lanalie.lua 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  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. function spawn(NPC)
  10. AddTimer(NPC, 1900, "follow_Raleigh")
  11. SetPlayerProximityFunction(NPC, 10, "InRange", "LeaveRange")
  12. end
  13. function InRange(NPC, Spawn)
  14. NonCitizen(NPC,Spawn)
  15. end
  16. function hailed(NPC, Spawn)
  17. if GetFactionAmount(Spawn,11)<0 then
  18. else
  19. FaceTarget(NPC, Spawn)
  20. GenericGuardHail(NPC,Spawn)
  21. end
  22. end
  23. function respawn(NPC)
  24. spawn(NPC)
  25. end
  26. function follow_Raleigh(NPC)
  27. local zone = GetZone(NPC)
  28. local Raleigh_location = GetSpawnByLocationID(zone, 415331)
  29. local sli = GetSpawnLocationID(NPC)
  30. local leaderX = GetX(Raleigh_location)
  31. local leaderY = GetY(Raleigh_location)
  32. local leaderZ = GetZ(Raleigh_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 Raleigh_location ~=nil then
  36. if sli == 415322 then --Lanalie
  37. if GetDistance(NPC, Raleigh_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 == 415313 then --Stanhyl
  45. if GetDistance(NPC, Raleigh_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_Raleigh")
  58. end
  59. --[[Raleigh's Patrol
  60. function waypoints(NPC)
  61. MovementLoopAddLocation(NPC, 518.13, -10.48, 148.06, 2, 1)
  62. MovementLoopAddLocation(NPC, 546.76, -10.58, 151.7, 2, 0)
  63. MovementLoopAddLocation(NPC, 619.74, -12.25, 144.07, 2, 0)
  64. MovementLoopAddLocation(NPC, 621.1, -16.52, 201.22, 2, 0)
  65. MovementLoopAddLocation(NPC, 557.98, -15.36, 210.45, 2, 0)
  66. MovementLoopAddLocation(NPC, 558.15, -17.19, 232.88, 2, 0)
  67. MovementLoopAddLocation(NPC, 552.57, -17.74, 244.2, 2, 0)
  68. MovementLoopAddLocation(NPC, 503.12, -19.64, 242.37, 2, 0)
  69. MovementLoopAddLocation(NPC, 459.61, -22.15, 233.9, 2, 0)
  70. MovementLoopAddLocation(NPC, 457.36, -21.39, 226.69, 2, 0)
  71. MovementLoopAddLocation(NPC, 471.92, -20.75, 189.58, 2, 0)
  72. MovementLoopAddLocation(NPC, 485.11, -14.58, 159.08, 2, 0)
  73. MovementLoopAddLocation(NPC, 494.06, -11.84, 144.74, 2, 0)
  74. MovementLoopAddLocation(NPC, 514.53, -10.6, 147.01, 2, 0)
  75. MovementLoopAddLocation(NPC, 546.4, -10.57, 151.35, 2, 0)
  76. MovementLoopAddLocation(NPC, 546.6, -14.95, 189.7, 2, 0)
  77. MovementLoopAddLocation(NPC, 546.4, -10.57, 151.35, 2, 0)
  78. MovementLoopAddLocation(NPC, 514.53, -10.6, 147.01, 2, 0)
  79. MovementLoopAddLocation(NPC, 494.06, -11.84, 144.74, 2, 0)
  80. MovementLoopAddLocation(NPC, 485.11, -14.58, 159.08, 2, 0)
  81. MovementLoopAddLocation(NPC, 471.92, -20.75, 189.58, 2, 0)
  82. MovementLoopAddLocation(NPC, 457.36, -21.39, 226.69, 2, 0)
  83. MovementLoopAddLocation(NPC, 459.61, -22.15, 233.9, 2, 0)
  84. MovementLoopAddLocation(NPC, 503.12, -19.64, 242.37, 2, 0)
  85. MovementLoopAddLocation(NPC, 552.57, -17.74, 244.2, 2, 0)
  86. MovementLoopAddLocation(NPC, 558.15, -17.19, 232.88, 2, 0)
  87. MovementLoopAddLocation(NPC, 557.98, -15.36, 210.45, 2, 0)
  88. MovementLoopAddLocation(NPC, 621.1, -16.52, 201.22, 2, 0)
  89. MovementLoopAddLocation(NPC, 619.74, -12.25, 144.07, 2, 0)
  90. MovementLoopAddLocation(NPC, 546.76, -10.58, 151.7, 2, 0)
  91. MovementLoopAddLocation(NPC, 518.13, -10.48, 148.06, 2, 0)
  92. end
  93. ]]--