GuardRelna.lua 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. --[[
  2. Script Name : SpawnScripts/TempleSt/GuardRelna.lua
  3. Script Author : Dorbin
  4. Script Date : 2023.10.27 08:10:56
  5. Script Purpose :
  6. :
  7. --]]
  8. function spawn(NPC)
  9. waypoints(NPC)
  10. end
  11. dofile("SpawnScripts/Generic/GenericGuardVoiceOvers.lua")
  12. function hailed(NPC, Spawn)
  13. if GetFactionAmount(Spawn,12)<0 then
  14. else
  15. FaceTarget(NPC, Spawn)
  16. GenericGuardHail(NPC,Spawn)
  17. end
  18. end
  19. function respawn(NPC)
  20. spawn(NPC)
  21. end
  22. function waypoints(NPC)
  23. MovementLoopAddLocation(NPC, -12.04, 3, 77.7, 2, 1)
  24. MovementLoopAddLocation(NPC, -12.04, 3, 77.7, 2, 7,"Action")
  25. MovementLoopAddLocation(NPC, -5.18, 3, 74.66, 2, 0)
  26. MovementLoopAddLocation(NPC, 2.23, 3, 70.81, 2, 0)
  27. MovementLoopAddLocation(NPC, 4.03, 3, 69.19, 2, 0)
  28. MovementLoopAddLocation(NPC, 9.99, 3, 68.09, 2, 0)
  29. MovementLoopAddLocation(NPC, 14.93, 3.01, 68.56, 2, 0)
  30. MovementLoopAddLocation(NPC, 14.93, 3.01, 68.56, 2, 1)
  31. MovementLoopAddLocation(NPC, 14.93, 3.01, 68.56, 2, 7,"Action")
  32. MovementLoopAddLocation(NPC, 16.26, 3.01, 69.41, 2, 0)
  33. MovementLoopAddLocation(NPC, 23.3, 3, 81.22, 2, 0)
  34. MovementLoopAddLocation(NPC, 40.43, 3, 74.03, 2, 0)
  35. MovementLoopAddLocation(NPC, 46.8, 3, 71.09, 2, 0)
  36. MovementLoopAddLocation(NPC, 52.22, 3, 67.76, 2, 0)
  37. MovementLoopAddLocation(NPC, 58.69, 3, 62.62, 2, 1)
  38. MovementLoopAddLocation(NPC, 58.69, 3, 62.62, 2, 18,"Action")
  39. MovementLoopAddLocation(NPC, 57.47, 3, 64.38, 2, 0)
  40. MovementLoopAddLocation(NPC, 53.81, 3, 69.06, 2, 0)
  41. MovementLoopAddLocation(NPC, 44.36, 3, 74.27, 2, 0)
  42. MovementLoopAddLocation(NPC, 39.34, 3, 77.04, 2, 0)
  43. MovementLoopAddLocation(NPC, 32.7, 3, 79.24, 2, 0)
  44. MovementLoopAddLocation(NPC, 20.99, 2.98, 79.78, 2, 0)
  45. MovementLoopAddLocation(NPC, 14.56, 3, 74.18, 2, 0)
  46. MovementLoopAddLocation(NPC, 12.16, 3, 71.04, 2, 0)
  47. MovementLoopAddLocation(NPC, 3.74, 3, 68.64, 2, 0)
  48. MovementLoopAddLocation(NPC, -0.43, 3, 63.76, 2, 0)
  49. MovementLoopAddLocation(NPC, -2.84, 3, 58.03, 2, 1)
  50. MovementLoopAddLocation(NPC, -2.84, 3, 58.03, 2, 18,"Action")
  51. MovementLoopAddLocation(NPC, 1.58, 3, 66.5, 2, 0)
  52. MovementLoopAddLocation(NPC, 2.98, 3, 69.18, 2, 0)
  53. MovementLoopAddLocation(NPC, 1.24, 3, 73.83, 2, 0)
  54. MovementLoopAddLocation(NPC, -5.65, 3, 77.46, 2, 0)
  55. MovementLoopAddLocation(NPC, -10.98, 3, 79.2, 2, 1)
  56. MovementLoopAddLocation(NPC, -10.98, 3, 79.2, 2, 7,"Action")
  57. MovementLoopAddLocation(NPC, -10.98, 3, 79.2, 2, 0)
  58. MovementLoopAddLocation(NPC, -5.88, 3, 89.66, 2, 1)
  59. MovementLoopAddLocation(NPC, -5.88, 3, 89.66, 2, 7,"Action")
  60. end
  61. function Action(NPC)
  62. local choice = MakeRandomInt(1, 4)
  63. if choice == 1 then
  64. PlayFlavor(NPC, "", "", "peer", 0, 0, Spawn)
  65. elseif choice == 2 then
  66. PlayFlavor(NPC, "", "", "listen", 0, 0, Spawn)
  67. elseif choice == 3 then
  68. PlayFlavor(NPC, "", "", "sniff", 0, 0, Spawn)
  69. elseif choice == 4 then
  70. PlayFlavor(NPC, "", "", "tapfoot", 0, 0, Spawn)
  71. end
  72. end