9
3

acorrupteddryad.lua 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. --[[
  2. Script Name : SpawnScripts/Oakmyst/acorrupteddryad.lua
  3. Script Purpose : a corrupted dryad
  4. Script Author : Scatman
  5. Script Date : 2009.10.08
  6. Script Notes :
  7. --]]
  8. local spoke = false
  9. function spawn(NPC)
  10. spoke = false
  11. end
  12. function respawn(NPC)
  13. spawn(NPC)
  14. end
  15. function hailed(NPC, Spawn)
  16. end
  17. function healthchanged(NPC, Spawn)
  18. local chance = math.random(0, 100)
  19. if chance <= 25 then
  20. local health_percent = GetHP(NPC) / GetMaxHP(NPC)
  21. if health_percent < 0.50 and spoke == false then
  22. spoke = true
  23. Speak(NPC, Spawn)
  24. end
  25. end
  26. end
  27. function death(NPC, Spawn)
  28. spoke = false
  29. end
  30. function Speak(NPC, Spawn)
  31. --if HasLanguage(Spawn, Fayfolk) then
  32. local choice = math.random(1, 2)
  33. if choice == 1 then
  34. PlayFlavor(NPC, "voiceover/english/dryad_corrupted/ft/dryad/dryad_corrupted_1_halfhealth_87c4d551.mp3", "My blood will continue to taint this land. ", "", 4171401485, 1497569558, Spawn)
  35. else
  36. PlayFlavor(NPC, "voiceover/english/dryad_corrupted/ft/dryad/dryad_corrupted_1_halfhealth_f788c9f0.mp3", "My death only furthers my goals.", "", 4264087301, 2283544980, Spawn)
  37. end
  38. --[[else
  39. local choice = math.random(1, 4)
  40. if choice == 1 then
  41. PlayFlavor(NPC, "voiceover/english/dryad_corrupted/ft/dryad/dryad_corrupted_1_garbled_e858f993.mp3", "Tawaneee follahh dilifilongia avee", "", 677789876, 1792673679, Spawn)
  42. elseif choice == 2 then
  43. PlayFlavor(NPC, "voiceover/english/dryad_corrupted/ft/dryad/dryad_corrupted_1_garbled_dfa9e7d9.mp3", "Amamooenoo illysavah leetah", "", 1070184369, 1800384485, Spawn)
  44. elseif choice == 3 then
  45. PlayFlavor(NPC, "voiceover/english/dryad_corrupted/ft/dryad/dryad_corrupted_1_garbled_29e4606e.mp3", "Peelahha misialloniassaa laliallasala", "", 4241242710, 1388449419, Spawn)
  46. elseif choice == 4 then
  47. PlayFlavor(NPC, "voiceover/english/dryad_corrupted/ft/dryad/dryad_corrupted_1_garbled_628bdbdb.mp3", "Meraania suvalas itresteien", "", 2333386122, 320322749, Spawn)
  48. end
  49. end--]]
  50. end