9
3

aspectraldenizen.lua 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. --[[
  2. Script Name : SpawnScripts/SunkenCity/aspectraldenizen.lua
  3. Script Purpose : a spectral denizen
  4. Script Author : Scatman
  5. Script Date : 2009.08.01
  6. Script Notes :
  7. --]]
  8. local MALE = 1
  9. local FEMALE = 2
  10. local spoke = false
  11. function spawn(NPC)
  12. spoke = false
  13. end
  14. function respawn(NPC)
  15. spawn(NPC)
  16. end
  17. function hailed(NPC, Spawn)
  18. FaceTarget(NPC, Spawn)
  19. end
  20. function aggro(NPC, Spawn)
  21. local chance = math.random(1, 100)
  22. if chance <= 25 then
  23. end
  24. end
  25. function healthchanged(NPC, Spawn)
  26. local hp_percent = GetHP(NPC) / GetMaxHP(NPC)
  27. if hp_percent <= 0.50 and spoke == false then
  28. spoke = true
  29. if GetGender(NPC) == MALE then
  30. elseif GetGender(NPC) == FEMALE then
  31. PlayFlavor(NPC, "voiceover/english/ghost_base_1/ft/ghost/ghost_base_1_1_halfhealth_gf_4c18f3ce.mp3", "Your struggle is for naught!", "", 1689672062, 2512623281)
  32. end
  33. AddTimer(NPC, 30000, "ResetSpoke")
  34. end
  35. end
  36. function ResetSpoke(NPC)
  37. spoke = false
  38. end
  39. function killed(NPC, Spawn)
  40. local chance = math.random(1, 100)
  41. if chance <= 25 then
  42. end
  43. end
  44. function death(NPC, Spawn)
  45. spoke = false
  46. local chance = math.random(1, 100)
  47. if chance <= 25 then
  48. end
  49. end