aGruttoothaggressor.lua 7.3 KB

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