9
3

SlumlordValthun.lua 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416
  1. --[[
  2. Script Name : SpawnScripts/Freeport2Room1/SlumlordValthun.lua
  3. Script Author : Dorbin
  4. Script Date : 2023.06.21 08:06:57
  5. Script Purpose :
  6. :
  7. --]]
  8. require "SpawnScripts/Generic/DialogModule"
  9. function spawn(NPC)
  10. SetPlayerProximityFunction(NPC, 10, "InRange", "LeaveRange")
  11. if GetSpawnLocationID(NPC)==133785258 then
  12. SetRequiredQuest(NPC, 5859, 1, 1) --STONESTAIR
  13. SetRequiredQuest(NPC, 5859, 2, 1)
  14. SetRequiredQuest(NPC, 5859, 3, 1)
  15. SetRequiredQuest(NPC, 5859, 4, 1)
  16. SetRequiredQuest(NPC, 5859, 5, 1)
  17. SetRequiredQuest(NPC, 5859, 6, 1)
  18. SetRequiredQuest(NPC, 5859, 7, 1)
  19. elseif GetSpawnLocationID(NPC)==133785259 then
  20. SetRequiredQuest(NPC, 5859, 11, 1)
  21. SetRequiredQuest(NPC, 5859, 12, 1)
  22. SetRequiredQuest(NPC, 5859, 13, 1)
  23. end
  24. if GetSpawnLocationID(NPC)==133785258 then
  25. SetRequiredQuest(NPC, 5860, 1, 1) --BIG BEND
  26. SetRequiredQuest(NPC, 5860, 2, 1)
  27. SetRequiredQuest(NPC, 5860, 3, 1)
  28. SetRequiredQuest(NPC, 5860, 4, 1)
  29. SetRequiredQuest(NPC, 5860, 5, 1)
  30. SetRequiredQuest(NPC, 5860, 6, 1)
  31. SetRequiredQuest(NPC, 5860, 7, 1)
  32. elseif GetSpawnLocationID(NPC)==133785259 then
  33. SetRequiredQuest(NPC, 5860, 11, 1)
  34. SetRequiredQuest(NPC, 5860, 12, 1)
  35. SetRequiredQuest(NPC, 5860, 13, 1)
  36. end
  37. if GetSpawnLocationID(NPC)==133785258 then
  38. SetRequiredQuest(NPC, 5861, 1, 1) --BEGGAR'S COURT
  39. SetRequiredQuest(NPC, 5861, 2, 1)
  40. SetRequiredQuest(NPC, 5861, 3, 1)
  41. SetRequiredQuest(NPC, 5861, 4, 1)
  42. SetRequiredQuest(NPC, 5861, 5, 1)
  43. SetRequiredQuest(NPC, 5861, 6, 1)
  44. SetRequiredQuest(NPC, 5861, 7, 1)
  45. elseif GetSpawnLocationID(NPC)==133785259 then
  46. SetRequiredQuest(NPC, 5861, 11, 1)
  47. SetRequiredQuest(NPC, 5861, 12, 1)
  48. SetRequiredQuest(NPC, 5861, 13, 1)
  49. end
  50. if GetSpawnLocationID(NPC)==133785258 then
  51. SetRequiredQuest(NPC, 5862, 1, 1) --LONGSHADOW
  52. SetRequiredQuest(NPC, 5862, 2, 1)
  53. SetRequiredQuest(NPC, 5862, 3, 1)
  54. SetRequiredQuest(NPC, 5862, 4, 1)
  55. SetRequiredQuest(NPC, 5862, 5, 1)
  56. SetRequiredQuest(NPC, 5862, 6, 1)
  57. SetRequiredQuest(NPC, 5862, 7, 1)
  58. elseif GetSpawnLocationID(NPC)==133785259 then
  59. SetRequiredQuest(NPC, 5862, 11, 1)
  60. SetRequiredQuest(NPC, 5862, 12, 1)
  61. SetRequiredQuest(NPC, 5862, 13, 1)
  62. end
  63. if GetSpawnLocationID(NPC)==133785258 then
  64. SetRequiredQuest(NPC, 5863, 1, 1) --SCALE YARD
  65. SetRequiredQuest(NPC, 5863, 2, 1)
  66. SetRequiredQuest(NPC, 5863, 3, 1)
  67. SetRequiredQuest(NPC, 5863, 4, 1)
  68. SetRequiredQuest(NPC, 5863, 5, 1)
  69. SetRequiredQuest(NPC, 5863, 6, 1)
  70. SetRequiredQuest(NPC, 5863, 7, 1)
  71. elseif GetSpawnLocationID(NPC)==133785259 then
  72. SetRequiredQuest(NPC, 5863, 11, 1)
  73. SetRequiredQuest(NPC, 5863, 12, 1)
  74. SetRequiredQuest(NPC, 5863, 13, 1)
  75. end
  76. if GetSpawnLocationID(NPC)==133785258 then
  77. SetRequiredQuest(NPC, 5864, 1, 1) --TEMPLE STREET
  78. SetRequiredQuest(NPC, 5864, 2, 1)
  79. SetRequiredQuest(NPC, 5864, 3, 1)
  80. SetRequiredQuest(NPC, 5864, 4, 1)
  81. SetRequiredQuest(NPC, 5864, 5, 1)
  82. SetRequiredQuest(NPC, 5864, 6, 1)
  83. SetRequiredQuest(NPC, 5864, 7, 1)
  84. elseif GetSpawnLocationID(NPC)==133785259 then
  85. SetRequiredQuest(NPC, 5864, 11, 1)
  86. SetRequiredQuest(NPC, 5864, 12, 1)
  87. SetRequiredQuest(NPC, 5864, 13, 1)
  88. end
  89. end
  90. function InRange(NPC, Spawn)
  91. if HasQuest(Spawn,5859) and GetQuestStep(Spawn,5859)==2 or HasQuest(Spawn,5860) and GetQuestStep(Spawn,5860)==2 or HasQuest(Spawn,5861) and GetQuestStep(Spawn,5861)==2 or HasQuest(Spawn,5862) and GetQuestStep(Spawn,5862)==2 or HasQuest(Spawn,5863) and GetQuestStep(Spawn,5863)==2 or HasQuest(Spawn,5864) and GetQuestStep(Spawn,5864)==2 then
  92. FaceTarget(NPC, Spawn)
  93. PlayFlavor(NPC, "voiceover/english/slumlord_valthun/fprt_ph_1r01/100_city_slumlord_valthun_housing_callout1_b64ee15.mp3", "It's about time you arrived. Let's get this over with.", "sniff", 3512384459, 1802814631, Spawn)
  94. elseif HasQuest(Spawn,5859) and GetQuestStep(Spawn,5859)==5 or HasQuest(Spawn,5860) and GetQuestStep(Spawn,5860)==5 or HasQuest(Spawn,5861) and GetQuestStep(Spawn,5861)==5 or HasQuest(Spawn,5862) and GetQuestStep(Spawn,5862)==5 or HasQuest(Spawn,5863) and GetQuestStep(Spawn,5863)==5 or HasQuest(Spawn,5864) and GetQuestStep(Spawn,5864)==5 then
  95. FaceTarget(NPC, Spawn)
  96. PlayFlavor(NPC, "voiceover/english/slumlord_valthun/fprt_ph_1r01/100_city_slumlord_valthun_housing_callout2_f99d8b9b.mp3", "Ah, you're back. I'd like to...err... apologize for my earlier behavior.", "nod", 3212324263, 527488253, Spawn)
  97. elseif HasQuest(Spawn,5859) and GetQuestStep(Spawn,5859)==11 or HasQuest(Spawn,5860) and GetQuestStep(Spawn,5860)==11 or HasQuest(Spawn,5861) and GetQuestStep(Spawn,5861)==11 or HasQuest(Spawn,5862) and GetQuestStep(Spawn,5862)==11 or HasQuest(Spawn,5863) and GetQuestStep(Spawn,5863)==11 or HasQuest(Spawn,5864) and GetQuestStep(Spawn,5864)==11 then
  98. FaceTarget(NPC, Spawn)
  99. PlayFlavor(NPC, "voiceover/english/slumlord_valthun/fprt_ph_1r01/100_city_slumlord_valthun_housing_callout3_b7ae1d4c.mp3", "Why are you back already?!", "doubletake", 1913759677, 811352449, Spawn)
  100. end
  101. end
  102. function hailed(NPC, Spawn)
  103. if HasQuest(Spawn,5859) and GetQuestStep(Spawn,5859)==2 or HasQuest(Spawn,5860) and GetQuestStep(Spawn,5860)==2 or HasQuest(Spawn,5861) and GetQuestStep(Spawn,5861)==2 or HasQuest(Spawn,5862) and GetQuestStep(Spawn,5862)==2 or HasQuest(Spawn,5863) and GetQuestStep(Spawn,5863)==2 or HasQuest(Spawn,5864) and GetQuestStep(Spawn,5864)==2 then
  104. Dialog1 (NPC,Spawn) --GET FURNITURE 1
  105. elseif HasQuest(Spawn,5859) and GetQuestStep(Spawn,5859)==3 or HasQuest(Spawn,5860) and GetQuestStep(Spawn,5860)==3 or HasQuest(Spawn,5861) and GetQuestStep(Spawn,5861)==3 or HasQuest(Spawn,5862) and GetQuestStep(Spawn,5862)==3 or HasQuest(Spawn,5863) and GetQuestStep(Spawn,5863)==3 or HasQuest(Spawn,5864) and GetQuestStep(Spawn,5864)==3 then
  106. if HasItem(Spawn,61915,1) then --CHECK IF HAS TABLE (FURNITURE1)
  107. continue1(NPC, Spawn) --STILL NEED TO PLACE FURNITURE 1
  108. else
  109. Dialog2(NPC,Spawn) --SPEAK WITH BANKER
  110. end
  111. elseif HasQuest(Spawn,5859) and GetQuestStep(Spawn,5859)==4 or HasQuest(Spawn,5860) and GetQuestStep(Spawn,5860)==4 or HasQuest(Spawn,5861) and GetQuestStep(Spawn,5861)==4 or HasQuest(Spawn,5862) and GetQuestStep(Spawn,5862)==4 or HasQuest(Spawn,5863) and GetQuestStep(Spawn,5863)==4 or HasQuest(Spawn,5864) and GetQuestStep(Spawn,5864)==4 then
  112. Dialog2(NPC, Spawn) --SPEAK WITH BANKER
  113. elseif HasQuest(Spawn,5859) and GetQuestStep(Spawn,5859)==5 or HasQuest(Spawn,5860) and GetQuestStep(Spawn,5860)==5 or HasQuest(Spawn,5861) and GetQuestStep(Spawn,5861)==5 or HasQuest(Spawn,5862) and GetQuestStep(Spawn,5862)==5 or HasQuest(Spawn,5863) and GetQuestStep(Spawn,5863)==5 or HasQuest(Spawn,5864) and GetQuestStep(Spawn,5864)==5 then
  114. Dialog3(NPC,Spawn) --GET FURNITURE 2
  115. elseif HasQuest(Spawn,5859) and GetQuestStep(Spawn,5859)==6 or HasQuest(Spawn,5860) and GetQuestStep(Spawn,5860)==6 or HasQuest(Spawn,5861) and GetQuestStep(Spawn,5861)==6 or HasQuest(Spawn,5862) and GetQuestStep(Spawn,5862)==6 or HasQuest(Spawn,5863) and GetQuestStep(Spawn,5863)==6 or HasQuest(Spawn,5864) and GetQuestStep(Spawn,5864)==6 then
  116. if HasItem(Spawn,61913,1) then --CHECK IF HAS MIRROR (FURNITURE2)
  117. Dialog3(NPC,Spawn) --STILL NEED TO PLACE FURNITURE 2
  118. else
  119. Dialog4(NPC,Spawn) --FIND LOCATIONS
  120. end
  121. elseif HasQuest(Spawn,5859) and GetQuestStep(Spawn,5859)==7 or HasQuest(Spawn,5860) and GetQuestStep(Spawn,5860)==7 or HasQuest(Spawn,5861) and GetQuestStep(Spawn,5861)==6 or HasQuest(Spawn,5862) and GetQuestStep(Spawn,5862)==7 or HasQuest(Spawn,5863) and GetQuestStep(Spawn,5863)==7 or HasQuest(Spawn,5864) and GetQuestStep(Spawn,5864)==7 then
  122. Dialog4b(NPC, Spawn) --IF ALREADY ON THE TASK TO FIND LOCATIONS. CARETAKER DISAPPEARS UNTIL ON THE FINAL STEPS.
  123. elseif HasQuest(Spawn,5859) and GetQuestStep(Spawn,5859)==11 or HasQuest(Spawn,5860) and GetQuestStep(Spawn,5860)==11 or HasQuest(Spawn,5861) and GetQuestStep(Spawn,5861)==11 or HasQuest(Spawn,5862) and GetQuestStep(Spawn,5862)==11 or HasQuest(Spawn,5863) and GetQuestStep(Spawn,5863)==11 or HasQuest(Spawn,5864) and GetQuestStep(Spawn,5864)==11 then
  124. Dialog5(NPC,Spawn) -- GET FURNITURE 3
  125. elseif HasQuest(Spawn,5859) and GetQuestStep(Spawn,5859)==12 or HasQuest(Spawn,5860) and GetQuestStep(Spawn,5860)==12 or HasQuest(Spawn,5861) and GetQuestStep(Spawn,5861)==12 or HasQuest(Spawn,5862) and GetQuestStep(Spawn,5862)==12 or HasQuest(Spawn,5863) and GetQuestStep(Spawn,5863)==12 or HasQuest(Spawn,5864) and GetQuestStep(Spawn,5864)==12 then
  126. if HasItem(Spawn,61909,1) then --CHECK IF HAS CHANDELIER (FURNITURE3)
  127. Dialog5a(NPC,Spawn) --STILL NEED TO PLACE FURNITURE 3
  128. else
  129. Dialog6(NPC,Spawn) --START CITIZENSHIP TRIAL
  130. end
  131. elseif HasQuest(Spawn,5859) and GetQuestStep(Spawn,5859)==13 or HasQuest(Spawn,5860) and GetQuestStep(Spawn,5860)==13 or HasQuest(Spawn,5861) and GetQuestStep(Spawn,5861)==13 or HasQuest(Spawn,5862) and GetQuestStep(Spawn,5862)==13 or HasQuest(Spawn,5863) and GetQuestStep(Spawn,5863)==13 or HasQuest(Spawn,5864) and GetQuestStep(Spawn,5864)==13 then
  132. Dialog6b(NPC, Spawn)
  133. end
  134. end
  135. function Dialog1(NPC, Spawn)
  136. FaceTarget(NPC, Spawn)
  137. Dialog.New(NPC, Spawn)
  138. PlayFlavor(NPC, "", "", "tapfoot", 0, 0, Spawn)
  139. Dialog.AddDialog("You wasted enough of my precious time. I've more important duties than talking to you. So listen closely: This is your new home. Get used to it. Consider yourself lucky to receive such a fine house from the Overlord. If I had it my way, you'd freeze in the alleys. ")
  140. Dialog.AddVoiceover("voiceover/english/slumlord_valthun/tutorial_island02/slumlord_valthun001.mp3", 2753005301, 1802095357)
  141. Dialog.AddOption("Do you have a problem with me?", "AllWeCanDo")
  142. Dialog.Start()
  143. end
  144. function AllWeCanDo(NPC, Spawn)
  145. FaceTarget(NPC, Spawn)
  146. Dialog.New(NPC, Spawn)
  147. PlayFlavor(NPC, "", "", "grumble", 0, 0, Spawn)
  148. SpawnSet(NPC,"mood_state","11852")
  149. Dialog.AddDialog("Do I have a problem with you? Let's see, you're a filthy refugee who doesn't have coin worth counting. I'm not making a copper off you, but the Overlord forces me to let you live here for free. So, do I have a problem with you? Yes. I do. Now, let's get on with this, shall we?")
  150. Dialog.AddVoiceover("voiceover/english/slumlord_valthun/tutorial_island02/slumlord_valthun002.mp3", 2611962175, 2812157786)
  151. Dialog.AddOption("[continue]", "continue1")
  152. Dialog.Start()
  153. end
  154. function continue1(NPC, Spawn)
  155. if HasQuest(Spawn,5859) and GetQuestStep(Spawn,5859)==2 then
  156. SetStepComplete(Spawn,5859,2)
  157. Quest = GetQuest(Spawn,5859)
  158. GiveQuestItem(Quest, Spawn, "A welcome gift from The Coalition of Tradesfolke. Decorate your inn room with it.", 61915)
  159. elseif HasQuest(Spawn,5860) and GetQuestStep(Spawn,5860)==2 then
  160. SetStepComplete(Spawn,5860,2)
  161. Quest = GetQuest(Spawn,5860)
  162. GiveQuestItem(Quest, Spawn, "A welcome gift from The Coalition of Tradesfolke. Decorate your inn room with it.", 61915)
  163. elseif HasQuest(Spawn,5861) and GetQuestStep(Spawn,5861)==2 then
  164. SetStepComplete(Spawn,5861,2)
  165. Quest = GetQuest(Spawn,5861)
  166. GiveQuestItem(Quest, Spawn, "A welcome gift from The Coalition of Tradesfolke. Decorate your inn room with it.", 61915)
  167. elseif HasQuest(Spawn,5862) and GetQuestStep(Spawn,5862)==2 then
  168. SetStepComplete(Spawn,5862,2)
  169. Quest = GetQuest(Spawn,5862)
  170. GiveQuestItem(Quest, Spawn, "A welcome gift from The Coalition of Tradesfolke. Decorate your inn room with it.", 61915)
  171. elseif HasQuest(Spawn,5863) and GetQuestStep(Spawn,5863)==2 then
  172. SetStepComplete(Spawn,5863,2)
  173. Quest = GetQuest(Spawn,5863)
  174. GiveQuestItem(Quest, Spawn, "A welcome gift from The Coalition of Tradesfolke. Decorate your inn room with it.", 61915)
  175. elseif HasQuest(Spawn,5864) and GetQuestStep(Spawn,5864)==2 then
  176. SetStepComplete(Spawn,5864,2)
  177. Quest = GetQuest(Spawn,5864)
  178. GiveQuestItem(Quest, Spawn, "A welcome gift from The Coalition of Tradesfolke. Decorate your inn room with it.", 61915)
  179. end
  180. FaceTarget(NPC, Spawn)
  181. Dialog.New(NPC, Spawn)
  182. PlayFlavor(NPC, "", "", "", 0, 0, Spawn)
  183. Dialog.AddDialog("The Coalition of Tradesfolke gave you a piece of furniture. The first time it's free. Now, take this and put it in the room. Let's get on with it.")
  184. SpawnSet(NPC,"mood_state","0")
  185. Dialog.AddVoiceover("voiceover/english/slumlord_valthun/tutorial_island02/slumlord_valthun003.mp3", 3293605893, 2029752984)
  186. Dialog.AddOption("Give me a moment while I put this down.")
  187. Dialog.Start()
  188. end
  189. -------DIALOG 2
  190. function Dialog2(NPC, Spawn)
  191. if HasQuest(Spawn,5859) and GetQuestStep(Spawn,5859)==3 then
  192. SetStepComplete(Spawn,5859,3)
  193. elseif HasQuest(Spawn,5860) and GetQuestStep(Spawn,5860)==3 then
  194. SetStepComplete(Spawn,5860,3)
  195. elseif HasQuest(Spawn,5861) and GetQuestStep(Spawn,5861)==3 then
  196. SetStepComplete(Spawn,5861,3)
  197. elseif HasQuest(Spawn,5862) and GetQuestStep(Spawn,5862)==3 then
  198. SetStepComplete(Spawn,5862,3)
  199. elseif HasQuest(Spawn,5863) and GetQuestStep(Spawn,5863)==3 then
  200. SetStepComplete(Spawn,5863,3)
  201. elseif HasQuest(Spawn,5864) and GetQuestStep(Spawn,5864)==3 then
  202. SetStepComplete(Spawn,5864,3)
  203. end
  204. FaceTarget(NPC, Spawn)
  205. Dialog.New(NPC, Spawn)
  206. PlayFlavor(NPC, "", "", "lookaway", 0, 0, Spawn)
  207. Dialog.AddDialog("Ugh ... you're putting that there? Even your decorating taste is pathetic, but do as you wish. The last thing I need to tell you about is your bank account. The Freeport Reserve is waiting for you to register. Now we're finished, and I can leave.")
  208. Dialog.AddVoiceover("voiceover/english/slumlord_valthun/tutorial_island02/slumlord_valthun004.mp3", 1742619924, 1180312438)
  209. Dialog.AddOption("Thank you for your time, caretaker.")
  210. Dialog.Start()
  211. end
  212. -------DIALOG 3
  213. function Dialog3(NPC, Spawn)
  214. if HasQuest(Spawn,5859) and GetQuestStep(Spawn,5859)==5 then
  215. SetStepComplete(Spawn,5859,5)
  216. Quest = GetQuest(Spawn,5859)
  217. GiveQuestItem(Quest, Spawn, "A 'gift' from Valthun as a token of 'friendship'?", 61913)
  218. elseif HasQuest(Spawn,5860) and GetQuestStep(Spawn,5860)==5 then
  219. SetStepComplete(Spawn,5860,5)
  220. Quest = GetQuest(Spawn,5860)
  221. GiveQuestItem(Quest, Spawn, "A 'gift' from Valthun as a token of 'friendship'?", 61913)
  222. elseif HasQuest(Spawn,5861) and GetQuestStep(Spawn,5861)==5 then
  223. SetStepComplete(Spawn,5861,5)
  224. Quest = GetQuest(Spawn,5861)
  225. GiveQuestItem(Quest, Spawn, "A 'gift' from Valthun as a token of 'friendship'?", 61913)
  226. elseif HasQuest(Spawn,5862) and GetQuestStep(Spawn,5862)==5 then
  227. SetStepComplete(Spawn,5862,5)
  228. Quest = GetQuest(Spawn,5862)
  229. GiveQuestItem(Quest, Spawn, "A 'gift' from Valthun as a token of 'friendship'?", 61913)
  230. elseif HasQuest(Spawn,5863) and GetQuestStep(Spawn,5863)==5 then
  231. SetStepComplete(Spawn,5863,5)
  232. Quest = GetQuest(Spawn,5863)
  233. GiveQuestItem(Quest, Spawn, "A 'gift' from Valthun as a token of 'friendship'?", 61913)
  234. elseif HasQuest(Spawn,5864) and GetQuestStep(Spawn,5864)==5 then
  235. SetStepComplete(Spawn,5864,5)
  236. Quest = GetQuest(Spawn,5864)
  237. GiveQuestItem(Quest, Spawn, "A 'gift' from Valthun as a token of 'friendship'?", 61913)
  238. end
  239. FaceTarget(NPC, Spawn)
  240. Dialog.New(NPC, Spawn)
  241. PlayFlavor(NPC, "", "", "agree", 0, 0, Spawn)
  242. Dialog.AddDialog("I am sorry if I was a bit ... rude. You must understand. I've had a very long day. As a token of my friendship, please take this mirror. Place it anywhere you like as long as you can see yourself in it. What use is a mirror if you can't see it, right?")
  243. Dialog.AddVoiceover("voiceover/english/slumlord_valthun/tutorial_island02/slumlord_valthun005.mp3", 1179966071, 3385583561)
  244. Dialog.AddOption("Hmmm... very well. I'll accept your apology.")
  245. Dialog.Start()
  246. end
  247. -------DIALOG 4
  248. function Dialog4(NPC, Spawn)
  249. FaceTarget(NPC, Spawn)
  250. Dialog.New(NPC, Spawn)
  251. PlayFlavor(NPC, "", "", "smirk", 0, 0, Spawn)
  252. Dialog.AddDialog("That's a perfect spot, friend ... perfect. Have you thought about how to make some coin now that you have a new, loving home?")
  253. Dialog.AddVoiceover("voiceover/english/slumlord_valthun/tutorial_island02/slumlord_valthun006.mp3", 2411252077, 4223491068)
  254. Dialog.AddOption("No, I haven't thought of that yet.","Dialog4a")
  255. Dialog.Start()
  256. end
  257. function Dialog4a(NPC, Spawn)
  258. FaceTarget(NPC, Spawn)
  259. Dialog.New(NPC, Spawn)
  260. Dialog.AddDialog("Well, if I may be so bold, let me offer a suggestion: Many people make a bounty of coin ridding our fine city of unwanted vermin. Some people venture down below into the sewers beneath our feet, but others seek their fortunes within the older, ruined parts of the city. You would do well exterminating these creatures, adventurer.")
  261. Dialog.AddVoiceover("voiceover/english/slumlord_valthun/tutorial_island02/slumlord_valthun007.mp3", 2795247576, 826391005)
  262. Dialog.AddOption("Where will I find these places?", "Dialog4b")
  263. Dialog.Start()
  264. end
  265. function Dialog4b(NPC, Spawn)
  266. if HasQuest(Spawn,5859) and GetQuestStep(Spawn,5859)==6 then
  267. SetStepComplete(Spawn,5859,6)
  268. elseif HasQuest(Spawn,5860) and GetQuestStep(Spawn,5860)==6 then
  269. SetStepComplete(Spawn,5860,6)
  270. elseif HasQuest(Spawn,5861) and GetQuestStep(Spawn,5861)==6 then
  271. SetStepComplete(Spawn,5861,6)
  272. elseif HasQuest(Spawn,5862) and GetQuestStep(Spawn,5862)==6 then
  273. SetStepComplete(Spawn,5862,6)
  274. elseif HasQuest(Spawn,5863) and GetQuestStep(Spawn,5863)==6 then
  275. SetStepComplete(Spawn,5863,6)
  276. elseif HasQuest(Spawn,5864) and GetQuestStep(Spawn,5864)==6 then
  277. SetStepComplete(Spawn,5864,6)
  278. end
  279. FaceTarget(NPC, Spawn)
  280. Dialog.New(NPC, Spawn)
  281. Dialog.AddDialog("I just told you, fool! Errr ... I meant to say, quite a number of places, actually. Search the city to find the vermin. Let me jot down a list for you. And don't worry about me. I'll wait here while you're gone.")
  282. PlayFlavor(NPC, "", "", "stare", 0, 0, Spawn)
  283. Dialog.AddVoiceover("voiceover/english/slumlord_valthun/tutorial_island02/slumlord_valthun008.mp3", 1471261046, 2380441133)
  284. Dialog.AddOption("If you touch any of my things while I'm gone, I'll be sure to return the favor.")
  285. Dialog.Start()
  286. end
  287. -------DIALOG 5
  288. function Dialog5(NPC, Spawn)
  289. FaceTarget(NPC, Spawn)
  290. Dialog.New(NPC, Spawn)
  291. PlayFlavor(NPC, "", "", "no", 0, 0, Spawn)
  292. Dialog.AddDialog("Err... I mean, did you find your way around alright?")
  293. Dialog.AddVoiceover("voiceover/english/slumlord_valthun/tutorial_island02/slumlord_valthun009.mp3", 216673398, 1959125107)
  294. Dialog.AddOption("Yeah. What were you just doing?","Dialog5a")
  295. Dialog.Start()
  296. end
  297. function Dialog5a(NPC, Spawn)
  298. if HasQuest(Spawn,5859) and GetQuestStep(Spawn,5859)==11 then
  299. SetStepComplete(Spawn,5859,11)
  300. Quest = GetQuest(Spawn,5859)
  301. GiveQuestItem(Quest, Spawn, "Valthun has given you an old chandelier. At least it will brighten up the place.", 61909)
  302. elseif HasQuest(Spawn,5860) and GetQuestStep(Spawn,5860)==11 then
  303. SetStepComplete(Spawn,5860,11)
  304. Quest = GetQuest(Spawn,5860)
  305. GiveQuestItem(Quest, Spawn, "Valthun has given you an old chandelier. At least it will brighten up the place.", 61909)
  306. elseif HasQuest(Spawn,5861) and GetQuestStep(Spawn,5861)==11 then
  307. SetStepComplete(Spawn,5861,11)
  308. Quest = GetQuest(Spawn,5861)
  309. GiveQuestItem(Quest, Spawn, "Valthun has given you an old chandelier. At least it will brighten up the place.", 61909)
  310. elseif HasQuest(Spawn,5862) and GetQuestStep(Spawn,5862)==11 then
  311. SetStepComplete(Spawn,5862,11)
  312. Quest = GetQuest(Spawn,5862)
  313. GiveQuestItem(Quest, Spawn, "Valthun has given you an old chandelier. At least it will brighten up the place.", 61909)
  314. elseif HasQuest(Spawn,5863) and GetQuestStep(Spawn,5863)==11 then
  315. SetStepComplete(Spawn,5863,11)
  316. Quest = GetQuest(Spawn,5863)
  317. GiveQuestItem(Quest, Spawn, "Valthun has given you an old chandelier. At least it will brighten up the place.", 61909)
  318. elseif HasQuest(Spawn,5864) and GetQuestStep(Spawn,5864)==11 then
  319. SetStepComplete(Spawn,5864,11)
  320. Quest = GetQuest(Spawn,5864)
  321. GiveQuestItem(Quest, Spawn, "Valthun has given you an old chandelier. At least it will brighten up the place.", 61909)
  322. end
  323. FaceTarget(NPC, Spawn)
  324. Dialog.New(NPC, Spawn)
  325. PlayFlavor(NPC, "", "", "shrug", 0, 0, Spawn)
  326. Dialog.AddDialog("Oh ... uh, nothing special. I was ... uh ... putting up this chandelier for you. I bought a new one, and I thought this old one would brighten up your home. Perhaps you can hang it somewhere special.")
  327. Dialog.AddVoiceover("voiceover/english/slumlord_valthun/tutorial_island02/slumlord_valthun010.mp3", 3386970796, 557685294)
  328. Dialog.AddOption("Hmmm... I guess so. I also have a question for you when I'm done.")
  329. Dialog.Start()
  330. end
  331. -------DIALOG 6
  332. function Dialog6(NPC, Spawn)
  333. FaceTarget(NPC, Spawn)
  334. Dialog.New(NPC, Spawn)
  335. PlayFlavor(NPC, "", "", "", 0, 0, Spawn)
  336. SpawnSet(NPC,"mood_state","0")
  337. Dialog.AddDialog("Well, I'm done here. Now, before I leave, you had a question ...")
  338. Dialog.AddVoiceover("voiceover/english/slumlord_valthun/tutorial_island02/slumlord_valthun011.mp3", 138919413, 3715601776)
  339. Dialog.AddOption("Why can't I go into the city gates?","Dialog6a")
  340. Dialog.Start()
  341. end
  342. function Dialog6a(NPC, Spawn)
  343. FaceTarget(NPC, Spawn)
  344. Dialog.New(NPC, Spawn)
  345. PlayFlavor(NPC, "", "", "scold", 0, 0, Spawn)
  346. SpawnSet(NPC,"mood_state","11852")
  347. Dialog.AddDialog("Why can't you go into the city gates?! I'll tell you why! Because you're a refugee, idiot! By our Lord's decree, only citizens may enter the city gates. Others who enter shall face the consequence of breaking the Overlord's laws. Friends or family may care about your well being, but in our city, you live and die by the laws of Freeport. Get used to it.")
  348. Dialog.AddVoiceover("voiceover/english/slumlord_valthun/tutorial_island02/slumlord_valthun012.mp3", 787996548, 2478588401)
  349. Dialog.AddOption("How do I become a citizen? Answer my question or suffer the consequences.","Dialog6b")
  350. Dialog.Start()
  351. end
  352. function Dialog6b(NPC, Spawn)
  353. if HasQuest(Spawn,5859) and GetQuestStep(Spawn,5859)==12 then
  354. SetStepComplete(Spawn,5859,12)
  355. elseif HasQuest(Spawn,5860) and GetQuestStep(Spawn,5860)==12 then
  356. SetStepComplete(Spawn,5860,12)
  357. elseif HasQuest(Spawn,5861) and GetQuestStep(Spawn,5861)==12 then
  358. SetStepComplete(Spawn,5861,12)
  359. elseif HasQuest(Spawn,5862) and GetQuestStep(Spawn,5862)==12 then
  360. SetStepComplete(Spawn,5862,12)
  361. elseif HasQuest(Spawn,5863) and GetQuestStep(Spawn,5863)==12 then
  362. SetStepComplete(Spawn,5863,12)
  363. elseif HasQuest(Spawn,5864) and GetQuestStep(Spawn,5864)==12 then
  364. SetStepComplete(Spawn,5864,12)
  365. end
  366. FaceTarget(NPC, Spawn)
  367. Dialog.New(NPC, Spawn)
  368. PlayFlavor(NPC, "", "", "grumble", 0, 0, Spawn)
  369. SpawnSet(NPC,"mood_state","0")
  370. Dialog.AddDialog("Fine, fine! It's your funeral, fool. Now, give me your stupid journal. I'll write down the name of the person who can tell you how to become a citizen. Now, I've answered your questions, so I'll take my leave of you. We shall not see each other again.")
  371. Dialog.AddVoiceover("voiceover/english/slumlord_valthun/tutorial_island02/slumlord_valthun013.mp3", 2573415341, 2897801437)
  372. Dialog.AddOption("I'd like to keep it that way.")
  373. Dialog.Start()
  374. end
  375. function respawn(NPC)
  376. spawn(NPC)
  377. end