9
3

KnightCaptainSkyreach.lua 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. --[[
  2. Script Name : SpawnScripts/WillowWood/KnightCaptainSkyreach.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.07.07 04:07:53
  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. local choice = math.random(1, 3)
  24. if choice == 1 then
  25. PlayFlavor(NPC, "voiceover/english/human_eco_good_1/ft/service/guard/human_guard_service_good_1_hail_gf_c865a827.mp3", "Duty above all else, citizen, except honor!", "scold", 373851625, 467562033, Spawn)
  26. elseif choice == 2 then
  27. PlayFlavor(NPC, "voiceover/english/human_eco_good_1/ft/service/guard/human_guard_service_good_1_hail_gf_ebfceda5.mp3", "Greetings, citizen. I am on guard duty. Should you get into trouble, seek me out.", "attention", 3448203562, 506341016, Spawn)
  28. elseif choice == 3 then
  29. PlayFlavor(NPC, "voiceover/english/human_eco_good_1/ft/service/guard/human_guard_service_good_1_hail_gf_ee473c11.mp3", "Good day to you, citizen. All preserve Queen Antonia.", "salute", 1886617373, 1115286759, Spawn)
  30. end
  31. end
  32. function waypoints(NPC)
  33. MovementLoopAddLocation(NPC, 816.89, -21.16, -572.46, 2, 35)
  34. MovementLoopAddLocation(NPC, 820.81, -21.39, -576.83, 2, 0)
  35. MovementLoopAddLocation(NPC, 824.72, -20.9, -581.63, 2, 0)
  36. MovementLoopAddLocation(NPC, 828.6, -19.92, -587.01, 2, 0)
  37. MovementLoopAddLocation(NPC, 831.54, -19.5, -592.42, 2, 0)
  38. MovementLoopAddLocation(NPC, 837.06, -20.5, -601.3, 2, 0)
  39. MovementLoopAddLocation(NPC, 840.34, -20.77, -603.08, 2, 0)
  40. MovementLoopAddLocation(NPC, 845.58, -21.2, -606.75, 2, 0)
  41. MovementLoopAddLocation(NPC, 851.71, -20.42, -609.68, 2, 0)
  42. MovementLoopAddLocation(NPC, 854.77, -20.07, -610.59, 2, 0)
  43. MovementLoopAddLocation(NPC, 863.08, -18.83, -608.81, 2, 0)
  44. MovementLoopAddLocation(NPC, 868.91, -18.54, -602.18, 2, 0)
  45. MovementLoopAddLocation(NPC, 873.08, -17.68, -595.72, 2, 0)
  46. MovementLoopAddLocation(NPC, 876.29, -16.47, -591.43, 2, 0)
  47. MovementLoopAddLocation(NPC, 877.53, -15.88, -585.86, 2, 35)
  48. MovementLoopAddLocation(NPC, 875.76, -16.55, -591.04, 2, 0)
  49. MovementLoopAddLocation(NPC, 871.92, -18.07, -597.72, 2, 0)
  50. MovementLoopAddLocation(NPC, 866.89, -18.59, -606.16, 2, 0)
  51. MovementLoopAddLocation(NPC, 861.3, -19.07, -608.9, 2, 0)
  52. MovementLoopAddLocation(NPC, 854.85, -20.06, -609.05, 2, 0)
  53. MovementLoopAddLocation(NPC, 847.76, -21.1, -607.34, 2, 0)
  54. MovementLoopAddLocation(NPC, 840.07, -20.79, -603.6, 2, 0)
  55. MovementLoopAddLocation(NPC, 835.21, -20.12, -598.65, 2, 0)
  56. MovementLoopAddLocation(NPC, 830.03, -19.57, -589.73, 2, 0)
  57. MovementLoopAddLocation(NPC, 821.2, -21.33, -576.27, 2, 0)
  58. MovementLoopAddLocation(NPC, 816.19, -21.14, -571.83, 2, 0)
  59. end