9
3

BaseSkeleton1.lua 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. --[[
  2. Script Name : SpawnScripts/Generic/MonsterCallouts/BaseSkeleton1.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.07.23 12:07:01
  5. Script Purpose : Base 1 Skeleton Voiceovers
  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", "true")
  32. AddTimer(NPC,10000,"ResetTimer")
  33. local choice = MakeRandomInt(1,4)
  34. if choice == 1 then
  35. PlayFlavor(NPC, "voiceover/english/skeleton_base_1/ft/skeleton/skeleton_base_1_1_aggro_c77d7bff.mp3", "Your eyes are so pretty.", "", 1412152942, 873988632)
  36. elseif choice == 2 then
  37. PlayFlavor(NPC, "voiceover/english/skeleton_base_1/ft/skeleton/skeleton_base_1_1_aggro_2168c5.mp3", "Seek death and it finds you.", "", 2988489621, 1045543573)
  38. elseif choice == 3 then
  39. PlayFlavor(NPC, "voiceover/english/skeleton_base_1/ft/skeleton/skeleton_base_1_1_aggro_8bc7a2cc.mp3", "Your blood calls to me.", "", 1242322025, 1154999668)
  40. elseif choice == 4 then
  41. if GetClass(Spawn)>=1 and GetClass(Spawn)<=10 then
  42. PlayFlavor(NPC, "voiceover/english/skeleton_base_1/ft/skeleton/skeleton_base_1_1_maofighter_ca2c63b.mp3", "Try your weapons on me fighter.", "", 3164950968, 4289608686)
  43. else
  44. PlayFlavor(NPC, "voiceover/english/skeleton_base_1/ft/skeleton/skeleton_base_1_1_aggro_2168c5.mp3", "Seek death and it finds you.", "", 2988489621, 1045543573)
  45. end
  46. end
  47. AddTimer(NPC,math.random(15000,30000),"FifteenCall",1,Spawn)
  48. end
  49. function death(NPC,Spawn)
  50. if GetTempVariable(NPC, "CalloutTimer")== "false" and IsPlayer(Spawn) then
  51. local choice = MakeRandomInt(1,2)
  52. if choice == 1 then
  53. PlayFlavor(NPC, "voiceover/english/skeleton_base_1/ft/skeleton/skeleton_base_1_1_death_ff39f327.mp3", "Final death comes at last.", "", 3768284332, 62777040)
  54. elseif choice == 2 then
  55. PlayFlavor(NPC, "voiceover/english/skeleton_base_1/ft/skeleton/skeleton_base_1_1_death_fbcb503b.mp3", "Rest in peace.", "", 3591309093, 1423656405)
  56. end
  57. end
  58. end
  59. function FifteenCall(NPC,Spawn)
  60. if IsInCombat(NPC)==true and IsAlive(NPC) == true and math.random(0,100)<=25 and IsPlayer(Spawn) then
  61. if GetTempVariable(NPC, "CalloutTimer") == "false" then
  62. SetTempVariable(NPC, "CalloutTimer", "true")
  63. AddTimer(NPC,10000,"ResetTimer")
  64. local choice = MakeRandomInt(1,3)
  65. if choice == 1 then
  66. PlayFlavor(NPC, "voiceover/english/skeleton_base_1/ft/skeleton/skeleton_base_1_1_everyfifteenseconds_8c0aac8c.mp3", "Nightmares are not only for slumber.", "", 4250803944, 3206368665)
  67. elseif choice == 2 then
  68. PlayFlavor(NPC, "voiceover/english/skeleton_base_1/ft/skeleton/skeleton_base_1_1_everyfifteenseconds_m_62f06fca.mp3", "You cannot cut what does not bleed.", "", 2912039571, 2278337941)
  69. elseif choice == 3 then
  70. PlayFlavor(NPC, "voiceover/english/skeleton_base_1/ft/skeleton/skeleton_base_1_1_everyfifteenseconds_e661e726.mp3", "I'll choke the breath from your lungs.", "", 2746342738, 2521715261)
  71. end
  72. end
  73. if IsAlive(NPC)then
  74. AddTimer(NPC,math.random(15000,30000),"FifteenCall",1,Spawn)
  75. end
  76. end
  77. end
  78. function healthchanged(NPC, Spawn)
  79. if GetTempVariable(NPC, "CalloutTimer") == "false" and IsPlayer(Spawn) then
  80. if GetTempVariable(NPC, "HealthCallout") == "false" then
  81. if GetHP(NPC) < GetMaxHP(NPC) * 0.55 then
  82. if GetHP(NPC) > GetMaxHP(NPC) * 0.45 then
  83. SetTempVariable(NPC, "HealthCallout", "true")
  84. SetTempVariable(NPC, "CalloutTimer", "true")
  85. AddTimer(NPC,10000,"ResetTimer")
  86. AddTimer(NPC,12500,"HealthReset")
  87. local choice = MakeRandomInt(1,2)
  88. if choice == 1 then
  89. PlayFlavor(NPC, "voiceover/english/skeleton_base_1/ft/skeleton/skeleton_base_1_1_halfhealth_d9ece37f.mp3", "You've shaken the dust from my bones.", "", 2011286772, 326848383)
  90. elseif choice == 2 then
  91. PlayFlavor(NPC, "voiceover/english/skeleton_base_1/ft/skeleton/skeleton_base_1_1_halfhealth_a4c947e4.mp3", "I'm shattered and broken.", "", 4021018144, 1305053073)
  92. end
  93. end
  94. end
  95. end
  96. end
  97. end
  98. function victory(NPC,Spawn)
  99. local choice = MakeRandomInt(1,3)
  100. if choice == 1 then
  101. PlayFlavor(NPC, "voiceover/english/skeleton_base_1/ft/skeleton/skeleton_base_1_1_victory_d2a649e7.mp3", "The life ebbs from them so quickly.", "", 2674394976, 3151731037)
  102. elseif choice == 2 then
  103. PlayFlavor(NPC, "voiceover/english/skeleton_base_1/ft/skeleton/skeleton_base_1_1_victory_fda8e7a9.mp3", "So stops the awful beating of their heart.", "", 1120117600, 3872148135)
  104. elseif choice == 3 then
  105. PlayFlavor(NPC, "voiceover/english/skeleton_base_1/ft/skeleton/skeleton_base_1_1_victory_ccde17c2.mp3", "Another falls to join our ranks.", "", 3285235030, 4198320186)
  106. end
  107. end
  108. function ResetTimer(NPC) -- 7 SECOND PAUSE BETWEEN VOs
  109. SetTempVariable(NPC, "CalloutTimer", "false")
  110. end
  111. function HealthReset (NPC) --SO HALF HEALTH DOESN'T SPAM
  112. SetTempVariable(NPC, "HealthCallout", "false")
  113. end