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...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..