Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local NPC_ID = 70001
- function Flameh_CombatStart(pUnit, event)
- pUnit:RegisterEvent(Flameh_SpellHandler, 15000, 0)
- end
- function Flameh_SpellHandler(pUnit, event)
- local spellSelection = math.random(1, 3)
- if (spellSelection == 1) then
- pUnit:FullCastSpellOnTarget(75413, pUnit:GetRandomPlayer())
- end
- if (spellSelection == 2) then
- pUnit:FullCastSpellOnTarget(74527, pUnit:GetRandomPlayer())
- end
- if (spellSelection == 3) then
- pUnit:CastSpell(68335)
- end
- end
- function Flameh_LeaveCombat(pUnit, event)
- pUnit:RemoveEvents()
- end
- function Flameh_OnDied(pUnit, event)
- pUnit:RemoveEvents()
- end
- RegisterCreatureEvent(NPC_ID, 1, Flameh_CombatStart)
- RegisterCreatureEvent(NPC_ID, 2, Flameh_LeaveCombat)
- RegisterCreatureEvent(NPC_ID, 4, Flameh_OnDied)
Advertisement
Add Comment
Please, Sign In to add comment