MarshalGlorfel.lua 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. --[[
  2. Script Name : SpawnScripts/Qeynos Citizenship Trial Chamber/MarshalGlorfel.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.08.30 05:08:52
  5. Script Purpose :
  6. :
  7. --]]
  8. require "SpawnScripts/Generic/DialogModule"
  9. local QCitizen = 5718
  10. function spawn(NPC)
  11. SetPlayerProximityFunction(NPC, 8, "InRange", "LeaveRange")
  12. end
  13. function respawn(NPC)
  14. spawn(NPC)
  15. end
  16. function InRange(NPC, Spawn)
  17. SetTarget(NPC,Spawn)
  18. if GetQuestStep (Spawn,QCitizen)==3 then
  19. FaceTarget(NPC, Spawn)
  20. PlayFlavor(NPC, "","Ahh, yer just in time!", "hello", 0,0, Spawn)
  21. end
  22. end
  23. function LeaveRange(NPC, Spawn)
  24. SetTarget(NPC,nil)
  25. end
  26. function hailed(NPC, Spawn)
  27. if GetQuestStep(Spawn,QCitizen)==3 then
  28. Dialog1(NPC,Spawn)
  29. elseif GetQuestStep(Spawn,QCitizen)==8 then
  30. Dialog2(NPC,Spawn)
  31. elseif GetQuestStep(Spawn,QCitizen)<=5 and GetQuestStep(Spawn,QCitizen)>=3 then
  32. PlayFlavor(NPC, "voiceover/english/marshal_glorfel/qey_catacomb_epic01/marshalglorfel010.mp3","I think you got more to learn before you're ready to become a citizen of the city.", "no", 799396705,3625137136, Spawn)
  33. elseif HasCompletedQuest(Spawn,QCitizen) then
  34. Dialog2(NPC,Spawn)
  35. else
  36. FaceTarget(NPC, Spawn)
  37. PlayFlavor(NPC, "","Hey! You're not allowed in here! Off with ya until you've proven yourself to complete this trial.", "glare", 0,0, Spawn)
  38. end
  39. end
  40. function Dialog1(NPC,Spawn)
  41. FaceTarget(NPC, Spawn)
  42. Dialog.New(NPC, Spawn)
  43. Dialog.AddDialog("Ya see, we got a problem with a group who decided to break away from Qeynos, and I heard of the fine things ya did on the Island of Refuge.")
  44. Dialog.AddVoiceover("voiceover/english/marshal_glorfel/qey_catacomb_epic01/marshalglorfel001.mp3", 1972383345, 185623710)
  45. Dialog.AddOption("Who would want to do that?", "Option1A")
  46. Dialog.AddOption("Wouldn't they just be allowed to leave?", "Option1Aa")
  47. Dialog.Start()
  48. end
  49. function Option1A(NPC,Spawn)
  50. FaceTarget(NPC, Spawn)
  51. Dialog.New(NPC, Spawn)
  52. Dialog.AddDialog("Some people are too set in their ways to live in our open society, or else they've been lured away to Freeport by the promise of wealth that they'll never receive.")
  53. Dialog.AddVoiceover("voiceover/english/marshal_glorfel/qey_catacomb_epic01/marshalglorfel002.mp3", 1674795503, 1640631237)
  54. Dialog.AddOption("[continue]", "Option1B")
  55. Dialog.Start()
  56. end
  57. function Option1Aa (NPC,Spawn)
  58. FaceTarget(NPC, Spawn)
  59. Dialog.New(NPC, Spawn)
  60. Dialog.AddDialog("Of course, they're allowed to leave. Problem is, these folks have been plottin' the murder of one of our fine citizens, and we can't have that.")
  61. Dialog.AddVoiceover("voiceover/english/marshal_glorfel/qey_catacomb_epic01/marshalglorfel003.mp3", 932259166, 3680508066)
  62. Dialog.AddOption("[continue]", "Option1B")
  63. Dialog.Start()
  64. end
  65. function Option1B(NPC,Spawn)
  66. FaceTarget(NPC, Spawn)
  67. Dialog.New(NPC, Spawn)
  68. Dialog.AddDialog("These murderous scoundrels planned to slay our very own Baron Ironforge. Though their plans never came to fruition, Baron Ironforge still lives due only to the heroics of one of Qeynos' fine adventuring companies and a keg of imported halfling ale.")
  69. Dialog.AddVoiceover("voiceover/english/marshal_glorfel/qey_catacomb_epic01/marshalglorfel004.mp3", 1462903596, 2724798765)
  70. Dialog.AddOption("Which company was it?", "Option1C")
  71. Dialog.Start()
  72. end
  73. function Option1C(NPC,Spawn)
  74. FaceTarget(NPC, Spawn)
  75. Dialog.New(NPC, Spawn)
  76. Dialog.AddDialog("Twas the great Halfer's Company. Not a one among 'em that's not a halfling or half elf. Strange lot, indeed! At any rate, we need to teach these ruffians a lesson. We'll leave this to yer judgment, if you can return the senses to any of these traitors, by all means, do so.")
  77. Dialog.AddVoiceover("voiceover/english/marshal_glorfel/qey_catacomb_epic01/marshalglorfel005.mp3", 3056107447, 1822754190)
  78. Dialog.AddOption("By judgment, you mean save who I can and kill the rest?", "Option1D")
  79. Dialog.Start()
  80. end
  81. function Option1D(NPC,Spawn)
  82. FaceTarget(NPC, Spawn)
  83. Dialog.New(NPC, Spawn)
  84. Dialog.AddDialog("That's right! Those who mean ill will to our people mustn't live, even if they're off to Freeport. It's your job to succeed where one of our knights failed.")
  85. Dialog.AddVoiceover("voiceover/english/marshal_glorfel/qey_catacomb_epic01/marshalglorfel006.mp3", 3980894706, 4254118210)
  86. Dialog.AddOption("I will not disappoint.", "Option1E")
  87. Dialog.Start()
  88. end
  89. function Option1E(NPC,Spawn)
  90. FaceTarget(NPC, Spawn)
  91. Dialog.New(NPC, Spawn)
  92. Dialog.AddDialog("So, what's the first thing ya do when ye come across one of em?")
  93. Dialog.AddVoiceover("voiceover/english/marshal_glorfel/qey_catacomb_epic01/marshalglorfel008.mp3", 344841247, 3075235208)
  94. Dialog.AddOption("Speak with them, and convince them of the error of their ways.", "Option1F")
  95. Dialog.AddOption("Slit their throats before they escape!", "Option1Fa")
  96. Dialog.Start()
  97. end
  98. function Option1Fa(NPC,Spawn) --Evil
  99. FaceTarget(NPC, Spawn)
  100. Dialog.New(NPC, Spawn)
  101. Dialog.AddDialog("Whoa, now! Ya sound a bit like the enemy. Be careful that when yer meting out yer judgment that ya don't become like those yer fixin' to judge.")
  102. Dialog.AddVoiceover("voiceover/english/marshal_glorfel/qey_catacomb_epic01/marshalglorfel007.mp3", 3117666178, 1750353665)
  103. Dialog.AddOption("Alright. I'll be sure to hear them out before I give judgement.", "Option1F")
  104. Dialog.Start()
  105. end
  106. function Option1F(NPC,Spawn)
  107. FaceTarget(NPC, Spawn)
  108. Dialog.New(NPC, Spawn)
  109. Dialog.AddDialog("I think ya got it! Let it be known, you got the full backing of the law, if push comes to shove. We'll understand if you can't make them see the light of reason, just so long as ya give it a shot. If you can prove yourself here, we'll welcome you, with open arms, into the city as a citizen!")
  110. Dialog.AddVoiceover("voiceover/english/marshal_glorfel/qey_catacomb_epic01/marshalglorfel009.mp3", 3980894706, 4254118210)
  111. Dialog.AddOption("Let us begin, Marshal.")
  112. Dialog.Start()
  113. SetStepComplete(Spawn,QCitizen,3)
  114. end