9
3

Groban.lua 6.8 KB

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