9
3

acharredminion.lua 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. --[[
  2. Script Name : SpawnScripts/Firemyst/acharredminion.lua
  3. Script Author : LordPazuzu
  4. Script Date : 2022.07.28 03:07:58
  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 = 15
  12. local level2 = 16
  13. local level3 = 17
  14. local difficulty1 = 9
  15. local hp1 = 3150
  16. local power1 = 1350
  17. local difficulty2 = 9
  18. local hp2 = 3485
  19. local power2 = 1350
  20. local difficulty3 = 9
  21. local hp3 = 4030
  22. local power3 = 1670
  23. if Level == level1 then
  24. SpawnSet(NPC, "difficulty", difficulty1)
  25. SpawnSet(NPC, "hp", hp1)
  26. SpawnSet(NPC, "power", power1)
  27. elseif Level == level2
  28. then
  29. SpawnSet(NPC, "difficulty", difficulty2)
  30. SpawnSet(NPC, "hp", hp2)
  31. SpawnSet(NPC, "power", power2)
  32. elseif Level == level3
  33. then
  34. SpawnSet(NPC, "difficulty", difficulty3)
  35. SpawnSet(NPC, "hp", hp3)
  36. SpawnSet(NPC, "power", power3)
  37. end
  38. ChooseMovement(NPC)
  39. end
  40. function ChooseMovement(NPC)
  41. local route = math.random(1,4)
  42. if route == 1 then
  43. RouteOne(NPC, Spawn)
  44. elseif route == 2 then
  45. RouteTwo(NPC, Spawn)
  46. elseif route == 3 then
  47. RouteThree(NPC, Spawn)
  48. elseif route == 4 then
  49. RouteFour(NPC, Spawn)
  50. end
  51. end
  52. function RouteOne(NPC, Spawn)
  53. local X = GetX(NPC)
  54. local Y = GetY(NPC)
  55. local Z = GetZ(NPC)
  56. MovementLoopAddLocation(NPC, X, Y, Z, 2, math.random(5,10))
  57. MovementLoopAddLocation(NPC, X + 20, Y, Z, 2, math.random(5,10))
  58. MovementLoopAddLocation(NPC, X + 20, Y, Z + 4, 2, math.random(5,10))
  59. MovementLoopAddLocation(NPC, X + 25, Y, Z, 2, math.random(5,10))
  60. MovementLoopAddLocation(NPC, X + 20, Y, Z + 4, 2, math.random(5,10))
  61. MovementLoopAddLocation(NPC, X, Y, Z, 2, math.random(5,10))
  62. end
  63. function RouteTwo(NPC, Spawn)
  64. local X = GetX(NPC)
  65. local Y = GetY(NPC)
  66. local Z = GetZ(NPC)
  67. MovementLoopAddLocation(NPC, X, Y, Z, 2, math.random(5,10))
  68. MovementLoopAddLocation(NPC, X - 20, Y, Z, 2, math.random(5,10))
  69. MovementLoopAddLocation(NPC, X - 20, Y, Z - 4, 2, math.random(5,10))
  70. MovementLoopAddLocation(NPC, X - 25, Y, Z, 2, math.random(5,10))
  71. MovementLoopAddLocation(NPC, X - 20, Y, Z - 4, 2, math.random(5,10))
  72. MovementLoopAddLocation(NPC, X, Y, Z, 1, math.random(5,10))
  73. end
  74. function RouteThree(NPC, Spawn)
  75. local X = GetX(NPC)
  76. local Y = GetY(NPC)
  77. local Z = GetZ(NPC)
  78. MovementLoopAddLocation(NPC, X, Y, Z, 2, math.random(5,10))
  79. MovementLoopAddLocation(NPC, X + 20, Y, Z, 2, math.random(5,10))
  80. MovementLoopAddLocation(NPC, X + 20, Y, Z - 4, 2, math.random(5,10))
  81. MovementLoopAddLocation(NPC, X + 25, Y, Z, 2, math.random(5,10))
  82. MovementLoopAddLocation(NPC, X + 20, Y, Z - 4, 2, math.random(5,10))
  83. MovementLoopAddLocation(NPC, X, Y, Z, 2, math.random(5,10))
  84. end
  85. function RouteFour(NPC, Spawn)
  86. local X = GetX(NPC)
  87. local Y = GetY(NPC)
  88. local Z = GetZ(NPC)
  89. MovementLoopAddLocation(NPC, X, Y, Z, 2, math.random(5,10))
  90. MovementLoopAddLocation(NPC, X - 20, Y, Z, 2, math.random(5,10))
  91. MovementLoopAddLocation(NPC, X - 20, Y, Z + 4, 2, math.random(5,10))
  92. MovementLoopAddLocation(NPC, X - 25, Y, Z, 2, math.random(5,10))
  93. MovementLoopAddLocation(NPC, X - 20, Y, Z + 4, 2, math.random(5,10))
  94. MovementLoopAddLocation(NPC, X, Y, Z, 2, math.random(5,10))
  95. end
  96. function respawn(NPC, Spawn)
  97. spawn(NPC)
  98. end
  99. function hailed(NPC, Spawn)
  100. FaceTarget(NPC, Spawn)
  101. end