Code:
local itemid = 92340
function Item_Trigger(item, event, player)
Item_menu(item, player)
end
function Item_menu(item, player)
if (player:IsInCombat() == true) then
player:SendAreaTriggerMessage("Das geht im Kampf nicht, Mann!")
else
item:GossipCreateMenu(3543, player, 0)
item:GossipMenuAddItem(4, "Playertreff", 50, 0)
item:GossipMenuAddItem(4, "Donnerfels", 22, 0)
item:GossipMenuAddItem(4, "Silbermond", 23, 0)
item:GossipMenuAddItem(4, "Sturmwind", 24, 0)
item:GossipMenuAddItem(4, "Darnassus", 25, 0)
item:GossipMenuAddItem(4, "Eisenschmiede", 26, 0)
item:GossipMenuAddItem(4, "Die Exodar", 27, 0)
item:GossipMenuAddItem(4, "Orgrimmar", 28, 0)
item:GossipMenuAddItem(4, "Unterstadt", 29, 0)
item:GossipMenuAddItem(4, "Tier 8 Instanz", 30, 0)
item:GossipSendMenu(player)
end
end
function OnSelect(item, event, player, id, intid, code)
if (intid == 21) then
player:Teleport(1, 5137.83, -2357.04, 1418.38)
player:GossipComplete()
end
if (intid == 22) then
player:Teleport(1, -1278.849609, 126.752800, 131.329880)
player:GossipComplete()
end
if (intid == 23) then
player:Teleport(530, 9414.009766, -7278.341797, 14.201572)
player:GossipComplete()
end
if (intid == 24) then
player:Teleport(0, -8908.250000, 558.204956, 93.432388)
player:GossipComplete()
end
if (intid == 25) then
player:Teleport(1, 9952.001953, 2280.712891, 1341.393921)
player:GossipComplete()
end
if (intid == 26) then
player:Teleport(0, -4925.266602, -951.037842, 501.551971)
player:GossipComplete()
end
if (intid == 27) then
player:Teleport(530, -3992.824951, -11858.342773, 0.297733)
player:GossipComplete()
end
if (intid == 28) then
player:Teleport(1, 1502.709961, -4415.419922, 21.552456)
player:GossipComplete()
end
if (intid == 29) then
player:Teleport(0, 1831.260010, 238.529999, 60.520748)
player:GossipComplete()
end
if (intid == 30) then
player:Teleport( 0, -8779.369141, 834.499695, 94.488205)
player:GossipComplete()
end
if (intid == 50) then
player:Teleport(1, 1939.879272, 1979.603760, 131.407211)
player:GossipComplete()
end
if (intid == 1000) then
local prace = player:GetPlayerRace()
item:GossipCreateMenu(3543, player, 0)
if ( race[prace] == 1 ) then
item:GossipMenuAddItem(0, "Deff", 10, 0)
end
if ( race[prace] == 2) then
item:GossipMenuAddItem(0, "Deff", 11, 0)
end
item:GossipMenuAddItem(4, "Deff", 50, 0)
item:GossipMenuAddItem(4, "Deff", 1, 0)
item:GossipSendMenu(player)
end
end
RegisterItemGossipEvent(itemid,1,"Item_Trigger")
RegisterItemGossipEvent(itemid,2,"OnSelect")
is there an error?