Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --When he's aggro'd
- function Angrond_OnCombat(pUnit, Event)
- pUnit:SendChatMessage(14, 0, "Only fools seek death!")
- pUnit:RegisterEvent(Angrond_Phase_One, 1000, 0)
- end
- -- When he dies
- function Angrond_OnDied(pUnit, Event)
- pUnit:SendChatMessage(14, 0, "I've got to run! NO! STAY AWAY FROM THE LIGHT!")
- pUnit:RemoveEvents()
- end
- -- When he kills a player
- function Angrond_OnKilledTarget(pUnit, Event)
- pUnit:SendChatMessage(14, 0, "Fall to the shadows!")
- pUnit:CastSpell(40318)
- end
- -- When he leaves combat (either players run or entire group wipes
- function Angrond_OnLeaveCombat(pUnit, Event)
- pUnit:SendChatMessage(14, 0, "The shadows have prevailed!")
- pUnit:RemoveEvents()
- end
- --Phase One
- function Angrond_Phase_One(pUnit, Event)
- if (pUnit:GetHealthPct() <= 50) then
- pUnit:RemoveEvents()
- pUnit:SendChatMessage(14, 0, "You're really starting to piss me off!")
- pUnit:RegisterEvent(Angrond_Final_Phase, 1000, 0)
- pUnit:CastSpell(40318)
- pUnit:CastSpell(40318)
- pUnit:CastSpell(40318)
- end
- end
- --3rd and final phase | no second phase exists?
- function Angrond_Final_Phase(pUnit, Event)
- if (pUnit:GetHealthPct() <= 30) then
- pUnit:RemoveEvents()
- pUnit:SendChatMessage(14, 0, "I can not fail! FELL THE SHADOWS!")
- pUnit:Root()
- pUnit:RegisterEvent(Angrond_Shadowbolt, 3000, 0) -- This will cast it once every three seconds, if he's a caster you'll want him to chain it so set it to 1100 miliseconds as the cast time is 1 sec.
- end
- end
- --[[ What is this? Why is this defined twice?
- function Angrond_Shadowbolt(pUnit, event)
- pUnit:CastSpell(101329)
- pUnit:RemoveEvents()
- end
- ]]
- function Angrond_Shadowbolt(pUnit, Event)
- pUnit:FullCastSpellOnTarget(39026, pUnit:GetRandomPlayer(0))
- end
- RegisterUnitEvent(88803, 1, Angrond_OnCombat)
- RegisterUnitEvent(88803, 2, Angrond_OnLeaveCombat)
- RegisterUnitEvent(88803, 3, Angrond_OnKilledTarget)
- RegisterUnitEvent(88803, 4, Angrond_OnDied)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement