9
3

aGruttoothaggressor.lua 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  1. --[[
  2. Script Name : SpawnScripts/IsleRefuge1/aGruttoothaggressor.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.09.08 03:09:47
  5. Script Purpose :
  6. :
  7. --]]
  8. dofile("SpawnScripts/Generic/MonsterCallouts/BaseGoblin1.lua")
  9. require "SpawnScripts/Generic/NPCModule"
  10. function spawn(NPC, Spawn)
  11. NPCModule(NPC, Spawn)
  12. EmoteLoop(NPC,Spawn)
  13. SetTempVariable(NPC,"Update","false")
  14. end
  15. function hailed(NPC, Spawn)
  16. end
  17. function respawn(NPC)
  18. spawn(NPC)
  19. end
  20. function casted_on(NPC, Spawn, SpellName) --Priests use minor heal if the deer is diseased. These deer will then give updates for scouts to scouts.
  21. if SpellName == 'Taunt' then
  22. if GetQuestStep(Spawn, 5739) ==1 then
  23. SetTempVariable(NPC,"Update","true")
  24. end
  25. end
  26. end
  27. --function aggro(NPC,Spawn)
  28. --if GetQuestStep(Spawn, 5739)==1 then
  29. function EmoteLoop(NPC,Spawn)
  30. if IsInCombat(NPC) == false then
  31. choice = MakeRandomInt(1,13)
  32. if choice == 1 then
  33. PlayFlavor(NPC, "", "", "neener", 0, 0, Spawn, 0)
  34. elseif choice == 2 then
  35. PlayFlavor(NPC, "", "", "rude", 0, 0, Spawn, 0)
  36. elseif choice == 3 then
  37. PlayFlavor(NPC, "", "", "flirt", 0, 0, Spawn, 0)
  38. elseif choice == 4 then
  39. PlayFlavor(NPC, "", "", "woowoo", 0, 0, Spawn, 0)
  40. elseif choice == 5 then
  41. PlayFlavor(NPC, "", "", "shakefist", 0, 0, Spawn, 0)
  42. elseif choice == 6 then
  43. PlayFlavor(NPC, "", "", "flex", 0, 0, Spawn, 0)
  44. elseif choice == 7 then
  45. PlayFlavor(NPC, "", "", "cutthroat", 0, 0, Spawn, 0)
  46. elseif choice == 8 then
  47. PlayFlavor(NPC, "", "", "cackle", 0, 0, Spawn, 0)
  48. elseif choice == 9 then
  49. PlayFlavor(NPC, "", "", "feint", 0, 0, Spawn, 0)
  50. elseif choice == 10 then
  51. PlayFlavor(NPC, "", "", "squeal", 0, 0, Spawn, 0)
  52. elseif choice == 11 then
  53. PlayFlavor(NPC, "", "", "peer", 0, 0, Spawn, 0)
  54. elseif choice == 12 then
  55. PlayFlavor(NPC, "", "", "flirt", 0, 0, Spawn, 0)
  56. elseif choice == 13 then
  57. PlayFlavor(NPC, "", "", "square", 0, 0, Spawn, 0)
  58. end
  59. AddTimer(NPC,MakeRandomInt(7000,9000),"EmoteLoop")
  60. else
  61. AddTimer(NPC,MakeRandomInt(10000,11000),"EmoteLoop")
  62. end
  63. end
  64. local HealthCallout = false --REDUCES Half-Health Spam
  65. local CalloutTimer = false --REDUCES Callout Spam
  66. function ResetTimer(NPC) -- 7 SECOND PAUSE BETWEEN VOs
  67. SetTempVariable(NPC, "CalloutTimer", "false")
  68. end
  69. function Garbled(NPC,Player)
  70. local choice = MakeRandomInt(1,4)
  71. if choice == 1 then
  72. 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)
  73. elseif choice == 2 then
  74. 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)
  75. elseif choice == 3 then
  76. 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)
  77. elseif choice == 4 then
  78. 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)
  79. end
  80. end
  81. function aggro(NPC,Player)
  82. AddTimer(NPC,math.random(15000,30000),"FifteenCall",1,Player)
  83. SetTempVariable(NPC, "CalloutTimer", "false")
  84. if GetTempVariable(NPC, "CalloutTimer")== "false" and math.random(0,100) <=33 and IsPlayer(Player) then
  85. SetTempVariable(NPC, "CalloutTimer", "true")
  86. AddTimer(NPC,10000,"ResetTimer")
  87. if not HasLanguage(Player,20 )then
  88. Garbled(NPC,Player)
  89. else
  90. local choice = MakeRandomInt(1,3)
  91. if choice == 1 then
  92. 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)
  93. elseif choice == 2 then
  94. 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)
  95. elseif choice == 3 then
  96. PlayFlavor(NPC, "voiceover/english/goblin_base_1/ft/goblin/goblin_base_1_1_aggro_c4b47779.mp3", "Attack! Attack! Kill everything!", "", 2914843599, 3201999114, Player, 20)
  97. end
  98. end
  99. end
  100. end
  101. function FifteenCall(NPC,Player)
  102. if IsAlive(NPC) and IsInCombat(NPC)==true and IsPlayer(Player)and GetTempVariable(NPC, "CalloutTimer")== "false" then
  103. if math.random(0,100)<=33 then
  104. SetTempVariable(NPC, "CalloutTimer", "true")
  105. AddTimer(NPC,10000,"ResetTimer")
  106. if not HasLanguage(Player,20 )then
  107. Garbled(NPC,Player)
  108. else
  109. local choice = MakeRandomInt(1,2)
  110. if choice == 1 then
  111. 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)
  112. elseif choice == 2 then
  113. 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)
  114. end
  115. end
  116. end
  117. if IsAlive(NPC)then
  118. AddTimer(NPC,math.random(15000,30000),"FifteenCall",1,Player)
  119. end
  120. end
  121. end
  122. function victory(NPC,Player)
  123. if IsPlayer(Player)and not HasLanguage(Player,20 )then
  124. Garbled(NPC,Player)
  125. elseif IsPlayer(Player) and HasLanguage(Player,20 )then
  126. PlayFlavor(NPC, "voiceover/english/goblin_base_1/ft/goblin/goblin_base_1_1_victory_f76bf039.mp3", "What I do now?", "", 3938448472, 456821246, Player, 20)
  127. end
  128. end
  129. function death(NPC,Spawn)
  130. if GetTempVariable(NPC, "CalloutTimer")== "false" and IsPlayer(Player) then
  131. if math.random(0,100)<=35 then
  132. if not HasLanguage(Player,20 )then
  133. Garbled(NPC,Player)
  134. else
  135. local choice = MakeRandomInt(1,2)
  136. if choice == 1 then
  137. 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)
  138. elseif choice == 2 then
  139. 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)
  140. end
  141. end
  142. end
  143. end
  144. if GetQuestStep(Spawn, 5739)==1 then
  145. if GetTempVariable(NPC,"Update")=="true" then
  146. AddStepProgress(Spawn,5739,1,1)
  147. else
  148. SendMessage(Spawn, "You must 'TAUNT' the Gruttooth aggressors if you wish to demonstrate your battle prowess.")
  149. SendPopUpMessage(Spawn, "You must 'TAUNT' the Gruttooth aggressors.",200, 200, 200)
  150. end
  151. end
  152. end