BaseFairy1.lua 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. --[[
  2. Script Name : SpawnScripts/Generic/MonsterCallouts/BaseFairy1.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.10.22 12:10:43
  5. Script Purpose :
  6. :
  7. --]]
  8. local HealthCallout = false --REDUCES Half-Health Spam
  9. local CalloutTimer = false --REDUCES Callout Spam
  10. function ResetTimer(NPC) -- 7 SECOND PAUSE BETWEEN VOs
  11. SetTempVariable(NPC, "CalloutTimer", "false")
  12. end
  13. function HealthReset (NPC) --SO HALF HEALTH DOESN'T SPAM
  14. SetTempVariable(NPC, "HealthCallout", "false")
  15. end
  16. function Garbled(NPC,Player)
  17. local choice = MakeRandomInt(1,4)
  18. if choice == 1 then
  19. PlayFlavor(NPC, "voiceover/english/optional3/fairy_bog/ft/fairy/fairy_bog_1_garbled_628bdbdb.mp3", "Meraania suvalas itresteien", "", 711889774, 2079504251, Player, 23)
  20. elseif choice == 2 then
  21. PlayFlavor(NPC, "voiceover/english/optional3/fairy_bog/ft/fairy/fairy_bog_1_garbled_e858f993.mp3", "Tawaneee follahh dilifilongia avee", "", 2527230882, 3520925768,Player, 23)
  22. elseif choice == 3 then
  23. PlayFlavor(NPC, "voiceover/english/optional3/fairy_bog/ft/fairy/fairy_bog_1_garbled_29e4606e.mp3", "Peelahha misialloniassaa laliallasala", "", 4233892159, 3471050504, Player, 23)
  24. elseif choice == 4 then
  25. PlayFlavor(NPC, "voiceover/english/optional3/fairy_bog/ft/fairy/fairy_bog_1_garbled_dfa9e7d9.mp3", "Amamooenoo illysavah leetah", "", 2254044711, 2481645116, Player, 23)
  26. end
  27. end
  28. function aggro(NPC,Player)
  29. SetTempVariable(NPC, "CalloutTimer", "false")
  30. if GetTempVariable(NPC, "CalloutTimer")== "false" and math.random(0,100) <=33 and IsPlayer(Player) then
  31. SetTempVariable(NPC, "CalloutTimer", "true")
  32. AddTimer(NPC,10000,"ResetTimer")
  33. if not HasLanguage(Player,23 )then
  34. Garbled(NPC,Player)
  35. else
  36. local choice = MakeRandomInt(1,4)
  37. if choice == 1 then
  38. PlayFlavor(NPC, "", "Hey! Do you want to be friends?", "", 0, 0, Player, 23)
  39. elseif choice == 2 then
  40. PlayFlavor(NPC, "", "Hello! I've never seen you before!", "", 0, 0, Player, 23)
  41. elseif choice == 3 then
  42. PlayFlavor(NPC, "", "Hi! What's your name?", "", 0, 0, Player, 23)
  43. elseif choice == 4 then
  44. PlayFlavor(NPC, "", "So you want to fight us too, eh?", "", 0, 0, Player, 23)
  45. end
  46. end
  47. end
  48. end
  49. function death(NPC,Player)
  50. if GetTempVariable(NPC, "CalloutTimer")== "false" and IsPlayer(Player) then
  51. if math.random(0,100)<=35 then
  52. if not HasLanguage(Player,23 )then
  53. Garbled(NPC,Player)
  54. else
  55. local choice = MakeRandomInt(1,2)
  56. if choice == 1 then
  57. PlayFlavor(NPC, "", "Why won't my companion quit pretending to be dead?", "", 0, 0, Player, 23)
  58. elseif choice == 2 then
  59. PlayFlavor(NPC, "", "Oh no... You got red stuff all over my wings!", "", 0, 0, Player, 23)
  60. end
  61. end
  62. end
  63. end
  64. end
  65. function healthchanged(NPC, Player)
  66. if GetTempVariable(NPC, "CalloutTimer") == "false" and IsPlayer(Player) and IsAlive(NPC)==true then
  67. if GetTempVariable(NPC, "HealthCallout") == "false" then
  68. if GetHP(NPC) < GetMaxHP(NPC) * 0.55 and GetHP(NPC) > GetMaxHP(NPC) * 0.45 then
  69. SetTempVariable(NPC, "HealthCallout", "true")
  70. SetTempVariable(NPC, "CalloutTimer", "true")
  71. AddTimer(NPC,10000,"ResetTimer")
  72. AddTimer(NPC,12500,"HealthReset")
  73. if not HasLanguage(Spawn,23 )then
  74. Garbled(NPC,Player)
  75. else
  76. local choice = MakeRandomInt(1,3)
  77. if choice == 1 then
  78. PlayFlavor(NPC, "", "Owww!!! Don't hit so hard, okay?", "", 0, 0, Player, 23)
  79. elseif choice == 2 then
  80. PlayFlavor(NPC, "", "You're serious about this, right?", "", 0, 0, Player, 23)
  81. elseif choice == 3 then
  82. PlayFlavor(NPC, "", "Please... Please don't kill me...", "", 0, 0, Player, 23)
  83. end
  84. end
  85. end
  86. end
  87. end
  88. end
  89. function HealthReset (NPC)
  90. HealthCallout = false
  91. end
  92. function victory(NPC,Player)
  93. if not HasLanguage(Player,23 )then
  94. Garbled(NPC,Player)
  95. else
  96. local choice = MakeRandomInt(1,3)
  97. if choice == 1 then
  98. PlayFlavor(NPC, "", "They stopped moving! Why aren't they moving?", "", 0, 0, Player, 23)
  99. elseif choice == 2 then
  100. PlayFlavor(NPC, "", "Now, did you learn anything?", "", 0, 0, Player, 23)
  101. elseif choice == 3 then
  102. PlayFlavor(NPC, "", "Why must it come to this?", "", 0, 0, Player, 23)
  103. end
  104. end
  105. end