hrsgeorgiev

Untitled

Nov 28th, 2024
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. package com.l2emu.gameserver.handler.voicedcommandhandlers;
  2.  
  3. import com.l2emu.gameserver.handler.IVoicedCommandHandler;
  4. import com.l2emu.gameserver.model.actor.instance.L2PcInstance;
  5. import com.l2emu.gameserver.model.base.Experience;
  6.  
  7. /**
  8. @author Intrepid
  9. */
  10. public class delevel implements IVoicedCommandHandler
  11. {
  12. private static final String[] VOICED_COMMANDS = {"delevel"};
  13.  
  14. public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target)
  15. {
  16. if (command.equalsIgnoreCase("delevel"))
  17. {
  18. activeChar.destroyItemByItemId("Consume", 57, 10000000, activeChar, true);
  19. activeChar.getStat().removeExpAndSp((activeChar.getExp() - Experience.LEVEL[activeChar.getStat().getLevel() - 1]), 0);
  20. }
  21. return true;
  22.  
  23. }
  24. public String[] getVoicedCommandList()
  25. {
  26. return VOICED_COMMANDS;
  27. }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment