9
3

Sanoolielo.lua 3.7 KB

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