Skip to content

Who Know Java Code Please

Featured Replies

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

  • 10 months later...
  • Author

!

Edited by MegaCheat

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.