9
3

aCaltorsisMagi.lua 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. --[[
  2. Script Name : SpawnScripts/Antonica/aCaltorsisMagi.lua
  3. Script Author : LordPazuzu
  4. Script Date : 2022.07.05 09:07:35
  5. Script Purpose :
  6. :
  7. --]]
  8. dofile("SpawnScripts/Generic/MonsterCallouts/Antonica_Skeleton1.lua")
  9. require "SpawnScripts/Generic/CombatModule"
  10. function spawn(NPC, Spawn)
  11. combatModule(NPC, Spawn)
  12. local Level = GetLevel(NPC)
  13. local level1 = 18
  14. local level2 = 19
  15. local difficulty1 = 6
  16. local hp1 = 1180
  17. local power1 = 410
  18. local difficulty2 = 6
  19. local hp2 = 1315
  20. local power2 = 425
  21. if Level == level1 then
  22. SpawnSet(NPC, "difficulty", difficulty1)
  23. SpawnSet(NPC, "hp", hp1)
  24. SpawnSet(NPC, "power", power1)
  25. elseif Level == level2
  26. then
  27. SpawnSet(NPC, "difficulty", difficulty2)
  28. SpawnSet(NPC, "hp", hp2)
  29. SpawnSet(NPC, "power", power2)
  30. end
  31. ChooseMovement(NPC)
  32. end
  33. function ChooseMovement(NPC)
  34. local route = math.random(1,4)
  35. if route == 1 then
  36. RouteOne(NPC, Spawn)
  37. elseif route == 2 then
  38. RouteTwo(NPC, Spawn)
  39. elseif route == 3 then
  40. RouteThree(NPC, Spawn)
  41. elseif route == 4 then
  42. RouteFour(NPC, Spawn)
  43. end
  44. end
  45. function RouteOne(NPC, Spawn)
  46. local X = GetX(NPC)
  47. local Y = GetY(NPC)
  48. local Z = GetZ(NPC)
  49. MovementLoopAddLocation(NPC, X, Y, Z, 2, 0)
  50. MovementLoopAddLocation(NPC, X + 35, Y, Z, 2,0)
  51. MovementLoopAddLocation(NPC, X , Y, Z + 35, 2, 5)
  52. MovementLoopAddLocation(NPC, X + 10, Y, Z -35, 2, 0)
  53. MovementLoopAddLocation(NPC, X + 25, Y, Z + 4, 2, 0)
  54. MovementLoopAddLocation(NPC, X, Y, Z, 2, math.random(5,10), "ChooseMovement")
  55. end
  56. function RouteTwo(NPC, Spawn)
  57. local X = GetX(NPC)
  58. local Y = GetY(NPC)
  59. local Z = GetZ(NPC)
  60. MovementLoopAddLocation(NPC, X, Y, Z, 2, 0)
  61. MovementLoopAddLocation(NPC, X - 35, Y, Z, 2, 0)
  62. MovementLoopAddLocation(NPC, X, Y, Z - 25, 2, 5)
  63. MovementLoopAddLocation(NPC, X - 35, Y, Z -25, 2, 0)
  64. MovementLoopAddLocation(NPC, X , Y, Z - 4, 2, 0)
  65. MovementLoopAddLocation(NPC, X, Y, Z, 1, 0, "ChooseMovement")
  66. end
  67. function RouteThree(NPC, Spawn)
  68. local X = GetX(NPC)
  69. local Y = GetY(NPC)
  70. local Z = GetZ(NPC)
  71. MovementLoopAddLocation(NPC, X, Y, Z, 2, 0)
  72. MovementLoopAddLocation(NPC, X + 35, Y, Z, 2, 0)
  73. MovementLoopAddLocation(NPC, X -35, Y, Z - 4, 2, 5)
  74. MovementLoopAddLocation(NPC, X + 10, Y, Z -35, 2, 0)
  75. MovementLoopAddLocation(NPC, X + 25, Y, Z - 25, 2, 0)
  76. MovementLoopAddLocation(NPC, X, Y, Z, 2, math.random(5,10), "ChooseMovement")
  77. end
  78. function RouteFour(NPC, Spawn)
  79. local X = GetX(NPC)
  80. local Y = GetY(NPC)
  81. local Z = GetZ(NPC)
  82. MovementLoopAddLocation(NPC, X, Y, Z, 2, 0)
  83. MovementLoopAddLocation(NPC, X - 25, Y, Z -25, 2, 0)
  84. MovementLoopAddLocation(NPC, X - 35, Y, Z + 10, 2, 5)
  85. MovementLoopAddLocation(NPC, X + 35, Y, Z, 2, 0)
  86. MovementLoopAddLocation(NPC, X - 35, Y, Z + 25, 2, 0)
  87. MovementLoopAddLocation(NPC, X, Y, Z, 2, math.random(5,10), "ChooseMovement")
  88. end
  89. function respawn(NPC, Spawn)
  90. spawn(NPC)
  91. end
  92. function hailed(NPC, Spawn)
  93. FaceTarget(NPC, Spawn)
  94. end