Sanoolielo.lua 3.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. --[[
  2. Script Name : SpawnScripts/Starcrest/Sanoolielo.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.06.28 03:06:35
  5. Script Purpose :
  6. :
  7. --]]
  8. dofile("SpawnScripts/Generic/GenericGuardVoiceOvers.lua")
  9. function spawn(NPC)
  10. SetPlayerProximityFunction(NPC, 10, "InRange", "LeaveRange")
  11. waypoints(NPC)
  12. end
  13. function respawn(NPC)
  14. spawn(NPC)
  15. end
  16. function InRange(NPC, Spawn)
  17. CheckFaction(NPC, Spawn, "Qeynos")
  18. end
  19. function LeaveRange(NPC, Spawn)
  20. end
  21. function hailed(NPC, Spawn)
  22. FaceTarget(NPC, Spawn)
  23. GenericGuardHail(NPC, Spawn)
  24. end
  25. function Action(NPC)
  26. local choice = MakeRandomInt(1, 4)
  27. if choice == 1 then
  28. PlayFlavor(NPC, "", "", "peer", 0, 0, Spawn)
  29. elseif choice == 2 then
  30. PlayFlavor(NPC, "", "", "listen", 0, 0, Spawn)
  31. elseif choice == 3 then
  32. PlayFlavor(NPC, "", "", "sniff", 0, 0, Spawn)
  33. elseif choice == 4 then
  34. PlayFlavor(NPC, "", "", "attention", 0, 0, Spawn)
  35. end
  36. end
  37. function FaceStreet(NPC)
  38. SpawnSet(NPC, "heading", "143")
  39. end
  40. function FaceStreet2(NPC)
  41. SpawnSet(NPC, "heading", "296")
  42. end
  43. function waypoints(NPC)
  44. MovementLoopAddLocation(NPC, 802.74, -25.85, 313.9, 2, 1,"FaceStreet2")
  45. MovementLoopAddLocation(NPC, 802.74, -25.85, 313.9, 2, 28,"Action")
  46. MovementLoopAddLocation(NPC, 803.13, -25.74, 315.47, 2, 0)
  47. MovementLoopAddLocation(NPC, 805, -25.78, 317.53, 2, 0)
  48. MovementLoopAddLocation(NPC, 808.44, -25.89, 315.51, 2, 0)
  49. MovementLoopAddLocation(NPC, 809.31, -25.77, 313.72, 2, 0)
  50. MovementLoopAddLocation(NPC, 807.53, -24.35, 309.12, 2, 0)
  51. MovementLoopAddLocation(NPC, 804.44, -22.16, 305.26, 2, 0)
  52. MovementLoopAddLocation(NPC, 800.86, -20.25, 302.22, 2, 0)
  53. MovementLoopAddLocation(NPC, 797.13, -20.41, 297.81, 2, 0)
  54. MovementLoopAddLocation(NPC, 796.92, -20.45, 296.06, 2, 0)
  55. MovementLoopAddLocation(NPC, 793.71, -20.52, 293.59, 2, 0)
  56. MovementLoopAddLocation(NPC, 786.96, -20.52, 292.01, 2, 0)
  57. MovementLoopAddLocation(NPC, 779.71, -20.39, 292.23, 2, 0)
  58. MovementLoopAddLocation(NPC, 771.79, -20.33, 291.77, 2, 0)
  59. MovementLoopAddLocation(NPC, 763.82, -20.32, 289.38, 2, 0)
  60. MovementLoopAddLocation(NPC, 743.92, -20.44, 277.1, 2, 0)
  61. MovementLoopAddLocation(NPC, 732.48, -20.42, 279.83, 2, 0)
  62. MovementLoopAddLocation(NPC, 725.77, -20.43, 290.44, 2, 0)
  63. MovementLoopAddLocation(NPC, 728.81, -20.47, 294.96, 2, 0)
  64. MovementLoopAddLocation(NPC, 729.99, -20.47, 294.56, 2, 1,"FaceStreet")
  65. MovementLoopAddLocation(NPC, 729.99, -20.47, 294.56, 2, 28,"Action")
  66. MovementLoopAddLocation(NPC, 729.99, -20.47, 294.56, 2, 0)
  67. MovementLoopAddLocation(NPC, 728.81, -20.47, 294.96, 2, 0)
  68. MovementLoopAddLocation(NPC, 725.77, -20.43, 290.44, 2, 0)
  69. MovementLoopAddLocation(NPC, 732.48, -20.42, 279.83, 2, 0)
  70. MovementLoopAddLocation(NPC, 743.92, -20.44, 277.1, 2, 0)
  71. MovementLoopAddLocation(NPC, 763.82, -20.32, 289.38, 2, 0)
  72. MovementLoopAddLocation(NPC, 771.79, -20.33, 291.77, 2, 0)
  73. MovementLoopAddLocation(NPC, 779.71, -20.39, 292.23, 2, 0)
  74. MovementLoopAddLocation(NPC, 786.96, -20.52, 292.01, 2, 0)
  75. MovementLoopAddLocation(NPC, 793.71, -20.52, 293.59, 2, 0)
  76. MovementLoopAddLocation(NPC, 796.92, -20.45, 296.06, 2, 0)
  77. MovementLoopAddLocation(NPC, 797.13, -20.41, 297.81, 2, 0)
  78. MovementLoopAddLocation(NPC, 800.86, -20.25, 302.22, 2, 0)
  79. MovementLoopAddLocation(NPC, 804.44, -22.16, 305.26, 2, 0)
  80. MovementLoopAddLocation(NPC, 807.53, -24.35, 309.12, 2, 0)
  81. MovementLoopAddLocation(NPC, 809.31, -25.77, 313.72, 2, 0)
  82. MovementLoopAddLocation(NPC, 808.44, -25.89, 315.51, 2, 0)
  83. MovementLoopAddLocation(NPC, 805, -25.78, 317.53, 2, 0)
  84. MovementLoopAddLocation(NPC, 803.13, -25.74, 315.47, 2, 0)
  85. end