BaseRatonga1.lua 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. --[[
  2. Script Name : SpawnScripts/Generic/MonsterCallouts/BaseRatonga1.lua
  3. Script Author : dorbin
  4. Script Date : 2024.01.05 01:01:43
  5. Script Purpose :
  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. function aggro(NPC,Spawn)
  31. SetTempVariable(NPC, "CalloutTimer", "false")
  32. if GetTempVariable(NPC, "CalloutTimer")== "false" and MakeRandomInt(0,100) <=33 and IsPlayer(Spawn) then
  33. SetTempVariable(NPC, "CalloutTimer", "true")
  34. AddTimer(NPC,10000,"ResetTimer")
  35. if GetGender(NPC)==1 then --GENDER CHECK. 1==Male
  36. choice = MakeRandomInt(1,3)
  37. if choice == 1 then
  38. PlayFlavor(NPC, "voiceover/english/optional3/ratonga_base_1/ft/ratonga/ratonga_base_1_1_aggro_gm_4af7a99.mp3", "You're not as sneaky as you thought.", "", 1683997219, 1178080164)
  39. elseif choice == 2 then
  40. PlayFlavor(NPC, "voiceover/english/optional3/ratonga_base_1/ft/ratonga/ratonga_base_1_1_aggro_gm_7c145a1f.mp3", "Sees us, did we? Must not let you talk then.", "", 1928944506, 4197211546)
  41. elseif choice == 3 then
  42. PlayFlavor(NPC, "voiceover/english/optional3/ratonga_base_1/ft/ratonga/ratonga_base_1_1_aggro_gm_ce5970ec.mp3", "Startle us, you did! We'll remedy that.", "", 3710022769, 1084825101)
  43. end
  44. else
  45. choice = MakeRandomInt(1,4)
  46. if choice == 1 then
  47. PlayFlavor(NPC, "voiceover/english/optional3/ratonga_base_1/ft/ratonga/ratonga_base_1_1_aggro_gf_ce5970ec.mp3", "Startle us, you did! We'll remedy that.", "", 3905874632, 4086824059)
  48. elseif choice == 2 then
  49. PlayFlavor(NPC, "voiceover/english/optional3/ratonga_base_1/ft/ratonga/ratonga_base_1_1_aggro_gf_7c145a1f.mp3", "Sees us, did we? Must not let you talk then.", "", 2661963919, 697614069)
  50. elseif choice == 3 then
  51. PlayFlavor(NPC, "voiceover/english/optional3/ratonga_base_1/ft/ratonga/ratonga_base_1_1_aggro_gf_4af7a99.mp3", "You're not as sneaky as you thought.", "", 1898398655, 853136085)
  52. elseif choice == 4 then
  53. PlayFlavor(NPC, "voiceover/english/optional3/ratonga_base_2/ft/ratonga/ratonga_base_2_1_aggro_gf_a3d8a506.mp3", "Not very nice of you to be all sneaky.", "", 2210593426, 1217099089, Spawn, 0)
  54. end
  55. end
  56. end
  57. end
  58. function death(NPC,Spawn)
  59. if GetTempVariable(NPC, "CalloutTimer")== "false" and IsPlayer(Player) then
  60. if GetGender(NPC)==1 then
  61. local choice = MakeRandomInt(1,2)
  62. if choice == 1 then
  63. PlayFlavor(NPC, "voiceover/english/optional3/ratonga_base_1/ft/ratonga/ratonga_base_1_1_death_gm_e9ba5c44.mp3", "Flee and take care of them later.", "", 2862575499, 3074650652)
  64. elseif choice == 2 then
  65. end
  66. else
  67. local choice = MakeRandomInt(1,2)
  68. if choice == 1 then
  69. PlayFlavor(NPC, "", "Ow...OWww!", "", 0, 0)
  70. else
  71. PlayFlavor(NPC, "", "This is the end... for meess...", "", 0, 0)
  72. end
  73. end
  74. end
  75. end
  76. function healthchanged(NPC, Spawn)
  77. if GetTempVariable(NPC, "CalloutTimer") == "false" and IsPlayer(Player) and IsAlive(NPC)==true then
  78. if GetTempVariable(NPC, "HealthCallout") == "false" then
  79. if GetHP(NPC) < GetMaxHP(NPC) * 0.55 and GetHP(NPC) > GetMaxHP(NPC) * 0.45 then
  80. SetTempVariable(NPC, "HealthCallout", "true")
  81. SetTempVariable(NPC, "CalloutTimer", "true")
  82. AddTimer(NPC,10000,"ResetTimer")
  83. AddTimer(NPC,12500,"HealthReset")
  84. if GetGender(NPC)==1 then
  85. local choice = MakeRandomInt(1,2)
  86. if choice == 1 then
  87. PlayFlavor(NPC, "voiceover/english/optional3/ratonga_base_1/ft/ratonga/ratonga_base_1_1_halfhealth_gm_a2ace12c.mp3", "Don't hurt us! We're no threat to your mightiness.", "", 3593075606, 2907318102)
  88. elseif choice == 2 then
  89. PlayFlavor(NPC, "voiceover/english/optional3/ratonga_base_1/ft/ratonga/ratonga_base_1_1_halfhealth_gm_9c7df7ea.mp3", "That patch of fur will never grow back, you know.", "", 2241929269, 2874755723)
  90. end
  91. else
  92. local choice = MakeRandomInt(1,2)
  93. if choice == 1 then
  94. PlayFlavor(NPC, "voiceover/english/optional3/ratonga_base_1/ft/ratonga/ratonga_base_1_1_halfhealth_gf_a2ace12c.mp3", "Don't hurt us! We're no threat to your mightiness.", "", 1631608737, 385456101)
  95. elseif choice == 2 then
  96. PlayFlavor(NPC, "voiceover/english/optional3/ratonga_base_1/ft/ratonga/ratonga_base_1_1_halfhealth_gf_9c7df7ea.mp3", "That patch of fur will never grow back, you know.", "", 4146309857, 1135607887)
  97. end
  98. end
  99. end
  100. end
  101. end
  102. end
  103. function victory(NPC,Spawn)
  104. if GetGender(NPC)==1 then
  105. local choice = MakeRandomInt(1,3)
  106. if choice == 1 then
  107. PlayFlavor(NPC, "voiceover/english/optional3/ratonga_base_1/ft/ratonga/ratonga_base_1_1_victory_gm_935883a.mp3", "Shhh ... shhh ... it's ok ... shhh ...shhh. Stop fighting it...", "", 1459182295, 1340643629)
  108. elseif choice == 2 then
  109. PlayFlavor(NPC, "voiceover/english/optional3/ratonga_base_1/ft/ratonga/ratonga_base_1_1_victory_gm_732f23e7.mp3", "The dead tell no tales", "", 636430623, 2715556056)
  110. elseif choice == 3 then
  111. PlayFlavor(NPC, "voiceover/english/optional3/ratonga_base_1/ft/ratonga/ratonga_base_1_1_victory_gm_15e8fc93.mp3","One less worry in my life!",4116602987,3804155045)
  112. end
  113. else
  114. local choice = MakeRandomInt(1,2)
  115. if choice == 1 then
  116. PlayFlavor(NPC, "voiceover/english/optional3/ratonga_base_1/ft/ratonga/ratonga_base_1_1_victory_gf_935883a.mp3", "Shhh ... shhh ... it's ok ... shhh ...shhh. Stop fighting it...", "", 1459182295, 1340643629)
  117. elseif choice == 2 then
  118. PlayFlavor(NPC, "voiceover/english/optional3/ratonga_base_1/ft/ratonga/ratonga_base_1_1_victory_gf_732f23e7.mp3", "The dead tell no tales", "", 636430623, 2715556056)
  119. end
  120. end
  121. end
  122. --end
  123. function ResetTimer(NPC) -- 7 SECOND PAUSE BETWEEN VOs
  124. SetTempVariable(NPC, "CalloutTimer", "false")
  125. end
  126. function HealthReset (NPC) --SO HALF HEALTH DOESN'T SPAM
  127. SetTempVariable(NPC, "HealthCallout", "false")
  128. end