Jump to content
  • 0

[Request] Teleport cost X item..


Question

Posted

Hi i will like to make a GK but for teleport player need a x item for can go to 1 specific zone, for ex if you wanna use a Rad teleport you need 40 GB, something like that.  ::)

1 answer to this question

Recommended Posts

  • 0
Posted

Search onBypassFeedback  method in L2NpcInstance

 

		else if (command.startsWith("RaidbossTele"))
		{
			if (player.getInventory().getInventoryItemCount(3470, 0) >= 40) //3470 = GB //40 = count
			{
				InventoryUpdate iu = new InventoryUpdate();
				player.getInventory().destroyItemByItemId("GB", 3470, 40, player, null);
				player.getInventory().updateDatabase();
				player.sendPacket(iu);
				player.teleToLocation(113508, -154161, -1534, true); //x,y,z
			}
			else
			{
				player.sendMessage("You do not meet the items requirement for teleport.");
				return;
			}
		}

 

Button:

 

<a action="bypass -h npc_%objectId%_RaidbossTele">Teleport</a>

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