Code:
local ncpid = 959591
function Tele_Start(pUnit, event, player)
if (player:IsInCombat() == true) then
player:SendAreaTriggerMessage("You are currently in combat.")
else
Tele_OnGossipTalk(pUnit, event, player, pMisc)
end
function Tele_OnGossipTalk(pUnit, event, player, pMisc)
player:GetPlayerFaction()
pUnit:GossipCreateMenu(100, player, 0)
pUnit:GossipMenuAddItem(0,"Instances", 1, 0)
pUnit:GossipMenuAddItem(0,"Arenas", 2, 0)
pUnit:GossipMenuAddItem(0,"Event Zones", 3, 0)
if player:GetPlayerFaction() == 0 then
pUnit:GossipMenuAddItem(0,"Horde Mall", 80, 0)
elseif player:GetPlayerFaction() == 1 then
pUnit:GossipMenuAddItem(0,"Alliance Mall", 90, 0)
pUnit:GossipSendMenu(player)
end
end
function Tele_OnGossipSelect(pUnit, event, player, id, intid, code, pMisc)
if(intid == 1) then
pUnit:GossipCreateMenu(100, player, 0)
pUnit:GossipMenuAddItem(0,"Bridge of Souls", 50, 0)
pUnit:GossipSendMenu(player)
end
if(intid == 2) then
pUnit:GossipCreateMenu(100, player, 0)
pUnit:GossipMenuAddItem(0,"Pvp Arena", 60, 0)
pUnit:GossipMenuAddItem(0,"The Maul", 61, 0)
pUnit:GossipMenuAddItem(0,"Arena floor", 62, 0)
pUnit:GossipMenuAddItem(0,"Circle of blood", 63, 0)
pUnit:GossipSendMenu(player)
end
if(intid == 3) then
pUnit:GossipCreateMenu(100, player, 0)
pUnit:GossipMenuAddItem(0,"Stormwind", 70, 0)
pUnit:GossipSendMenu(player)
end
if(intid == 50) then
player:Teleport(530, -3361.398193, 5194.372070, -101.048965)
end
if(intid == 60) then
player:Teleport(1, 4598.74, -4592.56, 885.70)
end
if(intid == 61) then
player:Teleport(1, -3738.57, 1093.54, 131.96)
end
if(intid == 62) then
player:Teleport(530, -2039.733, 6657.005, 13.051)
end
if(intid == 63) then
player:Teleport(530, 2837.33, 5928.33, 11.129)
end
if(intid == 70) then
player:Teleport(0, -9092.272, 396.938, 93.219)
end
if(intid == 80) then
player:Teleport(450, 243.174, 84.988, 25.807)
end
if(intid == 90) then
player:Teleport(449, -0.157, 30.251, 2.429)
end
end
RegisterUnitGossipEvent(npcid, 1, "Tele_Start")
RegisterUnitGossipEvent(npcid, 2, "Tele_OnGossipSelect")