kapoios na mou pei ti exw kanei la8os se afton ton code gt to psaxnw na dw ti la8os exw kanei apo tis 6 kai mou exei spasei ta nevra...einai apo to guide to Fanky..to pack pou xrisimopoiw einai aCis...den mou vgazei kapio error,apla den litourgei
Index: java/net/sf/l2j/gameserver/handler/itemhandlers/UnSponsored.java
===============================================================
package net.sf.l2j.gameserver.handler.itemhandlers;
import net.sf.l2j.Config;
import net.sf.l2j.gameserver.cache.HtmCache;
import net.sf.l2j.gameserver.handler.IItemHandler;
import net.sf.l2j.gameserver.model.L2ItemInstance;
import net.sf.l2j.gameserver.model.actor.L2Playable;
import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
import net.sf.l2j.gameserver.network.serverpackets.NpcHtmlMessage;
/**
* @author UnSponsored
*
*/
public class PopUpItem implements IItemHandler
{
private static final int[] ITEM_ID = { Config.AIO_ITEM_ID };
@Override
public void useItem(L2Playable playable, L2ItemInstance item, boolean forceUse)
{
if (!(playable instanceof L2PcInstance))
return;
L2PcInstance activeChar = (L2PcInstance)playable;
int itemId = item.getItemId();
if (itemId == Config.AIO_ITEM_ID)
{
String htmFile = "data/html/AIO/AIO.htm";
String htmContent = HtmCache.getInstance().getHtm(htmFile);
NpcHtmlMessage infoHtml = new NpcHtmlMessage(1);
infoHtml.setHtml(htmContent);
activeChar.sendPacket(infoHtml);
}
}
@Override
public int[] getItemIds()
{
// TODO Auto-generated method stub
return null;
}
/**
* @return the itemId
*/
public static int[] getItemId()
{
return ITEM_ID;
}
}
Index: config/player.properties
==============================================================
# % regeneration of normal regeneration speed
HpRegenMultiplier = 100
MpRegenMultiplier = 100
CpRegenMultiplier = 100
+# Aio Item Configuration
+# When ActiveChar will use this item a html will pop up
+# Id Itemn Need's
+AioItemId = 6673
# Player Protection after teleporting or login in seconds, 0 for disabled
PlayerSpawnProtection = 0
Index: java/net/sf/l2j/Config.java
==============================================================
public static boolean ALT_GAME_FREIGHTS;
public static int ALT_GAME_FREIGHT_PRICE;
+public static int AIO_ITEM_ID;
ALT_GAME_DELEVEL = Boolean.parseBoolean(players.getProperty("Delevel", "True"));
DEATH_PENALTY_CHANCE = Integer.parseInt(players.getProperty("DeathPenaltyChance", "20"));
+AIO_ITEM_ID = Integer.parseInt(players.getProperty("AioItemId", "6673"));
Index: java/net/sf/l2j/gameserver/handler/itemhandlers.java
=============================================================
import net.sf.l2j.gameserver.handler.itemhandlers.PetFood;
+import net.sf.l2j.gameserver.handler.itemhandlers.PopUpItem;
import net.sf.l2j.gameserver.handler.itemhandlers.Recipes;
registerItemHandler(new SummonItems());
registerItemHandler(new BeastSpice());
registerItemHandler(new Elixir());
+registerItemHandler(new PopUpItem());
Question
UnSponsored
kapoios na mou pei ti exw kanei la8os se afton ton code gt to psaxnw na dw ti la8os exw kanei apo tis 6 kai mou exei spasei ta nevra...einai apo to guide to Fanky..to pack pou xrisimopoiw einai aCis...den mou vgazei kapio error,apla den litourgei
Link to comment
Share on other sites
47 answers to this question
Recommended Posts