Advertisement
Guest User

Untitled

a guest
Apr 4th, 2012
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.20 KB | None | 0 0
  1. --When he's aggro'd
  2. function Angrond_OnCombat(pUnit, Event)
  3. pUnit:SendChatMessage(14, 0, "Only fools seek death!")
  4. pUnit:RegisterEvent(Angrond_Phase_One, 1000, 0)
  5. end
  6.  
  7. -- When he dies
  8. function Angrond_OnDied(pUnit, Event)
  9. pUnit:SendChatMessage(14, 0, "I've got to run! NO! STAY AWAY FROM THE LIGHT!")
  10. pUnit:RemoveEvents()
  11. end
  12. -- When he kills a player
  13. function Angrond_OnKilledTarget(pUnit, Event)
  14. pUnit:SendChatMessage(14, 0, "Fall to the shadows!")
  15. pUnit:CastSpell(40318)
  16. end
  17.  
  18. -- When he leaves combat (either players run or entire group wipes
  19. function Angrond_OnLeaveCombat(pUnit, Event)
  20. pUnit:SendChatMessage(14, 0, "The shadows have prevailed!")
  21. pUnit:RemoveEvents()
  22. end
  23.  
  24. --Phase One
  25. function Angrond_Phase_One(pUnit, Event)
  26. if (pUnit:GetHealthPct() <= 50) then
  27. pUnit:RemoveEvents()
  28. pUnit:SendChatMessage(14, 0, "You're really starting to piss me off!")
  29. pUnit:RegisterEvent(Angrond_Phasetwo, 1000, 0)
  30. pUnit:CastSpell(40318)
  31. pUnit:CastSpell(40318)
  32. pUnit:CastSpell(40318)
  33. end
  34. end
  35.  
  36. function Anrond_Ground_Phase(pUnit, event)
  37. if (pUnit:GetHealthPct() <= 30) then
  38. pUnit:SendChatMessage(14, 0, "I can not fail! FELL THE SHADOWS!")
  39. pUnit:Root()
  40. pUnit:RegisterEvent(Angrond_Ground, 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.
  41.  
  42. end
  43. end
  44.  
  45. function Angrond_Shadowbolt(pUnit, event)
  46. pUnit:CastSpell(101329)
  47. pUnit:RemoveEvents()
  48. end
  49.  
  50.  
  51.  
  52. --3d and final phase
  53. function Angrond_Final_Phase(pUnit, Event)
  54. if (pUnit:GetHealthPct() <= 20) then
  55. pUnit:SendChatMessage(14, 0, "I can not fail! FELL THE SHADOWS!")
  56. pUnit:Root()
  57. 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.
  58.  
  59. end
  60. end
  61.  
  62. function Angrond_Shadowbolt(pUnit, Event)
  63. pUnit:FullCastSpellOnTarget(39026, pUnit:GetRandomPlayer())
  64. end
  65.  
  66. RegisterUnitEvent(88803, 1, Angrond_OnCombat)
  67. RegisterUnitEvent(88803, 2, Angrond_OnLeaveCombat)
  68. RegisterUnitEvent(88803, 3, Angrond_OnKilledTarget)
  69. RegisterUnitEvent(88803, 4, Angrond_OnDied)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement