Code:
function On_Gossip(unit, event, player)
unit:GossipCreateMenu(100, player, 0)
unit:GossipMenuAddItem(0,"Alliance Locations", 0, 0)
unit:GossipSendMenu(player)
end
function Gossip_Submenus(unit, event, player, id, intid, code)
if(intid == 0) then
unit:GossipCreateMenu(101, player, 0)
unit:GossipMenuAddItem(0,"Darnasuss", 50, 0)
unit:GossipMenuAddItem(0,"Ironforge", 51, 0)
unit:GossipMenuAddItem(0,"Stormwind", 52, 0)
unit:GossipMenuAddItem(0,"Exodar", 53, 0)
unit:GossipSendMenu(player)
end
if(intid == 50) then
player:Teleport(1, 9985.907227, 1971.155640, 1326.815674)
end
if(intid == 51) then
player:Teleport(0, -5028.265137, -825.976563, 495.301575)
end
if(intid == 52) then
player:Teleport(0, -9100.480469, 406.950745, 92.594185)
end
if(intid == 53) then
player:Teleport(530, -4072.202393, -12014.337891, -1.277277)
end
end
RegisterUnitGossipEvent(2, 1, "On_Gossip")
RegisterUnitGossipEvent(2, 2, "Gossip_Submenus")
I put this file into my scripts folder and i restarted my server. the npc wasnt even able to talk to! it wasnt before either actually. So anyway please can somebody tell me what im doing wrong and how to fix it? Also i think this server is definetely in need of a noobish guide for a teleporter npc including sql and lua setting up XD