Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[ Made by Ground Zero - EVENT-GM Script]--
- local Count = 0
- local Display = 11
- function Racer_pre(unit, event, player)
- if player:IsGm() == true then
- unit:GossipCreateMenu(23829, player, 0)
- unit:GossipMenuAddItem(0, "Line Up.", 216, 0)
- unit:GossipMenuAddItem(0, "Countdown.", 217, 0)
- unit:GossipMenuAddItem(0, "Finish Event", 218, 0)
- unit:GossipMenuAddItem(0, "(Only GM's can see this Menu)", 219, 0)
- unit:GossipMenuAddItem(0, "Nevermind", 219, 0)
- unit:GossipSendMenu(player)
- end
- end
- function Racer_Start(pUnit, event, player, id, intid, code)
- if(intid == 216) then
- pUnit:SendChatMessage(42, 0, "Will all Contestants please proceed and line up on the Starting line! Do not Move Until The Countdown has Completed!")
- pUnit:Emote(1, 5000)
- player:GossipComplete()
- end
- if(intid == 217) then
- Count = 1
- pUnit:SetNPCFlags(2)
- player:GossipComplete()
- end
- if (intid == 219) then
- player:GossipComplete()
- end
- if (intid == 218) then
- player:GossipComplete()
- local name = player:GetName()
- local PlayersAllAround = pUnit:GetInRangePlayers()
- for a, plr in pairs(PlayersAllAround) do
- plr:SetPlayerSpeed(7)
- plr:DeMorph()
- pUnit:SendChatMessage(42, 0, "<GM> "..name.." has ended the Event, Everyone has been demorphed and had their speed reset!")
- end
- end
- end
- function Racer_OnSpawn(pUnit, Event)
- pUnit:RegisterEvent("Lets_be_friends", 4000, 0)
- end
- RegisterUnitGossipEvent(YOURENTRYID, 1, "Racer_pre")
- RegisterUnitGossipEvent(YOURENTRYID, 2, "Racer_Start")
- RegisterUnitEvent(YOURENTRYID, 18, "Racer_OnSpawn")
- function Lets_be_friends(pUnit, Event)
- if Count == 1 then
- Count = 0
- pUnit:RegisterEvent("LetsCount", 1000, 11)
- pUnit:RegisterEvent("LetsCount_Reset", 12000, 1)
- end
- end
- function LetsCount(pUnit, Event)
- Display = Display - 1
- pUnit:SendChatMessage(42,0,""..Display.." seconds until the event starts!")
- end
- function LetsCount_Reset(pUnit, Event)
- Display = 0
- pUnit:SetNPCFlags(1)
- pUnit:SendChatMessage(42, 0, "Go Go!")
- pUnit:SendChatMessage(42, 0, "Go Go!")
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement