Forb: Все сообщения за 22 Августа 2005 года

 
ПнВтСрЧтПтСбВс
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31

Forb

новичок
я просто дял теста себе ткнул код вида

SignsSky ss = new SignsSky();

activeChar.sendPacket(ss);
 

Ну с ночью у меня получилось, а куда вот этот код ткнуть-то ? :D


SignsSky ss = new SignsSky();

activeChar.sendPacket(ss);
 

Forb

новичок
Не компилиться :(


Buildfile: build.xml

init:

compile:
[javac] Compiling 1 source file to D:LA2 Serverl2j.sfsvnServerL2_GameSe
rverbuildclasses
[javac] D:LA2 Serverl2j.sfsvnServerL2_GameServerjavanetsfl2jgamese
rverhandleradmincommandhandlersAdminInvul.java:54: cannot find symbol
[javac] symbol : class SignsSky
[javac] location: class net.sf.l2j.gameserver.handler.admincommandhandlers.A
dminInvul
[javac] SignsSky ss = new SignsSky();
[javac] ^
[javac] D:LA2 Serverl2j.sfsvnServerL2_GameServerjavanetsfl2jgamese
rverhandleradmincommandhandlersAdminInvul.java:54: cannot find symbol
[javac] symbol : class SignsSky
[javac] location: class net.sf.l2j.gameserver.handler.admincommandhandlers.A
dminInvul
[javac] SignsSky ss = new SignsSky();
[javac] ^
[javac] 2 errors

BUILD FAILED
D:LA2 Serverl2j.sfsvnServerL2_GameServerbuild.xml:62: Compile failed; see
the compiler error output for details.

Total time: 3 seconds


Вот мой AdminInvul


/*
  • This program is free software; you can redistribute it and/or modify
  • it under the terms of the GNU General Public License as published by
  • the Free Software Foundation; either version 2, or (at your option)
  • any later version.

*
  • This program is distributed in the hope that it will be useful,
  • but WITHOUT ANY WARRANTY; without even the implied warranty of
  • MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  • GNU General Public License for more details.

*
  • You should have received a copy of the GNU General Public License
  • along with this program; if not, write to the Free Software
  • Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  • 02111-1307, USA.

*

/
package net.sf.l2j.gameserver.handler.admincommandhandlers;

import java.util.logging.Logger;

import net.sf.l2j.Config;
import net.sf.l2j.gameserver.handler.IAdminCommandHandler;
import net.sf.l2j.gameserver.model.L2PcInstance;
import net.sf.l2j.gameserver.serverpackets.SystemMessage;

/*

  • This class handles following admin commands:
  • - invul = turns invulnerability on/off
  • @version $Revision: 1.2.4.4 $ $Date: 2005/04/11 10:06:02 $

*/
public class AdminInvul implements IAdminCommandHandler {
private static Logger _log = Logger.getLogger(AdminInvul.class.getName());
private static String[] _adminCommands = {"admin_invul"};
private static final int REQUIRED_LEVEL = Config.GM_GODMODE;

public boolean useAdminCommand(String command, L2PcInstance activeChar) {
if (!(checkLevel(activeChar.getAccessLevel()) && activeChar.isGM())) return false;
if (command.equals("admin_invul")) handleInvul(activeChar);
return true;
}

public String[] getAdminCommandList() {
return _adminCommands;
}

private boolean checkLevel(int level) {
return (level >= REQUIRED_LEVEL);
}

private void handleInvul(L2PcInstance activeChar) {
SignsSky ss = new SignsSky();
activeChar.sendPacket(ss);
if (activeChar.isInvul())
{
activeChar.setIsInvul(false);
String text = "Your status is set back to mortal.";
SystemMessage sm = new SystemMessage(614);
sm.addString(text);
activeChar.sendPacket(sm);
if (Config.DEBUG)
_log.fine("GM: Gm "+activeChar.getObjectId()+" removed invul mode from him.");
} else
{
activeChar.setIsInvul(true);
String text = "You are now Invulnerable";
SystemMessage sm = new SystemMessage(614);
sm.addString(text);
activeChar.sendPacket(sm);
if (Config.DEBUG)
_log.fine("GM: Gm "+activeChar.getObjectId()+" activated invul mode for him.");
}
}
}
 

в начало страницы | новое
 
Поиск
Настройки
Твиттер сайта
Статистика
Рейтинг@Mail.ru