BaseGoblin3.lua 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. --[[
  2. Script Name : SpawnScripts/Generic/MonsterCallouts/BaseGoblin3.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.09.29 11:09:47
  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. CalloutTimer = false
  12. end
  13. function Garbled(NPC,Player)
  14. local choice = MakeRandomInt(1,4)
  15. if choice == 1 then
  16. PlayFlavor(NPC, "voiceover/english/goblin_base_1/ft/goblin/goblin_base_1_3_garbled_7e085e6a.mp3", "Hih hih hihaaaaaa gillysee beeeetahhh gim(laughing)", "", 3103048065, 3152132926, Player, 20)
  17. elseif choice == 2 then
  18. PlayFlavor(NPC, "voiceover/english/goblin_base_1/ft/goblin/goblin_base_1_3_garbled_4e60f28a.mp3", "Eetabee wazzah net hava see", "", 3809713828, 3345390840, Player, 20)
  19. elseif choice == 3 then
  20. PlayFlavor(NPC, "voiceover/english/goblin_base_1/ft/goblin/goblin_base_1_3_garbled_27d93e2a.mp3", "Neeeh neeeeh vooooeee waddasee gai geee", "", 2952555326, 1576893186, Player, 20)
  21. elseif choice == 4 then
  22. PlayFlavor(NPC, "voiceover/english/goblin_base_1/ft/goblin/goblin_base_1_3_garbled_91577ded.mp3", "Kai leeza watawonga sooo beeta hee hee(laugh)", "", 2141491347, 228693750, Player, 20)
  23. end
  24. end
  25. function aggro(NPC,Player)
  26. AddTimer(NPC,math.random(15000,30000),"FifteenCall",1,Player)
  27. SetTempVariable(NPC, "CalloutTimer", "false")
  28. if GetTempVariable(NPC, "CalloutTimer")== "false" and math.random(0,100) <=33 and IsPlayer(Player) then
  29. SetTempVariable(NPC, "CalloutTimer", "true")
  30. AddTimer(NPC,10000,"ResetTimer")
  31. if not HasLanguage(Player,20 )then
  32. Garbled(NPC,Player)
  33. else
  34. local choice = MakeRandomInt(1,4)
  35. if choice == 1 then
  36. PlayFlavor(NPC, "voiceover/english/goblin_base_1/ft/goblin/goblin_base_1_3_aggro_3e6d7bc3.mp3", "They want to kill us all! Charge!","", 914073629, 1820469708, Player, 20)
  37. elseif choice == 2 then
  38. PlayFlavor(NPC, "voiceover/english/goblin_base_1/ft/goblin/goblin_base_1_2_battle_7623c3ad.mp3", "Hit them! Smash the face!", "", 1669181471, 1013046182, Player, 20)
  39. elseif choice == 3 then
  40. PlayFlavor(NPC, "voiceover/english/goblin_base_1/ft/goblin/goblin_base_1_3_aggro_c4b47779.mp3", "Attack! Attack! Kill everything!", "", 2082649470, 2445537322, Player, 20)
  41. elseif choice == 4 then
  42. PlayFlavor(NPC, "voiceover/english/goblin_base_1/ft/goblin/goblin_base_1_3_aggro_b639fe0e.mp3", "Help! Help! Big ones coming!", "", 2997741713, 1924374162, Player, 20)
  43. end
  44. end
  45. end
  46. end
  47. function death(NPC,Player)
  48. if GetTempVariable(NPC, "CalloutTimer")== "false" and IsPlayer(Player) then
  49. if math.random(0,100)<=35 then
  50. if not HasLanguage(Player,20 )then
  51. Garbled(NPC,Player)
  52. else
  53. local choice = MakeRandomInt(1,2)
  54. if choice == 1 then
  55. PlayFlavor(NPC, "voiceover/english/goblin_base_1/ft/goblin/goblin_base_1_3_death_a117394f.mp3", "We no can win, must flee!", "", 1774554763, 2119888638, Player, 20)
  56. elseif choice == 2 then
  57. PlayFlavor(NPC, "voiceover/english/goblin_base_1/ft/goblin/goblin_base_1_3_death_de31a5b3.mp3", "Run away! These ones too strong!", "", 2392954105, 283933087, Player, 20)
  58. end
  59. end
  60. end
  61. end
  62. end
  63. function FifteenCall(NPC,Player)
  64. if IsAlive(NPC) and IsInCombat(NPC)==true and IsPlayer(Player)and GetTempVariable(NPC, "CalloutTimer")== "false" then
  65. if math.random(0,100)<=33 then
  66. SetTempVariable(NPC, "CalloutTimer", "true")
  67. AddTimer(NPC,10000,"ResetTimer")
  68. if not HasLanguage(Player,20 )then
  69. Garbled(NPC,Player)
  70. else
  71. local choice = MakeRandomInt(1,3)
  72. if choice == 1 then
  73. PlayFlavor(NPC, "voiceover/english/goblin_base_1/ft/goblin/goblin_base_1_3_battle_8c0ceaf2.mp3", "Me want to eat you skin!", "",1780889837, 392167583, Player, 20)
  74. elseif choice == 2 then
  75. PlayFlavor(NPC, "voiceover/english/goblin_base_1/ft/goblin/goblin_base_1_3_battle_fbf65c07.mp3", "Keep hitting till all fall down!", "", 3160402591, 1477074214, Player, 20)
  76. elseif choice == 3 then
  77. PlayFlavor(NPC, "voiceover/english/goblin_base_1/ft/goblin/goblin_base_1_2_battle_7623c3ad.mp3", "Hit them! Smash the face!", "", 1669181471, 1013046182, Player, 20)
  78. end
  79. end
  80. end
  81. if IsAlive(NPC)then
  82. AddTimer(NPC,math.random(15000,30000),"FifteenCall",1,Player)
  83. end
  84. end
  85. end
  86. function victory(NPC,Player)
  87. if IsPlayer(Player)and not HasLanguage(Player,20 )then
  88. Garbled(NPC,Player)
  89. elseif IsPlayer(Player) and HasLanguage(Player,20 )then
  90. PlayFlavor(NPC, "voiceover/english/goblin_base_1/ft/goblin/goblin_base_1_3_victory_f76bf039.mp3", "What I do now?", "", 1771001138, 2077807369, Player, 20)
  91. end
  92. end