ForestersAntonica.lua 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. --[[
  2. Script Name : SpawnScripts/Generic/MonsterCallouts/ForestersAntonica.lua
  3. Script Author : Dorbin
  4. Script Date : 2023.04.30 12:04:20
  5. Script Purpose : Farmers and Foresters in Antonica( and Beyond) Combat VOs
  6. :
  7. --]]
  8. local HealthCallout = false --REDUCES Half-Health Spam
  9. local CalloutTimer = false --REDUCES Callout Spam
  10. --AGGRO CHECK --
  11. function aggro(NPC,Spawn) --RACE CHECK
  12. SetTempVariable(NPC, "CalloutTimer", "false")
  13. SetTempVariable(NPC, "HealthCallout", "false")
  14. if GetTempVariable(NPC, "CalloutTimer")== "false"then
  15. SetTempVariable(NPC, "CalloutTimer", "true")
  16. AddTimer(NPC,7000,"ResetTimer")
  17. if GetGender(NPC)==1 then --GENDER CHECK. 1==Male
  18. choice = MakeRandomInt(1,2)
  19. if choice == 1 then
  20. PlayFlavor(NPC, "voiceover/english/optional3/human_foresters/ft/human/human_foresters_1_aggro_gm_da8c1c5d.mp3", "You angered the spirits of the woods for the last time.", "", 3652855832, 3722520538)
  21. elseif choice == 2 then
  22. PlayFlavor(NPC, "voiceover/english/optional3/human_foresters/ft/human/human_foresters_1_aggro_gm_94a32cfd.mp3", "You will not despoil our sacred forest!", "", 1192082212, 2703953780)
  23. end
  24. else
  25. local choice = MakeRandomInt(1,3)
  26. if choice == 1 then
  27. PlayFlavor(NPC, "voiceover/english/optional3/human_foresters/ft/human/human_foresters_1_aggro_gf_fb18860.mp3", "The wisdom of the woods is not for you!", "", 114509927, 2469036691)
  28. elseif choice == 2 then
  29. PlayFlavor(NPC, "voiceover/english/optional3/human_foresters/ft/human/human_foresters_1_aggro_gf_da8c1c5d.mp3", "You angered the spirits of the woods for the last time.", "", 3419069517, 4183032814)
  30. elseif choice == 3 then
  31. PlayFlavor(NPC, "voiceover/english/optional3/human_foresters/ft/human/human_foresters_1_aggro_gf_94a32cfd.mp3", "You will not despoil our sacred forest!", "", 603052244, 1007102278)
  32. end
  33. end
  34. end
  35. end
  36. -- DEATH CHECK --
  37. function death(NPC,Spawn) --RACE CHECK
  38. if GetTempVariable(NPC, "CalloutTimer")== "false"then
  39. if GetGender(NPC)==1 then
  40. choice = MakeRandomInt(1,2)
  41. if choice == 1 then
  42. PlayFlavor(NPC, "voiceover/english/optional3/human_foresters/ft/human/human_foresters_1_death_gm_c8e6f923.mp3", "My friend may have fallen like a rotten tree but I will not.", "", 1442503118, 3414327424, Spawn, 0)
  43. elseif choice == 2 then
  44. PlayFlavor(NPC, "voiceover/english/optional3/human_foresters/ft/human/human_foresters_1_death_gm_3b153248.mp3", "You cannot kill us all, despoiler!", "", 321437922, 3533387413, Spawn, 0)
  45. end
  46. else
  47. choice = MakeRandomInt(1,2)
  48. if choice == 1 then
  49. PlayFlavor(NPC, "voiceover/english/optional3/human_foresters/ft/human/human_foresters_1_death_gf_c8e6f923.mp3", "My friend may have fallen like a rotten tree but I will not.", "", 4216402375, 1354432516, Spawn, 0)
  50. else
  51. PlayFlavor(NPC, "voiceover/english/optional3/human_foresters/ft/human/human_foresters_1_death_gf_3b153248.mp3", "You cannot kill us all, despoiler!", "", 3926164437, 4058895580, Spawn, 0)
  52. end
  53. end
  54. end
  55. end
  56. -- HealthChange CHECK --
  57. function healthchanged(NPC,Spawn) --RACE CHECK
  58. if GetHP(NPC) <= GetMaxHP(NPC) * 0.55 and GetHP(NPC) >= GetMaxHP(NPC) * 0.45 then
  59. if IsAlive(NPC) and IsInCombat(NPC)==true and IsPlayer(Spawn)and GetTempVariable(NPC, "CalloutTimer")== "false" and GetTempVariable(NPC, "HealthCallout")== "false" then
  60. SetTempVariable(NPC, "HealthCallout", "true")
  61. AddTimer(NPC,9000,"HealthReset")
  62. if GetGender(NPC)==1 then
  63. choice = MakeRandomInt(1,3)
  64. if choice == 1 then
  65. PlayFlavor(NPC, "voiceover/english/optional3/human_foresters/ft/human/human_foresters_1_halfhealth_gm_3b5012e4.mp3", "Is this sap seeping from my skin?", "", 3378401909, 2016168772)
  66. elseif choice == 2 then
  67. PlayFlavor(NPC, "voiceover/english/optional3/human_foresters/ft/human/human_foresters_1_halfhealth_gm_6a01659b.mp3", "You will not fell me like some lumberjack!", "", 3082129005, 2882113499)
  68. elseif choice == 3 then
  69. PlayFlavor(NPC, "voiceover/english/optional3/human_foresters/ft/human/human_foresters_1_battle_gm_df824c1b.mp3", "I'm more frightening than the dark woods.", "", 3188821257, 3608290528)
  70. end
  71. else
  72. choice = MakeRandomInt(1,2)
  73. if choice == 1 then
  74. PlayFlavor(NPC, "voiceover/english/optional3/human_base_1/ft/human/human_base_1_1_halfhealth_gf_8529e507.mp3", "I can't hold them forever!", "", 3371581229, 792393228)
  75. elseif choice == 2 then
  76. PlayFlavor(NPC, "voiceover/english/optional3/human_base_1/ft/human/human_base_1_1_halfhealth_gf_1babf022.mp3", "Is that all you have?", "", 2979351329, 4050238683)
  77. end
  78. end
  79. end
  80. end
  81. end
  82. -- Victory CHECK --
  83. function victory(NPC,Spawn)
  84. if GetGender(NPC)==1 then
  85. choice = MakeRandomInt(1,3)
  86. if choice == 1 then
  87. PlayFlavor(NPC, "voiceover/english/human_base_1/ft/human/human_base_1_1_victory_gm_153f12ff.mp3", "One down!", "", 3009518664, 4140389760)
  88. elseif choice == 2 then
  89. PlayFlavor(NPC, "voiceover/english/human_base_1/ft/human/human_base_1_1_victory_gm_4553e1e0.mp3", "Flee now or meet this one's fate.", "", 3032162747, 1359206304)
  90. elseif choice == 3 then
  91. PlayFlavor(NPC, "voiceover/english/human_base_1/ft/human/human_base_1_1_victory_gm_ec0cd85a.mp3", "I hope they're all this easy.", "", 2687289628, 2303639320)
  92. end
  93. else
  94. choice = MakeRandomInt(1,2)
  95. if choice == 1 then
  96. PlayFlavor(NPC, "voiceover/english/optional3/human_base_1/ft/human/human_base_1_1_victory_gf_6f459088.mp3", "Flee now or meet this one's fate.", "", 290765367, 473549337)
  97. elseif choice == 2 then
  98. PlayFlavor(NPC, "voiceover/english/optional3/human_base_1/ft/human/human_base_1_1_victory_gf_ec0cd85a.mp3", "I hope they're all this easy.", "", 1073758360, 3342649012)
  99. end
  100. end
  101. end
  102. function ResetTimer(NPC) -- 7 SECOND PAUSE BETWEEN VOs
  103. SetTempVariable(NPC, "CalloutTimer", "false")
  104. end
  105. function HealthReset (NPC) --SO HALF HEALTH DOESN'T SPAM
  106. SetTempVariable(NPC, "HealthCallout", "false")
  107. SetTempVariable(NPC, "CalloutTimer", "false")
  108. end