local npcid = NPC ID
function WarpNPC_OnGossipTalk(pUnit, event, player, pMisc)
if (player:IsInCombat() == true) then
player:SendAreaTriggerMessage("You are in combat!")
else
pUnit:GossipCreateMenu(3544, player, 0)
pUnit:GossipMenuAddItem(3, "Name of Menu", 1, 0)
pUnit:GossipMenuAddItem(3, "Name of Menu", 2, 0)
pUnit:GossipMenuAddItem(3, "Name of Menu", 3, 0)
pUnit:GossipSendMenu(player)
end
end
function WarpNPC_OnGossipSelect(pUnit, event, player, id, intid, code, pMisc)
if(intid == 999) then
pUnit:GossipCreateMenu(99, player, 0)
pUnit:GossipMenuAddItem(3, "", 1, 0)
pUnit:GossipMenuAddItem(3, "Name of Menu", 2, 0)
pUnit:GossipMenuAddItem(3, "Name of Menu", 3, 0)
pUnit:GossipSendMenu(player)
end
if(intid == 1) then
pUnit:GossipCreateMenu(99, player, 0)
pUnit:GossipMenuAddItem(3, "Sub Menu", 4, 0)
pUnit:GossipMenuAddItem(3, "Sub Menu", 5, 0)
pUnit:GossipMenuAddItem(0, "[Back]", 999, 0)
if(intid == 4) then
player:Teleport(Map, X, Y, Z)
pUnit:GossipComplete(player)
end
intid = 0
end
RegisterUnitGossipEvent(NPC ID, 1, "WarpNPC_OnGossipTalk")
RegisterUnitGossipEvent(NPC ID, 2, "WarpNPC_OnGossipSelect")
Fate salva con nome e salvatelo IN ciltuorepack\scripts e salvate cosi
Lua Teleporter.Lua