Code:
function Item_OnClick(Item, Event, player)
Item:GossipCreateMenu(100, player, 0)
Item:GossipMenuAddItem(0, "Playertreff, 0, 0)
Item:GossipMenuAddItem(0, "Klassenlehrer, 1, 0)
Item:GossipMenuAddItem(0, "Frigor (Boss), 2, 0)
Item:GossipMenuAddItem(0, "Berufe, 3, 0)
Item:GossipMenuAddItem(0, "Events", 4, 0)
Item:GossipMenuAddItem(0, "LevelArena", 5, 0)
Item:GossipSendMenu(player)
end
function OnSubMenu(Item, Event, player, id, intid, code)
if (intid == 0) then
player:Teleport(mapid, x, y, z)
end
if (intid == 1) then
player:Teleport(mapid, x, y, z)
end
if (intid == 2) then
player:Teleport(mapid, x, y, z)
end
if (intid == 3) then
player:Teleport(mapid, x, y, z)
end
if (intid == 4) then
Item:GossipCreateMenu(200, player, 0)
Item:GossipMenuAddItem(0, "Menupoint 1, 10, 0)
Item:GossipMenuAddItem(0, "Menupoint 2, 11, 0)
Item:GossipMenuAddItem(0, "Menupoint 3, 12, 0)
Item:GossipMenuAddItem(0, "Menupoint 4, 13, 0)
Item:GossipSendMenu(player)
end
if (intid == 5) then
Item:GossipCreateMenu(300, player, 0)
Item:GossipMenuAddItem(0, "Menupoint 1, 20, 0)
Item:GossipMenuAddItem(0, "Menupoint 2, 21, 0)
Item:GossipMenuAddItem(0, "Menupoint 3, 22, 0)
Item:GossipMenuAddItem(0, "Menupoint 4, 23, 0)
Item:GossipMenuAddItem(0, "Menupoint 5, 24, 0)
Item:GossipMenuAddItem(0, "Menupoint 6, 25, 0)
Item:GossipSendMenu(player)
end
end
RegisterItemGossipEvent(6948, 1, "Item_OnClick")
RegisterItemGossipEvent(6948, 2, "OnSelect")