Hello Guys, and thank you for taking your time to help me
I just started to mess around with lua... taking tut and what not. Everything is goin well but then when I try to use my teleporter, it does not work.
Here is a picture of what it looks like
Here is my script
Code:
-- Variables
local NPC_ID = 900001
-- On Triggers
function exampleGossipOnTalk(Unit, Event, player)
Unit:GossipCreateMenu(100, player, 0)
Unit:GossipMenuAddItem(0, "Teleport me to the mall.", 1, 0)
Unit:GossipMenuAddItem(0, "Remove Resurrection Sickness.", 2, 0)
Unit:GossipMenuAddItem(0, "Never mind.", 3, 0)
Unit:GossipSendMenu(player)
end
function exampleGossipOnSelect(Unit, Event, player, id, intid, code, pMisc)
if (intid == 1) then
player:Teleport(1, -9101.980469, 1612.902832, 21)
player:GossipComplete()
end
if (intid == 2) then
if (player:HasAura(15007) == true) then
player:SendBroadcastMessage("Resurrection Sickness has been removed. Be careful next time!")
player:RemoveAura(15007)
player:GossipComplete()
else
player:SendBroadcastMessage("You do not have Resurrection Sickness!")
player:GossipComplete()
end
end
if (intid == 3) then
player:GossipComplete()
end
end
-- RegisterUnitEvents
RegisterUnitGossipEvent(900001, 1, "exampleGossipOnTalk")
RegisterUnitGossipEvent(900001, 2, "exampleGossipOnSelect")
Thanks for the help..