9
3

AntonicanHawk.lua 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. --[[
  2. Script Name : SpawnScripts/ForestRuins/AntonicanHawk.lua
  3. Script Author : LordPazuzu
  4. Script Date : 2022.06.09 11:06:16
  5. Script Purpose :
  6. :
  7. --]]
  8. function spawn(NPC)
  9. local Level = GetLevel(NPC)
  10. local level1 =6
  11. local level2 = 7
  12. local difficulty1 = 5
  13. local hp1 = 70
  14. local power1 = 45
  15. local difficulty2 = 5
  16. local hp2 = 125
  17. local power2 = 55
  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 ChooseMovement(NPC)
  31. local choice = math.random(1, 4)
  32. if choice == 1 then
  33. clockwise1(NPC)
  34. elseif choice == 2 then
  35. clockwise2(NPC)
  36. elseif choice == 3 then
  37. counter_clockwise1(NPC)
  38. elseif choice == 4 then
  39. counter_clockwise2(NPC)
  40. end
  41. end
  42. function respawn(NPC)
  43. spawn(NPC)
  44. end
  45. function clockwise1(NPC)
  46. local x = GetX(NPC)
  47. local y = GetY(NPC)
  48. local z = GetZ(NPC)
  49. MovementLoopAddLocation(NPC, x + 1.5 , y +2 , z - 2 , 1, math.random(2, 10))
  50. MovementLoopAddLocation(NPC, x - .5 , y - .5, z - 3, 1, math.random(2, 10))
  51. MovementLoopAddLocation(NPC, x - 3, y, z - 5 + 2.5 , 1, math.random(2, 10))
  52. MovementLoopAddLocation(NPC, x + .5 , y, z - 1 + 2 , 1, math.random(2, 10))
  53. --MovementLoopAddLocation(NPC, x + 3 , y, z - 4 , 1, math.random(2, 5))
  54. --MovementLoopAddLocation(NPC, x - 1 , y, z - 6, 1, math.random(2, 5))
  55. --MovementLoopAddLocation(NPC, x - 6, y, z + 5 , 1, math.random(2, 5))
  56. --MovementLoopAddLocation(NPC, x + 1 , y, z + 4 , 1, math.random(2, 5))
  57. end
  58. function clockwise2(NPC)
  59. local x = GetX(NPC)
  60. local y = GetY(NPC)
  61. local z = GetZ(NPC)
  62. MovementLoopAddLocation(NPC, x + 1 , y, z - 2 , 1, math.random(2, 10))
  63. MovementLoopAddLocation(NPC, x - 3.5 , y +2 , z - .5 , 1, math.random(2, 10))
  64. MovementLoopAddLocation(NPC, x , y - .5 , z + 1 , 1, math.random(2, 10))
  65. MovementLoopAddLocation(NPC, x + 2.5 , y - .5, z + .5 , 1, math.random(2, 10))
  66. end
  67. function counter_clockwise1(NPC)
  68. local x = GetX(NPC)
  69. local y = GetY(NPC)
  70. local z = GetZ(NPC)
  71. MovementLoopAddLocation(NPC, x - 1.5 , y -.5, z + 1 , 1, math.random(2, 10))
  72. MovementLoopAddLocation(NPC, x + .5 , y, z + 3, 1, math.random(2, 10))
  73. MovementLoopAddLocation(NPC, x + 2, y + 2, z - 2.5 , 1, math.random(2, 10))
  74. MovementLoopAddLocation(NPC, x - .5 , y -1.5, z - 2 , 1, math.random(2, 10))
  75. end
  76. function counter_clockwise2(NPC)
  77. local x = GetX(NPC)
  78. local y = GetY(NPC)
  79. local z = GetZ(NPC)
  80. MovementLoopAddLocation(NPC, x - 1 , y, z + 2 , 1, math.random(2, 10))
  81. MovementLoopAddLocation(NPC, x + 1.5 , y, z + .5 , 1, math.random(2, 10))
  82. MovementLoopAddLocation(NPC, x , y, z - 1 , 1, math.random(2, 10))
  83. MovementLoopAddLocation(NPC, x - 2.5 , y, z - .5 , 1, math.random(2, 10))
  84. end