aCaltorsisMagiRoamLong.lua 3.0 KB

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