Jump to content

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

0 answers to this question

Recommended Posts

There have been no answers to this question yet

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