welcome_to_freeport__scale_yard.lua 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. --[[
  2. Script Name : Quests/Hallmark/welcome_to_freeport__scale_yard.lua
  3. Script Author : Dorbin
  4. Script Date : 2023.06.28 10:06:09
  5. Script Purpose :
  6. Zone : Hallmark
  7. Quest Giver:
  8. Preceded by: None
  9. Followed by:
  10. --]]
  11. require "SpawnScripts/Generic/DialogModule"
  12. function Init(Quest)
  13. AddQuestStepZoneLoc(Quest, 1, "Use the room door to be given your inn room. Click on the \"Buy\" button to get your room. Once you have purchased your room click on \"Enter\" to enter your room.", 10, "I've been instructed to sign in at the inn's guest registry in order to get the key to my room.", 11,-5.63, 0.75, -13.88 ,145)
  14. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  15. UpdateQuestZone(Quest,"Scale Yard")
  16. end
  17. function Accepted(Quest, QuestGiver, Player)
  18. FaceTarget(QuestGiver, Player)
  19. Dialog.New(QuestGiver, Player)
  20. Dialog.AddDialog("Your house is within the Scale Yard, where we call home. Go at once and find your landlord. He is waiting to give you further commands. So ends my gracious welcome. Now, get out of here...")
  21. PlayFlavor(QuestGiver,"","","agree",0,0,Player)
  22. -- Dialog.AddVoiceover("voiceover/english/overseer_daerla/fprt_hood05/overseer_daerla004.mp3", 2116614625, 2551669022)
  23. Dialog.AddOption("Praise the Overlord!")
  24. Dialog.Start()
  25. if HasQuest(Player,5758) and GetQuestStep(Player, 5758)==2 then
  26. SetStepComplete(Player, 5758,2)
  27. end
  28. end
  29. function Step1Complete(Quest, QuestGiver, Player)
  30. UpdateQuestStepDescription(Quest, 1, "I've been given my inn room")
  31. UpdateQuestTaskGroupDescription(Quest, 1, "I've been given the key to my room and can now come and go as I please.")
  32. AddQuestStepChat(Quest, 2, "I need to introduce myself to the caretaker.", 1, "I need to introduce myself to the landlord",11,1450271)
  33. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  34. end
  35. function Step2Complete(Quest, QuestGiver, Player)
  36. UpdateQuestStepDescription(Quest, 2, "I've introduced myself to the slumlord of the inn.")
  37. UpdateQuestTaskGroupDescription(Quest, 2, "I've introduced myself to the slumlord that's in charge of my innroom, Valthun.")
  38. AddQuestStep(Quest, 3, "Open your inventory. \"Place\" your new table and then speak with the slumlord.", 1, 100, "I've spoken with Valthun, a despicable slumlord. Since I don't know how attentive the guards are, I'll hold off on killing him for now. He says the Coalition of Tradesfolke have given me a table for free. I should place this on the floor for now then talk with the slumlord again.",11)
  39. AddQuestStepCompleteAction(Quest, 3, "Step3Complete")
  40. end
  41. function Step3Complete(Quest, QuestGiver, Player)
  42. UpdateQuestStepDescription(Quest, 3, "I've placed the table and spoken with the slumlord.")
  43. UpdateQuestTaskGroupDescription(Quest, 3, "I've placed the table and spoken with the slumlord.")
  44. AddQuestStepChat(Quest, 4, "Speak with the Banker Izark in Scale Yard.", 1, "Slumlord Valthun has informed me that I have a bank account waiting for me. I need to speak with the Banker in Scale Yard to open the account.",11,1390055)
  45. AddQuestStepCompleteAction(Quest, 4, "Step4Complete")
  46. end
  47. function Step4Complete(Quest, QuestGiver, Player)
  48. UpdateQuestStepDescription(Quest, 4, "I've spoken with the Banker in Scale Yard.")
  49. UpdateQuestTaskGroupDescription(Quest, 4, "I've spoken with the Banker in the Scale Yard.")
  50. AddQuestStepChat(Quest, 5, "Return to your room and speak with Slumlord Valthun.", 1, "Now that I have a bank account, I should return to my house and look around my brand new room. When I get there maybe I can find out where that Slumlord went.",11,1450271)
  51. AddQuestStepCompleteAction(Quest, 5, "Step5Complete")
  52. end
  53. function Step5Complete(Quest, QuestGiver, Player)
  54. UpdateQuestStepDescription(Quest, 5, "I've returned to my room and spoken with Slumlord Valthun.")
  55. UpdateQuestTaskGroupDescription(Quest, 5, "I've returned to my room and spoken with slumlord Valthun, who seems to have had a change in attitude since I last spoke with him.")
  56. AddQuestStep(Quest, 6, "Open your inventory. \"Place\" your new mirror and then speak with the slumlord.", 1,100, "Slumlord Valthun has suggested that I place the mirror on my walls. I don't know what came over him, but I don't trust it. I should place the mirror and then get him to tell me everything he knows about Scale Yard",0)
  57. AddQuestStepCompleteAction(Quest, 6, "Step6Complete")
  58. end
  59. function Step6Complete(Quest, QuestGiver, Player)
  60. UpdateQuestStepDescription(Quest, 6, "I've placed the mirror and spoken with the slumlord.")
  61. UpdateQuestTaskGroupDescription(Quest, 6, "I've placed the mirror and spoken with the slumlord.")
  62. UpdateQuestZone(Quest,"Sunken City")
  63. AddQuestStepZoneLoc(Quest, 7, "I need to use the mariner's bells near the docks to get to the Sunken City.",6,"\"The more daring of you bold, courageous adventurer types tend to make a living by killing things in the Sunken City. You have to take a ferry to reach the place. Go to the mariner's bell near the docks and give it a ring to travel there. I'll show you a few other places after you take a look at the gates.\" - Valthun", 2297,-48.62,-0.1,41.83,841)
  64. AddQuestStepCompleteAction(Quest, 7, "Step7Complete")
  65. end
  66. function Step7Complete(Quest, QuestGiver, Player)
  67. UpdateQuestStepDescription(Quest, 7, "I've visited the Sunken City.")
  68. UpdateQuestTaskGroupDescription(Quest, 7, "I've visisted one of four locations Valthun has told me about.")
  69. UpdateQuestZone(Quest,"Scale Yard")
  70. AddQuestStepChat(Quest, 8, "I need to introduce myself to the Scale Yard crafting trainer, Tegan Frostfist.",1,"\"Some commoners choose to waste their time twiddling, creating rubbish. If you have interest in such crafting nonsense, then speak with representative from The War Hagglers. While I doubt you can, there might be some coin to be made crafting. If I see your filth littering the streets though, remember, I know where you live.\" - Valthun", 11,1390014)
  71. AddQuestStepCompleteAction(Quest, 8, "Step8Complete")
  72. end
  73. function Step8Complete(Quest, QuestGiver, Player)
  74. UpdateQuestStepDescription(Quest, 8, "I've met with the district crafting trainer.")
  75. UpdateQuestTaskGroupDescription(Quest, 8, "I've visisted two of four locations Valthun has told me about.")
  76. AddQuestStepZoneLoc(Quest, 9, "I need to locate the grate to the Thieve's Way.",6,"\"Though most of the people who venture down into the sewers are nothing more than filthy, worthless, good-for-nothing vagabonds, I'm sure you have good reasons for traveling there yourself. You can find the grate leading down to them if you take a close look. After that, I'll show you one more place.\" - Valthun", 0,37, -3.5, -30.72,139)
  77. AddQuestStepCompleteAction(Quest, 9, "Step9Complete")
  78. end
  79. function Step9Complete(Quest, QuestGiver, Player)
  80. UpdateQuestStepDescription(Quest, 9, "I've found the enterence to the Thieve's Way.")
  81. UpdateQuestTaskGroupDescription(Quest, 9, "I've visisted three of four locations Valthun has told me about.")
  82. AddQuestStepZoneLoc(Quest, 10, "I need to locate the gates to South Freeport.",6, "\"Only citizens like myself can come and go as they please. The rest of you refugees are corralled into the districts. If you'd like to see what door you're not allowed to travel through, take a look for the city gates. You'll be able to find it here. By the time you look at it, I should be done wi----- waiting for you.\" - Valthun", 11,15.54, 3.00, 73.32,139)
  83. AddQuestStepCompleteAction(Quest, 10, "Step10Complete")
  84. end
  85. function Step10Complete(Quest, QuestGiver, Player)
  86. UpdateQuestStepDescription(Quest, 10, "I've visited the inner city gates but was not allowed access.")
  87. UpdateQuestTaskGroupDescription(Quest, 10, "I've visisted all four locations Slumlord Valthun has told me about.")
  88. AddQuestStepChat(Quest, 11, "I need to return to my room and ask Slumlord Valthun why I can't enter the city.", 1, 100, "I should return back to my room and tell Valthun to let me know why the guard didn't allow me to enter into the city. I also don't trust him hanging around my house.",11,1450271)
  89. AddQuestStepCompleteAction(Quest, 11, "Step11Complete")
  90. end
  91. function Step11Complete(Quest, QuestGiver, Player)
  92. UpdateQuestStepDescription(Quest, 11, "I've spoken with Slumlord Valthun and have a chandelier now.")
  93. UpdateQuestTaskGroupDescription(Quest, 11, "I've spoken with Slumlord Valthun and have a chandelier now.")
  94. AddQuestStep(Quest, 12, "Open your inventory. \"Place\" your new chandelier and then speak with the slumlord.", 1, 100,"I came back to find Valthun doing something suspicious. When I confronted him, he gave me another piece of furniture. I don't believe for a second he was doing this out of the kindness of his own heart. Nontheless, there's no need for me to throw away the chandelier. I'll place it on the ceiling, then get Valthun to tell me why I can't go into the city.",11)
  95. AddQuestStepCompleteAction(Quest, 12, "Step12Complete")
  96. end
  97. function Step12Complete(Quest, QuestGiver, Player)
  98. UpdateQuestStepDescription(Quest, 12, "I've placed the chandelier on the ceiling and spoke with Valthun.")
  99. UpdateQuestTaskGroupDescription(Quest, 12, "I've placed the chandelier on the ceiling and spoke with Valthun.")
  100. AddQuestStep(Quest, 13, "Take an application from the citizenship sign, complete the task, then speak with Abbetor T'avi by using the citizenship sign again.", 1, 100,"\"If you for one moment think that Freeport wants trash like you walking around the city, you've got another think coming. You're going to die here, and hopefully soon, no matter what they say. I'm not being paid to tell you this, but if you want to become a citizen you have to apply for it. Go to the city gates and pull an application from the sign there. Do what it says and then use the sign again to speak to Abbetor T'avi. I hope it winds up getting you killed so I can have this room back.\" - Valthun",11)
  101. AddQuestStepCompleteAction(Quest, 13, "Step13Complete")
  102. end
  103. function Step13Complete(Quest, QuestGiver, Player)
  104. UpdateQuestStepDescription(Quest, 13, "I've spoken with Abbetor T'avi and have been told how to become a citizen.")
  105. UpdateQuestTaskGroupDescription(Quest, 13, "I've spoken with Abbetor T'avi and have been told how to become a citizen.")
  106. UpdateQuestZone(Quest,"Uncovered Traitors Hideout")
  107. AddQuestStepChat(Quest, 14, "Judge the traitors individually and prove your loyalty to Freeport.", 1, 100,"Abbetor T'avi has asked that I prove my loyalty to the city of Freeport in order to gain citizenship. She has pointed out that there are those who would betray our great city to that harlot Antonia. To prove myself, I will have to deal with their insolent and foolish behavior.",11,22101350)
  108. AddQuestStepCompleteAction(Quest, 14, "QuestComplete")
  109. end
  110. function QuestComplete(Quest, QuestGiver, Player)
  111. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  112. UpdateQuestStepDescription(Quest, 14, "I have completed the Citizenship Trial and am now a citizen of Freeport.")
  113. UpdateQuestTaskGroupDescription(Quest, 14, "I am now a citizen of Freeport!")
  114. UpdateQuestDescription(Quest, "I've managed to keep from killing Vathun long enough for me to familiarize myself with Longshadow Alley. That disgusting man has shown me what I need to know about my new home, along with pointing me at who I need to talk to in order to become a citizen. The next time we meet, things will be much different.")
  115. GiveQuestReward(Quest, Player)
  116. end
  117. function Reload(Quest, QuestGiver, Player, Step)
  118. if Step == 1 then
  119. Step1Complete(Quest, QuestGiver, Player)
  120. elseif Step == 2 then
  121. Step2Complete(Quest, QuestGiver, Player)
  122. elseif Step == 3 then
  123. Step3Complete(Quest, QuestGiver, Player)
  124. elseif Step == 4 then
  125. Step4Complete(Quest, QuestGiver, Player)
  126. elseif Step == 5 then
  127. Step5Complete(Quest, QuestGiver, Player)
  128. elseif Step == 6 then
  129. Step6Complete(Quest, QuestGiver, Player)
  130. elseif Step == 7 then
  131. Step7Complete(Quest, QuestGiver, Player)
  132. elseif Step == 8 then
  133. Step8Complete(Quest, QuestGiver, Player)
  134. elseif Step == 9 then
  135. Step9Complete(Quest, QuestGiver, Player)
  136. elseif Step == 10 then
  137. Step10Complete(Quest, QuestGiver, Player)
  138. elseif Step == 11 then
  139. Step11Complete(Quest, QuestGiver, Player)
  140. elseif Step == 12 then
  141. Step12Complete(Quest, QuestGiver, Player)
  142. elseif Step == 13 then
  143. Step13Complete(Quest, QuestGiver, Player)
  144. elseif Step == 14 then
  145. QuestComplete(Quest, QuestGiver, Player)
  146. end
  147. end