KnightCaptainHastings.lua 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. --[[
  2. Script Name : SpawnScripts/Nettleville/KnightCaptainHastings.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.06.20 01:06:53
  5. Script Purpose :
  6. :
  7. --]]
  8. require "SpawnScripts/Generic/DialogModule"
  9. local Delivery = 5596
  10. local FPStout = 5595
  11. function spawn(NPC)
  12. waypoints(NPC)
  13. ProvidesQuest(NPC,Delivery)
  14. end
  15. function hailed(NPC, Spawn)
  16. FaceTarget(NPC, Spawn)
  17. end
  18. function respawn(NPC)
  19. spawn(NPC)
  20. end
  21. function waypoints(NPC)
  22. MovementLoopAddLocation(NPC, 660.35, -20.39, 270.5, 2, 25)
  23. MovementLoopAddLocation(NPC, 660.75, -20.34, 273.54, 2, 0)
  24. MovementLoopAddLocation(NPC, 664.72, -20.21, 284.51, 2, 0)
  25. MovementLoopAddLocation(NPC, 667.53, -19.95, 293.1, 2, 0)
  26. MovementLoopAddLocation(NPC, 674.78, -20.14, 296.04, 2, 25)
  27. MovementLoopAddLocation(NPC, 672.68, -20.12, 296.97, 2, 0)
  28. MovementLoopAddLocation(NPC, 669.51, -20.18, 299.32, 2, 0)
  29. MovementLoopAddLocation(NPC, 662.97, -20.44, 318.56, 2, 25)
  30. MovementLoopAddLocation(NPC, 664.84, -20.44, 317.66, 2, 0)
  31. MovementLoopAddLocation(NPC, 663.91, -20.43, 308.87, 2, 0)
  32. MovementLoopAddLocation(NPC, 665.98, -20.22, 298.33, 2, 0)
  33. MovementLoopAddLocation(NPC, 648.47, -20.46, 297.16, 2, 0)
  34. MovementLoopAddLocation(NPC, 641.88, -20.59, 300.29, 2, 0)
  35. MovementLoopAddLocation(NPC, 636.4, -20.67, 302.89, 2, 0)
  36. MovementLoopAddLocation(NPC, 629.07, -20.62, 307.18, 2, 0)
  37. MovementLoopAddLocation(NPC, 623.98, -20.53, 310.56, 2, 0)
  38. MovementLoopAddLocation(NPC, 612.92, -20.6, 322.49, 2, 0)
  39. MovementLoopAddLocation(NPC, 612.92, -20.6, 322.49, 2, 0)
  40. MovementLoopAddLocation(NPC, 605.71, -20.66, 334.49, 2, 0)
  41. MovementLoopAddLocation(NPC, 601.62, -20.76, 343.68, 2, 1)
  42. MovementLoopAddLocation(NPC, 601.62, -20.76, 343.68, 2, 25)
  43. MovementLoopAddLocation(NPC, 602.79, -20.81, 345.99, 2, 0)
  44. MovementLoopAddLocation(NPC, 604.14, -20.78, 338.99, 2, 0)
  45. MovementLoopAddLocation(NPC, 606.87, -20.69, 329.69, 2, 0)
  46. MovementLoopAddLocation(NPC, 613.54, -20.57, 320.71, 2, 0)
  47. MovementLoopAddLocation(NPC, 620.37, -20.49, 312.91, 2, 0)
  48. MovementLoopAddLocation(NPC, 633.33, -20.72, 304.47, 2, 0)
  49. MovementLoopAddLocation(NPC, 633.33, -20.72, 304.47, 2, 0)
  50. MovementLoopAddLocation(NPC, 633.33, -20.72, 304.47, 2, 0)
  51. MovementLoopAddLocation(NPC, 640.32, -20.64, 300.67, 2, 0)
  52. MovementLoopAddLocation(NPC, 648.12, -20.47, 297.01, 2, 0)
  53. MovementLoopAddLocation(NPC, 649.85, -20.43, 296.58, 2, 0)
  54. MovementLoopAddLocation(NPC, 655.82, -20.42, 298.78, 2, 0)
  55. MovementLoopAddLocation(NPC, 666.53, -19.98, 292.88, 2, 0)
  56. MovementLoopAddLocation(NPC, 664.47, -20.25, 283.14, 2, 0)
  57. end
  58. function hailed(NPC, Spawn)
  59. if GetFactionAmount(Spawn,11)<0 then
  60. FaceTarget(NPC, Spawn)
  61. PlayFlavor(NPC, "", "", "shakefist", 0, 0, Spawn)
  62. else
  63. FaceTarget(NPC, Spawn)
  64. Dialog.New(NPC, Spawn)
  65. Dialog.AddDialog("Greetings resident! No time to chat. I'm in charge of the local Qeynos Guard squad.")
  66. Dialog.AddVoiceover("voiceover/english/knight-captain_hastings/qey_village01/captainhastings000.mp3", 2830541890, 1668350468)
  67. if not HasCompletedQuest (Spawn, Delivery) and not HasQuest (Spawn, Delivery) then
  68. Dialog.AddOption("I would love the opportunity to help the Qeynos Guard if there is anything that needs doing.", "Helping")
  69. end
  70. if GetQuestStep (Spawn, Delivery)==2 then
  71. Dialog.AddOption("I've returned with Captain Santis' response.","Delivered")
  72. end
  73. if GetQuestStep (Spawn, FPStout)==2 then
  74. Dialog.AddOption("...I have something that may be of interest to you.","FPStoutTurnin")
  75. end
  76. if HasCompletedQuest (Spawn, Delivery) then
  77. Dialog.AddOption("Keep up the good work!")
  78. end
  79. Dialog.AddOption("Sorry. Don't let me get in your way.")
  80. Dialog.Start()
  81. end
  82. end
  83. function Helping(NPC, Spawn)
  84. FaceTarget(NPC, Spawn)
  85. Dialog.New(NPC, Spawn)
  86. PlayFlavor(NPC, "", "", "nod", 0, 0, Spawn)
  87. Dialog.AddDialog("I admire your dedication to the kingdom. I have for you a task that will contribute to Qeynos greatness. Does this interest you?")
  88. Dialog.AddVoiceover("voiceover/english/knight-captain_hastings/qey_village01/captainhastings003.mp3", 3672561491, 3095253551)
  89. Dialog.AddOption("I would be happy to serve! Tell me what I must do!", "QuestBegin")
  90. Dialog.AddOption("On second thought, I am needed elsewhere.")
  91. Dialog.Start()
  92. end
  93. function QuestBegin (NPC, Spawn)
  94. FaceTarget(NPC, Spawn)
  95. OfferQuest(NPC, Spawn, Delivery)
  96. end
  97. function Delivered(NPC, Spawn)
  98. FaceTarget(NPC, Spawn)
  99. Dialog.New(NPC, Spawn)
  100. SetStepComplete(Spawn, Delivery, 2)
  101. PlayFlavor(NPC, "", "", "happy", 0, 0, Spawn)
  102. Dialog.AddDialog("Excellent! We will crush his team and earn the rights to the royal bunkhouse! You are free to go, citizen.")
  103. Dialog.AddVoiceover("voiceover/english/knight-captain_hastings/qey_village01/captainhastings005.mp3", 3310150005, 1305294330)
  104. Dialog.AddOption("")
  105. Dialog.AddOption("Glad I could help!")
  106. Dialog.Start()
  107. end
  108. function FPStoutTurnin(NPC, Spawn)
  109. FaceTarget(NPC, Spawn)
  110. Dialog.New(NPC, Spawn)
  111. Dialog.AddDialog("Interesting. What is this... something?")
  112. Dialog.AddVoiceover("voiceover/english/knight-captain_hastings/qey_village01/captainhastings001.mp3", 1036957677, 3879964827)
  113. Dialog.AddOption("I was given this case of Freeport contraband and thought it should be turned into the authorities.", "FPStoutUpdate")
  114. Dialog.AddOption("On second thought, I am needed elsewhere.")
  115. Dialog.Start()
  116. end
  117. function FPStoutUpdate(NPC, Spawn)
  118. FaceTarget(NPC, Spawn)
  119. Dialog.New(NPC, Spawn)
  120. PlayFlavor(NPC, "", "", "nod", 0, 0, Spawn)
  121. SetStepComplete(Spawn, FPStout, 2)
  122. SendMessage(Spawn, "Captain Hastings hands you a medium sized bag as a token of thanks for your service to Qeynos.")
  123. SummonItem(Spawn,20749,1) --Summons player a medium bag
  124. Dialog.AddDialog("You did the right thing. Thank you for bringing this to me.")
  125. Dialog.AddVoiceover("voiceover/english/knight-captain_hastings/qey_village01/captainhastings002.mp3", 1532795209, 281346736)
  126. Dialog.AddOption("I'm glad to have it off my hands.")
  127. Dialog.Start()
  128. end