aseasidefalcon.lua 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250
  1. --[[
  2. Script Name : SpawnScripts/IsleRefuge1/aseasidefalcon.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.09.27 02:09:11
  5. Script Purpose :
  6. :
  7. --]]
  8. require "SpawnScripts/Generic/NPCModule"
  9. function spawn(NPC, Spawn)
  10. NPCModule(NPC, Spawn)
  11. Waypoints(NPC)
  12. end
  13. function hailed(NPC, Spawn)
  14. end
  15. function respawn(NPC)
  16. spawn(NPC)
  17. end
  18. function death(NPC,Spawn)
  19. PlayFlavor(NPC,"","","result_feather_explosion",0,0)
  20. end
  21. function Waypoints(NPC)
  22. if GetSpawnLocationID(NPC)== 133776637 then
  23. MovementLoopAddLocation(NPC, 58.02, 2.98, 215.83, 2, 0)
  24. MovementLoopAddLocation(NPC, 82.48, 2.98, 218.9, 2, 0)
  25. MovementLoopAddLocation(NPC, 100.4, 2.98, 195.86, 2, math.random(5,10))
  26. MovementLoopAddLocation(NPC, 83.62, 2.98, 199.55, 2, 0)
  27. MovementLoopAddLocation(NPC, 69.85, 2.98, 209.06, 2, 0)
  28. MovementLoopAddLocation(NPC, 64.81, 2.98, 222.48, 2, math.random(5,10))
  29. MovementLoopAddLocation(NPC, 84.42, 2.98, 196.42, 2, 0)
  30. MovementLoopAddLocation(NPC, 110.66, 2.98, 193.77, 2, math.random(5,10))
  31. MovementLoopAddLocation(NPC, 61.77, 2.98, 225.35, 2, math.random(5,10))
  32. MovementLoopAddLocation(NPC, 82.13, 2.98, 219.46, 2, 0)
  33. MovementLoopAddLocation(NPC, 105.38, 2.98, 207.29, 2, math.random(5,10))
  34. MovementLoopAddLocation(NPC, 82.83, 2.98, 196.3, 2, 0)
  35. MovementLoopAddLocation(NPC, 64, 2.98, 198.99, 2, math.random(5,10))
  36. MovementLoopAddLocation(NPC, 74.89, 2.98, 226.16, 2, math.random(5,10))
  37. MovementLoopAddLocation(NPC, 64, 2.98, 198.99, 2, math.random(5,10))
  38. MovementLoopAddLocation(NPC, 82.83, 2.98, 196.3, 2, 0)
  39. MovementLoopAddLocation(NPC, 105.38, 2.98, 207.29, 2, math.random(5,10))
  40. MovementLoopAddLocation(NPC, 82.13, 2.98, 219.46, 2, 0)
  41. MovementLoopAddLocation(NPC, 61.77, 2.98, 225.35, 2, math.random(5,10))
  42. MovementLoopAddLocation(NPC, 110.66, 2.98, 193.77, 2, math.random(5,10))
  43. MovementLoopAddLocation(NPC, 84.42, 2.98, 196.42, 2, 0)
  44. MovementLoopAddLocation(NPC, 64.81, 2.98, 222.48, 2, math.random(5,10))
  45. MovementLoopAddLocation(NPC, 69.85, 2.98, 209.06, 2, 0)
  46. MovementLoopAddLocation(NPC, 83.62, 2.98, 199.55, 2, 0)
  47. MovementLoopAddLocation(NPC, 100.4, 2.98, 195.86, 2, math.random(5,10))
  48. MovementLoopAddLocation(NPC, 82.48, 2.98, 218.9, 2, 0)
  49. MovementLoopAddLocation(NPC, 58.02, 2.98, 215.83, 2, 0)
  50. elseif GetSpawnLocationID(NPC)== 133776638 then
  51. MovementLoopAddLocation(NPC, 93.29, 2.98, 150.73, 2, math.random(5,10))
  52. MovementLoopAddLocation(NPC, 115.86, 2.98, 173.22, 2, 0)
  53. MovementLoopAddLocation(NPC, 131.57, 2.98, 180.07, 2, math.random(5,10))
  54. MovementLoopAddLocation(NPC, 150.85, 2.98, 133.7, 2, math.random(5,10))
  55. MovementLoopAddLocation(NPC, 134.24, 2.98, 145.7, 2, 0)
  56. MovementLoopAddLocation(NPC, 123.6, 2.98, 155.34, 2, 0)
  57. MovementLoopAddLocation(NPC, 114.95, 2.98, 176.3, 2, math.random(5,10))
  58. MovementLoopAddLocation(NPC, 143.28, 2.98, 161.97, 2, 0)
  59. MovementLoopAddLocation(NPC, 176.24, 2.98, 154.94, 2, 0)
  60. MovementLoopAddLocation(NPC, 194.09, 2.98, 137.54, 2, math.random(5,10))
  61. MovementLoopAddLocation(NPC, 140.35, 2.98, 183.87, 2, 0)
  62. MovementLoopAddLocation(NPC, 140.35, 2.98, 183.87, 2, math.random(5,10))
  63. MovementLoopAddLocation(NPC, 123.2, 2.98, 164.61, 2, 0)
  64. MovementLoopAddLocation(NPC, 96.28, 2.98, 150.87, 2, 0)
  65. MovementLoopAddLocation(NPC, 96.28, 2.98, 150.87, 2, math.random(5,10))
  66. MovementLoopAddLocation(NPC, 96.28, 2.98, 150.87, 2, 0)
  67. MovementLoopAddLocation(NPC, 123.2, 2.98, 164.61, 2, 0)
  68. MovementLoopAddLocation(NPC, 140.35, 2.98, 183.87, 2, math.random(5,10))
  69. MovementLoopAddLocation(NPC, 140.35, 2.98, 183.87, 2, 0)
  70. MovementLoopAddLocation(NPC, 194.09, 2.98, 137.54, 2, math.random(5,10))
  71. MovementLoopAddLocation(NPC, 176.24, 2.98, 154.94, 2, 0)
  72. MovementLoopAddLocation(NPC, 143.28, 2.98, 161.97, 2, 0)
  73. MovementLoopAddLocation(NPC, 114.95, 2.98, 176.3, 2, math.random(5,10))
  74. MovementLoopAddLocation(NPC, 123.6, 2.98, 155.34, 2, 0)
  75. MovementLoopAddLocation(NPC, 134.24, 2.98, 145.7, 2, 0)
  76. MovementLoopAddLocation(NPC, 150.85, 2.98, 133.7, 2, math.random(5,10))
  77. MovementLoopAddLocation(NPC, 131.57, 2.98, 180.07, 2, math.random(5,10))
  78. MovementLoopAddLocation(NPC, 115.86, 2.98, 173.22, 2, 0)
  79. MovementLoopAddLocation(NPC, 93.29, 2.98, 150.73, 2, math.random(5,10))
  80. elseif GetSpawnLocationID(NPC)== 133776639 then
  81. MovementLoopAddLocation(NPC, 151.62, 2.98, 205.35, 2, math.random(5,10))
  82. MovementLoopAddLocation(NPC, 155.54, 2.98, 208.24, 2, math.random(5,10))
  83. MovementLoopAddLocation(NPC, 179.73, 2.98, 190.52, 2, 0)
  84. MovementLoopAddLocation(NPC, 189.91, 2.98, 179.3, 2, math.random(5,10))
  85. MovementLoopAddLocation(NPC, 137.33, 2.98, 186.18, 2, math.random(5,10))
  86. MovementLoopAddLocation(NPC, 160.75, 2.98, 180.23, 2, 0)
  87. MovementLoopAddLocation(NPC, 169.79, 2.98, 198.93, 2, math.random(5,10))
  88. MovementLoopAddLocation(NPC, 179.05, 2.98, 206.12, 2, math.random(5,10))
  89. MovementLoopAddLocation(NPC, 157.41, 2.98, 183.46, 2, 0)
  90. MovementLoopAddLocation(NPC, 145.11, 2.98, 181.11, 2, math.random(5,10))
  91. MovementLoopAddLocation(NPC, 142.34, 2.98, 198.19, 2, 0)
  92. MovementLoopAddLocation(NPC, 151.11, 2.98, 209.53, 2, math.random(5,10))
  93. MovementLoopAddLocation(NPC, 158.54, 2.98, 181.22, 2, 0)
  94. MovementLoopAddLocation(NPC, 157.35, 2.98, 177.36, 2, math.random(5,10))
  95. MovementLoopAddLocation(NPC, 151.61, 2.98, 211.65, 2, 0)
  96. MovementLoopAddLocation(NPC, 157.35, 2.98, 177.36, 2, math.random(5,10))
  97. MovementLoopAddLocation(NPC, 158.54, 2.98, 181.22, 2, 0)
  98. MovementLoopAddLocation(NPC, 151.11, 2.98, 209.53, 2, math.random(5,10))
  99. MovementLoopAddLocation(NPC, 142.34, 2.98, 198.19, 2, 0)
  100. MovementLoopAddLocation(NPC, 145.11, 2.98, 181.11, 2, math.random(5,10))
  101. MovementLoopAddLocation(NPC, 157.41, 2.98, 183.46, 2, 0)
  102. MovementLoopAddLocation(NPC, 179.05, 2.98, 206.12, 2, math.random(5,10))
  103. MovementLoopAddLocation(NPC, 169.79, 2.98, 198.93, 2, math.random(5,10))
  104. MovementLoopAddLocation(NPC, 160.75, 2.98, 180.23, 2, 0)
  105. MovementLoopAddLocation(NPC, 137.33, 2.98, 186.18, 2, math.random(5,10))
  106. MovementLoopAddLocation(NPC, 189.91, 2.98, 179.3, 2, math.random(5,10))
  107. MovementLoopAddLocation(NPC, 179.73, 2.98, 190.52, 2, 0)
  108. MovementLoopAddLocation(NPC, 155.54, 2.98, 208.24, 2, math.random(5,10))
  109. MovementLoopAddLocation(NPC, 151.62, 2.98, 205.35, 2, math.random(5,10))
  110. elseif GetSpawnLocationID(NPC)== 133776640 then
  111. MovementLoopAddLocation(NPC, 263.71, 2.98, 133.46, 2, math.random(5,10))
  112. MovementLoopAddLocation(NPC, 257.78, 2.98, 120.93, 2, 0)
  113. MovementLoopAddLocation(NPC, 246.45, 2.98, 93.42, 2, 0)
  114. MovementLoopAddLocation(NPC, 248.39, 2.98, 73.02, 2, 0)
  115. MovementLoopAddLocation(NPC, 253.21, 2.98, 62.02, 2, 0)
  116. MovementLoopAddLocation(NPC, 268.8, 2.98, 54.55, 2, math.random(5,10))
  117. MovementLoopAddLocation(NPC, 238.89, 2.98, 71.11, 2, math.random(5,10))
  118. MovementLoopAddLocation(NPC, 236.65, 2.98, 84.78, 2, 0)
  119. MovementLoopAddLocation(NPC, 244.8, 2.98, 106.03, 2, 0)
  120. MovementLoopAddLocation(NPC, 248.55, 2.98, 135.47, 2, 0)
  121. MovementLoopAddLocation(NPC, 248.55, 2.98, 135.47, 2, math.random(5,10))
  122. MovementLoopAddLocation(NPC, 226.14, 2.98, 124.9, 2, math.random(5,10))
  123. MovementLoopAddLocation(NPC, 234.29, 2.98, 131.19, 2, 0)
  124. MovementLoopAddLocation(NPC, 243.94, 2.98, 126.11, 2, 0)
  125. MovementLoopAddLocation(NPC, 257.52, 2.98, 86.46, 2, 0)
  126. MovementLoopAddLocation(NPC, 256.42, 2.98, 78.88, 2, math.random(5,10))
  127. MovementLoopAddLocation(NPC, 231.35, 2.98, 109.8, 2, math.random(5,10))
  128. MovementLoopAddLocation(NPC, 270.51, 2.98, 128.17, 2, 0)
  129. MovementLoopAddLocation(NPC, 270.64, 2.98, 133.03, 2, math.random(5,10))
  130. MovementLoopAddLocation(NPC, 224.21, 2.98, 130.22, 2, math.random(5,10))
  131. MovementLoopAddLocation(NPC, 269.76, 2.98, 134.36, 2, 0)
  132. MovementLoopAddLocation(NPC, 224.21, 2.98, 130.22, 2, math.random(5,10))
  133. MovementLoopAddLocation(NPC, 270.64, 2.98, 133.03, 2, math.random(5,10))
  134. MovementLoopAddLocation(NPC, 270.51, 2.98, 128.17, 2, 0)
  135. MovementLoopAddLocation(NPC, 231.35, 2.98, 109.8, 2, math.random(5,10))
  136. MovementLoopAddLocation(NPC, 256.42, 2.98, 78.88, 2, math.random(5,10))
  137. MovementLoopAddLocation(NPC, 257.52, 2.98, 86.46, 2, 0)
  138. MovementLoopAddLocation(NPC, 243.94, 2.98, 126.11, 2, 0)
  139. MovementLoopAddLocation(NPC, 234.29, 2.98, 131.19, 2, 0)
  140. MovementLoopAddLocation(NPC, 226.14, 2.98, 124.9, 2, math.random(5,10))
  141. MovementLoopAddLocation(NPC, 248.55, 2.98, 135.47, 2, math.random(5,10))
  142. MovementLoopAddLocation(NPC, 248.55, 2.98, 135.47, 2, 0)
  143. MovementLoopAddLocation(NPC, 244.8, 2.98, 106.03, 2, 0)
  144. MovementLoopAddLocation(NPC, 236.65, 2.98, 84.78, 2, 0)
  145. MovementLoopAddLocation(NPC, 238.89, 2.98, 71.11, 2, math.random(5,10))
  146. MovementLoopAddLocation(NPC, 268.8, 2.98, 54.55, 2, math.random(5,10))
  147. MovementLoopAddLocation(NPC, 253.21, 2.98, 62.02, 2, 0)
  148. MovementLoopAddLocation(NPC, 248.39, 2.98, 73.02, 2, 0)
  149. MovementLoopAddLocation(NPC, 246.45, 2.98, 93.42, 2, 0)
  150. MovementLoopAddLocation(NPC, 257.78, 2.98, 120.93, 2, 0)
  151. MovementLoopAddLocation(NPC, 263.71, 2.98, 133.46, 2, math.random(5,10))
  152. elseif GetSpawnLocationID(NPC)== 133776641 then
  153. MovementLoopAddLocation(NPC, 235.16, 5.03, -25.46, 2, math.random(5,10))
  154. MovementLoopAddLocation(NPC, 218.91, 6.89, -82.27, 2, 0)
  155. MovementLoopAddLocation(NPC, 209.49, 6.89, -81.32, 2, math.random(5,10))
  156. MovementLoopAddLocation(NPC, 272.23, 6.89, -74.51, 2, math.random(5,10))
  157. MovementLoopAddLocation(NPC, 252.16, 6.89, -78.13, 2, math.random(5,10))
  158. MovementLoopAddLocation(NPC, 224.01, 6.89, -29.75, 2, math.random(5,10))
  159. MovementLoopAddLocation(NPC, 229.64, 6.89, 6.39, 2, 0)
  160. MovementLoopAddLocation(NPC, 232.68, 6.89, 39.53, 2, math.random(5,10))
  161. MovementLoopAddLocation(NPC, 228.5, 6.89, 9.54, 2, 0)
  162. MovementLoopAddLocation(NPC, 261.48, 6.89, -20.83, 2, math.random(5,10))
  163. MovementLoopAddLocation(NPC, 262.59, 6.89, 1.85, 2, math.random(5,10))
  164. MovementLoopAddLocation(NPC, 212.59, 6.89, -87.08, 2, math.random(5,10))
  165. MovementLoopAddLocation(NPC, 252.99, 6.89, -72.67, 2, 0)
  166. MovementLoopAddLocation(NPC, 266.97, 6.89, -75.65, 2, math.random(5,10))
  167. MovementLoopAddLocation(NPC, 218.62, 6.89, -62.62, 2, math.random(5,10))
  168. MovementLoopAddLocation(NPC, 247.52, 6.89, -16.89, 2, math.random(5,10))
  169. MovementLoopAddLocation(NPC, 218.62, 6.89, -62.62, 2, math.random(5,10))
  170. MovementLoopAddLocation(NPC, 266.97, 6.89, -75.65, 2, math.random(5,10))
  171. MovementLoopAddLocation(NPC, 252.99, 6.89, -72.67, 2, 0)
  172. MovementLoopAddLocation(NPC, 212.59, 6.89, -87.08, 2, math.random(5,10))
  173. MovementLoopAddLocation(NPC, 262.59, 6.89, 1.85, 2, math.random(5,10))
  174. MovementLoopAddLocation(NPC, 261.48, 6.89, -20.83, 2, math.random(5,10))
  175. MovementLoopAddLocation(NPC, 228.5, 6.89, 9.54, 2, 0)
  176. MovementLoopAddLocation(NPC, 232.68, 6.89, 39.53, 2, math.random(5,10))
  177. MovementLoopAddLocation(NPC, 229.64, 6.89, 6.39, 2, 0)
  178. MovementLoopAddLocation(NPC, 224.01, 6.89, -29.75, 2, math.random(5,10))
  179. MovementLoopAddLocation(NPC, 252.16, 6.89, -78.13, 2, math.random(5,10))
  180. MovementLoopAddLocation(NPC, 272.23, 6.89, -74.51, 2, math.random(5,10))
  181. MovementLoopAddLocation(NPC, 209.49, 6.89, -81.32, 2, math.random(5,10))
  182. MovementLoopAddLocation(NPC, 218.91, 6.89, -82.27, 2, 0)
  183. MovementLoopAddLocation(NPC, 235.16, 5.03, -25.46, 2, math.random(5,10))
  184. else
  185. local route = math.random(1,4)
  186. if route == 1 then
  187. RouteOne(NPC, Spawn)
  188. elseif route == 2 then
  189. RouteTwo(NPC, Spawn)
  190. elseif route == 3 then
  191. RouteThree(NPC, Spawn)
  192. elseif route == 4 then
  193. RouteFour(NPC, Spawn)
  194. end
  195. end
  196. function RouteOne(NPC, Spawn)
  197. local X = GetX(NPC)
  198. local Y = GetY(NPC)
  199. local Z = GetZ(NPC)
  200. MovementLoopAddLocation(NPC, X, Y, Z, 2, math.random(5,10))
  201. MovementLoopAddLocation(NPC, X + 12, Y, Z, 2,math.random(5,10))
  202. MovementLoopAddLocation(NPC, X + 12, Y, Z + 4, 2, math.random(5,10))
  203. MovementLoopAddLocation(NPC, X + 14, Y, Z, 2, math.random(5,10))
  204. MovementLoopAddLocation(NPC, X + 5, Y, Z + 4, 2, math.random(5,10))
  205. MovementLoopAddLocation(NPC, X, Y, Z, 2, math.random(5,10))
  206. end
  207. function RouteTwo(NPC, Spawn)
  208. local X = GetX(NPC)
  209. local Y = GetY(NPC)
  210. local Z = GetZ(NPC)
  211. MovementLoopAddLocation(NPC, X, Y, Z, 2, math.random(5,10))
  212. MovementLoopAddLocation(NPC, X - 5, Y, Z, 2, math.random(5,10))
  213. MovementLoopAddLocation(NPC, X - 14, Y, Z - 4, 2, math.random(5,10))
  214. MovementLoopAddLocation(NPC, X - 12, Y, Z, 2, math.random(5,10))
  215. MovementLoopAddLocation(NPC, X - 12, Y, Z - 4, 2, math.random(5,10))
  216. MovementLoopAddLocation(NPC, X, Y, Z, 1, 0)
  217. end
  218. function RouteThree(NPC, Spawn)
  219. local X = GetX(NPC)
  220. local Y = GetY(NPC)
  221. local Z = GetZ(NPC)
  222. MovementLoopAddLocation(NPC, X, Y, Z, 2, math.random(5,10))
  223. MovementLoopAddLocation(NPC, X + 12, Y, Z, 2, math.random(5,10))
  224. MovementLoopAddLocation(NPC, X + 5, Y, Z - 4, 2, math.random(5,10))
  225. MovementLoopAddLocation(NPC, X + 14, Y, Z, 2, math.random(5,10))
  226. MovementLoopAddLocation(NPC, X + 12, Y, Z - 4, 2, math.random(5,10))
  227. MovementLoopAddLocation(NPC, X, Y, Z, 2, math.random(5,10))
  228. end
  229. function RouteFour(NPC, Spawn)
  230. local X = GetX(NPC)
  231. local Y = GetY(NPC)
  232. local Z = GetZ(NPC)
  233. MovementLoopAddLocation(NPC, X, Y, Z, 2, math.random(5,10))
  234. MovementLoopAddLocation(NPC, X - 12, Y, Z, 2, math.random(5,10))
  235. MovementLoopAddLocation(NPC, X - 5, Y, Z + 4, 2, math.random(5,10))
  236. MovementLoopAddLocation(NPC, X - 14, Y, Z, 2, math.random(5,10))
  237. MovementLoopAddLocation(NPC, X - 12, Y, Z + 4, 2, math.random(5,10))
  238. MovementLoopAddLocation(NPC, X, Y, Z, 2, math.random(5,10))
  239. end
  240. end