Jump to content
  • 0

Wha't wrong?


Question

Posted

Who can help with Balloni code http://www.maxcheaters.com/forum/index.php?topic=47545.0  When I try click on item I get this error.

http://img145.imageshack.us/img145/9567/notwork.jpg

Watch codes sets in right places.

http://img145.imageshack.us/i/balloni.jpg/     Balloni.htm I changet in this photo.

http://img691.imageshack.us/i/50694730.jpg/

Please help me.If have working code please share or write comment how to repair this error.

Recommended Posts

  • 0
Posted

dont open 2 topic for the same thing the rules allow you to bump your own topic in every 12hour.

 

it shows an NPE for the htmlmessage add a check for the html file

  • 0
Posted

package com.l2jfree.gameserver.handler.itemhandlers;

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



/**
* @author Cobra
*
*/
public class Balloni implements IItemHandler
{
private static final int[] ITEM_IDS = { 10639 };

public void useItem(L2PlayableInstance playable, L2ItemInstance item)
    {
      if (!(playable instanceof L2PcInstance))
         return;
      L2PcInstance activeChar = (L2PcInstance)playable;
       int itemId = item.getItemId();
      
   if (itemId == 10639)
       {
	String htmFile = "data/html/Teleport/Balloni.htm";
	String htmContent = HtmCache.getInstance().getHtm(htmFile);
	if (htmContent != null)
	{
		NpcHtmlMessage infoHtml = new NpcHtmlMessage(1);
		infoHtml.setHtml(htmContent);
		activeChar.sendPacket(infoHtml);
	}
	else
		activeChar.sendMessage("omg lame error! where is " + htmFile + " ! blame the Server Admin");
       }
    }



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

 

it was easy thats why i like these forks it brings more and more 0 knowledge ppl great

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
Answer this question...

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