ajuvenileshrillerRail1.lua 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. --[[
  2. Script Name : SpawnScripts/DownBelow_Classic/ajuvenileshrillerRail1.lua
  3. Script Author : LordPazuzu
  4. Script Date : 2022.11.09 09:11:05
  5. Script Purpose :
  6. :
  7. --]]
  8. function spawn(NPC)
  9. local Level = GetLevel(NPC)
  10. local level1 = 4
  11. local level2 = 5
  12. local difficulty1 = 6
  13. local hp1 = 110
  14. local power1 = 55
  15. local difficulty2 = 6
  16. local hp2 = 130
  17. local power2 = 65
  18. if Level == level1 then
  19. SpawnSet(NPC, "difficulty", difficulty1)
  20. SpawnSet(NPC, "hp", hp1)
  21. SpawnSet(NPC, "power", power1)
  22. elseif Level == level2
  23. then
  24. SpawnSet(NPC, "difficulty", difficulty2)
  25. SpawnSet(NPC, "hp", hp2)
  26. SpawnSet(NPC, "power", power2)
  27. end
  28. --AddTimer(NPC,(MakeRandomInt(0,8000)),"ChooseMovement")
  29. ChooseMovement(NPC)
  30. end
  31. function ChooseMovement(NPC)
  32. local route = math.random(1,3)
  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. end
  40. end
  41. function RouteOne(NPC, Spawn)
  42. MovementLoopAddLocation(NPC, -12.93, 2, -89.93, 2, 0)
  43. MovementLoopAddLocation(NPC, -12.93, 2, -89.93, 2, 0)
  44. MovementLoopAddLocation(NPC, -29.21, 2, -73.44, 2, 0)
  45. MovementLoopAddLocation(NPC, -45.97, 2, -66.81, 2, 0)
  46. MovementLoopAddLocation(NPC, -52.56, 2, -70.13, 2, 0)
  47. MovementLoopAddLocation(NPC, -58, 2, -85.24, 2, 0)
  48. MovementLoopAddLocation(NPC, -57.83, 2, -93.24, 2, 0)
  49. MovementLoopAddLocation(NPC, -60.76, 2, -95.75, 2, 0)
  50. MovementLoopAddLocation(NPC, -62.95, 2, -96.43, 2, 0)
  51. MovementLoopAddLocation(NPC, -57.82, 2, -93.62, 2, 0)
  52. MovementLoopAddLocation(NPC, -58.25, 2, -85.9, 2, 0)
  53. MovementLoopAddLocation(NPC, -52.51, 2, -70.12, 2, 0)
  54. MovementLoopAddLocation(NPC, -49.61, 2, -67.4, 2, 0)
  55. MovementLoopAddLocation(NPC, -46.75, 2, -66.58, 2, 0)
  56. MovementLoopAddLocation(NPC, -43.9, 2, -67.46, 2, 0)
  57. MovementLoopAddLocation(NPC, -32.17, 2, -72.02, 2, 0)
  58. MovementLoopAddLocation(NPC, -12.93, 2, -89.93, 2, 0, "ChooseMovement")
  59. end
  60. function RouteTwo(NPC, Spawn)
  61. MovementLoopAddLocation(NPC, -12.93, 2, -89.93, 2, 0)
  62. MovementLoopAddLocation(NPC, -33.13, 2, -109.44, 2, 0)
  63. MovementLoopAddLocation(NPC, -34.35, 2, -129.23, 2, 0)
  64. MovementLoopAddLocation(NPC, -37.46, 2, -133.34, 2, 0)
  65. MovementLoopAddLocation(NPC, -54.69, 2, -150.55, 2, 0)
  66. MovementLoopAddLocation(NPC, -63.81, 2, -152.77, 2, 0)
  67. MovementLoopAddLocation(NPC, -81, 2, -152.43, 2, 0)
  68. MovementLoopAddLocation(NPC, -88.37, 2, -157.28, 2, 0)
  69. MovementLoopAddLocation(NPC, -88.99, 2, -175.1, 2, 0)
  70. MovementLoopAddLocation(NPC, -83.61, 2, -183.01, 2, 0)
  71. MovementLoopAddLocation(NPC, -83.9, 2, -190.1, 2, 0)
  72. MovementLoopAddLocation(NPC, -89.36, 2, -193.91, 2, 0)
  73. MovementLoopAddLocation(NPC, -93.06, 2, -194.46, 2, 0)
  74. MovementLoopAddLocation(NPC, -85.95, 2, -192.12, 2, 0)
  75. MovementLoopAddLocation(NPC, -83.5, 2, -187.63, 2, 0)
  76. MovementLoopAddLocation(NPC, -85.62, 2, -180.8, 2, 0)
  77. MovementLoopAddLocation(NPC, -89.13, 2, -175.07, 2, 0)
  78. MovementLoopAddLocation(NPC, -88.16, 2, -155.92, 2, 0)
  79. MovementLoopAddLocation(NPC, -82.2, 2, -153.12, 2, 0)
  80. MovementLoopAddLocation(NPC, -58.56, 2, -152.77, 2, 0)
  81. MovementLoopAddLocation(NPC, -34.47, 2, -130.82, 2, 0)
  82. MovementLoopAddLocation(NPC, -34.47, 2, -130.82, 2, 0)
  83. MovementLoopAddLocation(NPC, -34.08, 2, -110.26, 2, 0)
  84. MovementLoopAddLocation(NPC, -12.93, 2, -89.93, 2, 0, "ChooseMovement")
  85. end
  86. function RouteThree(NPC, Spawn)
  87. MovementLoopAddLocation(NPC, -12.93, 2, -89.93, 2, 0)
  88. MovementLoopAddLocation(NPC, 2.15, 2, -106.23, 2, 0)
  89. MovementLoopAddLocation(NPC, 5.87, 2, -108.25, 2, 0)
  90. MovementLoopAddLocation(NPC, 12.28, 2, -103.52, 2, 0)
  91. MovementLoopAddLocation(NPC, 21.4, 2, -94.55, 2, 0)
  92. MovementLoopAddLocation(NPC, 21.42, 2, -67.62, 2, 0)
  93. MovementLoopAddLocation(NPC, 14.27, 2, -60.73, 2, 0)
  94. MovementLoopAddLocation(NPC, -2.81, 2, -59.95, 2, 0)
  95. MovementLoopAddLocation(NPC, -14.76, 2, -48.36, 2, 0)
  96. MovementLoopAddLocation(NPC, -14.94, 2, -41.49, 2, 0)
  97. MovementLoopAddLocation(NPC, -1.56, 2, -27.95, 2, 0)
  98. MovementLoopAddLocation(NPC, -0.23, 2, -21.61, 2, 0)
  99. MovementLoopAddLocation(NPC, -0.17, 2, -18.38, 2, 0)
  100. MovementLoopAddLocation(NPC, 0.14, 2, -23.37, 2, 0)
  101. MovementLoopAddLocation(NPC, -3.09, 2, -30.03, 2, 0)
  102. MovementLoopAddLocation(NPC, -14.32, 2, -40.65, 2, 0)
  103. MovementLoopAddLocation(NPC, -15.24, 2, -48.01, 2, 0)
  104. MovementLoopAddLocation(NPC, -5.73, 2, -57.48, 2, 0)
  105. MovementLoopAddLocation(NPC, -1.9, 2, -60.12, 2, 0)
  106. MovementLoopAddLocation(NPC, 14.39, 2, -61.1, 2, 0)
  107. MovementLoopAddLocation(NPC, 18.11, 2, -63.59, 2, 0)
  108. MovementLoopAddLocation(NPC, 21.41, -2, -70.98, 2, 0)
  109. MovementLoopAddLocation(NPC, 20.96, 2, -95.74, 2, 0)
  110. MovementLoopAddLocation(NPC, 6.87, 2, -108.98, 2, 0)
  111. MovementLoopAddLocation(NPC, 2.94, 2, -106.79, 2, 0)
  112. MovementLoopAddLocation(NPC, -12.93, 2, -89.93, 2, 0, "ChooseMovement")
  113. end
  114. function respawn(NPC, Spawn)
  115. spawn(NPC)
  116. end
  117. function hailed(NPC, Spawn)
  118. FaceTarget(NPC, Spawn)
  119. end