9
3

BaseFireElemental1.lua 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. --[[
  2. Script Name : SpawnScripts/Generic/MonsterCallouts/BaseFireElemental1.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.10.17 12:10:17
  5. Script Purpose : Base Fire Elemental Voiceover collection
  6. :
  7. --]]
  8. function ResetTimer(NPC) -- 7 SECOND PAUSE BETWEEN VOs
  9. SetTempVariable(NPC, "CalloutTimer", "false")
  10. end
  11. function HealthReset (NPC) -- SO HALF HEALTH DOESN'T SPAM
  12. SetTempVariable(NPC, "HealthCallout", "false")
  13. end
  14. function Garbled(NPC,Player)
  15. local choice = MakeRandomInt(1,4)
  16. if choice == 1 then
  17. PlayFlavor(NPC, "voiceover/english/elemental_fire_base_1/ft/elemental/elemental_fire_base_1_1_garbled_fc50550a.mp3", "Ervmenta oolaves kortenza", "", 2629318897, 172422148, Spawn, 27)
  18. elseif choice == 2 then
  19. PlayFlavor(NPC, "voiceover/english/elemental_fire_base_1/ft/elemental/elemental_fire_base_1_1_garbled_e0fead4d.mp3", "Pintoota kolata eldina mastarina", "", 2759572022, 1504437337, Spawn, 27)
  20. elseif choice == 3 then
  21. PlayFlavor(NPC, "voiceover/english/elemental_fire_base_1/ft/elemental/elemental_fire_base_1_1_garbled_7c1e7a03.mp3", "Oerbet aertres nuavalen sulana", "", 944765445, 2661342879, Spawn, 27)
  22. elseif choice == 4 then
  23. PlayFlavor(NPC, "voiceover/english/elemental_fire_base_1/ft/elemental/elemental_fire_base_1_1_garbled_48632408.mp3", "Boona vas kontrella", "", 1013209475, 1648696462, Spawn, 27)
  24. end
  25. end
  26. function aggro(NPC,Player)
  27. SpawnSet(NPC, "visual_state", 0)
  28. SetTempVariable(NPC, "CalloutTimer", "false")
  29. if GetTempVariable(NPC, "CalloutTimer")== "false" and math.random(0,100) <=33 and IsPlayer(Player)==true then
  30. SetTempVariable(NPC, "CalloutTimer", "true")
  31. AddTimer(NPC,10000,"ResetTimer")
  32. if not HasLanguage(Player,27 )then
  33. Garbled(NPC,Player)
  34. else
  35. local choice = MakeRandomInt(1,5)
  36. if choice == 1 then
  37. PlayFlavor(NPC, "", "My flames will reduce your feeble body to ashes.", "", 3022463100, 3116808293, Player, 27)
  38. elseif choice == 2 then
  39. PlayFlavor(NPC, "", "Burn within my fires!", "", 257276325, 2522637460, Player, 27)
  40. elseif choice == 3 then
  41. PlayFlavor(NPC, "", "No guests allowed.", "", 3738509549, 661160854, Player, 27)
  42. elseif choice == 4 then
  43. PlayFlavor(NPC, "", "Now feel the wrath of my flames!", "", 769265419, 1578038738, Player, 27)
  44. elseif choice == 5 then
  45. PlayFlavor(NPC, "", "Burn!", "", 2360093588, 1657528756, Player, 27)
  46. end
  47. end
  48. end
  49. end
  50. function death(NPC,Player)
  51. if GetTempVariable(NPC, "CalloutTimer")== "false" and IsPlayer(Player) then
  52. if math.random(0,100)<=35 then
  53. if not HasLanguage(Player,27 )then
  54. Garbled(NPC,Player)
  55. else
  56. local choice = MakeRandomInt(1,5)
  57. if choice == 1 then
  58. PlayFlavor(NPC, "voiceover/english/elemental_fire_base_1/ft/elemental/elemental_fire_base_1_1_death_1f242778.mp3", "You will not trodden me out!", "", 1892762142, 2621190081, Player, 27)
  59. elseif choice == 2 then
  60. PlayFlavor(NPC, "voiceover/english/elemental_fire_base_1/ft/elemental/elemental_fire_base_1_1_death_b61ed449.mp3", "In ashes of despair, I will avenge thee.", "", 1014251980, 1288193790, Player, 27)
  61. end
  62. end
  63. end
  64. end
  65. end
  66. function healthchanged(NPC, Player)
  67. if GetTempVariable(NPC, "HealthCallout")== "false" and IsPlayer(Player) then
  68. if GetHP(NPC) < GetMaxHP(NPC) * 0.55 and GetHP(NPC) > GetMaxHP(NPC) * 0.45 then
  69. SetTempVariable(NPC, "HealthCallout", "true")
  70. AddTimer(NPC,10000,"HealthReset")
  71. if not HasLanguage(Player,27 )then
  72. Garbled(NPC,Player)
  73. else
  74. local choice = MakeRandomInt(1,3)
  75. if choice == 1 then
  76. PlayFlavor(NPC, "", "My flame doesn't extinguish when I miss you, simpleton.", "", 957561407, 2078337123, Player, 27)
  77. elseif choice == 2 then
  78. PlayFlavor(NPC, "", "My flames will not miss again!", "", 206904711, 131378704, Player, 27)
  79. elseif choice == 3 then
  80. PlayFlavor(NPC, "", "My fire burns extra bright!", "", 3662264007, 3476541130, Player, 27)
  81. end
  82. end
  83. end
  84. end
  85. end
  86. function victory(NPC,Player)
  87. if IsPlayer(Player)and not HasLanguage(Player,27 )then
  88. Garbled(NPC,Player)
  89. elseif IsPlayer(Player) and HasLanguage(Player,27 )then
  90. PlayFlavor(NPC, "voiceover/english/elemental_fire_base_1/ft/elemental/elemental_fire_base_1_1_victory_3815bfee.mp3", "The burned adventurer fears the flame!", "", 2392954105, 283933087, Spawn, 27)
  91. end
  92. end