Guest User

Untitled

a guest
Jul 18th, 2018
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.52 KB | None | 0 0
  1. --When players aggro--
  2. function Angrond_OnCombat(pUnit, Event)
  3. pUnit:RegisterEvent("Angrond_Final", 2000, 0)
  4. pUnit:SendChatMessage(14, 0, "I don't know who you are, but I won't allow you to hinder our efforts!")
  5. end
  6.  
  7. --When players run or, or the entire group wipes die--
  8. function Angrond_OnLeaveCombat(pUnit, Event)
  9. pUnit:SendChatMessage(14, 0, "The shadows shall consume all!")
  10. pUnit:RemoveEvents()
  11. end
  12.  
  13. --When he kills a player--
  14. function Angrond_OnKilledTarget(pUnit, Event)
  15. pUnit:SendChatMessage(14, 0, "Another sent to the shadows; I hope you won't mind if I feed upon your soul!")
  16. pUnit:CastSpell(36300)
  17. end
  18.  
  19. --When he himself dies--
  20. function Angrond_OnDeath(pUnit, Event)
  21. pUnit:SendChatMessage(14, 0, "I go now to the realm of shadows...forgive me master.")
  22. pUnit:RemoveEvents()
  23. end
  24.  
  25. --When he's half way dead--
  26. function Angrond_half(pUnit, event, player)
  27. if pUnit:GetHealthPct() == 50 then
  28. pUnit:RegisterEvent("Angrond_Half", 1000, 1)
  29. Unit:SendChatMessage(14, 0, "You're doing well for folls!"
  30. end
  31. end
  32.  
  33.  
  34. --When he's at 20% Health--
  35. function Angrond_Final(pUnit, event, player)
  36. if pUnit:GetHealthPct() == 20 then
  37. pUnit:SendChatMessage(14, 0, "This is but a taste of the shadows to come!")
  38. pUnit:RegisterEvent("Angrond_Final", 1000, 0)
  39. pUnit:CastSpellOnTarget(686, pUnit:GetMainTank())
  40. end
  41. end
  42.  
  43.  
  44.  
  45. RegisterUnitEvent(88803, 1, "Angrond_OnCombat")
  46. RegisterUnitEvent(88803, 2, "Angrond_OnLeaveCombat")
  47. RegisterUnitEvent(88803, 3, "Angrond_OnKilledTarget")
  48. RegisterUnitEvent(88803, 4, "Agrond_OnDeath")
Add Comment
Please, Sign In to add comment