9
3

AtramentorBehemoth.lua 971 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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. function spawn(NPC)
  10. AttackRocks(NPC)
  11. end
  12. function respawn(NPC)
  13. spawn(NPC)
  14. end
  15. function AttackRocks(NPC)
  16. local rockattack = math.random (1, 4)
  17. if rockattack == 1 then
  18. AddTimer(NPC, 100, "stop_attack")
  19. else
  20. AddTimer(NPC, 100, "Rocks")
  21. end
  22. end
  23. function Rocks(NPC)
  24. if not IsInCombat(NPC) then
  25. SpawnSet(NPC, "visual_state", "10783") -- Start attacking
  26. end
  27. AddTimer(NPC, 3500, "stop_attack") -- for 2 seconds, then stop
  28. end
  29. function stop_attack(NPC)
  30. SpawnSet(NPC, "visual_state", "0") -- Stop attacking
  31. AddTimer(NPC, 8000, "AttackRocks")
  32. end