9
3

BaseGoblin2.lua 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. --[[
  2. Script Name : SpawnScripts/Generic/MonsterCallouts/BaseGoblin2.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.09.29 03:09:02
  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_2_garbled_7e085e6a.mp3", "Hih hih hihaaaaaa gillysee beeeetahhh gim(laughing)", "", 3399890614, 264152008, Player, 20)
  17. elseif choice == 2 then
  18. PlayFlavor(NPC, "voiceover/english/goblin_base_1/ft/goblin/goblin_base_1_2_garbled_4e60f28a.mp3", "Eetabee wazzah net hava see", "", 1653288173, 4188680709, Player, 20)
  19. elseif choice == 3 then
  20. PlayFlavor(NPC, "voiceover/english/goblin_base_1/ft/goblin/goblin_base_1_2_garbled_27d93e2a.mp3", "Neeeh neeeeh vooooeee waddasee gai geee", "", 4004358685, 1661226684, Player, 20)
  21. elseif choice == 4 then
  22. PlayFlavor(NPC, "voiceover/english/goblin_base_1/ft/goblin/goblin_base_1_2_garbled_91577ded.mp3", "Kai leeza watawonga sooo beeta hee hee(laugh)", "", 937221476, 2685779061, 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_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_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_2_aggro_c4b47779.mp3", "Attack! Attack! Kill everything!", "", 3380426802, 2678177698, Player, 20)
  41. elseif choice == 3 then
  42. PlayFlavor(NPC, "voiceover/english/goblin_base_1/ft/goblin/goblin_base_1_2_aggro_b639fe0e.mp3", "Help! Help! Big ones coming!", "", 3389049362, 1602980703, 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_2_death_a117394f.mp3", "We no can win, must flee!", "", 700157407, 3625236831, Player, 20)
  56. elseif choice == 2 then
  57. 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)
  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,4)
  72. if choice == 1 then
  73. PlayFlavor(NPC, "voiceover/english/goblin_base_1/ft/goblin/goblin_base_1_2_battle_8c0ceaf2.mp3", "Me want to eat you skin!", "", 4260304461, 2785283618, Player, 20)
  74. elseif choice == 2 then
  75. PlayFlavor(NPC, "voiceover/english/goblin_base_1/ft/goblin/goblin_base_1_2_battle_164e4a4f.mp3", "Now, I go get little one ...ready?", "", 3942794123, 4207602069, Player, 20)
  76. elseif choice == 3 then
  77. PlayFlavor(NPC, "voiceover/english/goblin_base_1/ft/goblin/goblin_base_1_2_battle_fbf65c07.mp3", "Keep hitting till all fall down!", "", 4058596532, 1515408483, Player, 20)
  78. elseif choice == 4 then
  79. PlayFlavor(NPC, "voiceover/english/goblin_base_1/ft/goblin/goblin_base_1_2_battle_c_b9bf6e4d.mp3", "This one goes BOOM!", "", 2215482861, 2562924174, Player, 20)
  80. end
  81. end
  82. end
  83. if IsAlive(NPC)then
  84. AddTimer(NPC,math.random(15000,30000),"FifteenCall",1,Player)
  85. end
  86. end
  87. end
  88. function victory(NPC,Player)
  89. if IsPlayer(Player)and not HasLanguage(Player,20 )then
  90. Garbled(NPC,Player)
  91. elseif IsPlayer(Player) and HasLanguage(Player,20 )then
  92. PlayFlavor(NPC, "voiceover/english/goblin_base_1/ft/goblin/goblin_base_1_2_victory_f76bf039.mp3", "What I do now?", "", 1862619283, 2206242734, Player, 20)
  93. end
  94. end