9
3

aduck.lua 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. --[[
  2. Script Name : SpawnScripts/Castleview/aduck.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.01.27 04:01:37
  5. Script Purpose : Cuz Ducks
  6. :
  7. --]]
  8. function spawn(NPC)
  9. waypoints(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 waypoints(NPC)
  18. if GetSpawnLocationID (NPC) == 418592 then
  19. MovementLoopAddLocation(NPC, 781.4, -16.47, -157.04, 1, 2)
  20. MovementLoopAddLocation(NPC, 790.8, -15.97, -157.8, 1, math.random(15, 20))
  21. MovementLoopAddLocation(NPC, 790.47, -15.97, -157.8, 1, 0)
  22. MovementLoopAddLocation(NPC, 790.6, -16.22, -154.66, 1, 0)
  23. MovementLoopAddLocation(NPC, 799.02, -16.22, -151.3, 1, 0)
  24. MovementLoopAddLocation(NPC, 800.07, -16.22, -135.31, 1, 0)
  25. MovementLoopAddLocation(NPC, 803.09, -16.22, -130.15, 1, 0)
  26. MovementLoopAddLocation(NPC, 803.05, -16.08, -122.99, 1, 0)
  27. MovementLoopAddLocation(NPC, 799.04, -15.89, -108.07, 1, 0)
  28. MovementLoopAddLocation(NPC, 794.74, -16.16, -107, 1, 0)
  29. MovementLoopAddLocation(NPC, 793.92, -16.19, -123.9, 1, math.random(8, 15))
  30. MovementLoopAddLocation(NPC, 788.38, -16.22, -128.23, 1, 0)
  31. MovementLoopAddLocation(NPC, 778.26, -16.22, -130.61, 1, math.random(8, 15))
  32. MovementLoopAddLocation(NPC, 778.05, -16.22, -133.17, 1, 0)
  33. MovementLoopAddLocation(NPC, 791.85, -16.22, -126.93, 1, 0)
  34. MovementLoopAddLocation(NPC, 795.35, -16.22, -129.45, 1, 0)
  35. MovementLoopAddLocation(NPC, 795.35, -16.22, -129.45, 1, 0)
  36. MovementLoopAddLocation(NPC, 796.87, -16.22, -146.41, 2, 0)
  37. MovementLoopAddLocation(NPC, 795.6, -15.97, -154.17, 1, math.random(15, 20))
  38. MovementLoopAddLocation(NPC, 795.6, -15.97, -156.03, 2, 0)
  39. MovementLoopAddLocation(NPC, 789.67, -16.22, -154.17, 2, 0)
  40. MovementLoopAddLocation(NPC, 785.74, -17.39, -162.52, 1, math.random(8, 15))
  41. MovementLoopAddLocation(NPC, 785.89, -17.43, -170.98, 1, 0)
  42. elseif GetSpawnLocationID (NPC) == 418576 then
  43. MovementLoopAddLocation(NPC, 769.35, -18.22, -109.66, 1, 0)
  44. MovementLoopAddLocation(NPC, 775.31, -18.05, -108.09, 1, 0)
  45. MovementLoopAddLocation(NPC, 776.32, -18.05, -114.66, 1, 0)
  46. MovementLoopAddLocation(NPC, 771.71, -17.83, -114.37, 1, math.random(8, 15))
  47. MovementLoopAddLocation(NPC, 771.74, -17.66, -114.06, 1, 0)
  48. MovementLoopAddLocation(NPC, 773.31, -18.22, -119.5, 1, 0)
  49. MovementLoopAddLocation(NPC, 773.68, -19.96, -125.92, 1, 0)
  50. MovementLoopAddLocation(NPC, 766.58, -20.46, -135.04, 1, 0)
  51. MovementLoopAddLocation(NPC, 767.06, -19.99, -144.8, 1, 0)
  52. MovementLoopAddLocation(NPC, 767.27, -18.99, -160.61, 1, 0)
  53. MovementLoopAddLocation(NPC, 775.41, -17.46, -164.36, 1, 0)
  54. MovementLoopAddLocation(NPC, 790.34, -15.99, -161.26, 1, math.random(15, 20))
  55. MovementLoopAddLocation(NPC, 790.5, -15.97, -161.14, 1, 0)
  56. MovementLoopAddLocation(NPC, 787.55, -16.85, -158.8, 1, 0)
  57. MovementLoopAddLocation(NPC, 780.75, -16.97, -159.07, 1, 0)
  58. MovementLoopAddLocation(NPC, 774.59, -17.65, -161.75, 1, 0)
  59. MovementLoopAddLocation(NPC, 768.32, -18.96, -161.03, 1, 0)
  60. MovementLoopAddLocation(NPC, 767.26, -20.53, -132.4, 1, 0)
  61. MovementLoopAddLocation(NPC, 759.71, -19.98, -117.96, 1, 0)
  62. MovementLoopAddLocation(NPC, 763.93, -18.22, -115.61, 1, 0)
  63. elseif GetSpawnLocationID (NPC) == 418569 then
  64. MovementLoopAddLocation(NPC, 759.4, -13.79, -94.45, 1, 0)
  65. MovementLoopAddLocation(NPC, 761.45, -13.79, -102.43, 1, 0)
  66. MovementLoopAddLocation(NPC, 754.31, -13.77, -111.64, 1, 0)
  67. MovementLoopAddLocation(NPC, 745.3, -13.76, -125.05, 1, math.random(8, 15))
  68. MovementLoopAddLocation(NPC, 746.49, -13.76, -125.52, 1, 0)
  69. MovementLoopAddLocation(NPC, 748.98, -13.81, -121.57, 1, math.random(8, 15))
  70. MovementLoopAddLocation(NPC, 761.96, -13.79, -104.41, 1, 0)
  71. MovementLoopAddLocation(NPC, 761.9, -13.78, -94.12, 1, 0)
  72. MovementLoopAddLocation(NPC, 769.64, -11.19, -89.57, 1, 0)
  73. MovementLoopAddLocation(NPC, 776.6, -11.19, -91.83, 1, math.random(8, 15))
  74. MovementLoopAddLocation(NPC, 770.54, -11.19, -91.96, 1, 0)
  75. MovementLoopAddLocation(NPC, 763.99, -13.01, -92.7, 1, 0)
  76. MovementLoopAddLocation(NPC, 769.07, -18.22, -106.4, 1, 0)
  77. MovementLoopAddLocation(NPC, 765.54, -18.05, -117.88, 1, 0)
  78. MovementLoopAddLocation(NPC, 770.75, -18.05, -120.28, 1, 0)
  79. MovementLoopAddLocation(NPC, 771.92, -17.72, -114.32, 1, math.random(15, 20))
  80. MovementLoopAddLocation(NPC, 774.3, -18.22, -113.42, 1, 0)
  81. MovementLoopAddLocation(NPC, 768.13, -18.16, -105.41, 1, 0)
  82. MovementLoopAddLocation(NPC, 763.19, -13.75, -94.44, 1, 0)
  83. elseif GetSpawnLocationID (NPC) == 418563 then
  84. MovementLoopAddLocation(NPC, 736.29, -15.19, -136.32, 1, math.random(8, 15))
  85. MovementLoopAddLocation(NPC, 734.6, -15.19, -139.6, 1, 0)
  86. MovementLoopAddLocation(NPC, 730.52, -15.53, -149.15, 1, 0)
  87. MovementLoopAddLocation(NPC, 725.72, -15.2, -153.78, 1, math.random(8, 15))
  88. MovementLoopAddLocation(NPC, 738.9, -15.17, -156.39, 1, 0)
  89. MovementLoopAddLocation(NPC, 747.5, -15.18, -160.12, 1, 0)
  90. MovementLoopAddLocation(NPC, 756.62, -15.19, -160.82, 1, math.random(8, 15))
  91. MovementLoopAddLocation(NPC, 753.21, -15.18, -162.5, 1, 0)
  92. MovementLoopAddLocation(NPC, 755.53, -15.22, -164.71, 1, math.random(8, 15))
  93. MovementLoopAddLocation(NPC, 765.03, -18.97, -164.88, 1, 0)
  94. MovementLoopAddLocation(NPC, 789.44, -17.43, -171.14, 1, 5)
  95. MovementLoopAddLocation(NPC, 792.62, -15.97, -165.74, 1, math.random(15, 20))
  96. MovementLoopAddLocation(NPC, 792.64, -15.97, -165.74, 1, 0)
  97. MovementLoopAddLocation(NPC, 784.35, -17.43, -170.89, 1, 2)
  98. MovementLoopAddLocation(NPC, 796.19, -16.54, -168.73, 1, 0)
  99. MovementLoopAddLocation(NPC, 797.81, -15.97, -167.38, 1, math.random(15, 20))
  100. MovementLoopAddLocation(NPC, 797.92, -15.97, -167.07, 1, 0)
  101. MovementLoopAddLocation(NPC, 793.13, -16.77, -168.39, 1, 0)
  102. MovementLoopAddLocation(NPC, 778.76, -17.39, -167.07, 1, 0)
  103. MovementLoopAddLocation(NPC, 754.03, -15.24, -166.33, 1, 0)
  104. MovementLoopAddLocation(NPC, 737.45, -15.17, -155.87, 1, 0)
  105. MovementLoopAddLocation(NPC, 734.86, -15.24, -146.08, 1, 0)
  106. elseif GetSpawnLocationID (NPC) == 418557 then
  107. MovementLoopAddLocation(NPC, 715.46, -16.18, -151.19, 1, 0)
  108. MovementLoopAddLocation(NPC, 707.2, -14.97, -150.55, 1, 0)
  109. MovementLoopAddLocation(NPC, 705.01, -14.94, -153.05, 1, math.random(8, 15))
  110. MovementLoopAddLocation(NPC, 706.67, -14.97, -150.41, 1, 0)
  111. MovementLoopAddLocation(NPC, 710.9, -16.16, -155.15, 1, 0)
  112. MovementLoopAddLocation(NPC, 714.06, -16.14, -161.4, 1, math.random(8, 15))
  113. MovementLoopAddLocation(NPC, 717.2, -16.14, -164.02, 1, 0)
  114. MovementLoopAddLocation(NPC, 721.54, -16.1, -163.26, 1, 0)
  115. MovementLoopAddLocation(NPC, 733.25, -15.21, -164.08, 1, 0)
  116. MovementLoopAddLocation(NPC, 737.26, -15.2, -165.15, 1, 0)
  117. MovementLoopAddLocation(NPC, 740.22, -15.21, -163.88, 1, math.random(8, 15))
  118. MovementLoopAddLocation(NPC, 746.55, -15.2, -163.65, 1, 0)
  119. MovementLoopAddLocation(NPC, 767.14, -18.97, -164.93, 1, 0)
  120. MovementLoopAddLocation(NPC, 771.73, -18.39, -168.48, 1, 0)
  121. MovementLoopAddLocation(NPC, 781.73, -17.43, -170, 1, 1)
  122. MovementLoopAddLocation(NPC, 790.28, -15.97, -162.89, 1, math.random(15, 20))
  123. MovementLoopAddLocation(NPC, 790.58, -15.97, -162.72, 1, 0)
  124. MovementLoopAddLocation(NPC, 790.33, -15.97, -159.41, 1, 0)
  125. MovementLoopAddLocation(NPC, 791.07, -15.97, -157, 1, 0)
  126. MovementLoopAddLocation(NPC, 793.19, -15.97, -154.82, 1, math.random(15, 20))
  127. MovementLoopAddLocation(NPC, 793.62, -15.97, -154.86, 1, 0)
  128. MovementLoopAddLocation(NPC, 788.84, -16.22, -151.25, 1, math.random(8, 15))
  129. MovementLoopAddLocation(NPC, 781.99, -17.39, -162.15, 1, 0)
  130. MovementLoopAddLocation(NPC, 771.47, -18.43, -165.13, 1, 0)
  131. MovementLoopAddLocation(NPC, 760.75, -17.49, -166.55, 1, 0)
  132. MovementLoopAddLocation(NPC, 749.12, -15.21, -166.17, 1, 0)
  133. MovementLoopAddLocation(NPC, 740.2, -15.21, -162.99, 1, math.random(8, 15))
  134. MovementLoopAddLocation(NPC, 735.08, -15.22, -161.89, 1, 0)
  135. MovementLoopAddLocation(NPC, 726, -15.21, -155.98, 1, 0)
  136. elseif GetSpawnLocationID (NPC) == 418609 then
  137. MovementLoopAddLocation(NPC, 790.47, -17.98, -112.61, 1, 0)
  138. MovementLoopAddLocation(NPC, 789.77, -16.22, -107.42, 1, 0)
  139. MovementLoopAddLocation(NPC, 791.19, -16.22, -105.32, 1, 3)
  140. MovementLoopAddLocation(NPC, 793.41, -16.16, -104.35, 1, 0)
  141. MovementLoopAddLocation(NPC, 796.09, -16.22, -119.77, 1, math.random(15, 20))
  142. MovementLoopAddLocation(NPC, 797.69, -16.22, -133.59, 1, 3)
  143. MovementLoopAddLocation(NPC, 800.1, -15.97, -153.69, 1, math.random(15, 20))
  144. MovementLoopAddLocation(NPC, 800.15, -15.97, -154.03, 1, 0)
  145. MovementLoopAddLocation(NPC, 793.22, -16.22, -150.9, 1, 0)
  146. MovementLoopAddLocation(NPC, 792.12, -15.97, -155.84, 1, math.random(15, 20))
  147. MovementLoopAddLocation(NPC, 792.19, -15.97, -156.09, 1, 0)
  148. MovementLoopAddLocation(NPC, 785.7, -17.43, -169.48, 1, math.random(8, 15))
  149. MovementLoopAddLocation(NPC, 794.05, -15.97, -166.81, 1, math.random(15, 20))
  150. MovementLoopAddLocation(NPC, 794.29, -15.97, -166.56, 1, 0)
  151. MovementLoopAddLocation(NPC, 778.12, -17.39, -167.92, 1, 0)
  152. MovementLoopAddLocation(NPC, 768.37, -18.96, -159.58, 1, 0)
  153. MovementLoopAddLocation(NPC, 768.45, -20.02, -130.34, 1, 0)
  154. MovementLoopAddLocation(NPC, 769.44, -20.01, -128.57, 1, math.random(8, 15))
  155. MovementLoopAddLocation(NPC, 780.89, -19.95, -123.98, 1, 0)
  156. MovementLoopAddLocation(NPC, 785.53, -19.94, -117.96, 1, 0)
  157. MovementLoopAddLocation(NPC, 789.3, -19.73, -117.18, 1, 0)
  158. end
  159. end