BaseWaterElemental1.lua 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. --[[
  2. Script Name : SpawnScripts/Generic/MonsterCallouts/BaseWaterElemental1.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.10.18 06:10:35
  5. Script Purpose :
  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,3)
  36. if choice == 1 then
  37. PlayFlavor(NPC, "", "Your footsteps sent ripples before you", "", 0, 0, Player, 27)
  38. elseif choice == 2 then
  39. PlayFlavor(NPC, "", "You will not defile this place!", "", 0, 0, Player, 27)
  40. elseif choice == 3 then
  41. PlayFlavor(NPC, "", "A drop in the ocean can disturb the waves.", "", 0, 0, Player, 27)
  42. end
  43. end
  44. end
  45. end
  46. function death(NPC,Player)
  47. if GetTempVariable(NPC, "CalloutTimer")== "false" and IsPlayer(Player) then
  48. if math.random(0,100)<=35 then
  49. if not HasLanguage(Player,27 )then
  50. Garbled(NPC,Player)
  51. else
  52. local choice = MakeRandomInt(1,5)
  53. if choice == 1 then
  54. PlayFlavor(NPC, "", "Return to the rivers from where you came.", "", 0, 0, Player, 27)
  55. elseif choice == 2 then
  56. PlayFlavor(NPC, "", "The oceans accept all who return.", "", 0, 0, Player, 27)
  57. end
  58. end
  59. end
  60. end
  61. end
  62. function victory(NPC,Player)
  63. if IsPlayer(Player)and not HasLanguage(Player,27 )then
  64. Garbled(NPC,Player)
  65. elseif IsPlayer(Player) and HasLanguage(Player,27 )then
  66. local choice = MakeRandomInt(1,5)
  67. if choice == 1 then
  68. PlayFlavor(NPC, "", "How does it feel to drown?", "", 0, 0, Spawn, 27)
  69. elseif choice == 2 then
  70. PlayFlavor(NPC, "", "You don't drown by being in water, you drown by staying there.", "", 0, 0, Spawn, 27)
  71. end
  72. end
  73. end