Okay a while back i made a teleporter with a password. Worked fine. I didnt attend the server for like a month and updated the revision and imported database changesets. The teleporter is now pretty much useless. The npc doesnt even open a gossip window. Other scripts ive used, for playing music etc. work fine but this one just wont anymore. i hope someone can help me.
Code:
function Teleporter1_OnGossip(Unit, Event, Player)
Unit:GossipCreateMenu(10000002, Player, 0)
Unit:GossipMenuAddItem(0, "----- ----- --- --- ----", 1, 1)
Unit:GossipSendMenu(Player)
end
function Teleporter1_OnSubMenu(Unit, Event, Player, id, intid, code)
if (intid == 1) then
if (code == "password") then
Player:Teleport(169,3434.65,3035.1,31.9966)
end
if (code ~= "password") then
Unit:SendChatMessage(12, 0, "Wrong password buddy!")
Player:Teleport(0,-11234.141602,-2833.264160,157.925125)
end
end
end
RegisterUnitGossipEvent(50000, 1, "Teleporter1_OnGossip")
RegisterUnitGossipEvent(50000, 2, "Teleporter1_OnSubMenu")