Atramentor.lua 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. --[[
  2. Script Name : SpawnScripts/Caves/Atramentor.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.10.05 11:10:33
  5. Script Purpose :
  6. :
  7. --]]
  8. function spawn(NPC)
  9. end
  10. function aggro(NPC,Spawn)
  11. SpawnSet(NPC, "visual_state", 0)
  12. PlayAnimation(NPC, 13016)
  13. dmgMod = GetStr(NPC)/10
  14. SetInfoStructUInt(NPC, "override_primary_weapon", 1)
  15. SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(35 + dmgMod))
  16. SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(75 + dmgMod))
  17. end
  18. function respawn(NPC)
  19. spawn(NPC)
  20. end
  21. local HealthCallout = false --REDUCES Half-Health Spam
  22. local CalloutTimer = false --REDUCES Callout Spam
  23. function ResetTimer(NPC) -- 7 SECOND PAUSE BETWEEN VOs
  24. SetTempVariable(NPC, "CalloutTimer", "false")
  25. end
  26. function HealthReset (NPC) -- SO HALF HEALTH DOESN'T SPAM
  27. SetTempVariable(NPC, "HealthCallout", "false")
  28. end
  29. function Garbled(NPC,Player)
  30. local choice = MakeRandomInt(1,8)
  31. if choice == 1 then
  32. if choice == 1 then
  33. PlayFlavor(NPC, "voiceover/english/optional3/golem_base_1/ft/golem/golem_base_1_1_garbled_7c1e7a03.mp3", "Oerbet aertres nuavalen sulana", "", 294229851, 323943279, Player, 27)
  34. elseif choice == 2 then
  35. PlayFlavor(NPC, "voiceover/english/optional3/golem_base_1/ft/golem/golem_base_1_1_garbled_48632408.mp3", "Boona vas kontrella", "", 2577927628, 312715019, Player, 27)
  36. elseif choice == 3 then
  37. PlayFlavor(NPC, "voiceover/english/optional3/golem_base_1/ft/golem/golem_base_1_1_garbled_e0fead4d.mp3", "Pintoota kolata eldina mastarina", "", 2947217871, 3677590207, Player, 27)
  38. elseif choice == 4 then
  39. PlayFlavor(NPC, "voiceover/english/optional3/golem_base_1/ft/golem/golem_base_1_1_garbled_ba1c8454.mp3", "Ervmenta oolaves kor'tenza", "", 422166849, 245170409, Player, 27)
  40. elseif choice == 5 then
  41. PlayFlavor(NPC, "voiceover/english/optional5/golem_base_2/ft/golem/golem_base_2_1_garbled_e0fead4d.mp3", "Pintoota kolata eldina mastarina", "", 639170042, 3072010585, Player, 27)
  42. elseif choice == 6 then
  43. PlayFlavor(NPC, "voiceover/english/optional5/golem_base_2/ft/golem/golem_base_2_1_garbled_7c1e7a03.mp3", "Oerbet aertres nuavalen sulana", "", 2422828991, 2611697218, Player, 27)
  44. elseif choice == 7 then
  45. PlayFlavor(NPC, "voiceover/english/optional5/golem_base_2/ft/golem/golem_base_2_1_garbled_48632408.mp3", "Boona vas kontrella", "", 3186320893, 862014285, Player, 27)
  46. elseif choice == 8 then
  47. PlayFlavor(NPC, "voiceover/english/optional5/golem_base_2/ft/golem/golem_base_2_1_garbled_ba1c8454.mp3", "Ervmenta oolaves kor'tenza", "", 888692198, 2015697711, Player, 27)
  48. end
  49. end
  50. end
  51. function aggro(NPC,Player)
  52. SpawnSet(NPC, "visual_state", 0)
  53. SetTempVariable(NPC, "CalloutTimer", "false")
  54. if GetTempVariable(NPC, "CalloutTimer")== "false" and IsPlayer(Player) then
  55. SetTempVariable(NPC, "CalloutTimer", "true")
  56. AddTimer(NPC,10000,"ResetTimer")
  57. if not HasLanguage(Player,27 )then
  58. Garbled(NPC,Player)
  59. else
  60. local choice = MakeRandomInt(1,5)
  61. if choice == 1 then
  62. PlayFlavor(NPC, "voiceover/english/optional5/golem_base_2/ft/golem/golem_base_2_1_aggro_8c0c561c.mp3", "My master does not allow interruptions. ", "", 3022463100, 3116808293, Player, 27)
  63. elseif choice == 2 then
  64. PlayFlavor(NPC, "voiceover/english/optional3/golem_base_1/ft/golem/golem_base_1_1_aggro_16cd431.mp3", "Yes, my master, the intruder will die.", "", 257276325, 2522637460, Player, 27)
  65. elseif choice == 3 then
  66. PlayFlavor(NPC, "voiceover/english/optional5/golem_base_2/ft/golem/golem_base_2_1_aggro_11dc1958.mp3", "No guests allowed.", "", 3738509549, 661160854, Player, 27)
  67. elseif choice == 4 then
  68. PlayFlavor(NPC, "voiceover/english/optional3/golem_base_1/ft/golem/golem_base_1_1_aggro_b8540029.mp3", "The guardian obeys.", "", 769265419, 1578038738, Player, 27)
  69. elseif choice == 5 then
  70. PlayFlavor(NPC, "voiceover/english/optional3/golem_base_1/ft/golem/golem_base_1_1_aggro_703b6e79.mp3", "The mortals will perish.", "", 2360093588, 1657528756, Player, 27)
  71. end
  72. end
  73. end
  74. end
  75. function death(NPC,Player)
  76. if GetTempVariable(NPC, "CalloutTimer")== "false" and IsPlayer(Player) then
  77. if math.random(0,100)<=35 then
  78. if not HasLanguage(Player,27 )then
  79. Garbled(NPC,Player)
  80. else
  81. local choice = MakeRandomInt(1,5)
  82. if choice == 1 then
  83. PlayFlavor(NPC, "voiceover/english/optional3/golem_base_1/ft/golem/golem_base_1_1_death_621f26ae.mp3", "Master will make another.", "", 1723362223, 1880861825, Player, 27)
  84. elseif choice == 2 then
  85. PlayFlavor(NPC, "voiceover/english/optional3/golem_base_1/ft/golem/golem_base_1_1_death_e7820773.mp3", "You cannot defeat us all.", "", 3579670490, 2152032663, Player, 27)
  86. elseif choice == 3 then
  87. PlayFlavor(NPC, "voiceover/english/optional3/golem_base_1/ft/golem/golem_base_1_1_death_e7820773.mp3", "You cannot defeat us all.", "", 3579670490, 2152032663, Player, 27)
  88. elseif choice == 4 then
  89. PlayFlavor(NPC, "voiceover/english/optional5/golem_base_2/ft/golem/golem_base_2_1_death_6e0fe426.mp3", "So ends my service.", "", 3508288945, 550656700, Player, 27)
  90. elseif choice == 5 then
  91. PlayFlavor(NPC, "voiceover/english/optional5/golem_base_2/ft/golem/golem_base_2_1_death_7e77a73c.mp3", "There's always more.", "", 2395781453, 2542379752, Player, 27)
  92. end
  93. end
  94. end
  95. end
  96. end
  97. function healthchanged(NPC, Player)
  98. if GetTempVariable(NPC, "HealthCallout")== "false" and IsPlayer(Player) then
  99. if GetHP(NPC) < GetMaxHP(NPC) * 0.55 and GetHP(NPC) > GetMaxHP(NPC) * 0.45 then
  100. SetTempVariable(NPC, "HealthCallout", "true")
  101. AddTimer(NPC,10000,"HealthReset")
  102. if not HasLanguage(Player,27 )then
  103. Garbled(NPC,Player)
  104. else
  105. local choice = MakeRandomInt(1,3)
  106. if choice == 1 then
  107. PlayFlavor(NPC, "voiceover/english/optional3/golem_base_1/ft/golem/golem_base_1_1_halfhealth_56c106e.mp3", "I require repairs.", "", 957561407, 2078337123, Player, 27)
  108. elseif choice == 2 then
  109. PlayFlavor(NPC, "voiceover/english/optional5/golem_base_2/ft/golem/golem_base_2_1_halfhealth_6afbfbe4.mp3", "Don't let the intruders progress.", "", 206904711, 131378704, Player, 27)
  110. elseif choice == 3 then
  111. PlayFlavor(NPC, "voiceover/english/optional3/golem_base_1/ft/golem/golem_base_1_1_halfhealth_ea5a0760.mp3", "My service is almost done.", "", 3662264007, 3476541130, Player, 27)
  112. end
  113. end
  114. end
  115. end
  116. end