9
3

aGruttoothsparkcaster.lua 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. --[[
  2. Script Name : SpawnScripts/GrimgashsLair/aGruttoothsparkcaster.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.09.23 01:09:03
  5. Script Purpose :
  6. :
  7. --]]
  8. require "SpawnScripts/Generic/NPCModule"
  9. function spawn(NPC, Spawn)
  10. NPCModule(NPC, Spawn)
  11. end
  12. function respawn(NPC)
  13. spawn(NPC)
  14. end
  15. function death(NPC,Spawn)
  16. local zone = GetZone(NPC)
  17. local Gob1 = GetSpawnByLocationID(zone, 133776472)
  18. local Gob2 = GetSpawnByLocationID(zone, 133776473)
  19. local Gob3 = GetSpawnByLocationID(zone, 133776474)
  20. local GobChamp = GetSpawnByLocationID(zone, 133776471)
  21. local Grimgash = GetSpawnByLocationID(zone, 133776469)
  22. if IsAlive(Gob1) == false and IsAlive(Gob2) == false and IsAlive(Gob3) == false then
  23. SetTarget(Grimgash,Spawn)
  24. SetTarget(GobChamp,Spawn)
  25. FaceTarget(Grimgash,Spawn)
  26. FaceTarget(GobChamp,Spawn)
  27. AddTimer(NPC,1200,"Taunt",1,Spawn)
  28. AddTimer(NPC,5000,"GrimAttack",1,Spawn)
  29. end
  30. end
  31. function Taunt(NPC,Spawn)
  32. local zone = GetZone(NPC)
  33. local GobChamp = GetSpawnByLocationID(zone, 133776471)
  34. local Grimgash = GetSpawnByLocationID(zone, 133776469)
  35. if not HasLanguage(Spawn,20)then
  36. 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)
  37. else
  38. 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)
  39. end
  40. PlayFlavor(Grimgash,"","","shakefist",0,0)
  41. end
  42. function GrimAttack(NPC,Spawn)
  43. local zone = GetZone(NPC)
  44. local GobChamp = GetSpawnByLocationID(zone, 133776471)
  45. local Grimgash = GetSpawnByLocationID(zone, 133776469)
  46. Attack(Grimgash,Spawn)
  47. end