BaseSkeleton2.lua 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. --[[
  2. Script Name : SpawnScripts/Generic/MonsterCallouts/BaseSkeleton2.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.07.23 02:07:57
  5. Script Purpose : Base 2 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,3)
  34. if choice == 1 then
  35. PlayFlavor(NPC, "voiceover/english/optional3/skeleton_base_2/ft/skeleton/skeleton_base_2_1_aggro_c6c2672d.mp3", "Brains! It's what's for dinner.", "", 2091371377, 2422178491)
  36. elseif choice == 2 then
  37. PlayFlavor(NPC, "voiceover/english/optional3/skeleton_base_2/ft/skeleton/skeleton_base_2_1_aggro_18d1544d.mp3", "As I rise from the grave, you will now take my place!", "", 485726074, 3646499350)
  38. elseif choice == 3 then
  39. PlayFlavor(NPC, "voiceover/english/optional3/skeleton_base_2/ft/skeleton/skeleton_base_2_1_aggro_daf16808.mp3", "To the grave with you!", "", 958122326, 1810359159)
  40. end
  41. AddTimer(NPC,math.random(15000,30000),"FifteenCall")
  42. end
  43. function death(NPC,Spawn)
  44. if GetTempVariable(NPC, "CalloutTimer")== "false" then
  45. local choice = MakeRandomInt(1,2)
  46. if choice == 1 then
  47. PlayFlavor(NPC, "voiceover/english/optional3/skeleton_base_2/ft/skeleton/skeleton_base_2_1_death_bb6b2b8e.mp3", "You cannot eliminate us!", "", 897103301, 541292352)
  48. elseif choice == 2 then
  49. PlayFlavor(NPC, "voiceover/english/optional3/skeleton_base_2/ft/skeleton/skeleton_base_2_1_death_edc04fb8.mp3", "That pile of bones was my friend!", "", 2317728806, 1758283676)
  50. end
  51. end
  52. end
  53. function FifteenCall(NPC,Player)
  54. if IsInCombat(NPC)==true and IsAlive(NPC) == true and math.random(0,100)<=25 then
  55. if GetTempVariable(NPC, "CalloutTimer") == "false" then
  56. SetTempVariable(NPC, "CalloutTimer", "true")
  57. AddTimer(NPC,10000,"ResetTimer")
  58. local choice = MakeRandomInt(1,3)
  59. if choice == 1 then
  60. PlayFlavor(NPC, "voiceover/english/skeleton_base_1/ft/skeleton/skeleton_base_1_1_everyfifteenseconds_8c0aac8c.mp3", "Nightmares are not only for slumber.", "", 4250803944, 3206368665)
  61. elseif choice == 2 then
  62. 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)
  63. elseif choice == 3 then
  64. 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)
  65. end
  66. end
  67. if IsAlive(NPC)then
  68. AddTimer(NPC,math.random(15000,30000),"FifteenCall")
  69. end
  70. end
  71. end
  72. function healthchanged(NPC, Spawn)
  73. if GetTempVariable(NPC, "CalloutTimer") == "false" then
  74. if GetTempVariable(NPC, "HealthCallout") == "false" then
  75. if GetHP(NPC) < GetMaxHP(NPC) * 0.55 then
  76. if GetHP(NPC) > GetMaxHP(NPC) * 0.45 then
  77. SetTempVariable(NPC, "HealthCallout", "true")
  78. SetTempVariable(NPC, "CalloutTimer", "true")
  79. AddTimer(NPC,10000,"ResetTimer")
  80. AddTimer(NPC,12500,"HealthReset")
  81. local choice = MakeRandomInt(1,2)
  82. if choice == 1 then
  83. PlayFlavor(NPC, "voiceover/english/optional3/skeleton_base_2/ft/skeleton/skeleton_base_2_1_halfhealth_f1d542e0.mp3", "Dying didn't feel good the first time.", "", 766636803, 1915881366)
  84. elseif choice == 2 then
  85. PlayFlavor(NPC, "voiceover/english/optional3/skeleton_base_2/ft/skeleton/skeleton_base_2_1_halfhealth_29344c6f.mp3", "I didn't need those bones anyway.", "", 1704957193, 2042978689)
  86. end
  87. end
  88. end
  89. end
  90. end
  91. end
  92. function victory(NPC,Spawn)
  93. local choice = MakeRandomInt(1,3)
  94. if choice == 1 then
  95. PlayFlavor(NPC, "voiceover/english/optional3/skeleton_base_2/ft/skeleton/skeleton_base_2_1_victory_39c9d69e.mp3", "We're all just bones in the end.", "", 3276297174, 633510318)
  96. elseif choice == 2 then
  97. PlayFlavor(NPC, "voiceover/english/optional3/skeleton_base_2/ft/skeleton/skeleton_base_2_1_victory_cbcd383a.mp3", "Their bones will join mine!", "", 680786598, 666536798)
  98. elseif choice == 3 then
  99. PlayFlavor(NPC, "voiceover/english/optional3/skeleton_base_2/ft/skeleton/skeleton_base_2_1_victory_d7e375be.mp3", "Never too early to slumber in the grave.", "", 353194320, 2589250240)
  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. end