arazorgill.lua 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. --[[
  2. Script Name : SpawnScripts/Blackburrow/arazorgill.lua
  3. Script Author : LordPazuzu
  4. Script Date : 2022.07.15 05:07:30
  5. Script Purpose :
  6. :
  7. --]]
  8. function spawn(NPC)
  9. ChooseMovement(NPC)
  10. end
  11. function hailed(NPC, Spawn)
  12. FaceTarget(NPC, Spawn)
  13. end
  14. function respawn(NPC)
  15. spawn(NPC)
  16. end
  17. function ChooseMovement(NPC)
  18. local route = math.random(1,4)
  19. if route == 1 then
  20. RouteOne(NPC, Spawn)
  21. elseif route == 2 then
  22. RouteTwo(NPC, Spawn)
  23. elseif route == 3 then
  24. RouteThree(NPC, Spawn)
  25. elseif route == 4 then
  26. RouteFour(NPC, Spawn)
  27. end
  28. end
  29. function RouteOne(NPC, Spawn)
  30. local X = GetX(NPC)
  31. local Y = GetY(NPC)
  32. local Z = GetZ(NPC)
  33. MovementLoopAddLocation(NPC, X, Y, Z, 1, math.random(5,10))
  34. MovementLoopAddLocation(NPC, X + 4, Y, Z, 1,math.random(5,10))
  35. MovementLoopAddLocation(NPC, X + 4, Y, Z + 4, 1, math.random(5,10))
  36. MovementLoopAddLocation(NPC, X + 4, Y, Z, 1, math.random(5,10))
  37. MovementLoopAddLocation(NPC, X + 4, Y, Z + 4, 1, math.random(5,10))
  38. MovementLoopAddLocation(NPC, X, Y, Z, 1, math.random(5,10), "ChooseMovement")
  39. end
  40. function RouteTwo(NPC, Spawn)
  41. local X = GetX(NPC)
  42. local Y = GetY(NPC)
  43. local Z = GetZ(NPC)
  44. MovementLoopAddLocation(NPC, X, Y, Z, 1, math.random(5,10))
  45. MovementLoopAddLocation(NPC, X - 4, Y, Z, 1, math.random(5,10))
  46. MovementLoopAddLocation(NPC, X - 4, Y, Z - 4, 1, math.random(5,10))
  47. MovementLoopAddLocation(NPC, X - 4, Y, Z, 1, math.random(5,10))
  48. MovementLoopAddLocation(NPC, X - 4, Y, Z - 4, 1, math.random(5,10))
  49. MovementLoopAddLocation(NPC, X, Y, Z, 1, math.random(5,10), "ChooseMovement")
  50. end
  51. function RouteThree(NPC, Spawn)
  52. local X = GetX(NPC)
  53. local Y = GetY(NPC)
  54. local Z = GetZ(NPC)
  55. MovementLoopAddLocation(NPC, X, Y, Z, 1, math.random(5,10))
  56. MovementLoopAddLocation(NPC, X + 4, Y, Z, 1, math.random(5,10))
  57. MovementLoopAddLocation(NPC, X + 4, Y, Z - 4, 1, math.random(5,10))
  58. MovementLoopAddLocation(NPC, X + 4, Y, Z, 1, math.random(5,10))
  59. MovementLoopAddLocation(NPC, X + 4, Y, Z - 4, 1, math.random(5,10))
  60. MovementLoopAddLocation(NPC, X, Y, Z, 1, math.random(5,10), "ChooseMovement")
  61. end
  62. function RouteFour(NPC, Spawn)
  63. local X = GetX(NPC)
  64. local Y = GetY(NPC)
  65. local Z = GetZ(NPC)
  66. MovementLoopAddLocation(NPC, X, Y, Z, 1, math.random(5,10))
  67. MovementLoopAddLocation(NPC, X - 4, Y, Z, 1, math.random(5,10))
  68. MovementLoopAddLocation(NPC, X - 4, Y, Z + 4, 1, math.random(5,10))
  69. MovementLoopAddLocation(NPC, X - 4, Y, Z, 1, math.random(5,10))
  70. MovementLoopAddLocation(NPC, X - 4, Y, Z + 4, 1, math.random(5,10))
  71. MovementLoopAddLocation(NPC, X, Y, Z, 1, math.random(5,10), "ChooseMovement")
  72. end
  73. function respawn(NPC, Spawn)
  74. spawn(NPC)
  75. end
  76. function hailed(NPC, Spawn)
  77. FaceTarget(NPC, Spawn)
  78. end