Hi all! So i find the code thx! But i have another problem Race for mount hyal event is not working i guess the problem must be here somewhere:
Code:
function RaceMenu(unit, player)
unit:GossipCreateMenu(100, player, 0)
unit:GossipMenuAddItem(4, "Join the Race for Mount Hyjal", 1, 0)
unit:GossipMenuAddItem(4, "I want to see the list of today's winners", 2, 0)
unit:GossipSendMenu(player)
end
function RaceSubMenu(unit, event, player, id, intid, code)
if(intid == 1) then
unit:RegisterEvent("EnterRace",10,1)
pMisc = player
player:GossipComplete()
end
---------
if(intid == 2) then
unit:GossipCreateMenu(99, player, 0)
if winnercount ~= 0 then
wnnrs = string.format("There are %s winners today: %s.", winnercount, winners)
unit:GossipMenuAddItem(5, wnnrs, 3, 0)
unit:GossipMenuAddItem(5, "[Back]", 50, 0)
else
unit:GossipMenuAddItem(5, "No-one has won yet today.", 3, 0)
unit:GossipMenuAddItem(5, "[Back]", 50, 0)
end
unit:GossipSendMenu(player)
end
---------
if(intid == 3) then
player:GossipComplete()
end
---------
if(intid == 50) then
RaceMenu(unit, player)
end
end
In the Game i don't see this line:
Code:
function RaceSubMenu(unit, event, player, id, intid, code)
if(intid == 1) then
unit:RegisterEvent("EnterRace",10,1)
pMisc = player
player:GossipComplete()
end
---------
And it doesn't teleport me to the exact location of the starting line.