Jump to content
  • 0

Auto equip



Hello cheaters, Well, I'm implementing my Capture the Flag (CTF) event, I want to put it on when a player picks up a flag and delivers the weapon he was equipped to return without needing to do it himself.


can you give me examples how can i do this? because I tried creating an array but it didn't work


if (_flags.keySet().contains(npc))
			if (getState() != EventState.RUNNING)
				return true;
			if (_flags.get(npc) == getTeam(player) && _flagWielders.values().contains(player))
				player.destroyItemByItemId("Event flag.", 6718, 1, null, false);
				announce(player.getName()+" has scored for "+_flags.get(npc).getName()+"!", false);
				increaseScore(player, 1);
				for (Npc flag : _flagWielders.keySet())
					if (_flagWielders.get(flag) == player)
						_removeFlags = flag;
				return true;
			if (_flags.get(npc) != getTeam(player) && !_flagWielders.keySet().contains(npc))
				ItemInstance flag = player.addItem("Event flag.", 6718, 1, null, false);
				player.useEquippableItem(flag, true);
				announce(player.getName()+" has got the "+_flags.get(npc).getName()+" flag!", false);
				player.broadcastPacket(new SocialAction(player, 16));
				_flagWielders.put(npc, player);
				return true;


Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

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

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock