analabastergolem.lua 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. --[[
  2. Script Name : SpawnScripts/Caves/analabastergolem.lua
  3. Script Purpose : an alabaster golem
  4. Script Author : LordPazuzu
  5. Script Date : 10/2/2022
  6. Script Notes :
  7. --]]
  8. dofile("SpawnScripts/Generic/MonsterCallouts/BaseGolem1.lua")
  9. dofile("SpawnScripts/Generic/CatalogueQuestUpdates.lua")
  10. require "SpawnScripts/Generic/NPCModule"
  11. function spawn(NPC, Spawn)
  12. NPCModule(NPC, Spawn)
  13. SetSpawnAnimation(NPC, 13016)
  14. AddTimer(NPC,math.random(2500,6000),"AttackRocks")
  15. end
  16. function respawn(NPC)
  17. spawn(NPC)
  18. end
  19. function AttackRocks(NPC)
  20. if not IsInCombat(NPC) then
  21. PlayAnimation(NPC,10783)
  22. end
  23. AddTimer(NPC, math.random(7000,8500), "AttackRocks")
  24. end
  25. --[[
  26. local rockattack = math.random (1, 4)
  27. if rockattack == 1 then
  28. AddTimer(NPC, 100, "stop_attack")
  29. else
  30. AddTimer(NPC, 100, "Rocks")
  31. end ]]--
  32. --[[function Rocks(NPC)
  33. if not IsInCombat(NPC) then
  34. SpawnSet(NPC, "visual_state", "10783") -- Start attacking
  35. end
  36. AddTimer(NPC, 3500, "stop_attack") -- for 2 seconds, then stop
  37. end
  38. function stop_attack(NPC)
  39. SpawnSet(NPC, "visual_state", "0") -- Stop attacking
  40. AddTimer(NPC, 8000, "AttackRocks")
  41. end]]--