mikkel.lua 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230
  1. --[[
  2. Script Name : nightstalker.lua
  3. Script Purpose : Waypoint Path for nightstalker.lua
  4. Script Author : Devn00b
  5. Script Date : 04/12/2020 11:16:46 AM
  6. Script Notes : Locations collected from Live
  7. --]]
  8. dofile("SpawnScripts/Generic/GenericEcologyVoiceOvers.lua")
  9. function spawn(NPC)
  10. AddTimer(NPC, 1900, "follow_Enursin")
  11. SetPlayerProximityFunction(NPC, 7, "InRange", "LeaveRange")
  12. end
  13. function hailed(NPC, Spawn)
  14. local Enursin = GetSpawn(NPC,2220118)
  15. FaceTarget(NPC, Spawn)
  16. if Enursin ~=nil then
  17. FaceTarget(Enursin,Spawn)
  18. end
  19. GenericEcologyHail(NPC, Spawn, faction)
  20. end
  21. function follow_Enursin(NPC)
  22. local zone = GetZone(NPC)
  23. local Enursin_location = GetSpawnByLocationID(zone, 379944)
  24. local sli = GetSpawnLocationID(NPC)
  25. local leaderX = GetX(Enursin_location)
  26. local leaderY = GetY(Enursin_location)
  27. local leaderZ = GetZ(Enursin_location)
  28. local speed = 2
  29. -- Say(NPC, "Leader location is: " .. GetX(guard_A_placement) .. ", " .. GetY(guard_A_placement) .. ", " .. GetZ(guard_A_placement))
  30. if Enursin_location ~=nil and not IsInCombat(NPC) then
  31. if sli == 379936 then
  32. if GetDistance(NPC, Enursin_location) >= 8 then
  33. speed = 5
  34. MoveToLocation(NPC, leaderX - 1, leaderY, leaderZ, speed)
  35. else
  36. speed = 2
  37. MoveToLocation(NPC, leaderX - 1, leaderY, leaderZ, speed)
  38. end
  39. end
  40. end
  41. speed = 2
  42. AddTimer(NPC, 3000, "follow_Enursin")
  43. end
  44. --[[Enursin's Patrol
  45. function waypoints(NPC) --(following Enursin Nightstalker)
  46. MovementLoopAddLocation(NPC, 441.68, -20.33, -318.13, 2, 0)
  47. MovementLoopAddLocation(NPC, 447.68, -20.33, -324.06, 2, 0)
  48. MovementLoopAddLocation(NPC, 451.08, -20.35, -326.46, 2, 0)
  49. MovementLoopAddLocation(NPC, 455.34, -20.41, -326.81, 2, 0)
  50. MovementLoopAddLocation(NPC, 460.61, -20.5, -325.99, 2, 0)
  51. MovementLoopAddLocation(NPC, 464.6, -20.47, -323.73, 2, 0)
  52. MovementLoopAddLocation(NPC, 467.31, -20.42, -320.02, 2, 0)
  53. MovementLoopAddLocation(NPC, 467.77, -20.35, -315.62, 2, 0)
  54. MovementLoopAddLocation(NPC, 466.03, -20.23, -311.41, 2, 0)
  55. MovementLoopAddLocation(NPC, 461.14, -20.18, -307.03, 2, 0)
  56. MovementLoopAddLocation(NPC, 455.07, -20.2, -304.7, 2, 0)
  57. MovementLoopAddLocation(NPC, 449.84, -20.26, -304.03, 2, 0)
  58. MovementLoopAddLocation(NPC, 437.04, -20.75, -281.16, 2, 0)
  59. MovementLoopAddLocation(NPC, 437.55, -20.92, -254.01, 2, 0)
  60. MovementLoopAddLocation(NPC, 434.83, -21.31, -248.24, 2, 0)
  61. MovementLoopAddLocation(NPC, 405.9, -23.02, -216.31, 2, 0)
  62. MovementLoopAddLocation(NPC, 388.39, -18.86, -235.08, 2, 0)
  63. MovementLoopAddLocation(NPC, 405.93, -23, -217.04, 2, 0)
  64. MovementLoopAddLocation(NPC, 386.32, -24.34, -194.34, 2, 0)
  65. MovementLoopAddLocation(NPC, 359.28, -25.34, -174.69, 2, 0)
  66. MovementLoopAddLocation(NPC, 341.23, -23.91, -145.54, 2, 0)
  67. MovementLoopAddLocation(NPC, 319.08, -23.15, -103.21, 2, 0)
  68. MovementLoopAddLocation(NPC, 314.18, -22.67, -91.88, 2, 0)
  69. MovementLoopAddLocation(NPC, 306.92, -21.35, -54.89, 2, 0)
  70. MovementLoopAddLocation(NPC, 294.23, -21.05, -45.16, 2, 0)
  71. MovementLoopAddLocation(NPC, 279.54, -21.18, -32.57, 2, 0)
  72. MovementLoopAddLocation(NPC, 257.93, -21.1, -11.88, 2, 0)
  73. MovementLoopAddLocation(NPC, 254.82, -19.97, 35.53, 2, 0)
  74. MovementLoopAddLocation(NPC, 286.47, -12.82, 76.85, 2, 0)
  75. MovementLoopAddLocation(NPC, 291.57, -13.42, 109.62, 2, 0)
  76. MovementLoopAddLocation(NPC, 301.61, -15.94, 140.57, 2, 0)
  77. MovementLoopAddLocation(NPC, 311.09, -17.91, 158.73, 2, 0)
  78. MovementLoopAddLocation(NPC, 315.55, -17.98, 164.22, 2, 0)
  79. MovementLoopAddLocation(NPC, 321.17, -18.12, 167.53, 2, 0)
  80. MovementLoopAddLocation(NPC, 327.38, -18.49, 168.63, 2, 0)
  81. MovementLoopAddLocation(NPC, 335.41, -19.11, 168.24, 2, 0)
  82. MovementLoopAddLocation(NPC, 343.39, -19.81, 165.99, 2, 0)
  83. MovementLoopAddLocation(NPC, 353.19, -20.11, 161.76, 2, 0)
  84. MovementLoopAddLocation(NPC, 362.33, -20.07, 156.28, 2, 0)
  85. MovementLoopAddLocation(NPC, 371, -20.4, 150.07, 2, 0)
  86. MovementLoopAddLocation(NPC, 376.95, -20.63, 141.51, 2, 0)
  87. MovementLoopAddLocation(NPC, 380.82, -20.84, 135.48, 2, 0)
  88. MovementLoopAddLocation(NPC, 376.95, -20.63, 141.51, 2, 0)
  89. MovementLoopAddLocation(NPC, 371, -20.4, 150.07, 2, 0)
  90. MovementLoopAddLocation(NPC, 362.33, -20.07, 156.28, 2, 0)
  91. MovementLoopAddLocation(NPC, 353.19, -20.11, 161.76, 2, 0)
  92. MovementLoopAddLocation(NPC, 343.39, -19.81, 165.99, 2, 0)
  93. MovementLoopAddLocation(NPC, 335.41, -19.11, 168.24, 2, 0)
  94. MovementLoopAddLocation(NPC, 327.38, -18.49, 168.63, 2, 0)
  95. MovementLoopAddLocation(NPC, 321.17, -18.12, 167.53, 2, 0)
  96. MovementLoopAddLocation(NPC, 315.55, -17.98, 164.22, 2, 0)
  97. MovementLoopAddLocation(NPC, 311.09, -17.91, 158.73, 2, 0)
  98. MovementLoopAddLocation(NPC, 301.61, -15.94, 140.57, 2, 0)
  99. MovementLoopAddLocation(NPC, 291.57, -13.42, 109.62, 2, 0)
  100. MovementLoopAddLocation(NPC, 286.47, -12.82, 76.85, 2, 0)
  101. MovementLoopAddLocation(NPC, 254.82, -19.97, 35.53, 2, 0)
  102. MovementLoopAddLocation(NPC, 257.93, -21.1, -11.88, 2, 0)
  103. MovementLoopAddLocation(NPC, 279.54, -21.18, -32.57, 2, 0)
  104. MovementLoopAddLocation(NPC, 294.23, -21.05, -45.16, 2, 0)
  105. MovementLoopAddLocation(NPC, 306.92, -21.35, -54.89, 2, 0)
  106. MovementLoopAddLocation(NPC, 314.18, -22.67, -91.88, 2, 0)
  107. MovementLoopAddLocation(NPC, 319.08, -23.15, -103.21, 2, 0)
  108. MovementLoopAddLocation(NPC, 341.23, -23.91, -145.54, 2, 0)
  109. MovementLoopAddLocation(NPC, 359.28, -25.34, -174.69, 2, 0)
  110. MovementLoopAddLocation(NPC, 386.32, -24.34, -194.34, 2, 0)
  111. MovementLoopAddLocation(NPC, 405.93, -23, -217.04, 2, 0)
  112. MovementLoopAddLocation(NPC, 388.39, -18.86, -235.08, 2, 0)
  113. MovementLoopAddLocation(NPC, 405.9, -23.02, -216.31, 2, 0)
  114. MovementLoopAddLocation(NPC, 434.83, -21.31, -248.24, 2, 0)
  115. MovementLoopAddLocation(NPC, 437.55, -20.92, -254.01, 2, 0)
  116. MovementLoopAddLocation(NPC, 437.04, -20.75, -281.16, 2, 0)
  117. MovementLoopAddLocation(NPC, 449.84, -20.26, -304.03, 2, 0)
  118. MovementLoopAddLocation(NPC, 455.07, -20.2, -304.7, 2, 0)
  119. MovementLoopAddLocation(NPC, 461.14, -20.18, -307.03, 2, 0)
  120. MovementLoopAddLocation(NPC, 466.03, -20.23, -311.41, 2, 0)
  121. MovementLoopAddLocation(NPC, 467.77, -20.35, -315.62, 2, 0)
  122. MovementLoopAddLocation(NPC, 467.31, -20.42, -320.02, 2, 0)
  123. MovementLoopAddLocation(NPC, 464.6, -20.47, -323.73, 2, 0)
  124. MovementLoopAddLocation(NPC, 460.61, -20.5, -325.99, 2, 0)
  125. MovementLoopAddLocation(NPC, 455.34, -20.41, -326.81, 2, 0)
  126. MovementLoopAddLocation(NPC, 451.08, -20.35, -326.46, 2, 0)
  127. MovementLoopAddLocation(NPC, 447.68, -20.33, -324.06, 2, 0)
  128. MovementLoopAddLocation(NPC, 441.68, -20.33, -318.13, 2, 0)
  129. end
  130. ]]--
  131. --[[ DevNoob's Creation.
  132. math.randomseed(os.clock()*100000000000)
  133. for i=1,3 do
  134. math.random(10000, 65000)
  135. end
  136. r = math.random(10, 30)
  137. s = math.random(5, 15)
  138. MovementLoopAddLocation(NPC, 441.68, -20.33, -318.13, 2, r)
  139. MovementLoopAddLocation(NPC, 447.68, -20.33, -324.06, 2, s)
  140. MovementLoopAddLocation(NPC, 451.08, -20.35, -326.46, 2, 0)
  141. MovementLoopAddLocation(NPC, 455.34, -20.41, -326.81, 2, 0)
  142. MovementLoopAddLocation(NPC, 460.61, -20.5, -325.99, 2, 0)
  143. MovementLoopAddLocation(NPC, 464.6, -20.47, -323.73, 2, 0)
  144. MovementLoopAddLocation(NPC, 467.31, -20.42, -320.02, 2, 0)
  145. MovementLoopAddLocation(NPC, 467.77, -20.35, -315.62, 2, 0)
  146. MovementLoopAddLocation(NPC, 466.03, -20.23, -311.41, 2, 0)
  147. MovementLoopAddLocation(NPC, 461.14, -20.18, -307.03, 2, 0)
  148. MovementLoopAddLocation(NPC, 455.07, -20.2, -304.7, 2, 0)
  149. MovementLoopAddLocation(NPC, 449.84, -20.26, -304.03, 2, 0)
  150. MovementLoopAddLocation(NPC, 437.04, -20.75, -281.16, 2, 0)
  151. MovementLoopAddLocation(NPC, 437.55, -20.92, -254.01, 2, 0)
  152. MovementLoopAddLocation(NPC, 434.83, -21.31, -248.24, 2, 0)
  153. MovementLoopAddLocation(NPC, 405.9, -23.02, -216.31, 2, 0)
  154. MovementLoopAddLocation(NPC, 388.39, -18.86, -235.08, 2, 0)
  155. MovementLoopAddLocation(NPC, 405.93, -23, -217.04, 2, 0)
  156. MovementLoopAddLocation(NPC, 386.32, -24.34, -194.34, 2, 0)
  157. MovementLoopAddLocation(NPC, 359.28, -25.34, -174.69, 2, 0)
  158. MovementLoopAddLocation(NPC, 341.23, -23.91, -145.54, 2, 0)
  159. MovementLoopAddLocation(NPC, 319.08, -23.15, -103.21, 2, 0)
  160. MovementLoopAddLocation(NPC, 314.18, -22.67, -91.88, 2, 0)
  161. MovementLoopAddLocation(NPC, 306.92, -21.35, -54.89, 2, 0)
  162. MovementLoopAddLocation(NPC, 294.23, -21.05, -45.16, 2, 0)
  163. MovementLoopAddLocation(NPC, 279.54, -21.18, -32.57, 2, 0)
  164. MovementLoopAddLocation(NPC, 257.93, -21.1, -11.88, 2, 0)
  165. MovementLoopAddLocation(NPC, 254.82, -19.97, 35.53, 2, 0)
  166. MovementLoopAddLocation(NPC, 286.47, -12.82, 76.85, 2, 0)
  167. MovementLoopAddLocation(NPC, 291.57, -13.42, 109.62, 2, 0)
  168. MovementLoopAddLocation(NPC, 301.61, -15.94, 140.57, 2, 0)
  169. MovementLoopAddLocation(NPC, 311.09, -17.91, 158.73, 2, 0)
  170. MovementLoopAddLocation(NPC, 315.55, -17.98, 164.22, 2, 0)
  171. MovementLoopAddLocation(NPC, 321.17, -18.12, 167.53, 2, 0)
  172. MovementLoopAddLocation(NPC, 327.38, -18.49, 168.63, 2, 0)
  173. MovementLoopAddLocation(NPC, 335.41, -19.11, 168.24, 2, 0)
  174. MovementLoopAddLocation(NPC, 343.39, -19.81, 165.99, 2, 0)
  175. MovementLoopAddLocation(NPC, 353.19, -20.11, 161.76, 2, 0)
  176. MovementLoopAddLocation(NPC, 362.33, -20.07, 156.28, 2, 0)
  177. MovementLoopAddLocation(NPC, 371, -20.4, 150.07, 2, 0)
  178. MovementLoopAddLocation(NPC, 376.95, -20.63, 141.51, 2, 0)
  179. MovementLoopAddLocation(NPC, 380.82, -20.84, 135.48, 2, 0)
  180. MovementLoopAddLocation(NPC, 376.95, -20.63, 141.51, 2, 0)
  181. MovementLoopAddLocation(NPC, 371, -20.4, 150.07, 2, 0)
  182. MovementLoopAddLocation(NPC, 362.33, -20.07, 156.28, 2, 0)
  183. MovementLoopAddLocation(NPC, 353.19, -20.11, 161.76, 2, 0)
  184. MovementLoopAddLocation(NPC, 343.39, -19.81, 165.99, 2, 0)
  185. MovementLoopAddLocation(NPC, 335.41, -19.11, 168.24, 2, 0)
  186. MovementLoopAddLocation(NPC, 327.38, -18.49, 168.63, 2, 0)
  187. MovementLoopAddLocation(NPC, 321.17, -18.12, 167.53, 2, 0)
  188. MovementLoopAddLocation(NPC, 315.55, -17.98, 164.22, 2, 0)
  189. MovementLoopAddLocation(NPC, 311.09, -17.91, 158.73, 2, 0)
  190. MovementLoopAddLocation(NPC, 301.61, -15.94, 140.57, 2, 0)
  191. MovementLoopAddLocation(NPC, 291.57, -13.42, 109.62, 2, 0)
  192. MovementLoopAddLocation(NPC, 286.47, -12.82, 76.85, 2, 0)
  193. MovementLoopAddLocation(NPC, 254.82, -19.97, 35.53, 2, 0)
  194. MovementLoopAddLocation(NPC, 257.93, -21.1, -11.88, 2, 0)
  195. MovementLoopAddLocation(NPC, 279.54, -21.18, -32.57, 2, 0)
  196. MovementLoopAddLocation(NPC, 294.23, -21.05, -45.16, 2, 0)
  197. MovementLoopAddLocation(NPC, 306.92, -21.35, -54.89, 2, 0)
  198. MovementLoopAddLocation(NPC, 314.18, -22.67, -91.88, 2, 0)
  199. MovementLoopAddLocation(NPC, 319.08, -23.15, -103.21, 2, 0)
  200. MovementLoopAddLocation(NPC, 341.23, -23.91, -145.54, 2, 0)
  201. MovementLoopAddLocation(NPC, 359.28, -25.34, -174.69, 2, 0)
  202. MovementLoopAddLocation(NPC, 386.32, -24.34, -194.34, 2, 0)
  203. MovementLoopAddLocation(NPC, 405.93, -23, -217.04, 2, 0)
  204. MovementLoopAddLocation(NPC, 388.39, -18.86, -235.08, 2, 0)
  205. MovementLoopAddLocation(NPC, 405.9, -23.02, -216.31, 2, 0)
  206. MovementLoopAddLocation(NPC, 434.83, -21.31, -248.24, 2, 0)
  207. MovementLoopAddLocation(NPC, 437.55, -20.92, -254.01, 2, 0)
  208. MovementLoopAddLocation(NPC, 437.04, -20.75, -281.16, 2, 0)
  209. MovementLoopAddLocation(NPC, 449.84, -20.26, -304.03, 2, 0)
  210. MovementLoopAddLocation(NPC, 455.07, -20.2, -304.7, 2, 0)
  211. MovementLoopAddLocation(NPC, 461.14, -20.18, -307.03, 2, 0)
  212. MovementLoopAddLocation(NPC, 466.03, -20.23, -311.41, 2, 0)
  213. MovementLoopAddLocation(NPC, 467.77, -20.35, -315.62, 2, 0)
  214. MovementLoopAddLocation(NPC, 467.31, -20.42, -320.02, 2, 0)
  215. MovementLoopAddLocation(NPC, 464.6, -20.47, -323.73, 2, 0)
  216. MovementLoopAddLocation(NPC, 460.61, -20.5, -325.99, 2, 0)
  217. MovementLoopAddLocation(NPC, 455.34, -20.41, -326.81, 2, 0)
  218. MovementLoopAddLocation(NPC, 451.08, -20.35, -326.46, 2, 0)
  219. MovementLoopAddLocation(NPC, 447.68, -20.33, -324.06, 2, 0)
  220. MovementLoopAddLocation(NPC, 441.68, -20.33, -318.13, 2, 0)
  221. end]]--