function Teleport_menu(pUnit, Event, player) -- added the word event works now
pUnit:GossipCreateMenu(100, player, 0)
pUnit:GossipMenuAddItem(0, "Do you wanna teleport", 1, 0)
pUnit:GossipMenuAddItem(0, "No Thanks", 2, 0)
pUnit:GossipSendMenu(player)
-- end delete this end too many ends lol
end
function Teleport_on_gossip_select(pUnit, event, player, id, intid, code, pMisc)
if(intid == 1) then
player:Teleport(0, -8924.706055, 545.626953, 96.633163) --Stormwind at the moment but enter your own coords here
end
if(intid == 2) then
player:GossipComplete()
end
end
RegisterUnitGossipEvent(NPC_ID_HERE, 1, "Teleport_menu")
RegisterUnitGossipEvent(NPC_ID_HERE, 2, "Teleport_on_gossip_select")
Bookmarks