Jump to content

Recommended Posts

  • 3 weeks later...
  • 2 months later...
Posted

yes.

 

check how voicedcommands works.

ok i will try it. somethig more.

i dont have this

gameserver.model.actor.instance.L2PlayableInstance;

so i will change it to something else?

or what?

 

here is all code

 

 

[/code]

package handlers.voicedcommandhandlers;


import com.l2jserver.Config;
import com.l2jserver.gameserver.handler.IItemHandler;
import com.l2jserver.gameserver.GameServer;
import com.l2jserver.gameserver.cache.HtmCache;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.network.serverpackets.NpcHtmlMessage;
import com.l2jserver.gameserver.handler.IItemHandler;
import com.l2jserver.gameserver.model.L2ItemInstance;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.actor.instance.L2PlayableInstance;






/**
* @author eSet
*
*/
public class AioItem implements IItemHandler
{
       private static final int[] ITEM_IDS = { 6673 };


       public void useItem(L2PlayableInstance playable, L2ItemInstance item)
    {
             if (!(playable instanceof L2PcInstance))
                return;
             L2PcInstance activeChar = (L2PcInstance)playable;
              int itemId = item.getItemId();
            
          if (itemId == 6673)
       {
               String htmFile = "data/html/mods/AioItem.htm";
               String htmContent = HtmCache.getInstance().getHtm(htmFile);


                       NpcHtmlMessage infoHtml = new NpcHtmlMessage(1);
                       infoHtml.setHtml(htmContent);
                       activeChar.sendPacket(infoHtml);
       }
    }


              


    public int[] getItemIds()
    {
       return ITEM_IDS;
    }
}  

  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...