DrossAdds.lua 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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. dofile("SpawnScripts/Generic/CatalogueQuestUpdates.lua")
  10. require "SpawnScripts/Generic/NPCModule"
  11. function spawn(NPC, Spawn)
  12. NPCModule(NPC, Spawn)
  13. AddTimer(NPC,math.random(2500,6000),"AttackRocks")
  14. end
  15. function respawn(NPC)
  16. spawn(NPC)
  17. end
  18. function AttackRocks(NPC) --Simplified the below version to this version for attacking rocks.
  19. if not IsInCombat(NPC) then
  20. PlayAnimation(NPC,10783) --attack
  21. end
  22. AddTimer(NPC, math.random(7000,8500), "AttackRocks")
  23. end
  24. --[[
  25. function AttackRocks(NPC)
  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. end
  33. function Rocks(NPC)
  34. if not IsInCombat(NPC) then
  35. SpawnSet(NPC, "visual_state", "10783") -- Start attacking
  36. end
  37. AddTimer(NPC, 3500, "stop_attack") -- for 2 seconds, then stop
  38. end
  39. function stop_attack(NPC)
  40. SpawnSet(NPC, "visual_state", "0") -- Stop attacking
  41. AddTimer(NPC, 8000, "AttackRocks")
  42. end
  43. ]]--