Code:
function Item_Trigger(item, event, player)
Item_menu(item, player)
end
function Item_menu(item, player)
if (player:IsInCombat() == true) then
player:SendAreaTriggerMessage("You are in combat, sucker")
else
item:GossipCreateMenu(3543, player, 0)
local race=player:GetPlayerRace()
if race==1 or race==3 or race==4 or race==7 or race==11 then
item:GossipMenuAddItem(2, "Alliance Cities", 2, 0)
item:GossipMenuAddItem(2, "Outland Locations", 4, 0)
item:GossipMenuAddItem(2, "Northrend locations", 5, 0)
item:GossipMenuAddItem(2, "Buff me", 6, 0)
item:GossipSendMenu(player)
else
item:GossipCreateMenu(3543, player, 0)
item:GossipMenuAddItem(2, "Horde Cities", 3, 0)
item:GossipMenuAddItem(2, "Outland Locations", 4, 0)
item:GossipMenuAddItem(2, "Northrend locations", 5, 0)
item:GossipMenuAddItem(2, "Buff me", 3, 0)
item:GossipSendMenu(player)
end
end
end
function OnSelect(item, event, player, id, intid, code)
if (intid == 2) then
item:GossipCreateMenu(3543, player, 0)
item:GossipMenuAddItem(2, "Stormwind", 40, 0)
item:GossipMenuAddItem(2, "Ironforge", 41, 0)
item:GossipMenuAddItem(2, "Darnassus", 42, 0)
item:GossipMenuAddItem(2, "The Exodar", 43, 0)
item:GossipMenuAddItem(2, "[BACK]", 44, 0)
item:GossipSendMenu(player)
end
if (intid == 3) then
item:GossipCreateMenu(3543, player, 0)
item:GossipMenuAddItem(2, "Orgrimmar", 50, 0)
item:GossipMenuAddItem(2, "Thunder Bluff", 51, 0)
item:GossipMenuAddItem(2, "Undercity", 52, 0)
item:GossipMenuAddItem(2, "Silvermoon", 53, 0)
item:GossipMenuAddItem(2, "[BACK]", 54, 0)
item:GossipSendMenu(player)
end
if (intid == 4) then
item:GossipCreateMenu(3543, player, 0)
item:GossipMenuAddItem(2, "Hellfire Peninsula [58-63]", 61, 0)
item:GossipMenuAddItem(2, "Zangarmarsh [60-64]", 62, 0)
item:GossipMenuAddItem(2, "Terokkar Forest [62-65]", 63, 0)
item:GossipMenuAddItem(2, "Nagrand [64-67]", 64, 0)
item:GossipMenuAddItem(2, "Blade's Edge Mountains [65-68]", 65, 0)
item:GossipMenuAddItem(2, "Netherstorm [67-70]", 66, 0)
item:GossipMenuAddItem(2, "Shadowmoon Valley [67-70]", 67, 0)
item:GossipMenuAddItem(2, "[BACK]", 123, 0)
end
if (intid == 5) then
item:GossipCreateMenu(3543, player, 0)
item:GossipMenuAddItem(2, "Borean Tundra [68-72]", 100, 0)
item:GossipMenuAddItem(2, "Howling Fjord [68-72]", 150, 0)
item:GossipMenuAddItem(2, "Dragonblight [71-74]", 200, 0)
item:GossipMenuAddItem(2, "Grizzly Hills [73-75]", 250, 0)
item:GossipMenuAddItem(2, "Crystalsong Forest [74-76]", 300, 0)
item:GossipMenuAddItem(2, "Zul'Drak [74-77]", 350, 0)
item:GossipMenuAddItem(2, "Sholazar Basin [75-78]", 400, 0)
item:GossipMenuAddItem(2, "The Storm Peaks [76-80]", 450, 0)
item:GossipMenuAddItem(2, "Icecrown [77-80]", 500, 0)
item:GossipMenuAddItem(2, "Wintergrasp [PVP]", 550, 0)
item:GossipMenuAddItem(2, "[BACK]", 123, 0)
end
if (intid == 6) then
player:FullCastSpellOnTarget(16609,player)
end
if (intid == 40) then
player:Teleport(0, -8913, 555, 95)
end
if (intid == 41) then
player:Teleport(0, -4981, -882, 503)
end
if (intid == 42) then
player:Teleport(1, 8796, 969, 31)
end
if (intid == 43) then
player:Teleport(530, -4014, -11897, -2)
end
if (intid == 44) then
item:GossipCreateMenu(3543, player, 0)
item:GossipMenuAddItem(2, "Alliance Cities", 2, 0)
item:GossipMenuAddItem(2, "Outland Locations", 4, 0)
item:GossipMenuAddItem(2, "Northrend locations", 5, 0)
item:GossipMenuAddItem(2, "Buff me", 6, 0)
item:GossipSendMenu(player)
end
if (intid == 50) then
player:Teleport(1, 1503, -4415, 23)
end
if (intid == 51) then
player:Teleport(1, -1285, 177, 131)
end
if (intid == 52) then
player:Teleport(0, 1831, 239, 62)
end
if (intid == 53) then
player:Teleport(530, 9414, -7279, 15)
end
if (intid == 54) then
item:GossipCreateMenu(3543, player, 0)
item:GossipMenuAddItem(2, "Horde Cities", 3, 0)
item:GossipMenuAddItem(2, "Outland Locations", 4, 0)
item:GossipMenuAddItem(2, "Northrend locations", 5, 0)
item:GossipMenuAddItem(2, "Buff me", 3, 0)
item:GossipSendMenu(player)
end
if (intid == 61) then
player:Teleport(530, -247, 941, 85)
end
if (intid == 62) then
player:Teleport(530, 30, 6983, 150)
end
if (intid == 63) then
player:Teleport(530, -1177, 5336, 31)
end
if (intid == 64) then
player:Teleport(530, -526, 8440, 48)
end
if (intid == 65) then
player:Teleport(530, 1114, 7091, 124)
end
if (intid == 66) then
player:Teleport(530, 2281, 2521, 116)
end
if (intid == 67) then
player:Teleport(530, -3081, 2567, 63)
end
if (intid == 100) then
player:Teleport(571, 3452, 3836, 29)
end
if (intid == 150) then
player:Teleport(571, 592, -5095, 6)
end
if (intid == 200) then
player:Teleport(571, 3577, 656, 77)
end
if (intid == 250) then
player:Teleport(571, 2767, -2889, 64)
end
if (intid == 300) then
player:Teleport(571, 5398, -743, 163)
end
if (intid == 350) then
player:Teleport(571, 5449, -1442, 248)
end
if (intit == 400) then
player:Teleport(571, 6516, 4824, -55)
end
if (intid == 450) then
player:Teleport(571, 7343, -927, 910)
end
if (intid == 500) then
player:Teleport(571, 6434, 1151, 283)
end
if (intid == 550) then
player:Teleport(571, 4717, 2420, 3462)
end
if (intid == 123) then
item:GossipCreateMenu(3543, player, 0)
end
local race=player:GetPlayerRace()
if race==1 or race==3 or race==4 or race==7 or race==11 then
item:GossipMenuAddItem(2, "Alliance Cities", 2, 0)
item:GossipMenuAddItem(2, "Outland Locations", 4, 0)
item:GossipMenuAddItem(2, "Northrend locations", 5, 0)
item:GossipMenuAddItem(2, "Buff me", 6, 0)
item:GossipSendMenu(player)
else
item:GossipCreateMenu(3543, player, 0)
item:GossipMenuAddItem(2, "Horde Cities", 3, 0)
item:GossipMenuAddItem(2, "Outland Locations", 4, 0)
item:GossipMenuAddItem(2, "Northrend locations", 5, 0)
item:GossipMenuAddItem(2, "Buff me", 3, 0)
item:GossipSendMenu(player)
end
end
RegisterItemGossipEvent(69480,1,"Item_Trigger")
RegisterItemGossipEvent(69480,2,"OnSelect")
and name it Teleporter.lua (Make sure when your saving it you click the drop down menu for files and click All files,