9
3

aLonetuskchampion.lua 967 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. --[[
  2. Script Name : SpawnScripts/Ruins/aLonetuskchampion.lua
  3. Script Purpose : a Lonetusk champion
  4. Script Author : Scatman
  5. Script Date : 2009.08.21
  6. Script Notes :
  7. --]]
  8. dofile("SpawnScripts/Ruins/LonetuskVoiceOvers.lua")
  9. local spoke = false
  10. function spawn(NPC)
  11. spoke = false
  12. end
  13. function respawn(NPC)
  14. spawn(NPC)
  15. end
  16. function hailed(NPC, Spawn)
  17. FaceTarget(NPC, Spawn)
  18. end
  19. function aggro(NPC, Spawn)
  20. local chance = math.random(0, 100)
  21. if chance <= 25 then
  22. generic_aggro(NPC, Spawn)
  23. end
  24. end
  25. function healthchanged(NPC, Spawn)
  26. local chance = math.random(0, 100)
  27. if chance <= 25 then
  28. local health_percent = GetHP(NPC) / GetMaxHP(NPC)
  29. if health_percent < 0.50 and spoke == false then
  30. spoke = true
  31. generic_healthchanged(NPC, Spawn)
  32. end
  33. end
  34. end
  35. function killed(NPC, Spawn)
  36. generic_killed(NPC, Spawn)
  37. end
  38. function death(NPC, Spawn)
  39. spoke = false
  40. local chance = math.random(0, 100)
  41. if chance <= 25 then
  42. generic_death(NPC, Spawn)
  43. end
  44. end