Jump to content
  • 0

Who Know Java Code Please


Question

Posted (edited)

Auto to Item anoigei me diplo click Einai to tutorial Guide

https://www.mediafire.com/view/ujdw12tvui8arfy/ffgg.png/file

 

Pws Mporw na to anoiksw oxi me diplo Click Alla me Voice Command???

Diladi na patisw .book kai na anoiksi Auto to tutorial Guide

 

--- dist/game/data/scripts/handlers/itemhandlers/AIOItem.java	(revision 0)
+++ dist/game/data/scripts/handlers/itemhandlers/AIOItem.java	(revision 0)
@@ -0,0 +1,58 @@

package handlers.itemhandlers;

import java.util.logging.Logger;

import com.l2jserver.gameserver.cache.HtmCache;
import com.l2jserver.gameserver.datatables.AIOItemTable;
import com.l2jserver.gameserver.handler.IItemHandler;
import com.l2jserver.gameserver.model.L2ItemInstance;
import com.l2jserver.gameserver.model.actor.L2Playable;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.network.serverpackets.NpcHtmlMessage;

/**
 * @author BiggBoss
 */
public class AIOItem implements IItemHandler 
{
	private static final Logger _log = Logger.getLogger(AIOItem.class.getName());
	
	@Override
	public void useItem(L2Playable playable, L2ItemInstance item, boolean forceUse) 
	{
		/*
		 * Null pointer check
		 */
		if(playable == null)
		{
			return;
		}
		/*
		 * Only players can use it
		 */
		if(playable instanceof L2PcInstance)
		{
			L2PcInstance player = (L2PcInstance)playable;
			
			/*
			 * Minumun requirements to use it
			 */
	if(!AIOItemTable.getInstance().checkPlayerConditions(player))
			{
				return;
			}
			
			String html = HtmCache.getInstance().getHtm(null, "data/html/aioitem/main.htm");
			
			if(html == null)
			{
				_log.severe("AIOItem: The main file [data/html/aioitem/main.htm] does not exist or is corrupted!");
				return;
			}
			
			NpcHtmlMessage msg = new NpcHtmlMessage(5);
			msg.setHtml(html);
			player.sendPacket(msg);
		}
	}
}

 

Edited by MegaCheat

1 answer to this question

Recommended Posts

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

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock