adefiledsquire.lua 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. --[[
  2. Script Name : SpawnScripts/Antonica/adefiledsquire.lua
  3. Script Author : LordPazuzu
  4. Script Date : 2022.07.12 10:07:23
  5. Script Purpose :
  6. :
  7. --]]
  8. dofile("SpawnScripts/Generic/MonsterCallouts/BaseSkeleton1.lua")
  9. function spawn(NPC)
  10. local Level = GetLevel(NPC)
  11. local level1 = 17
  12. local level2 = 18
  13. local difficulty1 = 6
  14. local hp1 = 1180
  15. local power1 = 360
  16. local difficulty2 = 6
  17. local hp2 = 1290
  18. local power2 = 410
  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(2,10))
  48. MovementLoopAddLocation(NPC, X + 4, Y, Z, 2, math.random(20,45))
  49. MovementLoopAddLocation(NPC, X + 4, Y, Z + 4, 2, math.random(20,45))
  50. MovementLoopAddLocation(NPC, X + 7, Y, Z, 2, math.random(20,45))
  51. MovementLoopAddLocation(NPC, X + 4, Y, Z + 4, 2, math.random(20,45))
  52. MovementLoopAddLocation(NPC, X, Y, Z, 2, math.random(20,45))
  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(2,10))
  59. MovementLoopAddLocation(NPC, X - 4, Y, Z, 2, math.random(20,45))
  60. MovementLoopAddLocation(NPC, X - 4, Y, Z - 4, 2, math.random(20,45))
  61. MovementLoopAddLocation(NPC, X - 7, Y, Z, 2, math.random(20,45))
  62. MovementLoopAddLocation(NPC, X - 4, Y, Z - 4, 2, math.random(20,45))
  63. MovementLoopAddLocation(NPC, X, Y, Z, 1, math.random(20,45))
  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(2,10))
  70. MovementLoopAddLocation(NPC, X + 4, Y, Z, 2, math.random(20,45))
  71. MovementLoopAddLocation(NPC, X + 4, Y, Z - 4, 2, math.random(20,45))
  72. MovementLoopAddLocation(NPC, X + 7, Y, Z, 2, math.random(20,45))
  73. MovementLoopAddLocation(NPC, X + 4, Y, Z - 4, 2, math.random(20,45))
  74. MovementLoopAddLocation(NPC, X, Y, Z, 2, math.random(20,45))
  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(2,10))
  81. MovementLoopAddLocation(NPC, X - 4, Y, Z, 2, math.random(20,45))
  82. MovementLoopAddLocation(NPC, X - 4, Y, Z + 4, 2, math.random(20,45))
  83. MovementLoopAddLocation(NPC, X - 7, Y, Z, 2, math.random(20,45))
  84. MovementLoopAddLocation(NPC, X - 4, Y, Z + 4, 2, math.random(20,45))
  85. MovementLoopAddLocation(NPC, X, Y, Z, 2, math.random(20,45))
  86. end
  87. function respawn(NPC, Spawn)
  88. spawn(NPC)
  89. end