Code:
function On_Gossip(pUnit, event, player)
pUnit:GossipCreateMenu(100, player)
pUnit:GossipMenuAddItem(player, 0, "Horde Cities", 1, 0)
pUnit:GossipMenuAddItem(player, 0, "Alliance Cities", 2, 0)
pUnit:GossipSendMenu(player)
end
function Gossip_Submenus(pUnit, event, player, id, intid, code)
if(intid == 1) then
pUnit:GossipGossipMenuAddItem(99, player)
pUnit:GossipMenuAddItem(player, 5, "Orgrimmar", 10, 0)
pUnit:GossipMenuAddItem(player, 5, "Undercity", 11, 0)
pUnit:GossipMenuAddItem(player, 5, "Thunder Bluff", 12, 0)
pUnit:GossipMenuAddItem(player, 5, "Silvermoon", 13, 0)
pUnit:GossipMenuAddItem(player, 5, "[Back]", 50, 0)
pUnit:GossipSendMenu
end
if(intid == 2) then
pUnit:GossipCreateMenu(99, player)
pUnit:GossipMenuAddItem(player, 5, "Stormwind", 14, 0)
pUnit:GossipMenuAddItem(player, 5, "Ironforge", 15, 0)
pUnit:GossipMenuAddItem(player, 5, "Darnassus", 16, 0)
pUnit:GossipMenuAddItem(player, 5, "Exodar", 17, 0)
pUnit:GossipMenuAddItem(player, 5, "[Back]", 50, 0)
pUnit:MenuSendToPlayer(player)
end
if(intid == 10) then
player:Teleport(1, 1502.709961, -4415.419922, 21.552401)
end
if(intid == 11) then
player:Teleport(0, 1641.975708, 239.871552, 62.592873)
end
if(intid == 12) then
player:Teleport(1, -1278.849609, 126.752800, 131.329880)
end
if(intid == 13) then
player:Teleport(530, 9414.009766, -7278.341797, 14.201572)
end
if(intid == 14) then
player:Teleport(0, -8908.250000, 558.204956, 93.432388)
end
if(intid == 15) then
player:Teleport(0, -4925.266602, -951.037842, 501.551971)
end
if(intid == 16) then
player:Teleport(1, 9952.001953, 2280.712891, 1341.393921)
end
if(intid == 17) then
player:Teleport(530, -3992.824951, -11858.342773, 0.297733)
end
RegisterGossipEvent(200001, 1, "On_Gossip")
RegisterGossipEvent(200001, 2, "Gossip_Submenus")
this is my first real try at LUA so any help would be appreciated