9
3

johannus.lua 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. --[[
  2. Script Name : stoutiron.lua
  3. Script Purpose : Waypoint Path for stoutiron.lua
  4. Script Author : Devn00b
  5. Script Date : 04/15/2020 04:56:57 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_Stoutiron")
  12. end
  13. function hailed(NPC, Spawn)
  14. if GetFactionAmount(Spawn,11)<0 then
  15. else
  16. FaceTarget(NPC, Spawn)
  17. GenericGuardHail(NPC,Spawn)
  18. end
  19. end
  20. function InRange(NPC, Spawn)
  21. NonCitizen(NPC,Spawn)
  22. end
  23. function respawn(NPC)
  24. spawn(NPC)
  25. end
  26. function follow_Stoutiron(NPC)
  27. local zone = GetZone(NPC)
  28. local Stoutiron_location = GetSpawnByLocationID(zone, 379768)
  29. local sli = GetSpawnLocationID(NPC)
  30. local leaderX = GetX(Stoutiron_location)
  31. local leaderY = GetY(Stoutiron_location)
  32. local leaderZ = GetZ(Stoutiron_location)
  33. local speed = 2
  34. -- Say(NPC, "Leader location is: " .. GetX(guard_A_placement) .. ", " .. GetY(guard_A_placement) .. ", " .. GetZ(guard_A_placement))
  35. if Stoutiron_location ~=nil then
  36. if sli == 379983 then --Feeyord
  37. if GetDistance(NPC, Stoutiron_location) >= 8 then
  38. speed = 5
  39. MoveToLocation(NPC, leaderX - 2, leaderY, leaderZ, speed)
  40. else
  41. speed = 2
  42. MoveToLocation(NPC, leaderX - 2, leaderY, leaderZ, speed)
  43. end
  44. elseif sli == 379972 then --Johannus
  45. if GetDistance(NPC, Stoutiron_location) >= 8 then
  46. -- Say(NPC, "Leader location is: " .. GetX(guard_A_placement) .. "")
  47. -- Say(NPC, "My location is: " .. GetX(NPC) .. "")
  48. speed = 5
  49. MoveToLocation(NPC, leaderX, leaderY, 2+ leaderZ, speed)
  50. else
  51. speed = 2
  52. MoveToLocation(NPC, leaderX, leaderY, 2+ leaderZ, speed)
  53. end
  54. end
  55. end
  56. speed = 2
  57. AddTimer(NPC, 2000, "follow_Stoutiron")
  58. end
  59. --[[Stoutiron's Patrol
  60. function waypoints(NPC)
  61. MovementLoopAddLocation(NPC, 366.02, -18.33, -272.16, 2, 0)
  62. MovementLoopAddLocation(NPC, 431.6, -20.85, -268.87, 2, 0)
  63. MovementLoopAddLocation(NPC, 398.61, -17.76, -272.02, 2, 0)
  64. MovementLoopAddLocation(NPC, 382.22, -17.56, -270.8, 2, 0)
  65. MovementLoopAddLocation(NPC, 338.65, -18.13, -233.43, 2, 0)
  66. MovementLoopAddLocation(NPC, 332.04, -22.87, -216.95, 2, 0)
  67. MovementLoopAddLocation(NPC, 321.12, -22.38, -185.92, 2, 0)
  68. MovementLoopAddLocation(NPC, 295.5, -20.9, -160.61, 2, 0)
  69. MovementLoopAddLocation(NPC, 284.59, -18.75, -142.28, 2, 0)
  70. MovementLoopAddLocation(NPC, 301.23, -19.99, -112.29, 2, 0)
  71. MovementLoopAddLocation(NPC, 269, -18.62, -94.27, 2, 0)
  72. MovementLoopAddLocation(NPC, 258.67, -20.79, -52.15, 2, 0)
  73. MovementLoopAddLocation(NPC, 265.53, -21.3, -27.72, 2, 0)
  74. MovementLoopAddLocation(NPC, 301.16, -21.23, -44.9, 2, 0)
  75. MovementLoopAddLocation(NPC, 321.33, -21.45, -22.43, 2, 0)
  76. MovementLoopAddLocation(NPC, 305.29, -21.12, 1.72, 2, 0)
  77. MovementLoopAddLocation(NPC, 279.23, -21.32, -4.67, 2, 0)
  78. MovementLoopAddLocation(NPC, 256.8, -21.38, -20.68, 2, 0)
  79. MovementLoopAddLocation(NPC, 250.76, -20.66, -4.67, 2, 0)
  80. MovementLoopAddLocation(NPC, 252.27, -19.04, 48.63, 2, 0)
  81. MovementLoopAddLocation(NPC, 277.05, -13.87, 72.71, 2, 0)
  82. MovementLoopAddLocation(NPC, 287.87, -12.89, 91.72, 2, 0)
  83. MovementLoopAddLocation(NPC, 293.28, -13.81, 117.82, 2, 0)
  84. MovementLoopAddLocation(NPC, 302.36, -17.12, 150.81, 2, 0)
  85. MovementLoopAddLocation(NPC, 316.94, -17.98, 166.39, 2, 0)
  86. MovementLoopAddLocation(NPC, 330.9, -18.7, 170.2, 2, 0)
  87. MovementLoopAddLocation(NPC, 362.75, -20.06, 156.34, 2, 0)
  88. MovementLoopAddLocation(NPC, 381.27, -20.79, 137.78, 2, 0)
  89. MovementLoopAddLocation(NPC, 408.42, -14.21, 74.82, 2, 0)
  90. MovementLoopAddLocation(NPC, 413.13, -13.83, 58.33, 2, 0)
  91. MovementLoopAddLocation(NPC, 396.74, -15.13, 21.03, 2, 0)
  92. MovementLoopAddLocation(NPC, 392.1, -17.01, -32.56, 2, 0)
  93. MovementLoopAddLocation(NPC, 397.5, -16.13, -89.47, 2, 0)
  94. MovementLoopAddLocation(NPC, 399.73, -23.53, -114.06, 2, 0)
  95. MovementLoopAddLocation(NPC, 425.15, -17.79, -154.07, 2, 0)
  96. MovementLoopAddLocation(NPC, 438.5, -17.1, -178.01, 2, 0)
  97. MovementLoopAddLocation(NPC, 438.72, -18.54, -197.59, 2, 0)
  98. MovementLoopAddLocation(NPC, 439.03, -20.98, -238.39, 2, 0)
  99. MovementLoopAddLocation(NPC, 436.78, -20.78, -280.35, 2, 0)
  100. MovementLoopAddLocation(NPC, 451.35, -20.24, -307.86, 2, 0)
  101. MovementLoopAddLocation(NPC, 436.78, -20.78, -280.35, 2, 0)
  102. MovementLoopAddLocation(NPC, 439.03, -20.98, -238.39, 2, 0)
  103. MovementLoopAddLocation(NPC, 438.72, -18.54, -197.59, 2, 0)
  104. MovementLoopAddLocation(NPC, 438.5, -17.1, -178.01, 2, 0)
  105. MovementLoopAddLocation(NPC, 425.15, -17.79, -154.07, 2, 0)
  106. MovementLoopAddLocation(NPC, 399.73, -23.53, -114.06, 2, 0)
  107. MovementLoopAddLocation(NPC, 397.5, -16.13, -89.47, 2, 0)
  108. MovementLoopAddLocation(NPC, 392.1, -17.01, -32.56, 2, 0)
  109. MovementLoopAddLocation(NPC, 396.74, -15.13, 21.03, 2, 0)
  110. MovementLoopAddLocation(NPC, 413.13, -13.83, 58.33, 2, 0)
  111. MovementLoopAddLocation(NPC, 408.42, -14.21, 74.82, 2, 0)
  112. MovementLoopAddLocation(NPC, 381.27, -20.79, 137.78, 2, 0)
  113. MovementLoopAddLocation(NPC, 362.75, -20.06, 156.34, 2, 0)
  114. MovementLoopAddLocation(NPC, 330.9, -18.7, 170.2, 2, 0)
  115. MovementLoopAddLocation(NPC, 316.94, -17.98, 166.39, 2, 0)
  116. MovementLoopAddLocation(NPC, 302.36, -17.12, 150.81, 2, 0)
  117. MovementLoopAddLocation(NPC, 293.28, -13.81, 117.82, 2, 0)
  118. MovementLoopAddLocation(NPC, 287.87, -12.89, 91.72, 2, 0)
  119. MovementLoopAddLocation(NPC, 277.05, -13.87, 72.71, 2, 0)
  120. MovementLoopAddLocation(NPC, 252.27, -19.04, 48.63, 2, 0)
  121. MovementLoopAddLocation(NPC, 250.76, -20.66, -4.67, 2, 0)
  122. MovementLoopAddLocation(NPC, 256.8, -21.38, -20.68, 2, 0)
  123. MovementLoopAddLocation(NPC, 279.23, -21.32, -4.67, 2, 0)
  124. MovementLoopAddLocation(NPC, 305.29, -21.12, 1.72, 2, 0)
  125. MovementLoopAddLocation(NPC, 321.33, -21.45, -22.43, 2, 0)
  126. MovementLoopAddLocation(NPC, 301.16, -21.23, -44.9, 2, 0)
  127. MovementLoopAddLocation(NPC, 265.53, -21.3, -27.72, 2, 0)
  128. MovementLoopAddLocation(NPC, 258.67, -20.79, -52.15, 2, 0)
  129. MovementLoopAddLocation(NPC, 269, -18.62, -94.27, 2, 0)
  130. MovementLoopAddLocation(NPC, 301.23, -19.99, -112.29, 2, 0)
  131. MovementLoopAddLocation(NPC, 284.59, -18.75, -142.28, 2, 0)
  132. MovementLoopAddLocation(NPC, 295.5, -20.9, -160.61, 2, 0)
  133. MovementLoopAddLocation(NPC, 321.12, -22.38, -185.92, 2, 0)
  134. MovementLoopAddLocation(NPC, 332.04, -22.87, -216.95, 2, 0)
  135. MovementLoopAddLocation(NPC, 338.65, -18.13, -233.43, 2, 0)
  136. MovementLoopAddLocation(NPC, 382.22, -17.56, -270.8, 2, 0)
  137. MovementLoopAddLocation(NPC, 398.61, -17.76, -272.02, 2, 0)
  138. MovementLoopAddLocation(NPC, 431.6, -20.85, -268.87, 2, 0)
  139. MovementLoopAddLocation(NPC, 366.02, -18.33, -272.16, 2, 0)
  140. end
  141. ]]--