Page 1 of 1

Gift_all for gracia final

Posted: Tue Feb 09, 2010 3:30 am
by Darkfeiter
hey all i found some scripts over give item target and so on but not found for give all

here a old code

Code: Select all

	private void giftItem(int id, int num)	{		for (L2PcInstance player : L2World.getInstance().getAllPlayers())		{		player.getInventory().addItem("Admin", id, num, player, null);		ItemList il = new ItemList(player, true);		player.sendPacket(il);		player.sendMessage("You earned " + num + " item(s) number " + id + " in your inventory.");	}
he get error at (L2PcInstance player : L2World.getInstance().getAllPlayers())

so what i have to do now ?

Re: Gift_all for gracia final

Posted: Tue Feb 09, 2010 7:10 am
by janiii
import the missing class. using eclipse, just make organize imports (ctrl+shift+o).

Re: Gift_all for gracia final

Posted: Tue Feb 09, 2010 7:17 am
by Gnacik
Try this patch:

http://www.pastebin.cz/31742

its for latest trunk, but you can apply code manualy. untested but should work without problems.