scrubs Posted January 2, 2011 Posted January 2, 2011 Okay so I've read this http://www.maxcheaters.com/forum/index.php?topic=76205.0 share. It's for l2emu, so I tried to make it into my L2jserver (freya). Now I don't have L2PcInstance, instead it's named L2Player. Don't bother asking why. And mine looks like this: package com.l2jserver.gameserver.handler.voicedcommandhandlers; import com.l2jserver.gameserver.handler.IVoicedCommandHandler; import com.l2jserver.gameserver.model.actor.L2Player; import com.l2jserver.gameserver.model.base.Experience; public class delevel implements IVoicedCommandHandler { private static final String[] VOICED_COMMANDS = {"delevel"}; public boolean useVoicedCommand(String command, L2Player activeChar, String target) { if (command.equalsIgnoreCase("delevel")) { activeChar.destroyItemByItemId("Consume", 57, 1, activeChar, true); activeChar.getStat().removeExpAndSp((activeChar.getExp() - Experience.LEVEL[activeChar.getStat().getLevel() - 1]), 0); } return true; } public String[] getVoicedCommandList() { return VOICED_COMMANDS; } } When I add it in eclipse, it gives me 2 errors, and that's on: public class delevel implements IVoicedCommandHandler "The public type delevel must be defined in its own file" and public boolean useVoicedCommand(String command, L2Player activeChar, String target) "The return type is incompatible with IVoicedCommandHandler.useVoicedCommand(String, L2Player, String)" Can anyone give me a working code for this command, or just tell me simply how to do in this case? Thanks in advance!
0 Tryskell Posted January 2, 2011 Posted January 2, 2011 package handlers.voicedcommandhandlers; instead of package com.l2jserver.gameserver.handler.voicedcommandhandlers; The L2Emu code was from the era where handlers were in the core, and not separated in datapack. The L2Player thing remembers me Archid :D. Anyway, it is nothing related to your problem.
0 CriticalError Posted January 3, 2011 Posted January 3, 2011 well this maybe help you [Guide]Transformations Between the Chronicles: The basics.
Question
scrubs
Okay so I've read this http://www.maxcheaters.com/forum/index.php?topic=76205.0 share.
It's for l2emu, so I tried to make it into my L2jserver (freya).
Now I don't have L2PcInstance, instead it's named L2Player. Don't bother asking why.
And mine looks like this:
When I add it in eclipse, it gives me 2 errors, and that's on:
"The public type delevel must be defined in its own file"
and
"The return type is incompatible with IVoicedCommandHandler.useVoicedCommand(String, L2Player, String)"
Can anyone give me a working code for this command, or just tell me simply how to do in this case?
Thanks in advance!
3 answers to this question
Recommended Posts