analabastergolem.lua 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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. function spawn(NPC)
  10. SetSpawnAnimation(NPC, 13016)
  11. local Level = GetLevel(NPC)
  12. local level1 = 7
  13. local level2 = 8
  14. local difficulty1 = 6
  15. local hp1 = 200
  16. local power1 = 90
  17. local difficulty2 = 6
  18. local hp2 = 240
  19. local power2 = 100
  20. if Level == level1 then
  21. SpawnSet(NPC, "difficulty", difficulty1)
  22. SpawnSet(NPC, "hp", hp1)
  23. SpawnSet(NPC, "power", power1)
  24. elseif Level == level2
  25. then
  26. SpawnSet(NPC, "difficulty", difficulty2)
  27. SpawnSet(NPC, "hp", hp2)
  28. SpawnSet(NPC, "power", power2)
  29. end
  30. AddTimer(NPC,math.random(2500,6000),"AttackRocks")
  31. end
  32. function respawn(NPC)
  33. spawn(NPC)
  34. end
  35. function AttackRocks(NPC)
  36. if not IsInCombat(NPC) then
  37. PlayAnimation(NPC,10783)
  38. end
  39. AddTimer(NPC, math.random(7000,8500), "AttackRocks")
  40. end
  41. --[[
  42. local rockattack = math.random (1, 4)
  43. if rockattack == 1 then
  44. AddTimer(NPC, 100, "stop_attack")
  45. else
  46. AddTimer(NPC, 100, "Rocks")
  47. end ]]--
  48. --[[function Rocks(NPC)
  49. if not IsInCombat(NPC) then
  50. SpawnSet(NPC, "visual_state", "10783") -- Start attacking
  51. end
  52. AddTimer(NPC, 3500, "stop_attack") -- for 2 seconds, then stop
  53. end
  54. function stop_attack(NPC)
  55. SpawnSet(NPC, "visual_state", "0") -- Stop attacking
  56. AddTimer(NPC, 8000, "AttackRocks")
  57. end]]--