Code:
local npcid = 939373
local npcidtwo = 99901
print (" - ")
print (" This Script was made by P1raten. ")
print (" Report bugs to mmowned.com ")
print (" - ")
function ggStart_OnGossipTalk(pUnit, event, player, pMisc)
pUnit:GossipCreateMenu(6031, player, 0)
pUnit:GossipMenuAddItem(9, "Start tour.", 1, 0)
pUnit:GossipMenuAddItem(0, "I dont need a guide.", 2, 0)
pUnit:GossipSendMenu(player)
end
function ggStart_OnGossipSelect(pUnit, event, player, id, intid, code, pMisc)
if (intid == 1) then
pUnit:SendBroadcastMessage("Welcome to DifferentWoW.")
pUnit:CastSpell(35341)
x = pUnit:GetX();
y = pUnit:GetY();
z = pUnit:GetZ();
o = pUnit:GetO();
pUnit:SpawnCreature(99901, x, y, z, o, 35, 0);
pUnit:GossipComplete(player)
end
if (intid == 2) then
pUnit:GossipComplete(player)
player:SendBroadcastMessage("Fine.")
end
end
RegisterUnitGossipEvent(npcid, 1, "ggStart_OnGossipTalk")
RegisterUnitGossipEvent(npcid, 2, "ggStart_OnGossipSelect")
Code:
function agggGuide_OnGossipTalk(pUnit, event, player, pMisc)
pUnit:GossipCreateMenu(5015, player, 0)
pUnit:GossipMenuAddItem(9, "Lets Go.", 3, 0)
pUnit:GossipMenuAddItem(1, "Do nothing.", 4, 0)
pUnit:GossipSendMenu(player)
end
function agggStart_OnGossipSelect(pUnit, event, player, id, intid, code, pMisc)
if (intid == 3) then
pUnit:SendBroadcastMessage("Let's go then.")
pUnit:MoveTo(1874.164917, 238.025650, 62.275116, 0.007061)
pUnit:GossipComplete(player)
end
if (intid == 4) then
pUnit:GossipComplete(player)
end
end
RegisterUnitGossipEvent(npcidtwo, 3, "agggGuide_OnGossipTalk") -- changed
RegisterUnitGossipEvent(npcidtwo, 4, "agggGuide_OnGossipSelect")
Fixed up loads of bugs, you had start when you registered talk, and each gossip create has to be a different id.
SendChatMessage syntex is wrong, i've changed it to broadcast as that should work. pUnit:SendChatMessage(12,0,"") or something for the other one.
The one posted above me wont work i'm afraid (sorry).