Advertisement
Guest User

Untitled

a guest
Feb 16th, 2019
255
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.44 KB | None | 0 0
  1. public void useItem(L2Playable playable, L2ItemInstance item)
  2. {
  3.     L2PcInstance activeChar = (L2PcInstance) playable;
  4.  
  5.     switch (item.getItemId())
  6.     {
  7. case itemid:
  8.         if (activeChar.isHero()) {
  9.          activeChar.sendMessage("You are already a hero!");
  10.          return;
  11.         }
  12.        
  13.         activeChar.setHero(true);
  14.          activeChar.sendMessage("You have hero status, util you log out!");
  15.         activeChar.destroyItem("Consume", itemId, 1, activeChar, true);
  16.         break;
  17. }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement