Valerie.lua 3.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. --[[
  2. Script Name : SpawnScripts/Starcrest/Valerie.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.06.29 03:06:50
  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. AddTimer(NPC, 6000, "waypoints")
  13. SetPlayerProximityFunction(NPC, 7, "InRange", "LeaveRange")
  14. end
  15. function InRange(NPC, Spawn)
  16. CheckFaction(NPC, Spawn, "Qeynos")
  17. if GetFactionAmount(Spawn,11)>0 then
  18. if math.random(1,100)<20 then
  19. GenericGuardHail(NPC, Spawn)
  20. end
  21. end
  22. end
  23. function hailed(NPC, Spawn)
  24. FaceTarget(NPC, Spawn)
  25. GenericGuardHail(NPC, Spawn)
  26. end
  27. function FaceStreet1(NPC)
  28. SpawnSet(NPC, "heading", "193")
  29. end
  30. function Action(NPC)
  31. local choice = MakeRandomInt(1, 4)
  32. if choice == 1 then
  33. PlayFlavor(NPC, "", "", "peer", 0, 0, Spawn)
  34. elseif choice == 2 then
  35. PlayFlavor(NPC, "", "", "listen", 0, 0, Spawn)
  36. elseif choice == 3 then
  37. PlayFlavor(NPC, "", "", "sniff", 0, 0, Spawn)
  38. elseif choice == 4 then
  39. PlayFlavor(NPC, "", "", "attention", 0, 0, Spawn)
  40. end
  41. end
  42. function waypoints(NPC)
  43. MovementLoopAddLocation(NPC, 739.91, -20.4, 248.86, 2, 1,"FaceStreet1")
  44. MovementLoopAddLocation(NPC, 739.91, -20.4, 248.86, 2, 25,"Action")
  45. MovementLoopAddLocation(NPC, 740.9, -20.39, 252.44, 2, 0)
  46. MovementLoopAddLocation(NPC, 738.06, -20.35, 250.55, 2, 0)
  47. MovementLoopAddLocation(NPC, 736.91, -20.3, 249.78, 2, 0)
  48. MovementLoopAddLocation(NPC, 720.22, -20.29, 255.27, 2, 0)
  49. MovementLoopAddLocation(NPC, 715.77, -20.33, 256.74, 2, 0)
  50. MovementLoopAddLocation(NPC, 714.04, -20.34, 263.42, 2, 0)
  51. MovementLoopAddLocation(NPC, 716.05, -20.07, 274.15, 2, 0)
  52. MovementLoopAddLocation(NPC, 717.91, -20.11, 276.59, 2, 0)
  53. MovementLoopAddLocation(NPC, 728.05, -20.42, 274.89, 2, 0)
  54. MovementLoopAddLocation(NPC, 743.36, -20.61, 271.59, 2, 0)
  55. MovementLoopAddLocation(NPC, 753.56, -20.65, 270.67, 2, 0)
  56. MovementLoopAddLocation(NPC, 764.18, -20.47, 270.69, 2, 0)
  57. MovementLoopAddLocation(NPC, 774.02, -20.46, 272.98, 2, 0)
  58. MovementLoopAddLocation(NPC, 790.6, -20.5, 282.03, 2, 0)
  59. MovementLoopAddLocation(NPC, 794.95, -20.49, 285.47, 2, 0)
  60. MovementLoopAddLocation(NPC, 800.29, -20.48, 286.75, 2, 0)
  61. MovementLoopAddLocation(NPC, 802.35, -20.45, 286.12, 2, 0)
  62. MovementLoopAddLocation(NPC, 804.96, -20.41, 284.26, 2, 0)
  63. MovementLoopAddLocation(NPC, 809.55, -20.31, 279.44, 2, 0)
  64. MovementLoopAddLocation(NPC, 814.27, -20.37, 275.1, 2, 0)
  65. MovementLoopAddLocation(NPC, 820.13, -20.38, 272.05, 2, 1)
  66. MovementLoopAddLocation(NPC, 820.13, -20.38, 272.05, 2, 30,"Action")
  67. MovementLoopAddLocation(NPC, 818.32, -20.32, 273.16, 2, 0)
  68. MovementLoopAddLocation(NPC, 811.08, -20.3, 279.02, 2, 0)
  69. MovementLoopAddLocation(NPC, 803.74, -20.43, 286.96, 2, 0)
  70. MovementLoopAddLocation(NPC, 797.69, -20.49, 286.74, 2, 0)
  71. MovementLoopAddLocation(NPC, 792.98, -20.5, 284.08, 2, 0)
  72. MovementLoopAddLocation(NPC, 787.13, -20.52, 279.54, 2, 0)
  73. MovementLoopAddLocation(NPC, 781.62, -20.51, 275.78, 2, 0)
  74. MovementLoopAddLocation(NPC, 774.34, -20.48, 273.32, 2, 0)
  75. MovementLoopAddLocation(NPC, 768.53, -20.44, 271.59, 2, 0)
  76. MovementLoopAddLocation(NPC, 761.9, -20.49, 271.15, 2, 0)
  77. MovementLoopAddLocation(NPC, 753.34, -20.65, 271.34, 2, 0)
  78. MovementLoopAddLocation(NPC, 744.66, -20.64, 271.54, 2, 0)
  79. MovementLoopAddLocation(NPC, 723.14, -20.42, 276.18, 2, 0)
  80. MovementLoopAddLocation(NPC, 718.27, -20.14, 276.29, 2, 0)
  81. MovementLoopAddLocation(NPC, 713.79, -20.22, 270.47, 2, 0)
  82. MovementLoopAddLocation(NPC, 713.08, -20.33, 264.49, 2, 0)
  83. MovementLoopAddLocation(NPC, 714.89, -20.34, 257.69, 2, 0)
  84. MovementLoopAddLocation(NPC, 724.99, -20.26, 253.1, 2, 0)
  85. MovementLoopAddLocation(NPC, 739.64, -20.39, 249.23, 2, 0)
  86. end