Dryad_Corrupt1.lua 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. --[[
  2. Script Name : SpawnScripts/Generic/MonsterCallouts/Dryad_Corrupt1.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.07.19 04:07:47
  5. Script Purpose :
  6. :
  7. --]]
  8. local HealthCallout = false --REDUCES Half-Health Spam
  9. local CalloutTimer = false --REDUCES Callout Spam
  10. function ResetTimer(NPC) -- 7 SECOND PAUSE BETWEEN VOs
  11. SetTempVariable(NPC, "CalloutTimer", "false")
  12. end
  13. function HealthReset (NPC) --SO HALF HEALTH DOESN'T SPAM
  14. SetTempVariable(NPC, "HealthCallout", "false")
  15. end
  16. function Garbled(NPC,Player)
  17. local choice = MakeRandomInt(1,4)
  18. if choice == 1 then
  19. PlayFlavor(NPC, "voiceover/english/dryad_corrupted/ft/dryad/dryad_corrupted_1_garbled_dfa9e7d9.mp3", "Amamooenoo illysavah leetah", "", 1070184369, 1800384485, Player, 23)
  20. elseif choice == 2 then
  21. PlayFlavor(NPC, "voiceover/english/dryad_corrupted/ft/dryad/dryad_corrupted_1_garbled_e858f993.mp3", "Tawaneee follahh dilifilongia avee", "", 677789876, 1792673679, Player, 23)
  22. elseif choice == 3 then
  23. PlayFlavor(NPC, "voiceover/english/dryad_corrupted/ft/dryad/dryad_corrupted_1_garbled_29e4606e.mp3", "Peelahha misialloniassaa laliallasala", "", 4241242710, 1388449419, Player, 23)
  24. elseif choice == 4 then
  25. PlayFlavor(NPC, "voiceover/english/dryad_corrupted/ft/dryad/dryad_corrupted_1_garbled_628bdbdb.mp3", "Meraania suvalas itresteien", "", 2333386122, 320322749, Player, 23)
  26. end
  27. end
  28. function aggro(NPC,Player)
  29. SetTempVariable(NPC, "CalloutTimer", "false")
  30. if GetTempVariable(NPC, "CalloutTimer")== "false" and math.random(0,100) <=33 and IsPlayer(Player) then
  31. SetTempVariable(NPC, "CalloutTimer", "true")
  32. AddTimer(NPC,10000,"ResetTimer")
  33. if not HasLanguage(Player,23 )then
  34. Garbled(NPC,Player)
  35. else
  36. local choice = MakeRandomInt(1,3)
  37. if choice == 1 then
  38. PlayFlavor(NPC, "voiceover/english/dryad_corrupted/ft/dryad/dryad_corrupted_1_aggro_3489ffb8.mp3", "Going for a nice walk in the woods? ", "", 218935920, 327495800, Player, 23)
  39. elseif choice == 2 then
  40. PlayFlavor(NPC, "voiceover/english/dryad_corrupted/ft/dryad/dryad_corrupted_1_aggro_5821d33b.mp3", "Only I shall foul up this land. ", "", 125666983, 1295971586, Player, 23)
  41. elseif choice == 3 then
  42. PlayFlavor(NPC, "voiceover/english/dryad_corrupted/ft/dryad/dryad_corrupted_1_aggro_8dc3893.mp3", "Bet you didn't think you'd run into me here. ", "", 773517983, 1681945374, Player, 23)
  43. end
  44. end
  45. end
  46. end
  47. function death(NPC,Player)
  48. if GetTempVariable(NPC, "CalloutTimer")== "false" and IsPlayer(Player) then
  49. if math.random(0,100)<=35 then
  50. if not HasLanguage(Player,23 )then
  51. Garbled(NPC,Player)
  52. else
  53. local choice = MakeRandomInt(1,2)
  54. if choice == 1 then
  55. PlayFlavor(NPC, "voiceover/english/dryad_corrupted/ft/dryad/dryad_corrupted_1_death_fb1cfdb6.mp3", "Our darkness spreads. ", "", 2549011102, 119342936, Player, 23)
  56. elseif choice == 2 then
  57. PlayFlavor(NPC, "voiceover/english/dryad_corrupted/ft/dryad/dryad_corrupted_1_death_5f90c8b4.mp3", "You are indeed strong, but you cannot stop our scourge.", "", 1126031911, 157446702, Player, 23)
  58. end
  59. end
  60. end
  61. end
  62. end
  63. function healthchanged(NPC, Player)
  64. if GetTempVariable(NPC, "CalloutTimer") == "false" and IsPlayer(Player) and IsAlive(NPC)==true then
  65. if GetTempVariable(NPC, "HealthCallout") == "false" then
  66. if GetHP(NPC) < GetMaxHP(NPC) * 0.55 and GetHP(NPC) > GetMaxHP(NPC) * 0.45 then
  67. SetTempVariable(NPC, "HealthCallout", "true")
  68. SetTempVariable(NPC, "CalloutTimer", "true")
  69. AddTimer(NPC,10000,"ResetTimer")
  70. AddTimer(NPC,12500,"HealthReset")
  71. if not HasLanguage(Spawn,23 )then
  72. Garbled(NPC,Player)
  73. else
  74. local choice = MakeRandomInt(1,2)
  75. if choice == 1 then
  76. PlayFlavor(NPC, "voiceover/english/dryad_corrupted/ft/dryad/dryad_corrupted_1_halfhealth_87c4d551.mp3", "My blood will continue to taint this land. ", "", 4171401485, 1497569558, Player, 23)
  77. elseif choice == 2 then
  78. PlayFlavor(NPC, "voiceover/english/dryad_corrupted/ft/dryad/dryad_corrupted_1_halfhealth_f788c9f0.mp3", "My death only furthers my goals.", "", 4264087301, 2283544980, Player, 23)
  79. end
  80. end
  81. end
  82. end
  83. end
  84. end
  85. function HealthReset (NPC)
  86. HealthCallout = false
  87. end
  88. function victory(NPC,Player)
  89. if not HasLanguage(Player,23 )then
  90. Garbled(NPC,Player)
  91. else
  92. local choice = MakeRandomInt(1,3)
  93. if choice == 1 then
  94. PlayFlavor(NPC, "voiceover/english/dryad_corrupted/ft/dryad/dryad_corrupted_1_victory_18f1da73.mp3", "Your rotting corpse will help me corrupt this land.", "", 2047984658, 2418122786, Player, 23)
  95. elseif choice == 2 then
  96. PlayFlavor(NPC, "voiceover/english/dryad_corrupted/ft/dryad/dryad_corrupted_1_victory_19d978a1.mp3", "The sweet smell of decay.", "", 1398513265, 2282068315, Player, 23)
  97. end
  98. end
  99. end