SHOW:
|
|
- or go back to the newest paste.
| 1 | - | --When he's aggro'd |
| 1 | + | |
| 2 | pUnit:SendChatMessage(14, 0, "Only fools seek death!") | |
| 3 | pUnit:RegisterEvent(Angrond_Phase_One, 5000, 0) | |
| 4 | - | pUnit:RegisterEvent(Angrond_Phase_One, 1000, 0) |
| 4 | + | |
| 5 | ||
| 6 | function Angrond_OnDied(pUnit, Event) | |
| 7 | - | -- When he dies |
| 7 | + | |
| 8 | pUnit:RemoveEvents() | |
| 9 | end | |
| 10 | ||
| 11 | function Angrond_OnKilledTarget(pUnit, Event) | |
| 12 | pUnit:SendChatMessage(14, 0, "Fall to the shadows!") | |
| 13 | - | -- When he kills a player |
| 13 | + | |
| 14 | end | |
| 15 | ||
| 16 | function Angrond_OnLeaveCombat(pUnit, Event) | |
| 17 | pUnit:SendChatMessage(14, 0, "The shadows have prevailed!") | |
| 18 | pUnit:RemoveEvents() | |
| 19 | - | -- When he leaves combat (either players run or entire group wipes |
| 19 | + | |
| 20 | ||
| 21 | function Angrond_Phase_One(pUnit, Event) | |
| 22 | if (pUnit:GetHealthPct() <= 50) then | |
| 23 | pUnit:RemoveEvents() | |
| 24 | - | |
| 24 | + | |
| 25 | - | --Phase One |
| 25 | + | pUnit:RegisterEvent(Angrond_Phase_Two, 5000, 0) |
| 26 | pUnit:CastSpell(40318) | |
| 27 | pUnit:CastSpell(40318) | |
| 28 | pUnit:CastSpell(40318) | |
| 29 | end | |
| 30 | - | pUnit:RegisterEvent(Angrond_Final_Phase, 1000, 0) |
| 30 | + | |
| 31 | ||
| 32 | function Angrond_Phase_Two(pUnit, Event) | |
| 33 | if (pUnit:GetHealthPct() <= 30) then | |
| 34 | pUnit:RemoveEvents() | |
| 35 | pUnit:SendChatMessage(14, 0, "I can not fail! FELL THE SHADOWS!") | |
| 36 | pUnit:Root() | |
| 37 | - | --3rd and final phase | no second phase exists? |
| 37 | + | for i = 1, 5 do |
| 38 | - | function Angrond_Final_Phase(pUnit, Event) |
| 38 | + | pUnit:CastSpell(101329) |
| 39 | end | |
| 40 | pUnit:RegisterEvent(Angrond_Phase_Three, 5000, 0) | |
| 41 | end | |
| 42 | - | pUnit:Root() |
| 42 | + | |
| 43 | - | 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. |
| 43 | + | |
| 44 | function Angrond_Phase_Three(pUnit, Event) | |
| 45 | if(pUnit:GetHealthPct() <= 20) then | |
| 46 | pUnit:RemoveEvents() | |
| 47 | - | --[[ What is this? Why is this defined twice? |
| 47 | + | pUnit:RegisterEvent(Angrond_Shadowbolt, 1000, 0) |
| 48 | - | function Angrond_Shadowbolt(pUnit, event) |
| 48 | + | |
| 49 | - | pUnit:CastSpell(101329) |
| 49 | + | |
| 50 | ||
| 51 | function Angrond_Shadowbolt(pUnit, Event) | |
| 52 | - | ]] |
| 52 | + | if(not pUnit:IsCasting()) then |
| 53 | - | |
| 53 | + | pUnit:FullCastSpellOnTarget(39026, pUnit:GetMainTank()) |
| 54 | end | |
| 55 | - | pUnit:FullCastSpellOnTarget(39026, pUnit:GetRandomPlayer(0)) |
| 55 | + | |
| 56 | ||
| 57 | - | |
| 57 | + | |
| 58 | RegisterUnitEvent(88803, 2, Angrond_OnLeaveCombat) | |
| 59 | RegisterUnitEvent(88803, 3, Angrond_OnKilledTarget) | |
| 60 | RegisterUnitEvent(88803, 4, Angrond_OnDied) |