9
3

Highgold.lua 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. --[[
  2. Script Name : Highgold.lua
  3. Script Purpose : Waypoint Path for Highgold.lua
  4. Script Author : Auto Generated
  5. Script Date : 04/08/2020 08:13:18 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. SetPlayerProximityFunction(NPC, 10, "InRange", "LeaveRange")
  12. AddTimer(NPC, 1900, "follow_Warland")
  13. end
  14. function respawn(NPC)
  15. spawn(NPC)
  16. end
  17. function InRange(NPC, Spawn)
  18. NonCitizen(NPC,Spawn)
  19. CheckFaction(NPC, Spawn, "Qeynos")
  20. end
  21. function hailed(NPC, Spawn)
  22. if GetFactionAmount(Spawn,11)<0 then
  23. else
  24. FaceTarget(NPC, Spawn)
  25. GenericGuardHail(NPC,Spawn)
  26. local Warland = GetSpawn(NPC,2210266)
  27. if Warland ~=nil then
  28. FaceTarget(Warland,Spawn)
  29. PlayFlavor(Warland, "", "", "attention", 0, 0, Spawn)
  30. end
  31. local Groban = GetSpawn(NPC,2210088)
  32. FaceTarget(NPC, Spawn)
  33. if Groban ~=nil then
  34. FaceTarget(Groban,Spawn)
  35. PlayFlavor(Groban, "", "", "attention", 0, 0, Spawn)
  36. end
  37. FaceTarget(NPC, Spawn)
  38. GenericGuardHail(NPC, Spawn)
  39. end
  40. end
  41. function follow_Warland(NPC)
  42. local zone = GetZone(NPC)
  43. local Warland_location = GetSpawnByLocationID(zone, 379451)
  44. local sli = GetSpawnLocationID(NPC)
  45. local leaderX = GetX(Warland_location)
  46. local leaderY = GetY(Warland_location)
  47. local leaderZ = GetZ(Warland_location)
  48. local speed = 2
  49. -- Say(NPC, "Leader location is: " .. GetX(guard_A_placement) .. ", " .. GetY(guard_A_placement) .. ", " .. GetZ(guard_A_placement))
  50. if Warland_location ~=nil then
  51. if sli == 379226 then
  52. if GetDistance(NPC, Warland_location) >= 8 then
  53. speed = 5
  54. MoveToLocation(NPC, leaderX - 2, leaderY, leaderZ, speed)
  55. else
  56. speed = 2
  57. MoveToLocation(NPC, leaderX - 2, leaderY, leaderZ, speed)
  58. end
  59. elseif sli == 379228 then
  60. if GetDistance(NPC, Warland_location) >= 8 then
  61. -- Say(NPC, "Leader location is: " .. GetX(guard_A_placement) .. "")
  62. -- Say(NPC, "My location is: " .. GetX(NPC) .. "")
  63. speed = 5
  64. MoveToLocation(NPC, leaderX, leaderY, (leaderZ +2), speed)
  65. else
  66. speed = 2
  67. MoveToLocation(NPC, leaderX, leaderY, (leaderZ +2), speed)
  68. end
  69. end
  70. end
  71. speed = 2
  72. AddTimer(NPC, 3000, "follow_Warland")
  73. end
  74. --[[WARLAND'S PATROL
  75. function waypoints(NPC)
  76. MovementLoopAddLocation(NPC, 794.25, -21, -60.3, 2, 0)
  77. MovementLoopAddLocation(NPC, 772.27, -21.61, -59.66, 2, 0)
  78. MovementLoopAddLocation(NPC, 760.59, -21.7, -58.92, 2, 0)
  79. MovementLoopAddLocation(NPC, 739.71, -21.37, -57.96, 2, 0)
  80. MovementLoopAddLocation(NPC, 727.83, -21.35, -59.01, 2, 0)
  81. MovementLoopAddLocation(NPC, 713.7, -20.97, -78.42, 2, 0)
  82. MovementLoopAddLocation(NPC, 691.67, -21.46, -108.83, 2, 0)
  83. MovementLoopAddLocation(NPC, 687.81, -21.1, -115.14, 2, 0)
  84. MovementLoopAddLocation(NPC, 681.96, -21.03, -115.62, 2, 0)
  85. MovementLoopAddLocation(NPC, 679.39, -21.14, -112.78, 2, 0)
  86. MovementLoopAddLocation(NPC, 689.87, -21.54, -99.94, 2, 0)
  87. MovementLoopAddLocation(NPC, 705.26, -21.11, -81.33, 2, 0)
  88. MovementLoopAddLocation(NPC, 717.69, -21.08, -66.29, 2, 0)
  89. MovementLoopAddLocation(NPC, 716.74, -20.84, -25.46, 2, 0)
  90. MovementLoopAddLocation(NPC, 716.53, -20.65, -16.01, 2, 0)
  91. MovementLoopAddLocation(NPC, 709.19, -20.64, -13.58, 2, 0)
  92. MovementLoopAddLocation(NPC, 701.63, -20.64, -13.85, 2, 0)
  93. MovementLoopAddLocation(NPC, 698.89, -20.64, -17.24, 2, 0)
  94. MovementLoopAddLocation(NPC, 699.08, -20.64, -21.61, 2, 0)
  95. MovementLoopAddLocation(NPC, 699.75, -20.64, -23.81, 2, 0)
  96. MovementLoopAddLocation(NPC, 755.76, -20.89, -21.87, 2, 0)
  97. MovementLoopAddLocation(NPC, 760.66, -20.72, -25, 2, 0)
  98. MovementLoopAddLocation(NPC, 756.84, -21.5, -47.79, 2, 0)
  99. MovementLoopAddLocation(NPC, 715.26, -21.4, -50.18, 2, 0)
  100. MovementLoopAddLocation(NPC, 714.68, -21.06, -64.63, 2, 0)
  101. MovementLoopAddLocation(NPC, 754.6, -21.56, -59.25, 2, 0)
  102. MovementLoopAddLocation(NPC, 789.89, -21.15, -55.73, 2, 0)
  103. MovementLoopAddLocation(NPC, 796.71, -20.97, -56.55, 2, 0)
  104. MovementLoopAddLocation(NPC, 789.89, -21.15, -55.73, 2, 0)
  105. MovementLoopAddLocation(NPC, 754.6, -21.56, -59.25, 2, 0)
  106. MovementLoopAddLocation(NPC, 714.68, -21.06, -64.63, 2, 0)
  107. MovementLoopAddLocation(NPC, 715.26, -21.4, -50.18, 2, 0)
  108. MovementLoopAddLocation(NPC, 756.84, -21.5, -47.79, 2, 0)
  109. MovementLoopAddLocation(NPC, 760.66, -20.72, -25, 2, 0)
  110. MovementLoopAddLocation(NPC, 755.76, -20.89, -21.87, 2, 0)
  111. MovementLoopAddLocation(NPC, 699.75, -20.64, -23.81, 2, 0)
  112. MovementLoopAddLocation(NPC, 699.08, -20.64, -21.61, 2, 0)
  113. MovementLoopAddLocation(NPC, 698.89, -20.64, -17.24, 2, 0)
  114. MovementLoopAddLocation(NPC, 701.63, -20.64, -13.85, 2, 0)
  115. MovementLoopAddLocation(NPC, 709.19, -20.64, -13.58, 2, 0)
  116. MovementLoopAddLocation(NPC, 716.53, -20.65, -16.01, 2, 0)
  117. MovementLoopAddLocation(NPC, 716.74, -20.84, -25.46, 2, 0)
  118. MovementLoopAddLocation(NPC, 717.69, -21.08, -66.29, 2, 0)
  119. MovementLoopAddLocation(NPC, 705.26, -21.11, -81.33, 2, 0)
  120. MovementLoopAddLocation(NPC, 689.87, -21.54, -99.94, 2, 0)
  121. MovementLoopAddLocation(NPC, 679.39, -21.14, -112.78, 2, 0)
  122. MovementLoopAddLocation(NPC, 681.96, -21.03, -115.62, 2, 0)
  123. MovementLoopAddLocation(NPC, 687.81, -21.1, -115.14, 2, 0)
  124. MovementLoopAddLocation(NPC, 691.67, -21.46, -108.83, 2, 0)
  125. MovementLoopAddLocation(NPC, 713.7, -20.97, -78.42, 2, 0)
  126. MovementLoopAddLocation(NPC, 727.83, -21.35, -59.01, 2, 0)
  127. MovementLoopAddLocation(NPC, 739.71, -21.37, -57.96, 2, 0)
  128. MovementLoopAddLocation(NPC, 760.59, -21.7, -58.92, 2, 0)
  129. MovementLoopAddLocation(NPC, 772.27, -21.61, -59.66, 2, 0)
  130. MovementLoopAddLocation(NPC, 794.25, -21, -60.3, 2, 0)
  131. end
  132. --[[ Old Path by Devnoob
  133. function waypoints(NPC)
  134. MovementLoopAddLocation(NPC, 679.82, -21.04, -115.09, 2, 0)
  135. MovementLoopAddLocation(NPC, 708.6, -20.89, -66.2, 2, 2)
  136. MovementLoopAddLocation(NPC, 698.37, -20.64, -15.85, 2, 5)
  137. MovementLoopAddLocation(NPC, 739.96, -21.2, -14.13, 2, 8)
  138. MovementLoopAddLocation(NPC, 755.77, -20.81, 7.22, 2, 1)
  139. MovementLoopAddLocation(NPC, 762.62, -21.48, -45.59, 2, 0)
  140. MovementLoopAddLocation(NPC, 779.17, -21.13, -45.52, 2, 0)
  141. MovementLoopAddLocation(NPC, 795.39, -21, -58.93, 2, 12)
  142. MovementLoopAddLocation(NPC, 745.01, -21.46, -58.01, 2, 0)
  143. MovementLoopAddLocation(NPC, 715.91, -21.27, -61.53, 2, 0)
  144. MovementLoopAddLocation(NPC, 676.46, -20.65, -124.59, 2, 17)
  145. MovementLoopAddLocation(NPC, 715.91, -21.27, -61.53, 2, 0)
  146. MovementLoopAddLocation(NPC, 745.01, -21.46, -58.01, 2, 0)
  147. MovementLoopAddLocation(NPC, 793.71 -21.05 -58.65, 2, 9)
  148. MovementLoopAddLocation(NPC, 779.17, -21.13, -45.52, 2, 0)
  149. MovementLoopAddLocation(NPC, 762.62, -21.48, -45.59, 2, 0)
  150. MovementLoopAddLocation(NPC, 757.77, -20.81, 7.22, 2, 0)
  151. MovementLoopAddLocation(NPC, 741.96, -21.2, -14.13, 2, 0)
  152. MovementLoopAddLocation(NPC, 698.37, -20.64, -15.85, 2, 0)
  153. MovementLoopAddLocation(NPC, 710.6, -20.89, -66.2, 2, 0)
  154. MovementLoopAddLocation(NPC, 679.82, -21.04, -115.09, 2, 0)
  155. end
  156. --]]