DrossAdds.lua 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. --[[
  2. Script Name : SpawnScripts/Caves/DrossAdds.lua
  3. Script Author : LordPazuzu
  4. Script Date : 2022.10.03 03:10:43
  5. Script Purpose :
  6. :
  7. --]]
  8. dofile("SpawnScripts/Generic/MonsterCallouts/BaseGolem1.lua")
  9. function spawn(NPC)
  10. AddTimer(NPC,math.random(2500,6000),"AttackRocks")
  11. end
  12. function respawn(NPC)
  13. spawn(NPC)
  14. end
  15. function AttackRocks(NPC) --Simplified the below version to this version for attacking rocks.
  16. if not IsInCombat(NPC) then
  17. PlayAnimation(NPC,10783) --attack
  18. end
  19. AddTimer(NPC, math.random(7000,8500), "AttackRocks")
  20. end
  21. --[[
  22. function AttackRocks(NPC)
  23. local rockattack = math.random (1, 4)
  24. if rockattack == 1 then
  25. AddTimer(NPC, 100, "stop_attack")
  26. else
  27. AddTimer(NPC, 100, "Rocks")
  28. end
  29. end
  30. function Rocks(NPC)
  31. if not IsInCombat(NPC) then
  32. SpawnSet(NPC, "visual_state", "10783") -- Start attacking
  33. end
  34. AddTimer(NPC, 3500, "stop_attack") -- for 2 seconds, then stop
  35. end
  36. function stop_attack(NPC)
  37. SpawnSet(NPC, "visual_state", "0") -- Stop attacking
  38. AddTimer(NPC, 8000, "AttackRocks")
  39. end
  40. ]]--