Hi my issue lies in a teleport npc. I have a working script and it has no problems for me but what i want to do is change it so when a player clicks to teleport he must enter a password.
This is the teleporters lua
Now i know that changing the 0 at the end of this line to 1 or 3 gives u an input box ingame... but how do i get the value which the player inputs to see if it matches the password i allow teleporting with.Code:local intSay = 0 function Teleporter1_OnGossip(Unit, Event, Player) if (intSay == 0) then Unit:SendChatMessage(12, 0, "Teleport away!") intSay = intSay + 1 end Unit:GossipCreateMenu(100, Player, 0) Unit:GossipMenuAddItem(0, "Click here to teleport away from here.", 1, 0) Unit:GossipSendMenu(Player) end function Teleporter1_OnSubMenu(Unit, Event, Player, id, intid, code) if (intid == "1") then Player:Teleport(169,3434.65,3035.1,31.9966) end end RegisterUnitGossipEvent(310075, 1, "Teleporter1_OnGossip") RegisterUnitGossipEvent(310075, 2, "Teleporter1_OnSubMenu")
Code:Unit:GossipMenuAddItem(0, "Click here to teleport away from here.", 1, 0)





Reply With Quote


