Windstalkers.lua 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301
  1. --[[
  2. Script Name : SpawnScripts/Generic/MonsterCallouts/Windstalkers.lua
  3. Script Author : Dorbin
  4. Script Date : 2023.04.30 12:04:56
  5. Script Purpose : Windstalker Village Combat VOs - Antonica Primarily
  6. :
  7. --]]
  8. local HealthCallout = false --REDUCES Half-Health Spam
  9. local CalloutTimer = false --REDUCES Callout Spam
  10. local FIGHTER = 1
  11. local WARRIOR =2
  12. local GUARDIAN= 3
  13. local BERSERKER = 4
  14. local BRAWLER = 5
  15. local MONK = 6
  16. local BRUISER= 7
  17. local CRUSADER = 8
  18. local SHADOWKNIGHT = 9
  19. local PALADIN = 10
  20. local MAGE = 21
  21. local SORCERER = 22
  22. local WIZARD = 23
  23. local WARLOCK = 24
  24. local ENCHANTER = 25
  25. local ILLUSIONIST = 26
  26. local COERCER = 27
  27. local SUMMONER = 28
  28. local CONJUROR = 29
  29. local NECROMANCER = 30
  30. --AGGRO CHECK --
  31. function aggro(NPC,Spawn) --RACE CHECK
  32. SetTempVariable(NPC, "CalloutTimer", "false")
  33. SetTempVariable(NPC, "HealthCallout", "false")
  34. if GetTempVariable(NPC, "CalloutTimer")== "false"then
  35. SetTempVariable(NPC, "CalloutTimer", "true")
  36. AddTimer(NPC,7000,"ResetTimer")
  37. local Race= GetRace(NPC)
  38. if Race == 6 then
  39. HfE_aggro(NPC,Spawn)
  40. elseif Race==9 then
  41. Hum_aggro(NPC,Spawn)
  42. else
  43. end
  44. end
  45. end
  46. function HfE_aggro(NPC,Spawn)
  47. if GetGender(NPC)==1 then --GENDER CHECK. 1==Male
  48. if GetClass(Spawn)>=21 and GetClass(Spawn)<=30 then
  49. Pick = MakeRandomInt(1,3) --MAGE CHECK
  50. else
  51. Pick = MakeRandomInt(1,2)
  52. end
  53. if Pick == 1 then
  54. PlayFlavor(NPC, "voiceover/english/halfelf_base_1/ft/halfelf/halfelf_base_1_1_aggro_gm_13a3055.mp3", "Summon help, intruders have arrived!", "", 262436067, 4127133618)
  55. elseif Pick == 2 then
  56. PlayFlavor(NPC, "voiceover/english/halfelf_base_1/ft/halfelf/halfelf_base_1_1_aggro_gm_12fbaefb.mp3", "Destroy the invader!", "", 489857902, 941763715)
  57. elseif Pick == 3 then
  58. PlayFlavor(NPC, "voiceover/english/halfelf_base_1/ft/halfelf/halfelf_base_1_1_maomage_gm_96692f88.mp3", "Distract the magician or we'll all die!", "", 3332270247, 2351356263)
  59. end
  60. else
  61. local choice = MakeRandomInt(1,3)
  62. if choice == 1 then
  63. PlayFlavor(NPC, "voiceover/english/optional3/halfelf_base_1/ft/halfelf/halfelf_base_1_1_aggro_gf_12fbaefb.mp3", "Destroy the invader!", "", 1313233821, 723410897)
  64. elseif choice == 2 then
  65. PlayFlavor(NPC, "voiceover/english/optional3/halfelf_base_1/ft/halfelf/halfelf_base_1_1_aggro_gf_a68f64b6.mp3", "Alarm! Alarm!", "", 1220383018, 2962002142)
  66. elseif choice == 3 then
  67. PlayFlavor(NPC, "voiceover/english/optional3/halfelf_base_1/ft/halfelf/halfelf_base_1_1_aggro_gf_13a3055.mp3", "Summon help, intruders have arrived!", "", 3324527452, 2122161878)
  68. end
  69. end
  70. end
  71. function Hum_aggro(NPC,Spawn)
  72. if GetGender(NPC)==1 then --GENDER CHECK. 1==Male
  73. local choice = MakeRandomInt(1,3)
  74. if choice == 1 then
  75. PlayFlavor(NPC, "voiceover/english/optional5/human_windstalkers/ft/human/human_windstalkers_1_aggro_gm_a6d0b787.mp3", "The bears told me to kill you!", "", 536396117, 2147228574)
  76. elseif choice == 2 then
  77. PlayFlavor(NPC, "voiceover/english/optional5/human_windstalkers/ft/human/human_windstalkers_1_aggro_gm_dccb12e.mp3", "Now it's time to die, little rabbit!", "", 3249519066, 4146206338)
  78. elseif choice == 3 then
  79. PlayFlavor(NPC, "voiceover/english/optional5/human_windstalkers/ft/human/human_windstalkers_1_aggro_gm_b11fb649.mp3", "The animals scream for vengeance!", "", 268719394, 2417421394)
  80. end
  81. else
  82. AddTimer(NPC,math.random(15000,30000),"FifteenCall",1,Spawn)
  83. local choice = MakeRandomInt(1,3)
  84. if choice == 1 then
  85. PlayFlavor(NPC, "voiceover/english/optional3/human_windstalkers/ft/human/human_windstalkers_1_aggro_gf_a6d0b787.mp3", "The bears told me to kill you!", "", 2136224796, 3415208051)
  86. elseif choice == 2 then
  87. PlayFlavor(NPC, "voiceover/english/optional3/human_windstalkers/ft/human/human_windstalkers_1_aggro_gf_b11fb649.mp3", "The animals scream for vengeance!", "", 1171613527, 934412679)
  88. elseif choice == 3 then
  89. PlayFlavor(NPC, "voiceover/english/optional3/human_windstalkers/ft/human/human_windstalkers_1_aggro_gf_dccb12e.mp3", "Now it's time to die, little rabbit!", "", 2799492103, 2525496836)
  90. end
  91. end
  92. end
  93. -- DEATH CHECK --
  94. function death(NPC,Spawn) --RACE CHECK
  95. if GetTempVariable(NPC, "CalloutTimer")== "false"then
  96. Race= GetRace(NPC)
  97. if Race == 6 then
  98. HfE_death(NPC,Spawn)
  99. elseif Race==9 then
  100. Hum_death(NPC,Spawn)
  101. else
  102. end
  103. end
  104. end
  105. function HfE_death(NPC,Spawn)
  106. if GetGender(NPC)==1 then
  107. local choice = MakeRandomInt(1,2)
  108. if choice == 1 then
  109. PlayFlavor(NPC, "voiceover/english/halfelf_base_1/ft/halfelf/halfelf_base_1_1_death_gm_1a659852.mp3", "We must withdraw before we all die!", "", 3147364973, 1341536758)
  110. elseif choice == 2 then
  111. PlayFlavor(NPC, "voiceover/english/halfelf_base_1/ft/halfelf/halfelf_base_1_1_death_gm_610c650e.mp3", "You must flee! I'll try to hold them.", "", 3580386891, 3023137994)
  112. end
  113. else
  114. local choice = MakeRandomInt(1,2)
  115. if choice == 1 then
  116. PlayFlavor(NPC, "voiceover/english/optional3/halfelf_base_1/ft/halfelf/halfelf_base_1_1_death_gf_610c650e.mp3", "You must flee! I'll try to hold them.", "", 1612338229, 10301262)
  117. else
  118. PlayFlavor(NPC, "voiceover/english/optional3/halfelf_base_1/ft/halfelf/halfelf_base_1_1_death_gf_1a659852.mp3", "We must withdraw before we all die!", "", 2249500792, 2154633904)
  119. end
  120. end
  121. end
  122. function Hum_death(NPC,Spawn)
  123. if GetGender(NPC)==1 then
  124. local choice = MakeRandomInt(1,2)
  125. if choice == 1 then
  126. PlayFlavor(NPC, "voiceover/english/optional5/human_windstalkers/ft/human/human_windstalkers_1_death_gm_7fc8a992.mp3", "My companion will be reborn as an animal and hunt you down!", "", 4095950768, 2638720474)
  127. elseif choice == 2 then
  128. PlayFlavor(NPC, "voiceover/english/optional5/human_windstalkers/ft/human/human_windstalkers_1_death_gm_15f1c518.mp3", "The wolves will howl in remembrance of the fallen.", "", 438946486, 1503863875)
  129. end
  130. else
  131. local choice = MakeRandomInt(1,3)
  132. if choice == 1 then
  133. PlayFlavor(NPC, "voiceover/english/optional3/human_windstalkers/ft/human/human_windstalkers_1_death_gf_7fc8a992.mp3", "My companion will be reborn as an animal and hunt you down!", "", 3241674347, 112875582)
  134. elseif choice == 2 then
  135. PlayFlavor(NPC, "voiceover/english/optional3/human_windstalkers/ft/human/human_windstalkers_1_death_gf_15f1c518.mp3", "The wolves will howl in remembrance of the fallen.", "", 1738757569, 154731502)
  136. elseif choice == 3 then
  137. PlayFlavor(NPC, "voiceover/english/optional3/human_windstalkers/ft/human/human_windstalkers_1_aggro_gf_b11fb649.mp3", "The animals scream for vengeance!", "", 1171613527, 934412679)
  138. end
  139. end
  140. end
  141. -- Battle Cry Call (Female Human Only)
  142. function FifteenCall(NPC,Spawn)
  143. if IsAlive(NPC) and IsInCombat(NPC)==true and IsPlayer(Spawn)and GetTempVariable(NPC, "CalloutTimer")== "false" then
  144. if math.random(0,100)<=33 then
  145. SetTempVariable(NPC, "CalloutTimer", "true")
  146. AddTimer(NPC,10000,"ResetTimer")
  147. local choice = MakeRandomInt(1,2)
  148. if choice == 1 then
  149. PlayFlavor(NPC, "voiceover/english/optional3/human_windstalkers/ft/human/human_windstalkers_1_battle_gf_7ad3a09.mp3", "Can't you hear the animals screaming?", "", 959773922, 3663023157)
  150. elseif choice == 2 then
  151. PlayFlavor(NPC, "voiceover/english/optional3/human_windstalkers/ft/human/human_windstalkers_1_battle_gf_d1f33b41.mp3", "Pay for your crimes against nature's creatures.", "", 3824659479, 1994519243)
  152. end
  153. end
  154. end
  155. if IsAlive(NPC)then
  156. AddTimer(NPC,math.random(15000,30000),"FifteenCall",1,Spawn)
  157. end
  158. end
  159. -- HealthChange CHECK --
  160. function healthchanged(NPC,Spawn) --RACE CHECK
  161. if GetHP(NPC) <= GetMaxHP(NPC) * 0.55 and GetHP(NPC) >= GetMaxHP(NPC) * 0.45 then
  162. if IsAlive(NPC) and IsInCombat(NPC)==true and IsPlayer(Spawn)and GetTempVariable(NPC, "CalloutTimer")== "false" and GetTempVariable(NPC, "HealthCallout")== "false" then
  163. SetTempVariable(NPC, "HealthCallout", "true")
  164. AddTimer(NPC,9000,"HealthReset")
  165. local Race= GetRace(NPC)
  166. if Race == 6 then
  167. HfE_healthchanged(NPC,Spawn)
  168. elseif Race==9 then
  169. Hum_healthchanged(NPC,Spawn)
  170. else
  171. end
  172. end
  173. end
  174. end
  175. function HfE_healthchanged(NPC, Spawn)
  176. if GetGender(NPC)==1 then
  177. local choice = MakeRandomInt(1,2)
  178. if choice == 1 then
  179. PlayFlavor(NPC, "voiceover/english/halfelf_base_1/ft/halfelf/halfelf_base_1_1_halfhealth_gm_e0686420.mp3", "Well, it seems you have some martial arts skills.", "", 1009191098, 3016339818, Spawn)
  180. elseif choice == 2 then
  181. PlayFlavor(NPC, "voiceover/english/halfelf_base_1/ft/halfelf/halfelf_base_1_1_halfhealth_gm_e48659f9.mp3", "Now, that really hurt!", "", 241651222, 476491397, Spawn)
  182. end
  183. else
  184. local choice = MakeRandomInt(1,2)
  185. if choice == 1 then
  186. PlayFlavor(NPC, "voiceover/english/optional3/halfelf_base_1/ft/halfelf/halfelf_base_1_1_halfhealth_gf_e0686420.mp3", "Well, it seems you have some martial arts skills.", "", 743699854, 1906875496, Spawn)
  187. elseif choice == 2 then
  188. PlayFlavor(NPC, "voiceover/english/optional3/halfelf_base_1/ft/halfelf/halfelf_base_1_1_halfhealth_gf_e48659f9.mp3", "Now, that really hurt!", "", 413378164, 719939114, Spawn)
  189. end
  190. end
  191. end
  192. function Hum_healthchanged(NPC, Spawn)
  193. if GetGender(NPC)==1 then
  194. local choice = MakeRandomInt(1,2)
  195. if choice == 1 then
  196. PlayFlavor(NPC, "voiceover/english/optional5/human_windstalkers/ft/human/human_windstalkers_1_death_gm_15f1c518.mp3", "The wolves will howl in remembrance of the fallen.", "", 438946486, 1503863875, Spawn, 0)
  197. elseif choice == 2 then
  198. PlayFlavor(NPC, "voiceover/english/human_base_1/ft/human/human_base_1_1_halfhealth_gm_8529e507.mp3", "I can't hold them forever!", "", 644448824, 755050547)
  199. end
  200. else
  201. local choice = MakeRandomInt(1,2)
  202. if choice == 1 then
  203. 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)
  204. elseif choice == 2 then
  205. 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)
  206. end
  207. end
  208. end
  209. -- Victory CHECK --
  210. function victory(NPC,Spawn) --RACE CHECK
  211. Race= GetRace(NPC)
  212. if Race == 6 then
  213. HfE_victory(NPC,Spawn)
  214. elseif Race==9 then
  215. Hum_victory(NPC,Spawn)
  216. else
  217. end
  218. end
  219. function HfE_victory(NPC,Spawn)
  220. if GetGender(NPC)==1 then
  221. local choice = MakeRandomInt(1,2)
  222. if choice == 1 then
  223. PlayFlavor(NPC, "voiceover/english/darkelf_base_1/ft/darkelf/darkelf_base_1_1_victory_gm_f5088778.mp3", "Get up! Death isn't good enough for you!", "", 3381713633, 2145918189)
  224. elseif choice == 2 then
  225. PlayFlavor(NPC, "voiceover/english/darkelf_base_1/ft/darkelf/darkelf_base_1_1_victory_gm_f4fc7cf8.mp3", "Did you really think you had a chance?", "", 607143583, 3133144305)
  226. end
  227. else
  228. local choice = MakeRandomInt(1,2)
  229. if choice == 1 then
  230. 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)
  231. elseif choice == 2 then
  232. 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)
  233. end
  234. end
  235. end
  236. function Hum_victory(NPC,Spawn)
  237. if GetGender(NPC)==1 then
  238. local choice = MakeRandomInt(1,3)
  239. if choice == 1 then
  240. PlayFlavor(NPC, "voiceover/english/human_base_1/ft/human/human_base_1_1_victory_gm_153f12ff.mp3", "One down!", "", 3009518664, 4140389760)
  241. elseif choice == 2 then
  242. 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)
  243. elseif choice == 3 then
  244. 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)
  245. end
  246. else
  247. local choice = MakeRandomInt(1,2)
  248. if choice == 1 then
  249. 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)
  250. elseif choice == 2 then
  251. 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)
  252. end
  253. end
  254. end
  255. function ResetTimer(NPC) -- 7 SECOND PAUSE BETWEEN VOs
  256. SetTempVariable(NPC, "CalloutTimer", "false")
  257. end
  258. function HealthReset (NPC) --SO HALF HEALTH DOESN'T SPAM
  259. SetTempVariable(NPC, "HealthCallout", "false")
  260. SetTempVariable(NPC, "CalloutTimer", "false")
  261. end