9
3

aGruttoothprotector.lua 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. --[[
  2. Script Name : SpawnScripts/GrimgashsLair/aGruttoothprotector.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.09.23 12:09:07
  5. Script Purpose :
  6. :
  7. --]]
  8. function spawn(NPC)
  9. AddTimer(NPC,2000,"EmoteLoop")
  10. end
  11. function EmoteLoop(NPC,Spawn)
  12. if IsInCombat(NPC) == false and HasMoved(NPC)==false then
  13. choice = MakeRandomInt(1,10)
  14. if choice == 1 then
  15. PlayFlavor(NPC, "", "", "treaten", 0, 0, Spawn, 0)
  16. elseif choice == 2 then
  17. PlayFlavor(NPC, "", "", "sniff", 0, 0, Spawn, 0)
  18. elseif choice == 3 then
  19. PlayFlavor(NPC, "", "", "frustrated", 0, 0, Spawn, 0)
  20. elseif choice == 4 then
  21. PlayFlavor(NPC, "", "", "peer", 0, 0, Spawn, 0)
  22. elseif choice == 5 then
  23. PlayFlavor(NPC, "", "", "feint", 0, 0, Spawn, 0)
  24. elseif choice == 6 then
  25. PlayFlavor(NPC, "", "", "confused", 0, 0, Spawn, 0)
  26. elseif choice == 7 then
  27. PlayFlavor(NPC, "", "", "treaten", 0, 0, Spawn, 0)
  28. elseif choice == 8 then
  29. PlayFlavor(NPC, "", "", "stare", 0, 0, Spawn, 0)
  30. elseif choice == 9 then
  31. PlayFlavor(NPC, "", "", "brandish", 0, 0, Spawn, 0)
  32. elseif choice == 10 then
  33. PlayFlavor(NPC, "", "", "cackle", 0, 0, Spawn, 0)
  34. end
  35. AddTimer(NPC,MakeRandomInt(7000,9000),"EmoteLoop")
  36. else
  37. AddTimer(NPC,MakeRandomInt(10000,11000),"EmoteLoop")
  38. end
  39. end
  40. function death(NPC,Spawn)
  41. local zone = GetZone(NPC)
  42. local Gob1 = GetSpawnByLocationID(zone, 133776472)
  43. local Gob2 = GetSpawnByLocationID(zone, 133776473)
  44. local Gob3 = GetSpawnByLocationID(zone, 133776474)
  45. local GobChamp = GetSpawnByLocationID(zone, 133776471)
  46. local Grimgash = GetSpawnByLocationID(zone, 133776469)
  47. if IsAlive(Gob1) == false and IsAlive(Gob2) == false and IsAlive(Gob3) == false then
  48. if IsInCombat(Grimgash)==false then
  49. SetTarget(Grimgash,Spawn)
  50. SetTarget(GobChamp,Spawn)
  51. FaceTarget(Grimgash,Spawn)
  52. FaceTarget(GobChamp,Spawn)
  53. AddTimer(NPC,1200,"Taunt",1,Spawn)
  54. AddTimer(NPC,5000,"GrimAttack",1,Spawn)
  55. end
  56. end
  57. end
  58. function Taunt(NPC,Spawn)
  59. local zone = GetZone(NPC)
  60. local GobChamp = GetSpawnByLocationID(zone, 133776471)
  61. local Grimgash = GetSpawnByLocationID(zone, 133776469)
  62. if not HasLanguage(Spawn,20)then
  63. PlayFlavor(GobChamp,"voiceover/english/goblin_base_1/ft/goblin/goblin_base_1_2_garbled_27d93e2a.mp3","They want to kill us all! Charge!","point",4004358685,1661226684,Spawn,20)
  64. else
  65. PlayFlavor(GobChamp,"voiceover/english/goblin_base_1/ft/goblin/goblin_base_1_1_aggro_3e6d7bc3.mp3","They want to kill us all! Charge!","point",1297886042,938149593,Spawn,20)
  66. end
  67. PlayFlavor(Grimgash,"","","shakefist",0,0)
  68. end
  69. function GrimAttack(NPC,Spawn)
  70. local zone = GetZone(NPC)
  71. local GobChamp = GetSpawnByLocationID(zone, 133776471)
  72. local Grimgash = GetSpawnByLocationID(zone, 133776469)
  73. Attack(Grimgash,Spawn)
  74. end