Jump to content
  • 0

[help] Request For Share


caramel

Question

I want this java code ---> http://www.maxcheaters.com/forum/index.php?topic=110074.0 <---

but this post is from  December 28 2009  :-[

who can give me them

 

sorry for my bad english..:(

 

 

thanks

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0

thats what you whant ?

couse in that post i dont see nothing else...

 

 private void giftItem(int id, int num)
	{
		for (L2PcInstance player : L2World.getInstance().getAllPlayers())
		{
			player.getInventory().destroyItem("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.");
		}
	} 

 

like this

Link to comment
Share on other sites

  • 0
import net.sf.l2j.gameserver.model.L2World;

	"admin_create_item",
+		"admin_mass_create"

else if (command.startsWith("admin_mass_create"))
	{
		try
		{
			String val = command.substring(17);
			StringTokenizer st = new StringTokenizer(val);
			if (st.countTokens()== 2)
			{
				String id = st.nextToken();
				int idval = Integer.parseInt(id);
				String num = st.nextToken();
				int numval = Integer.parseInt(num);
				massCreate(activeChar,idval,numval);
			}
			else if (st.countTokens()== 1)
			{
				String id = st.nextToken();
				int idval = Integer.parseInt(id);
				massCreate(activeChar,idval,1);
			}
		}
		catch (StringIndexOutOfBoundsException e)
		{
			activeChar.sendMessage("Usage: //itemcreate <itemId> [amount]");
		}
		catch (NumberFormatException nfe)
		{
			activeChar.sendMessage("Specify a valid number.");
		}
	}

private void massCreate(L2PcInstance activeChar, int id, int num)
{
	 for (L2PcInstance _players : L2World.getInstance().getAllPlayers())
	 {
		 if (_players == activeChar) continue;
		 _players.getInventory().addItem("Admin", id, num, _players, null);

		 ItemList il = new ItemList(_players, true);
		 _players.sendPacket(il);
	 }

	activeChar.sendMessage("You have spawned " + num + " item(s) number " + id + " in all chars inventory.");
}

Link to comment
Share on other sites

  • 0

import net.sf.l2j.gameserver.model.L2World;

	"admin_create_item",
+		"admin_mass_create"

else if (command.startsWith("admin_mass_create"))
	{
		try
		{
			String val = command.substring(17);
			StringTokenizer st = new StringTokenizer(val);
			if (st.countTokens()== 2)
			{
				String id = st.nextToken();
				int idval = Integer.parseInt(id);
				String num = st.nextToken();
				int numval = Integer.parseInt(num);
				massCreate(activeChar,idval,numval);
			}
			else if (st.countTokens()== 1)
			{
				String id = st.nextToken();
				int idval = Integer.parseInt(id);
				massCreate(activeChar,idval,1);
			}
		}
		catch (StringIndexOutOfBoundsException e)
		{
			activeChar.sendMessage("Usage: //itemcreate <itemId> [amount]");
		}
		catch (NumberFormatException nfe)
		{
			activeChar.sendMessage("Specify a valid number.");
		}
	}

private void massCreate(L2PcInstance activeChar, int id, int num)
{
	 for (L2PcInstance _players : L2World.getInstance().getAllPlayers())
	 {
		 if (_players == activeChar) continue;
		 _players.getInventory().addItem("Admin", id, num, _players, null);

		 ItemList il = new ItemList(_players, true);
		 _players.sendPacket(il);
	 }

	activeChar.sendMessage("You have spawned " + num + " item(s) number " + id + " in all chars inventory.");
}

 

i add this code at l2world.java right?

Link to comment
Share on other sites

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