Code:
function Item_Trigger(item, event, player)
Item_menu(item, player)
end
function Item_menu(item, player)
if (player:IsInCombat() == true) then
player:SendAreaTriggerMessage("Leave combat first!")
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 Towns", 2, 0)
item:GossipMenuAddItem(2, "Outland Locations", 4, 0)
item:GossipMenuAddItem(2, "Northrend Locations", 5, 0)
item:GossipMenuAddItem(2, "PVP Arenas", 6, 0)
item:GossipMenuAddItem(2, "Remove my Rez Sickness!", 7, 0)
item:GossipSendMenu(player)
else
item:GossipCreateMenu(3543, player, 0)
item:GossipMenuAddItem(2, "Horde Towns", 3, 0)
item:GossipMenuAddItem(2, "Outland Locations", 4, 0)
item:GossipMenuAddItem(2, "Northrend Locations", 5, 0)
item:GossipMenuAddItem(2, "PVP Arenas", 6, 0)
item:GossipMenuAddItem(2, "Remove my Rez Sickness!", 7, 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, "Alliance Mall", 44, 0)
item:GossipMenuAddItem(2, "[BACK]", 45, 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, "Horde Mall", 54, o)
item:GossipMenuAddItem(2, "[BACK]", 55, 0)
item:GossipSendMenu(player)
end
if (intid == 4) then
item:GossipCreateMenu(3543, player, 0)
item:GossipMenuAddItem(2, "Hellfire Peninsula", 61, 0)
item:GossipMenuAddItem(2, "Zangarmarsh", 62, 0)
item:GossipMenuAddItem(2, "Terokkar Forest", 63, 0)
item:GossipMenuAddItem(2, "Nagrand", 64, 0)
item:GossipMenuAddItem(2, "Blade's Edge Mountains", 65, 0)
item:GossipMenuAddItem(2, "Netherstorm", 66, 0)
item:GossipMenuAddItem(2, "Shadowmoon Valley", 67, 0)
item:GossipMenuAddItem(2, "[BACK]", 123, 0)
end
if (intid == 5) then
item:GossipCreateMenu(3543, player, 0)
item:GossipMenuAddItem(2, "Borean Tundra", 100, 0)
item:GossipMenuAddItem(2, "Howling Fjord", 150, 0)
item:GossipMenuAddItem(2, "Dragonblight", 200, 0)
item:GossipMenuAddItem(2, "Grizzly Hills", 250, 0)
item:GossipMenuAddItem(2, "Crystalsong Forest", 300, 0)
item:GossipMenuAddItem(2, "Zul'Drak", 350, 0)
item:GossipMenuAddItem(2, "Sholazar Basin", 400, 0)
item:GossipMenuAddItem(2, "The Storm Peaks", 450, 0)
item:GossipMenuAddItem(2, "Icecrown", 500, 0)
item:GossipMenuAddItem(2, "[BACK]", 123, 0)
end
if (intid == 6) then
item:GossipCreateMenu(3543, player, 0)
item:GossipMenuAddItem(2, "STV Arena [PVP]", 550, 0)
item:GossipMenuAddItem(2, "Emerald Arena [PVP]", 560, 0)
item:GossipMenuAddItem(2, "[BACK]", 123, 0)
end
if (intid == 7) then
player:RemoveAura(15007, 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
player:Teleport(1, -7446.93, -1692.15, 195)
end
if (intid == 45) then
item:GossipMenuAddItem(2, "Alliance Towns", 2, 0)
item:GossipMenuAddItem(2, "Outland Locations", 4, 0)
item:GossipMenuAddItem(2, "Northrend Locations", 5, 0)
item:GossipMenuAddItem(2, "PVP Arenas", 6, 0)
item:GossipMenuAddItem(2, "Remove my Rez Sickness!", 7, 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
player:Teleport(1, -6114.132324, -2434.407227, 48.246666)
end
if (intid == 55) then
item:GossipCreateMenu(3543, player, 0)
item:GossipMenuAddItem(2, "Horde Towns", 3, 0)
item:GossipMenuAddItem(2, "Outland Locations", 4, 0)
item:GossipMenuAddItem(2, "Northrend Locations", 5, 0)
item:GossipMenuAddItem(2, "PVP Arenas", 6, 0)
item:GossipMenuAddItem(2, "Remove my Rez Sickness!", 7, 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(0, -13249, 187.88, 31.38)
end
if (intid == 560) then
player:Teleport(571, 2841.275391, 103.384720, 918.109924)
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 Towns", 2, 0)
item:GossipMenuAddItem(2, "Outland Locations", 4, 0)
item:GossipMenuAddItem(2, "Northrend Locations", 5, 0)
item:GossipMenuAddItem(2, "Hydraxis Areas", 6, 0)
item:GossipMenuAddItem(2, "Remove my Rez Sickness!", 7, 0)
item:GossipSendMenu(player)
else
item:GossipCreateMenu(3543, player, 0)
item:GossipMenuAddItem(2, "Horde Towns", 3, 0)
item:GossipMenuAddItem(2, "Outland Locations", 4, 0)
item:GossipMenuAddItem(2, "Northrend Locations", 5, 0)
item:GossipMenuAddItem(2, "Hydraxis Areas", 6, 0)
item:GossipMenuAddItem(2, "Remove my Rez Sickness!", 7, 0)
item:GossipSendMenu(player)
end
end
RegisterItemGossipEvent(9550,1,"Item_Trigger")
RegisterItemGossipEvent(9550,2,"OnSelect")