atidewalkerbehemoth.lua 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. --[[
  2. Script Name : SpawnScripts/Antonica/atidewalkerbehemoth.lua
  3. Script Author : LordPazuzu
  4. Script Date : 2022.07.22 08:07:21
  5. Script Purpose :
  6. :
  7. --]]
  8. function spawn(NPC)
  9. function spawn(NPC)
  10. local Level = GetLevel(NPC)
  11. local level1 = 19
  12. local level2 = 20
  13. local difficulty1 = 9
  14. local hp1 = 4910
  15. local power1 = 1800
  16. local difficulty2 = 9
  17. local hp2 = 6445
  18. local power2 = 2020
  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 + 14, Y, Z, 2,math.random(5,10))
  49. MovementLoopAddLocation(NPC, X + 14, Y, Z + 4, 2, math.random(5,10))
  50. MovementLoopAddLocation(NPC, X + 20, Y, Z, 2, math.random(5,10))
  51. MovementLoopAddLocation(NPC, X + 14, Y, Z + 4, 2, math.random(5,10))
  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 - 14, Y, Z, 2, math.random(5,10))
  60. MovementLoopAddLocation(NPC, X - 14, Y, Z - 4, 2, math.random(5,10))
  61. MovementLoopAddLocation(NPC, X - 20, Y, Z, 2, math.random(5,10))
  62. MovementLoopAddLocation(NPC, X - 14, Y, Z - 4, 2, math.random(5,10))
  63. MovementLoopAddLocation(NPC, X, Y, Z, 1, math.random(5,10))
  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 + 14, Y, Z, 2, math.random(5,10))
  71. MovementLoopAddLocation(NPC, X + 14, Y, Z - 4, 2, math.random(5,10))
  72. MovementLoopAddLocation(NPC, X + 20, Y, Z, 2, math.random(5,10))
  73. MovementLoopAddLocation(NPC, X + 14, Y, Z - 4, 2, math.random(5,10))
  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 - 14, Y, Z, 2, math.random(5,10))
  82. MovementLoopAddLocation(NPC, X - 14, Y, Z + 4, 2, math.random(5,10))
  83. MovementLoopAddLocation(NPC, X - 20, Y, Z, 2, math.random(5,10))
  84. MovementLoopAddLocation(NPC, X - 14, Y, Z + 4, 2, math.random(5,10))
  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
  93. end
  94. function hailed(NPC, Spawn)
  95. FaceTarget(NPC, Spawn)
  96. end
  97. function respawn(NPC)
  98. spawn(NPC)
  99. end