geia :)
vrika sto forum ena npc opou boroun oi aploi char na milane sto hero chat alla 9eli item gia na milisoun..evala 500 adena alla den ta kanei destory otan milas mia fora..
alla vlepi ama exeis 500 adena gia na milisis dn s ta katastrefi ;$
else if(_command.startsWith("hmesit")){
String heroMessage = "";
int itemId = 57 , itemCount = 500;
StringTokenizer stringTokenizer = new StringTokenizer(_command);
stringTokenizer.nextToken();
while(stringTokenizer.hasMoreTokens())
heroMessage = heroMessage + stringTokenizer.nextToken() + " ";
if(heroMessage == "")
return;
if(heroMessage.length() >= 100)
{
activeChar.sendMessage("too much big");
return;
}
if(activeChar.getInventory().getItemByItemId(itemId) == null || activeChar.getInventory().getItemByItemId(itemId).getCount() < itemCount){
activeChar.sendMessage("You don't have enought items to use this npc instance");
return;
}
activeChar.getInventory().destroyItemByItemId("done", itemId, itemCount, activeChar, null);
for(L2PcInstance heroTakers : L2World.getInstance().getAllPlayers())
if(heroTakers != null)
heroTakers.sendPacket(new CreatureSay(activeChar.getObjectId(),Say2.HERO_VOICE,activeChar.getName(),heroMessage));
}
afto beni sto RequestBypassToServer.java
bori kapios na to epe3ergasti lg gia na katastrefete to item otan milaei meso tou NPC?