stanhyl.lua 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. --[[
  2. Script Name : raleigh.lua
  3. Script Purpose : Waypoint Path for raleigh.lua
  4. Script Author : Devn00b
  5. Script Date : 04/11/2020 06:51:30 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_Raleigh")
  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. end
  23. end
  24. function respawn(NPC)
  25. spawn(NPC)
  26. end
  27. function follow_Raleigh(NPC)
  28. local zone = GetZone(NPC)
  29. local Raleigh_location = GetSpawnByLocationID(zone, 415331)
  30. local sli = GetSpawnLocationID(NPC)
  31. local leaderX = GetX(Raleigh_location)
  32. local leaderY = GetY(Raleigh_location)
  33. local leaderZ = GetZ(Raleigh_location)
  34. local speed = 2
  35. -- Say(NPC, "Leader location is: " .. GetX(guard_A_placement) .. ", " .. GetY(guard_A_placement) .. ", " .. GetZ(guard_A_placement))
  36. if Raleigh_location ~=nil then
  37. if sli == 415322 then --Lanalie
  38. if GetDistance(NPC, Raleigh_location) >= 8 then
  39. speed = 5
  40. MoveToLocation(NPC, leaderX - 2, leaderY, leaderZ, speed)
  41. else
  42. speed = 2
  43. MoveToLocation(NPC, leaderX - 2, leaderY, leaderZ, speed)
  44. end
  45. elseif sli == 415313 then --Stanhyl
  46. if GetDistance(NPC, Raleigh_location) >= 8 then
  47. -- Say(NPC, "Leader location is: " .. GetX(guard_A_placement) .. "")
  48. -- Say(NPC, "My location is: " .. GetX(NPC) .. "")
  49. speed = 5
  50. MoveToLocation(NPC, leaderX, leaderY, 2+ leaderZ, speed)
  51. else
  52. speed = 2
  53. MoveToLocation(NPC, leaderX, leaderY, 2+ leaderZ, speed)
  54. end
  55. end
  56. end
  57. speed = 2
  58. AddTimer(NPC, 2000, "follow_Raleigh")
  59. end
  60. --[[Raleigh's Patrol
  61. function waypoints(NPC)
  62. MovementLoopAddLocation(NPC, 518.13, -10.48, 148.06, 2, 1.5)
  63. MovementLoopAddLocation(NPC, 546.76, -10.58, 151.7, 2, 0)
  64. MovementLoopAddLocation(NPC, 619.74, -12.25, 144.07, 2, 0)
  65. MovementLoopAddLocation(NPC, 621.1, -16.52, 201.22, 2, 0)
  66. MovementLoopAddLocation(NPC, 557.98, -15.36, 210.45, 2, 0)
  67. MovementLoopAddLocation(NPC, 558.15, -17.19, 232.88, 2, 0)
  68. MovementLoopAddLocation(NPC, 552.57, -17.74, 244.2, 2, 0)
  69. MovementLoopAddLocation(NPC, 503.12, -19.64, 242.37, 2, 0)
  70. MovementLoopAddLocation(NPC, 459.61, -22.15, 233.9, 2, 0)
  71. MovementLoopAddLocation(NPC, 457.36, -21.39, 226.69, 2, 0)
  72. MovementLoopAddLocation(NPC, 471.92, -20.75, 189.58, 2, 0)
  73. MovementLoopAddLocation(NPC, 485.11, -14.58, 159.08, 2, 0)
  74. MovementLoopAddLocation(NPC, 494.06, -11.84, 144.74, 2, 0)
  75. MovementLoopAddLocation(NPC, 514.53, -10.6, 147.01, 2, 0)
  76. MovementLoopAddLocation(NPC, 546.4, -10.57, 151.35, 2, 0)
  77. MovementLoopAddLocation(NPC, 546.6, -14.95, 189.7, 2, 0)
  78. MovementLoopAddLocation(NPC, 546.4, -10.57, 151.35, 2, 0)
  79. MovementLoopAddLocation(NPC, 514.53, -10.6, 147.01, 2, 0)
  80. MovementLoopAddLocation(NPC, 494.06, -11.84, 144.74, 2, 0)
  81. MovementLoopAddLocation(NPC, 485.11, -14.58, 159.08, 2, 0)
  82. MovementLoopAddLocation(NPC, 471.92, -20.75, 189.58, 2, 0)
  83. MovementLoopAddLocation(NPC, 457.36, -21.39, 226.69, 2, 0)
  84. MovementLoopAddLocation(NPC, 459.61, -22.15, 233.9, 2, 0)
  85. MovementLoopAddLocation(NPC, 503.12, -19.64, 242.37, 2, 0)
  86. MovementLoopAddLocation(NPC, 552.57, -17.74, 244.2, 2, 0)
  87. MovementLoopAddLocation(NPC, 558.15, -17.19, 232.88, 2, 0)
  88. MovementLoopAddLocation(NPC, 557.98, -15.36, 210.45, 2, 0)
  89. MovementLoopAddLocation(NPC, 621.1, -16.52, 201.22, 2, 0)
  90. MovementLoopAddLocation(NPC, 619.74, -12.25, 144.07, 2, 0)
  91. MovementLoopAddLocation(NPC, 546.76, -10.58, 151.7, 2, 0)
  92. MovementLoopAddLocation(NPC, 518.13, -10.48, 148.06, 2, 0)
  93. end
  94. ]]--