9
3

Hanstock.lua 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. --[[
  2. Script Name : Hanstock.lua
  3. Script Purpose : Waypoint Path for Hanstock.lua
  4. Script Author : Auto Generated
  5. Script Date : 04/08/2020 11:54:53 PM
  6. Script Notes : Locations collected from Live
  7. --]]
  8. dofile("SpawnScripts/Generic/GenericGuardVoiceOvers.lua")
  9. dofile("SpawnScripts/Generic/ExpelNonCitizen.lua")
  10. function spawn(NPC)
  11. AddTimer(NPC, 1900, "follow_Bilur")
  12. SetPlayerProximityFunction(NPC, 10, "InRange", "LeaveRange")
  13. end
  14. function InRange(NPC, Spawn)
  15. NonCitizen(NPC,Spawn)
  16. end
  17. function hailed(NPC, Spawn)
  18. if GetFactionAmount(Spawn,11)<0 then
  19. else
  20. FaceTarget(NPC, Spawn)
  21. GenericGuardHail(NPC,Spawn)
  22. local Bilur = GetSpawn(NPC,2210071)
  23. if Bilur ~=nil then
  24. FaceTarget(Bilur,Spawn)
  25. PlayFlavor(Bilur, "", "", "attention", 0, 0, Spawn)
  26. end
  27. local Oakhall = GetSpawn(NPC,2210072)
  28. if Oakhall ~=nil then
  29. FaceTarget(Oakhall,Spawn)
  30. PlayFlavor(Oakhall, "", "", "attention", 0, 0, Spawn)
  31. end
  32. end
  33. end
  34. function respawn(NPC)
  35. spawn(NPC)
  36. end
  37. function follow_Bilur(NPC)
  38. local zone = GetZone(NPC)
  39. local Bilur_location = GetSpawnByLocationID(zone, 379004)
  40. local sli = GetSpawnLocationID(NPC)
  41. local leaderX = GetX(Bilur_location)
  42. local leaderY = GetY(Bilur_location)
  43. local leaderZ = GetZ(Bilur_location)
  44. local speed = 2
  45. -- Say(NPC, "Leader location is: " .. GetX(guard_A_placement) .. ", " .. GetY(guard_A_placement) .. ", " .. GetZ(guard_A_placement))
  46. if Bilur_location ~=nil then
  47. if sli == 379172 then
  48. if GetDistance(NPC, Bilur_location) >= 8 then
  49. speed = 5
  50. MoveToLocation(NPC, leaderX - 3, leaderY, leaderZ, speed)
  51. else
  52. speed = 2
  53. MoveToLocation(NPC, leaderX - 3, leaderY, leaderZ, speed)
  54. end
  55. elseif sli == 133773368 then
  56. if GetDistance(NPC, Bilur_location) >= 8 then
  57. -- Say(NPC, "Leader location is: " .. GetX(guard_A_placement) .. "")
  58. -- Say(NPC, "My location is: " .. GetX(NPC) .. "")
  59. speed = 5
  60. MoveToLocation(NPC, leaderX, leaderY, 2+ leaderZ, speed)
  61. else
  62. speed = 2
  63. MoveToLocation(NPC, leaderX, leaderY, 2+ leaderZ, speed)
  64. end
  65. end
  66. end
  67. speed = 2
  68. AddTimer(NPC, 3000, "follow_Bilur")
  69. end
  70. --[[ COPY OF BILUR - PRE FOLLOW
  71. function waypoints(NPC)
  72. MovementLoopAddLocation(NPC, 898.99, -23.89, -31.94, 2, 0)
  73. MovementLoopAddLocation(NPC, 902.63, -25.37, -24.9, 2, 0)
  74. MovementLoopAddLocation(NPC, 904.6, -25.37, -14.12, 2, 0)
  75. MovementLoopAddLocation(NPC, 905.39, -25.37, 1.6, 2, 0)
  76. MovementLoopAddLocation(NPC, 903.48, -25.37, 13.39, 2, 0)
  77. MovementLoopAddLocation(NPC, 898.34, -25.37, 31.45, 2, 0)
  78. MovementLoopAddLocation(NPC, 892.48, -25.37, 41.15, 2, 0)
  79. MovementLoopAddLocation(NPC, 889.1, -25.37, 43.75, 2, 0)
  80. MovementLoopAddLocation(NPC, 884.94, -25.37, 44.74, 2, 0)
  81. MovementLoopAddLocation(NPC, 870.3, -25.37, 42.83, 2, 0)
  82. MovementLoopAddLocation(NPC, 857.65, -25.37, 41.36, 2, 0)
  83. MovementLoopAddLocation(NPC, 853.62, -24.15, 41.2, 2, 0)
  84. MovementLoopAddLocation(NPC, 842.78, -23.1, 43.14, 2, 0)
  85. MovementLoopAddLocation(NPC, 833.99, -23.31, 44.71, 2, 0)
  86. MovementLoopAddLocation(NPC, 832.86, -23.31, 46.74, 2, 0)
  87. MovementLoopAddLocation(NPC, 819.62, -23.31, 75.37, 2, 0)
  88. MovementLoopAddLocation(NPC, 817.3, -23.31, 83.28, 2, 0)
  89. MovementLoopAddLocation(NPC, 815.88, -23.31, 100.06, 2, 0)
  90. MovementLoopAddLocation(NPC, 813.07, -23.31, 111.83, 2, 0)
  91. MovementLoopAddLocation(NPC, 813.3, -23.33, 119.04, 2, 0)
  92. MovementLoopAddLocation(NPC, 810.24, -23.31, 123.59, 2, 0)
  93. MovementLoopAddLocation(NPC, 806.41, -23.32, 121.1, 2, 0)
  94. MovementLoopAddLocation(NPC, 810.39, -23.31, 114.14, 2, 0)
  95. MovementLoopAddLocation(NPC, 815.65, -23.31, 103.24, 2, 0)
  96. MovementLoopAddLocation(NPC, 817.16, -23.31, 98.64, 2, 0)
  97. MovementLoopAddLocation(NPC, 817.24, -23.31, 83.23, 2, 0)
  98. MovementLoopAddLocation(NPC, 827.26, -23.31, 59.57, 2, 0)
  99. MovementLoopAddLocation(NPC, 835.69, -23.31, 42.84, 2, 0)
  100. MovementLoopAddLocation(NPC, 842.85, -23.11, 42.64, 2, 0)
  101. MovementLoopAddLocation(NPC, 857.22, -25.37, 40.55, 2, 0)
  102. MovementLoopAddLocation(NPC, 866.53, -25.37, 42.31, 2, 0)
  103. MovementLoopAddLocation(NPC, 884.82, -25.37, 44.99, 2, 0)
  104. MovementLoopAddLocation(NPC, 890.13, -25.37, 43.48, 2, 0)
  105. MovementLoopAddLocation(NPC, 897, -25.37, 33.43, 2, 0)
  106. MovementLoopAddLocation(NPC, 905.32, -25.37, 2.65, 2, 0)
  107. MovementLoopAddLocation(NPC, 906.92, -25.37, -10.6, 2, 0)
  108. MovementLoopAddLocation(NPC, 901.32, -25.34, -28.3, 2, 0)
  109. MovementLoopAddLocation(NPC, 896.96, -23.65, -42.62, 2, 0)
  110. MovementLoopAddLocation(NPC, 892.44, -25.36, -54.04, 2, 0)
  111. MovementLoopAddLocation(NPC, 887.08, -25.36, -59.81, 2, 0)
  112. MovementLoopAddLocation(NPC, 872.58, -25.36, -62.58, 2, 0)
  113. MovementLoopAddLocation(NPC, 863.27, -25.36, -63.39, 2, 0)
  114. MovementLoopAddLocation(NPC, 842.39, -25.36, -62.98, 2, 0)
  115. MovementLoopAddLocation(NPC, 827.44, -23.9, -62.05, 2, 0)
  116. MovementLoopAddLocation(NPC, 814.63, -21.06, -59.61, 2, 0)
  117. MovementLoopAddLocation(NPC, 813.79, -20.86, -60.7, 2, 0)
  118. MovementLoopAddLocation(NPC, 817.05, -21.55, -63.8, 2, 0)
  119. MovementLoopAddLocation(NPC, 822.62, -22.81, -62.65, 2, 0)
  120. MovementLoopAddLocation(NPC, 833.39, -24.99, -62.45, 2, 0)
  121. MovementLoopAddLocation(NPC, 852.73, -25.36, -63.01, 2, 0)
  122. MovementLoopAddLocation(NPC, 869.41, -25.36, -62.98, 2, 0)
  123. MovementLoopAddLocation(NPC, 884.39, -25.36, -59.64, 2, 0)
  124. MovementLoopAddLocation(NPC, 891.75, -25.36, -54.96, 2, 0)
  125. MovementLoopAddLocation(NPC, 897, -23.45, -40.35, 2, 0)
  126. end
  127. ]]--
  128. --[[ OLD DEVNOOB
  129. function waypoints(NPC)
  130. MovementLoopAddLocation(NPC, 874.28, -25.36, -62.98, 2, 0)
  131. MovementLoopAddLocation(NPC, 894.59, -25.36, -50.05, 2, 0)
  132. MovementLoopAddLocation(NPC, 905.14, -25.37, -20.73, 2, 0)
  133. MovementLoopAddLocation(NPC, 903.37, -25.37, 14.31, 2, 0)
  134. MovementLoopAddLocation(NPC, 949.04, -25.5, 30.04, 2, 0)
  135. MovementLoopAddLocation(NPC, 960.34, -25.47, 18.04, 2, 0)
  136. MovementLoopAddLocation(NPC, 989.2, -25.11, 15.34, 2, 30)
  137. MovementLoopAddLocation(NPC, 963.89, -25.47, 16.77, 2, 0)
  138. MovementLoopAddLocation(NPC, 947.16, -25.5, 30.8, 2, 0)
  139. MovementLoopAddLocation(NPC, 934.16, -25.52, 25.45, 2, 0)
  140. MovementLoopAddLocation(NPC, 922.35, -25.49, 51.75, 2, 0)
  141. MovementLoopAddLocation(NPC, 859.14, -25.37, 40.63, 2, 0)
  142. MovementLoopAddLocation(NPC, 836.86, -23.28, 43, 2, 0)
  143. MovementLoopAddLocation(NPC, 820.26, -23.32, 78.33, 2, 0)
  144. MovementLoopAddLocation(NPC, 812.84, -23.31, 104.84, 2, 0)
  145. MovementLoopAddLocation(NPC, 802.18, -20.93, 141.48, 2, 0)
  146. MovementLoopAddLocation(NPC, 812.84, -23.31, 104.84, 2, 0)
  147. MovementLoopAddLocation(NPC, 820.26, -23.32, 78.33, 2, 0)
  148. MovementLoopAddLocation(NPC, 836.86, -23.28, 43, 2, 0)
  149. MovementLoopAddLocation(NPC, 859.14, -25.37, 40.63, 2, 0)
  150. MovementLoopAddLocation(NPC, 922.35, -25.49, 51.75, 2, 0)
  151. MovementLoopAddLocation(NPC, 934.16, -25.52, 25.45, 2, 0)
  152. MovementLoopAddLocation(NPC, 947.16, -25.5, 30.8, 2, 0)
  153. MovementLoopAddLocation(NPC, 963.89, -25.47, 16.77, 2, 0)
  154. MovementLoopAddLocation(NPC, 989.2, -25.11, 15.34, 2, 0)
  155. MovementLoopAddLocation(NPC, 960.34, -25.47, 18.04, 2, 0)
  156. MovementLoopAddLocation(NPC, 949.04, -25.5, 30.04, 2, 0)
  157. MovementLoopAddLocation(NPC, 903.37, -25.37, 14.31, 2, 0)
  158. MovementLoopAddLocation(NPC, 905.14, -25.37, -20.73, 2, 0)
  159. MovementLoopAddLocation(NPC, 894.59, -25.36, -50.05, 2, 0)
  160. MovementLoopAddLocation(NPC, 874.28, -25.36, -62.98, 2, 0)
  161. end
  162. --]]