AtramentorBehemoth.lua 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. --[[
  2. Script Name : SpawnScripts/Caves/AtramentorBehemoth.lua
  3. Script Author : LordPazuzu
  4. Script Date : 2022.10.10 03:10:20
  5. Script Purpose :
  6. :
  7. --]]
  8. dofile("SpawnScripts/Generic/MonsterCallouts/BaseGolem1.lua")
  9. require "SpawnScripts/Generic/NPCModule"
  10. function spawn(NPC, Spawn)
  11. NPCModule(NPC, Spawn)
  12. AttackRocks(NPC)
  13. end
  14. function respawn(NPC)
  15. spawn(NPC)
  16. end
  17. function AttackRocks(NPC)
  18. local rockattack = math.random (1, 4)
  19. if rockattack == 1 then
  20. AddTimer(NPC, 100, "stop_attack")
  21. else
  22. AddTimer(NPC, 100, "Rocks")
  23. end
  24. end
  25. function Rocks(NPC)
  26. if not IsInCombat(NPC) then
  27. SpawnSet(NPC, "visual_state", "10783") -- Start attacking
  28. end
  29. AddTimer(NPC, 3500, "stop_attack") -- for 2 seconds, then stop
  30. end
  31. function stop_attack(NPC)
  32. SpawnSet(NPC, "visual_state", "0") -- Stop attacking
  33. AddTimer(NPC, 8000, "AttackRocks")
  34. end