Valerie.lua 3.7 KB

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