BaseGoblin1.lua 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. --[[
  2. Script Name : SpawnScripts/Generic/MonsterCallouts/BaseGoblin1.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.09.28 07:09:37
  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 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_1_garbled_7e085e6a.mp3", "Hih hih hihaaaaaa gillysee beeeetahhh gim(laughing)", "", 1583213582, 800928147, Player, 20)
  17. elseif choice == 2 then
  18. PlayFlavor(NPC, "voiceover/english/goblin_base_1/ft/goblin/goblin_base_1_1_garbled_4e60f28a.mp3", "Eetabee wazzah net hava see", "", 4121161455, 2862267020, Player, 20)
  19. elseif choice == 3 then
  20. PlayFlavor(NPC, "voiceover/english/goblin_base_1/ft/goblin/goblin_base_1_1_garbled_27d93e2a.mp3", "Neeeh neeeeh vooooeee waddasee gai geee", "", 2062312678, 184868374, Player, 20)
  21. elseif choice == 4 then
  22. PlayFlavor(NPC, "voiceover/english/goblin_base_1/ft/goblin/goblin_base_1_1_garbled_91577ded.mp3", "Kai leeza watawonga sooo beeta hee hee(laugh)", "", 1583842231, 4206667097, 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,3)
  35. if choice == 1 then
  36. PlayFlavor(NPC, "voiceover/english/goblin_base_1/ft/goblin/goblin_base_1_1_aggro_3e6d7bc3.mp3", "They want to kill us all! Charge!","", 1297886042, 938149593, Player, 20)
  37. elseif choice == 2 then
  38. PlayFlavor(NPC, "voiceover/english/goblin_base_1/ft/goblin/goblin_base_1_1_aggro_b639fe0e.mp3", "Help! Help! Big ones coming!", "", 1606472655, 3222319850, Player, 20)
  39. elseif choice == 3 then
  40. PlayFlavor(NPC, "voiceover/english/goblin_base_1/ft/goblin/goblin_base_1_1_aggro_c4b47779.mp3", "Attack! Attack! Kill everything!", "", 2914843599, 3201999114, Player, 20)
  41. end
  42. end
  43. end
  44. end
  45. function death(NPC,Player)
  46. if GetTempVariable(NPC, "CalloutTimer")== "false" and IsPlayer(Player) then
  47. if math.random(0,100)<=35 then
  48. if not HasLanguage(Player,20 )then
  49. Garbled(NPC,Player)
  50. else
  51. local choice = MakeRandomInt(1,2)
  52. if choice == 1 then
  53. PlayFlavor(NPC, "voiceover/english/goblin_base_1/ft/goblin/goblin_base_1_1_death_a117394f.mp3", "We no can win, must flee!", "", 3582074720, 3132066359, Player, 20)
  54. elseif choice == 2 then
  55. PlayFlavor(NPC, "voiceover/english/goblin_base_1/ft/goblin/goblin_base_1_1_death_de31a5b3.mp3", "Run away! These ones too strong!", "", 45632181, 2602785034, Player, 20)
  56. end
  57. end
  58. end
  59. end
  60. end
  61. function FifteenCall(NPC,Player)
  62. if IsAlive(NPC) and IsInCombat(NPC)==true and IsPlayer(Player)and GetTempVariable(NPC, "CalloutTimer")== "false" then
  63. if math.random(0,100)<=33 then
  64. SetTempVariable(NPC, "CalloutTimer", "true")
  65. AddTimer(NPC,10000,"ResetTimer")
  66. if not HasLanguage(Player,20 )then
  67. Garbled(NPC,Player)
  68. else
  69. local choice = MakeRandomInt(1,2)
  70. if choice == 1 then
  71. PlayFlavor(NPC, "voiceover/english/goblin_base_1/ft/goblin/goblin_base_1_1_battle_fbf65c07.mp3", "Keep hitting till all fall down!", "", 3899483731, 1029218579, Player, 20)
  72. elseif choice == 2 then
  73. PlayFlavor(NPC, "voiceover/english/goblin_base_1/ft/goblin/goblin_base_1_1_battle_m_5bc8ba22.mp3", "Use the stabbie not clubbie!", "", 3466675620, 350505655, Player, 20)
  74. end
  75. end
  76. end
  77. if IsAlive(NPC)then
  78. AddTimer(NPC,math.random(15000,30000),"FifteenCall",1,Player)
  79. end
  80. end
  81. end
  82. function victory(NPC,Player)
  83. if IsPlayer(Player)and not HasLanguage(Player,20 )then
  84. Garbled(NPC,Player)
  85. elseif IsPlayer(Player) and HasLanguage(Player,20 )then
  86. PlayFlavor(NPC, "voiceover/english/goblin_base_1/ft/goblin/goblin_base_1_1_victory_f76bf039.mp3", "What I do now?", "", 3938448472, 456821246, Player, 20)
  87. end
  88. end