afiercerazorgill.lua 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. --[[
  2. Script Name : SpawnScripts/Blackburrow/afiercerazorgill.lua
  3. Script Author : LordPazuzu
  4. Script Date : 2022.07.15 04:07:19
  5. Script Purpose :
  6. :
  7. --]]
  8. function spawn(NPC)
  9. local Level = GetLevel(NPC)
  10. local level1 = 13
  11. local level2 = 14
  12. local difficulty1 = 6
  13. local hp1 = 680
  14. local power1 = 205
  15. local difficulty2 = 6
  16. local hp2 = 795
  17. local power2 = 240
  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. ChooseMovement(NPC)
  29. end
  30. function hailed(NPC, Spawn)
  31. FaceTarget(NPC, Spawn)
  32. end
  33. function respawn(NPC)
  34. spawn(NPC)
  35. end
  36. function ChooseMovement(NPC)
  37. local route = math.random(1,4)
  38. if route == 1 then
  39. RouteOne(NPC, Spawn)
  40. elseif route == 2 then
  41. RouteTwo(NPC, Spawn)
  42. elseif route == 3 then
  43. RouteThree(NPC, Spawn)
  44. elseif route == 4 then
  45. RouteFour(NPC, Spawn)
  46. end
  47. end
  48. function RouteOne(NPC, Spawn)
  49. local X = GetX(NPC)
  50. local Y = GetY(NPC)
  51. local Z = GetZ(NPC)
  52. MovementLoopAddLocation(NPC, X, Y, Z, 1, math.random(5,10))
  53. MovementLoopAddLocation(NPC, X + 4, Y, Z, 1,math.random(5,10))
  54. MovementLoopAddLocation(NPC, X + 4, Y, Z + 4, 1, math.random(5,10))
  55. MovementLoopAddLocation(NPC, X + 4, Y, Z, 1, math.random(5,10))
  56. MovementLoopAddLocation(NPC, X + 4, Y, Z + 4, 1, math.random(5,10))
  57. MovementLoopAddLocation(NPC, X, Y, Z, 1, math.random(5,10), "ChooseMovement")
  58. end
  59. function RouteTwo(NPC, Spawn)
  60. local X = GetX(NPC)
  61. local Y = GetY(NPC)
  62. local Z = GetZ(NPC)
  63. MovementLoopAddLocation(NPC, X, Y, Z, 1, math.random(5,10))
  64. MovementLoopAddLocation(NPC, X - 4, Y, Z, 1, math.random(5,10))
  65. MovementLoopAddLocation(NPC, X - 4, Y, Z - 4, 1, math.random(5,10))
  66. MovementLoopAddLocation(NPC, X - 4, Y, Z, 1, math.random(5,10))
  67. MovementLoopAddLocation(NPC, X - 4, Y, Z - 4, 1, math.random(5,10))
  68. MovementLoopAddLocation(NPC, X, Y, Z, 1, math.random(5,10), "ChooseMovement")
  69. end
  70. function RouteThree(NPC, Spawn)
  71. local X = GetX(NPC)
  72. local Y = GetY(NPC)
  73. local Z = GetZ(NPC)
  74. MovementLoopAddLocation(NPC, X, Y, Z, 1, math.random(5,10))
  75. MovementLoopAddLocation(NPC, X + 4, Y, Z, 1, math.random(5,10))
  76. MovementLoopAddLocation(NPC, X + 4, Y, Z - 4, 1, math.random(5,10))
  77. MovementLoopAddLocation(NPC, X + 4, Y, Z, 1, math.random(5,10))
  78. MovementLoopAddLocation(NPC, X + 4, Y, Z - 4, 1, math.random(5,10))
  79. MovementLoopAddLocation(NPC, X, Y, Z, 1, math.random(5,10), "ChooseMovement")
  80. end
  81. function RouteFour(NPC, Spawn)
  82. local X = GetX(NPC)
  83. local Y = GetY(NPC)
  84. local Z = GetZ(NPC)
  85. MovementLoopAddLocation(NPC, X, Y, Z, 1, math.random(5,10))
  86. MovementLoopAddLocation(NPC, X - 4, Y, Z, 1, math.random(5,10))
  87. MovementLoopAddLocation(NPC, X - 4, Y, Z + 4, 1, math.random(5,10))
  88. MovementLoopAddLocation(NPC, X - 4, Y, Z, 1, math.random(5,10))
  89. MovementLoopAddLocation(NPC, X - 4, Y, Z + 4, 1, math.random(5,10))
  90. MovementLoopAddLocation(NPC, X, Y, Z, 1, math.random(5,10), "ChooseMovement")
  91. end
  92. function respawn(NPC, Spawn)
  93. spawn(NPC)
  94. end
  95. function hailed(NPC, Spawn)
  96. FaceTarget(NPC, Spawn)
  97. end