9
3

gyles.lua 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. --[[
  2. Script Name : icebear.lua
  3. Script Purpose : Waypoint Path for icebear.lua
  4. Script Author : Devn00b
  5. Script Date : 04/15/2020 02:45:21 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_Icebear")
  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. end
  20. end
  21. function respawn(NPC)
  22. spawn(NPC)
  23. end
  24. function InRange(NPC, Spawn)
  25. NonCitizen(NPC,Spawn)
  26. end
  27. function follow_Icebear(NPC)
  28. local zone = GetZone(NPC)
  29. local Icebear_location = GetSpawnByLocationID(zone, 379862)
  30. local sli = GetSpawnLocationID(NPC)
  31. local leaderX = GetX(Icebear_location)
  32. local leaderY = GetY(Icebear_location)
  33. local leaderZ = GetZ(Icebear_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 Icebear_location ~=nil then
  37. if sli == 379841 then --Illervo
  38. if GetDistance(NPC, Icebear_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 == 379868 then --Milton
  46. if GetDistance(NPC, Icebear_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, 3+ leaderZ, speed)
  51. else
  52. speed = 2
  53. MoveToLocation(NPC, leaderX, leaderY, 3+ leaderZ, speed)
  54. end
  55. elseif sli == 379822 then --Gyles
  56. if GetDistance(NPC, Icebear_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, 2+ leaderX, leaderY, leaderZ, speed)
  61. else
  62. speed = 2
  63. MoveToLocation(NPC, 2 + leaderX, leaderY, leaderZ, speed)
  64. end
  65. end
  66. end
  67. speed = 2
  68. AddTimer(NPC, 2000, "follow_Icebear")
  69. end
  70. --[[ICEBEAR PATROL
  71. function waypoints(NPC)
  72. MovementLoopAddLocation(NPC, 337.5, -21.62, -17.84, 2, 0)
  73. MovementLoopAddLocation(NPC, 327.95, -21.47, -18.3, 2, 0)
  74. MovementLoopAddLocation(NPC, 301.42, -21.15, 2.22, 2, 0)
  75. MovementLoopAddLocation(NPC, 307.82, -21.28, 12.39, 2, 0)
  76. MovementLoopAddLocation(NPC, 316.31, -21.35, 25.73, 2, 0)
  77. MovementLoopAddLocation(NPC, 328.54, -21.46, 34.69, 2, 0)
  78. MovementLoopAddLocation(NPC, 342.6, -21.08, 47.69, 2, 0)
  79. MovementLoopAddLocation(NPC, 351.56, -21.1, 62.44, 2, 0)
  80. MovementLoopAddLocation(NPC, 356.53, -20.81, 86.48, 2, 0)
  81. MovementLoopAddLocation(NPC, 365.55, -20.84, 100.34, 2, 0)
  82. MovementLoopAddLocation(NPC, 383.27, -20.98, 123.01, 2, 0)
  83. MovementLoopAddLocation(NPC, 391.04, -21.3, 133.4, 2, 0)
  84. MovementLoopAddLocation(NPC, 386.84, -20.7, 119.23, 2, 0)
  85. MovementLoopAddLocation(NPC, 412.2, -13.89, 65.74, 2, 0)
  86. MovementLoopAddLocation(NPC, 409.82, -13.77, 57.53, 2, 0)
  87. MovementLoopAddLocation(NPC, 400.59, -14.47, 33.02, 2, 0)
  88. MovementLoopAddLocation(NPC, 393.11, -15.81, 12.92, 2, 0)
  89. MovementLoopAddLocation(NPC, 393.69, -17.09, -23.72, 2, 0)
  90. MovementLoopAddLocation(NPC, 369.04, -20.37, -19.09, 2, 0)
  91. MovementLoopAddLocation(NPC, 338.76, -21.66, -18.13, 2, 0)
  92. end
  93. ]]--