freeport_to_qeynos__exile.lua 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240
  1. --[[
  2. Script Name : Quests/Hallmark/freeport_to_qeynos__exile.lua
  3. Script Author : Dorbin
  4. Script Date : 2023.09.26 11:09:16
  5. Script Purpose :
  6. Zone : Hallmark
  7. Quest Giver:
  8. Preceded by: None
  9. Followed by:
  10. --]]
  11. require "SpawnScripts/Generic/DialogModule"
  12. function Accepted(Quest, QuestGiver, Player)
  13. FaceTarget(QuestGiver, Player)
  14. Dialog.New(QuestGiver, Player)
  15. Dialog.AddDialog("Stow away on a ship and travel to Antonica. I will send a message to my old friend, Vishra. Seek him out near the gnoll's lair where he fights to stop their impending threat. I will tell him that you need a home. Go before it's too late!")
  16. Dialog.AddOption("Thank you Selindi. I will go to Antonica!")
  17. Dialog.Start()
  18. end
  19. function Declined(Quest, QuestGiver, Player)
  20. OfferQuest(nil,Player,5891)
  21. end
  22. function Init(Quest)
  23. AddQuestStepChat(Quest, 1, "Speak with Selindi in the Commonlands.", 1, "I need to speak with Executioner Selindi in the Commonlands.", 11, 330235)
  24. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  25. UpdateQuestZone(Quest,"The Commonlands")
  26. end
  27. function Accepted(Quest, QuestGiver, Player)
  28. -- Add dialog here for when the quest is accepted
  29. end
  30. function Declined(Quest, QuestGiver, Player)
  31. -- Add dialog here for when the quest is declined
  32. end
  33. function Deleted(Quest, QuestGiver, Player)
  34. -- Remove any quest specific items here when the quest is deleted
  35. end
  36. function Step1Complete(Quest, QuestGiver, Player)
  37. UpdateQuestStepDescription(Quest, 1, "I've spoken with Selindi.")
  38. UpdateQuestTaskGroupDescription(Quest, 1, "I spoke with Selindi about becoming a Qeynos citizen.")
  39. AddQuestStepChat(Quest, 2, "I need to find Vishra in Antonica.", 1, "Selindi instructed me to travel to Antonica and seek out Vishra. It seems he can offer me a new home. I am told that he can be found where the gnoll's make their home, preventing them from harming others. I only hope he will see me for what I am, not what I was.", 11, 120402)
  40. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  41. end
  42. function Step2Complete(Quest, QuestGiver, Player)
  43. UpdateQuestZone(Quest,"Multiple Zones")
  44. UpdateQuestStepDescription(Quest, 2, "I have found Vishra the Ranger.")
  45. UpdateQuestTaskGroupDescription(Quest, 2, "I have found Vishra, but he turned me away for now.")
  46. AddQuestStepKillByRace(Quest, 3, "Strike into the heart of Blackburrow and attempt to put an end to their merciless attacks on Qeynosians.", 500, 100, "Vishra has tasked me with defending the innocent against those who seek to slaughter them.", 1221,298)
  47. AddQuestStepKill(Quest, 4, "Defeat Dancoed of the Pine in Antonica and end the threat he presents.", 1, 100, "Vishra has tasked me with defending the innocent against those who seek to slaughter them.", 1221, 1)
  48. AddQuestStepKill(Quest, 5, "Remove the threat Sarn the Wayfarer presents to the people of Antonica.", 1, 100, "Vishra has tasked me with defending the innocent against those who seek to slaughter them.", 1220, 1)
  49. AddQuestStepKill(Quest, 6, "Catch Towyn the Lazy unaware in Antonica and put an end to him.", 1, 100, "Vishra has tasked me with defending the innocent against those who seek to slaughter them.", 1221, 1)
  50. AddQuestStepKill(Quest, 7, "Find Crugybar the Rock in Blackburrow and stop him from mining ore for gnoll weapons.", 1, 100, "Vishra has tasked me with defending the innocent against those who seek to slaughter them.", 1220, 170038)
  51. AddQuestStepKill(Quest, 8, "Seek out and slay Nantglas the Cold in Blackburrow.", 1, 100, "Vishra has tasked me with defending the innocent against those who seek to slaughter them.", 1220, 170050)
  52. AddQuestStepCompleteAction(Quest, 3, "Step3Complete")
  53. AddQuestStepCompleteAction(Quest, 4, "Step4Complete")
  54. AddQuestStepCompleteAction(Quest, 5, "Step5Complete")
  55. AddQuestStepCompleteAction(Quest, 6, "Step6Complete")
  56. AddQuestStepCompleteAction(Quest, 7, "Step7Complete")
  57. AddQuestStepCompleteAction(Quest, 8, "Step8Complete")
  58. end
  59. function Step3Complete(Quest, QuestGiver, Player)
  60. UpdateQuestStepDescription(Quest, 3, "I fought for the forces of good and now understand the truth of virtue.")
  61. CheckProgress(Quest, QuestGiver, Player)
  62. end
  63. function Step4Complete(Quest, QuestGiver, Player)
  64. UpdateQuestStepDescription(Quest, 4, "I have defeated Dancoed of the Pine.")
  65. CheckProgress(Quest, QuestGiver, Player)
  66. end
  67. function Step5Complete(Quest, QuestGiver, Player)
  68. UpdateQuestStepDescription(Quest, 5, "I have removed Sarn the Wayfarer.")
  69. CheckProgress(Quest, QuestGiver, Player)
  70. end
  71. function Step6Complete(Quest, QuestGiver, Player)
  72. UpdateQuestStepDescription(Quest, 6, "You have put an end to Towyn the Lazy.")
  73. CheckProgress(Quest, QuestGiver, Player)
  74. end
  75. function Step7Complete(Quest, QuestGiver, Player)
  76. UpdateQuestStepDescription(Quest, 7, "You have stopped Crugybar the Rock.")
  77. CheckProgress(Quest, QuestGiver, Player)
  78. end
  79. function Step8Complete(Quest, QuestGiver, Player)
  80. UpdateQuestStepDescription(Quest, 8, "I have slain Nantglas the Cold.")
  81. CheckProgress(Quest, QuestGiver, Player)
  82. end
  83. function CheckProgress(Quest, QuestGiver, Player)
  84. if QuestStepIsComplete(Player, 5891, 3) and
  85. QuestStepIsComplete(Player, 5891, 4) and
  86. QuestStepIsComplete(Player, 5891, 5) and
  87. QuestStepIsComplete(Player, 5891, 6) and
  88. QuestStepIsComplete(Player, 5891, 7) and
  89. QuestStepIsComplete(Player, 5891, 8) then
  90. UpdateQuestTaskGroupDescription(Quest, 3, "I have proved myself in battle against the enemies of Qeynos: the gnolls.")
  91. AddQuestStepChat(Quest, 9, "Speak with Vishra once more.", 1, "While fighting monsters, I came to realize that I was no different than them. Only when I refused to add hatred's strength to my attacks did I truly defeat my enemies. I see now that virtue and wrath cannot co-exist. I think it's time I speak with Vishra again.", 11, 120402)
  92. AddQuestStepCompleteAction(Quest, 9, "Step9Complete")
  93. end
  94. end
  95. function Step9Complete(Quest, QuestGiver, Player)
  96. UpdateQuestZone(Quest,"Antonica")
  97. UpdateQuestStepDescription(Quest, 9, "I have spoken with Vishra again")
  98. UpdateQuestTaskGroupDescription(Quest, 4, "I have spoken with Vishra and shown him my new understanding.")
  99. AddQuestStepChat(Quest, 10, "Speak with Timothy Cooper.", 1, "Vishra has asked that I speak with Timothy Cooper and offer my assistance to him.", 11, 1)
  100. AddQuestStepCompleteAction(Quest, 10, "Step10Complete")
  101. end
  102. function Step10Complete(Quest, QuestGiver, Player)
  103. UpdateQuestZone(Quest,"Antonica")
  104. UpdateQuestStepDescription(Quest, 10, "I have spoken with Timothy Cooper.")
  105. UpdateQuestTaskGroupDescription(Quest, 5, "I have spoken with Timothy Cooper")
  106. AddQuestStepChat(Quest, 11, "Speak with Felzik Dursin in Antonica.", 1, "I must seek out Felzik Dursin and offer my aid.", 11, 1)
  107. AddQuestStepCompleteAction(Quest, 11, "Step11Complete")
  108. end
  109. function Step11Complete(Quest, QuestGiver, Player)
  110. UpdateQuestZone(Quest,"Antonica")
  111. UpdateQuestStepDescription(Quest, 11, "I found out what Felzik was doing and put a stop to it.")
  112. UpdateQuestTaskGroupDescription(Quest, 6, "I've put an end to the slave trade that Felzik Dursin was running.")
  113. AddQuestStepChat(Quest, 12, "Speak with Vishra once more.", 1, "I must return to Vishra to let him know what I've done.", 11, 120402)
  114. AddQuestStepCompleteAction(Quest, 12, "Step12Complete")
  115. end
  116. function Step12Complete(Quest, QuestGiver, Player)
  117. UpdateQuestStepDescription(Quest, 12, "I have spoken with Vishra.")
  118. UpdateQuestTaskGroupDescription(Quest, 7, "I've spoken with Vishra and have received another task.")
  119. AddQuestStepChat(Quest, 13, "Speak with Darvin Gallowyn in Antonica.", 1, "Vishra has asked that I speak with children and convince them to follow the path of good.", 11, 1)
  120. AddQuestStepCompleteAction(Quest, 13, "Step13Complete")
  121. end
  122. function Step13Complete(Quest, QuestGiver, Player)
  123. UpdateQuestStepDescription(Quest, 13, "I have convinced Darvin Gallowyn to turn away from the darkness.")
  124. UpdateQuestTaskGroupDescription(Quest, 8, "I have convinced Sialla Windwhisper to turn away from the darkness.")
  125. AddQuestStepChat(Quest, 14, "Speak with Wolfgang Constantine in Antonica.", 1, "Vishra has asked that I speak with children and convince them to follow the path of good.", 11, 1)
  126. AddQuestStepCompleteAction(Quest, 14, "Step14Complete")
  127. end
  128. function Step14Complete(Quest, QuestGiver, Player)
  129. UpdateQuestStepDescription(Quest, 14, "I have convinced Wolfgang Constantine to turn away from the darkness.")
  130. UpdateQuestTaskGroupDescription(Quest, 9, "I have convinced Wolfgang Constantine to turn away from the darkness.")
  131. AddQuestStepChat(Quest, 15, "Speak with Sialla Windwhisper in Antonica.", 1, "Vishra has asked that I speak with children and convince them to follow the path of good.", 11, 1)
  132. AddQuestStepCompleteAction(Quest, 15, "Step15Complete")
  133. end
  134. function Step15Complete(Quest, QuestGiver, Player)
  135. UpdateQuestStepDescription(Quest, 15, "I have convinced Sialla Windwhisper to turn away from the darkness.")
  136. UpdateQuestTaskGroupDescription(Quest, 10, "I have convinced Sialla Windwhisper to turn away from the darkness.")
  137. AddQuestStepChat(Quest, 16, "Speak with Vishra again.", 1, "I must return to Vishra to let him know what I've done.", 11, 120402)
  138. AddQuestStepCompleteAction(Quest, 16, "Step16Complete")
  139. end
  140. function Step16Complete(Quest, QuestGiver, Player)
  141. UpdateQuestStepDescription(Quest, 16, "I have spoken with Vishra.")
  142. UpdateQuestTaskGroupDescription(Quest, 11, "I've spoken with Vishra and have received another task.")
  143. AddQuestStepChat(Quest, 17, "Speak with Magistrate Rachelle and confess your crimes.", 1, "Vishra has bid me confess any crimes that I may have committed to Lower Magistrate Rachelle in Antonica.", 11, 1)
  144. AddQuestStepCompleteAction(Quest, 17, "Step17Complete")
  145. end
  146. function Step17Complete(Quest, QuestGiver, Player)
  147. UpdateQuestStepDescription(Quest, 17, "I have spoken with Magistrate Rachelle and my honesty has won me her backing.")
  148. UpdateQuestTaskGroupDescription(Quest, 12, "I have spoken with Magistrate Rachelle and my honesty has won me her backing.")
  149. AddQuestStepChat(Quest, 18, "Speak with Vishra once more.", 1, "I must return to Vishra and speak to him once more.", 11, 120402)
  150. AddQuestStepCompleteAction(Quest, 18, "QuestComplete")
  151. end
  152. function QuestComplete(Quest, QuestGiver, Player)
  153. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  154. UpdateQuestStepDescription(Quest, 18, "I have spoken with Vishra again.")
  155. UpdateQuestTaskGroupDescription(Quest, 13, "Vishra has absolved me of all crimes and I am now free to walk among the citizens of Qeynos.")
  156. UpdateQuestDescription(Quest, "During the time I spent in exile, I thought upon what it means to hold the ideals of virtue. I understand that the ends do not justify the means, but rather the path that one takes decides what is good or evil. Though a good life is harder, it is more rewarding.")
  157. GiveQuestReward(Quest, Player)
  158. end
  159. function Reload(Quest, QuestGiver, Player, Step)
  160. if Step == 1 then
  161. Step1Complete(Quest, QuestGiver, Player)
  162. elseif Step == 2 then
  163. Step2Complete(Quest, QuestGiver, Player)
  164. elseif Step == 3 then
  165. Step3Complete(Quest, QuestGiver, Player)
  166. elseif Step == 4 then
  167. Step4Complete(Quest, QuestGiver, Player)
  168. elseif Step == 5 then
  169. Step5Complete(Quest, QuestGiver, Player)
  170. elseif Step == 6 then
  171. Step6Complete(Quest, QuestGiver, Player)
  172. elseif Step == 7 then
  173. Step7Complete(Quest, QuestGiver, Player)
  174. elseif Step == 8 then
  175. Step8Complete(Quest, QuestGiver, Player)
  176. elseif Step == 9 then
  177. Step9Complete(Quest, QuestGiver, Player)
  178. elseif Step == 10 then
  179. Step10Complete(Quest, QuestGiver, Player)
  180. elseif Step == 11 then
  181. Step11Complete(Quest, QuestGiver, Player)
  182. elseif Step == 12 then
  183. Step12Complete(Quest, QuestGiver, Player)
  184. elseif Step == 13 then
  185. Step13Complete(Quest, QuestGiver, Player)
  186. elseif Step == 14 then
  187. Step14Complete(Quest, QuestGiver, Player)
  188. elseif Step == 15 then
  189. Step15Complete(Quest, QuestGiver, Player)
  190. elseif Step == 16 then
  191. Step16Complete(Quest, QuestGiver, Player)
  192. elseif Step == 17 then
  193. Step17Complete(Quest, QuestGiver, Player)
  194. elseif Step == 18 then
  195. QuestComplete(Quest, QuestGiver, Player)
  196. end
  197. end