9
3

Ashburn.lua 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. --[[
  2. Script Name : SpawnScripts/Nettleville/Ashburn.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.06.21 01:06:09
  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)<25 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 respawn(NPC)
  26. spawn(NPC)
  27. end
  28. function waypoints(NPC)
  29. MovementLoopAddLocation(NPC, 588.51, -26.53, 385.69, 2, 1)
  30. MovementLoopAddLocation(NPC, 588.51, -26.53, 385.69, 2, 40,"Action")
  31. MovementLoopAddLocation(NPC, 592.42, -26.51, 381.08, 2, 0)
  32. MovementLoopAddLocation(NPC, 595.44, -26.35, 378.6, 2, 0)
  33. MovementLoopAddLocation(NPC, 603.92, -26.48, 377.55, 2, 0)
  34. MovementLoopAddLocation(NPC, 607.61, -26.47, 375.64, 2, 1)
  35. MovementLoopAddLocation(NPC, 607.61, -26.47, 375.64, 2, 22,"Action")
  36. MovementLoopAddLocation(NPC, 607.28, -26.46, 374.52, 2, 0)
  37. MovementLoopAddLocation(NPC, 615.47, -26.29, 375.82, 2, 0)
  38. MovementLoopAddLocation(NPC, 623.46, -25.65, 375.73, 2, 0)
  39. MovementLoopAddLocation(NPC, 636.75, -24.89, 381.29, 2, 0)
  40. MovementLoopAddLocation(NPC, 640.28, -24.82, 379.52, 2, 0)
  41. MovementLoopAddLocation(NPC, 645.37, -24.74, 375.13, 2, 0)
  42. MovementLoopAddLocation(NPC, 650.64, -24.74, 371.28, 2, 0)
  43. MovementLoopAddLocation(NPC, 657.54, -24.66, 366.66, 2, 0)
  44. MovementLoopAddLocation(NPC, 666.05, -24.69, 361.52, 2, 0)
  45. MovementLoopAddLocation(NPC, 677.02, -24.68, 354.26, 2, 1)
  46. MovementLoopAddLocation(NPC, 677.02, -24.68, 354.26, 2, 55,"Action")
  47. MovementLoopAddLocation(NPC, 666.05, -24.69, 361.52, 2, 0)
  48. MovementLoopAddLocation(NPC, 657.54, -24.66, 366.66, 2, 0)
  49. MovementLoopAddLocation(NPC, 650.64, -24.74, 371.28, 2, 0)
  50. MovementLoopAddLocation(NPC, 645.37, -24.74, 375.13, 2, 0)
  51. MovementLoopAddLocation(NPC, 640.28, -24.82, 379.52, 2, 0)
  52. MovementLoopAddLocation(NPC, 636.75, -24.89, 381.29, 2, 0)
  53. MovementLoopAddLocation(NPC, 623.46, -25.65, 375.73, 2, 0)
  54. MovementLoopAddLocation(NPC, 615.47, -26.29, 375.82, 2, 0)
  55. MovementLoopAddLocation(NPC, 606.58, -26.49, 376.59, 2, 0)
  56. MovementLoopAddLocation(NPC, 606.53, -26.49, 377.45, 2, 0)
  57. MovementLoopAddLocation(NPC, 603.92, -26.48, 377.55, 2, 0)
  58. MovementLoopAddLocation(NPC, 595.44, -26.35, 378.6, 2, 0)
  59. MovementLoopAddLocation(NPC, 592.42, -26.51, 381.08, 2, 0)
  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, "", "", "attention", 0, 0, Spawn)
  71. end
  72. end