9
3

CaretakerFairlee.lua 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392
  1. --[[
  2. Script Name : SpawnScripts/Qeynos2Room1/CaretakerFairlee.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.08.28 08:08:35
  5. Script Purpose :
  6. :
  7. --]]
  8. require "SpawnScripts/Generic/DialogModule"
  9. function spawn(NPC)
  10. SetPlayerProximityFunction(NPC, 7, "InRange", "LeaveRange")
  11. SetRequiredQuest(NPC, 5760, 1, 1) --BAUBBLESHIRE
  12. SetRequiredQuest(NPC, 5760, 2, 1)
  13. SetRequiredQuest(NPC, 5760, 3, 1)
  14. SetRequiredQuest(NPC, 5760, 4, 1)
  15. SetRequiredQuest(NPC, 5760, 5, 1)
  16. SetRequiredQuest(NPC, 5760, 6, 1)
  17. SetRequiredQuest(NPC, 5760, 7, 1)
  18. SetRequiredQuest(NPC, 5760, 11, 1)
  19. SetRequiredQuest(NPC, 5760, 12, 1)
  20. SetRequiredQuest(NPC, 5760, 13, 1)
  21. SetRequiredQuest(NPC, 5761, 1, 1) --WILLOW WOOD
  22. SetRequiredQuest(NPC, 5761, 2, 1)
  23. SetRequiredQuest(NPC, 5761, 3, 1)
  24. SetRequiredQuest(NPC, 5761, 4, 1)
  25. SetRequiredQuest(NPC, 5761, 5, 1)
  26. SetRequiredQuest(NPC, 5761, 6, 1)
  27. SetRequiredQuest(NPC, 5761, 7, 1)
  28. SetRequiredQuest(NPC, 5761, 11, 1)
  29. SetRequiredQuest(NPC, 5761, 12, 1)
  30. SetRequiredQuest(NPC, 5761, 13, 1)
  31. SetRequiredQuest(NPC, 5762, 1, 1) --STARCREST
  32. SetRequiredQuest(NPC, 5762, 2, 1)
  33. SetRequiredQuest(NPC, 5762, 3, 1)
  34. SetRequiredQuest(NPC, 5762, 4, 1)
  35. SetRequiredQuest(NPC, 5762, 5, 1)
  36. SetRequiredQuest(NPC, 5762, 6, 1)
  37. SetRequiredQuest(NPC, 5762, 7, 1)
  38. SetRequiredQuest(NPC, 5762, 11, 1)
  39. SetRequiredQuest(NPC, 5762, 12, 1)
  40. SetRequiredQuest(NPC, 5762, 13, 1)
  41. SetRequiredQuest(NPC, 5763, 1, 1) --NETTLEVILLE
  42. SetRequiredQuest(NPC, 5763, 2, 1)
  43. SetRequiredQuest(NPC, 5763, 3, 1)
  44. SetRequiredQuest(NPC, 5763, 4, 1)
  45. SetRequiredQuest(NPC, 5763, 5, 1)
  46. SetRequiredQuest(NPC, 5763, 6, 1)
  47. SetRequiredQuest(NPC, 5763, 7, 1)
  48. SetRequiredQuest(NPC, 5763, 11, 1)
  49. SetRequiredQuest(NPC, 5763, 12, 1)
  50. SetRequiredQuest(NPC, 5763, 13, 1)
  51. SetRequiredQuest(NPC, 5764, 1, 1) --GRAYSTONE
  52. SetRequiredQuest(NPC, 5764, 2, 1)
  53. SetRequiredQuest(NPC, 5764, 3, 1)
  54. SetRequiredQuest(NPC, 5764, 4, 1)
  55. SetRequiredQuest(NPC, 5764, 5, 1)
  56. SetRequiredQuest(NPC, 5764, 6, 1)
  57. SetRequiredQuest(NPC, 5764, 7, 1)
  58. SetRequiredQuest(NPC, 5764, 11, 1)
  59. SetRequiredQuest(NPC, 5764, 12, 1)
  60. SetRequiredQuest(NPC, 5764, 13, 1)
  61. SetRequiredQuest(NPC, 5765, 1, 1) --CASTLEVIEW
  62. SetRequiredQuest(NPC, 5765, 2, 1)
  63. SetRequiredQuest(NPC, 5765, 3, 1)
  64. SetRequiredQuest(NPC, 5765, 4, 1)
  65. SetRequiredQuest(NPC, 5765, 5, 1)
  66. SetRequiredQuest(NPC, 5765, 6, 1)
  67. SetRequiredQuest(NPC, 5765, 7, 1)
  68. SetRequiredQuest(NPC, 5765, 11, 1)
  69. SetRequiredQuest(NPC, 5765, 12, 1)
  70. SetRequiredQuest(NPC, 5765, 13, 1)
  71. end
  72. function InRange(NPC, Spawn)
  73. if HasQuest(Spawn,5760) and GetQuestStep(Spawn,5760)==2 or HasQuest(Spawn,5761) and GetQuestStep(Spawn,5761)==2 or HasQuest(Spawn,5762) and GetQuestStep(Spawn,5762)==2 or HasQuest(Spawn,5763) and GetQuestStep(Spawn,5763)==2 or HasQuest(Spawn,5764) and GetQuestStep(Spawn,5764)==2 or HasQuest(Spawn,5765) and GetQuestStep(Spawn,5765)==2 then
  74. FaceTarget(NPC, Spawn)
  75. PlayFlavor(NPC, "voiceover/english/caretaker_fairlee/qey_ph_1r01/100_city_caretaker_fairlee_housing_callout1_bd9d430e.mp3", "You must be the new tenant. Allow me to introduce myself.", "hello", 90341496, 1787511893, Spawn)
  76. elseif HasQuest(Spawn,5760) and GetQuestStep(Spawn,5760)==5 or HasQuest(Spawn,5761) and GetQuestStep(Spawn,5761)==5 or HasQuest(Spawn,5762) and GetQuestStep(Spawn,5762)==5 or HasQuest(Spawn,5763) and GetQuestStep(Spawn,5763)==5 or HasQuest(Spawn,5764) and GetQuestStep(Spawn,5764)==5 or HasQuest(Spawn,5765) and GetQuestStep(Spawn,5765)==5 then
  77. FaceTarget(NPC, Spawn)
  78. PlayFlavor(NPC, "voiceover/english/caretaker_fairlee/qey_ph_1r01/100_city_caretaker_fairlee_housing_callout2_245e1e60.mp3", "Perfect timing! I was hoping you'd be back about now!", "nod", 1399879843, 3585568022, Spawn)
  79. elseif HasQuest(Spawn,5760) and GetQuestStep(Spawn,5760)==11 or HasQuest(Spawn,5761) and GetQuestStep(Spawn,5761)==11 or HasQuest(Spawn,5762) and GetQuestStep(Spawn,5762)==11 or HasQuest(Spawn,5763) and GetQuestStep(Spawn,5763)==11 or HasQuest(Spawn,5764) and GetQuestStep(Spawn,5764)==11 or HasQuest(Spawn,5765) and GetQuestStep(Spawn,5765)==11 then
  80. FaceTarget(NPC, Spawn)
  81. PlayFlavor(NPC, "voiceover/english/caretaker_fairlee/qey_ph_1r01/100_city_caretaker_fairlee_housing_callout3_ce5b5490.mp3", "There... that should just about do it.", "nod", 2665995219, 2254532534, Spawn)
  82. end
  83. end
  84. function hailed(NPC, Spawn)
  85. if HasQuest(Spawn,5760) and GetQuestStep(Spawn,5760)==2 or HasQuest(Spawn,5761) and GetQuestStep(Spawn,5761)==2 or HasQuest(Spawn,5762) and GetQuestStep(Spawn,5762)==2 or HasQuest(Spawn,5763) and GetQuestStep(Spawn,5763)==2 or HasQuest(Spawn,5764) and GetQuestStep(Spawn,5764)==2 or HasQuest(Spawn,5765) and GetQuestStep(Spawn,5765)==2 then
  86. Dialog1 (NPC,Spawn) --GET FURNITURE 1
  87. elseif HasQuest(Spawn,5760) and GetQuestStep(Spawn,5760)==3 or HasQuest(Spawn,5761) and GetQuestStep(Spawn,5761)==3 or HasQuest(Spawn,5762) and GetQuestStep(Spawn,5762)==3 or HasQuest(Spawn,5763) and GetQuestStep(Spawn,5763)==3 or HasQuest(Spawn,5764) and GetQuestStep(Spawn,5764)==3 or HasQuest(Spawn,5765) and GetQuestStep(Spawn,5765)==3 then
  88. if HasItem(Spawn,61915,1) then --CHECK IF HAS TABLE (FURNITURE1)
  89. continue1(NPC, Spawn) --STILL NEED TO PLACE FURNITURE 1
  90. else
  91. Dialog2(NPC,Spawn) --SPEAK WITH BANKER
  92. end
  93. elseif HasQuest(Spawn,5760) and GetQuestStep(Spawn,5760)==4 or HasQuest(Spawn,5761) and GetQuestStep(Spawn,5761)==4 or HasQuest(Spawn,5762) and GetQuestStep(Spawn,5762)==3 or HasQuest(Spawn,5763) and GetQuestStep(Spawn,5763)==4 or HasQuest(Spawn,5764) and GetQuestStep(Spawn,5764)==4 or HasQuest(Spawn,5765) and GetQuestStep(Spawn,5765)==4 then
  94. Dialog2(NPC, Spawn) --SPEAK WITH BANKER
  95. elseif HasQuest(Spawn,5760) and GetQuestStep(Spawn,5760)==5 or HasQuest(Spawn,5761) and GetQuestStep(Spawn,5761)==5 or HasQuest(Spawn,5762) and GetQuestStep(Spawn,5762)==5 or HasQuest(Spawn,5763) and GetQuestStep(Spawn,5763)==5 or HasQuest(Spawn,5764) and GetQuestStep(Spawn,5764)==5 or HasQuest(Spawn,5765) and GetQuestStep(Spawn,5765)==5 then
  96. Dialog3(NPC,Spawn) --GET FURNITURE 2
  97. elseif HasQuest(Spawn,5760) and GetQuestStep(Spawn,5760)==6 or HasQuest(Spawn,5761) and GetQuestStep(Spawn,5761)==6 or HasQuest(Spawn,5762) and GetQuestStep(Spawn,5762)==6 or HasQuest(Spawn,5763) and GetQuestStep(Spawn,5763)==6 or HasQuest(Spawn,5764) and GetQuestStep(Spawn,5764)==6 or HasQuest(Spawn,5765) and GetQuestStep(Spawn,5765)==6 then
  98. if HasItem(Spawn,61914,1) then --CHECK IF HAS PAINTING (FURNITURE2)
  99. Dialog3(NPC,Spawn) --STILL NEED TO PLACE FURNITURE 2
  100. else
  101. Dialog4(NPC,Spawn) --FIND LOCATIONS
  102. end
  103. elseif HasQuest(Spawn,5760) and GetQuestStep(Spawn,5760)==7 or HasQuest(Spawn,5761) and GetQuestStep(Spawn,5761)==7 or HasQuest(Spawn,5762) and GetQuestStep(Spawn,5762)==6 or HasQuest(Spawn,5763) and GetQuestStep(Spawn,5763)==7 or HasQuest(Spawn,5764) and GetQuestStep(Spawn,5764)==7 or HasQuest(Spawn,5765) and GetQuestStep(Spawn,5765)==7 then
  104. Dialog4b(NPC, Spawn) --IF ALREADY ON THE TASK TO FIND LOCATIONS. CARETAKER DISAPPEARS UNTIL ON THE FINAL STEPS.
  105. elseif HasQuest(Spawn,5760) and GetQuestStep(Spawn,5760)==11 or HasQuest(Spawn,5761) and GetQuestStep(Spawn,5761)==11 or HasQuest(Spawn,5762) and GetQuestStep(Spawn,5762)==11 or HasQuest(Spawn,5763) and GetQuestStep(Spawn,5763)==11 or HasQuest(Spawn,5764) and GetQuestStep(Spawn,5764)==11 or HasQuest(Spawn,5765) and GetQuestStep(Spawn,5765)==11 then
  106. Dialog5(NPC,Spawn) -- GET FURNITURE 3
  107. elseif HasQuest(Spawn,5760) and GetQuestStep(Spawn,5760)==12 or HasQuest(Spawn,5761) and GetQuestStep(Spawn,5761)==12 or HasQuest(Spawn,5762) and GetQuestStep(Spawn,5762)==12 or HasQuest(Spawn,5763) and GetQuestStep(Spawn,5763)==12 or HasQuest(Spawn,5764) and GetQuestStep(Spawn,5764)==12 or HasQuest(Spawn,5765) and GetQuestStep(Spawn,5765)==12 then
  108. if HasItem(Spawn,61909,1) then --CHECK IF HAS CHANDELIER (FURNITURE3)
  109. Dialog5a(NPC,Spawn) --STILL NEED TO PLACE FURNITURE 3
  110. else
  111. Dialog6(NPC,Spawn) --START CITIZENSHIP TRIAL
  112. end
  113. elseif HasQuest(Spawn,5760) and GetQuestStep(Spawn,5760)==13 or HasQuest(Spawn,5761) and GetQuestStep(Spawn,5761)==13 or HasQuest(Spawn,5762) and GetQuestStep(Spawn,5762)==13 or HasQuest(Spawn,5763) and GetQuestStep(Spawn,5763)==13 or HasQuest(Spawn,5764) and GetQuestStep(Spawn,5764)==13 or HasQuest(Spawn,5765) and GetQuestStep(Spawn,5765)==13 then
  114. Dialog6b(NPC, Spawn)
  115. end
  116. end
  117. function Dialog1(NPC, Spawn)
  118. FaceTarget(NPC, Spawn)
  119. Dialog.New(NPC, Spawn)
  120. PlayFlavor(NPC, "", "", "", 0, 0, Spawn)
  121. Dialog.AddDialog("I'm the caretaker of these apartments, and I'm to see to it that you're settled in to your new place. I know it may not look like much right now, but with all the refugees coming in on a daily basis, this is about all we can do.")
  122. Dialog.AddVoiceover("voiceover/english/caretaker_fairlee/tutorial_island02/caretaker_fairlee001.mp3", 3717538538, 588872219)
  123. Dialog.AddOption("It's more than I could have ever expected. Thank you!", "AllWeCanDo")
  124. Dialog.Start()
  125. end
  126. function AllWeCanDo(NPC, Spawn)
  127. FaceTarget(NPC, Spawn)
  128. Dialog.New(NPC, Spawn)
  129. PlayFlavor(NPC, "", "", "nod", 0, 0, Spawn)
  130. Dialog.AddDialog("Think nothing of it. Let me go over a few rules about the place: Pets must be house trained. If guests stay longer than a month, please let us know. Finally, please ask any visiting bards to sing quietly at night -- some people go to sleep early around here.")
  131. Dialog.AddVoiceover("voiceover/english/caretaker_fairlee/tutorial_island02/caretaker_fairlee002.mp3", 4044688594, 3625376816)
  132. Dialog.AddOption("[continue]", "continue1")
  133. Dialog.Start()
  134. end
  135. function continue1(NPC, Spawn)
  136. if HasQuest(Spawn,5760) and GetQuestStep(Spawn,5760)==2 then
  137. SetStepComplete(Spawn,5760,2)
  138. Quest = GetQuest(Spawn,5760)
  139. GiveQuestItem(Quest, Spawn, "A welcome gift from The Ironforge Exchange. Decorate your inn room with it.", 61915)
  140. elseif HasQuest(Spawn,5761) and GetQuestStep(Spawn,5761)==2 then
  141. SetStepComplete(Spawn,5761,2)
  142. Quest = GetQuest(Spawn,5761)
  143. GiveQuestItem(Quest, Spawn, "A welcome gift from The Ironforge Exchange. Decorate your inn room with it.", 61915)
  144. elseif HasQuest(Spawn,5762) and GetQuestStep(Spawn,5762)==2 then
  145. SetStepComplete(Spawn,5762,2)
  146. Quest = GetQuest(Spawn,5762)
  147. GiveQuestItem(Quest, Spawn, "A welcome gift from The Ironforge Exchange. Decorate your inn room with it.", 61915)
  148. elseif HasQuest(Spawn,5763) and GetQuestStep(Spawn,5763)==2 then
  149. SetStepComplete(Spawn,5763,2)
  150. Quest = GetQuest(Spawn,5763)
  151. GiveQuestItem(Quest, Spawn, "A welcome gift from The Ironforge Exchange. Decorate your inn room with it.", 61915)
  152. elseif HasQuest(Spawn,5764) and GetQuestStep(Spawn,5764)==2 then
  153. SetStepComplete(Spawn,5764,2)
  154. Quest = GetQuest(Spawn,5764)
  155. GiveQuestItem(Quest, Spawn, "A welcome gift from The Ironforge Exchange. Decorate your inn room with it.", 61915)
  156. elseif HasQuest(Spawn,5765) and GetQuestStep(Spawn,5765)==2 then
  157. SetStepComplete(Spawn,5765,2)
  158. Quest = GetQuest(Spawn,5765)
  159. GiveQuestItem(Quest, Spawn, "A welcome gift from The Ironforge Exchange. Decorate your inn room with it.", 61915)
  160. end
  161. FaceTarget(NPC, Spawn)
  162. Dialog.New(NPC, Spawn)
  163. PlayFlavor(NPC, "", "", "", 0, 0, Spawn)
  164. Dialog.AddDialog("Oh, I almost forgot! The Ironforge Exchange has a welcome gift for you. It's a piece of furniture to liven up your home. Go ahead and put it wherever you want.")
  165. Dialog.AddVoiceover("voiceover/english/caretaker_fairlee/tutorial_island02/caretaker_fairlee003.mp3", 3943554629, 4275156589)
  166. Dialog.AddOption("Thank you. Let me place it now.")
  167. Dialog.Start()
  168. end
  169. -------DIALOG 2
  170. function Dialog2(NPC, Spawn)
  171. if HasQuest(Spawn,5760) and GetQuestStep(Spawn,5760)==3 then
  172. SetStepComplete(Spawn,5760,3)
  173. elseif HasQuest(Spawn,5761) and GetQuestStep(Spawn,5761)==3 then
  174. SetStepComplete(Spawn,5761,3)
  175. elseif HasQuest(Spawn,5762) and GetQuestStep(Spawn,5762)==3 then
  176. SetStepComplete(Spawn,5762,3)
  177. elseif HasQuest(Spawn,5763) and GetQuestStep(Spawn,5763)==3 then
  178. SetStepComplete(Spawn,5763,3)
  179. elseif HasQuest(Spawn,5764) and GetQuestStep(Spawn,5764)==3 then
  180. SetStepComplete(Spawn,5764,3)
  181. elseif HasQuest(Spawn,5765) and GetQuestStep(Spawn,5765)==3 then
  182. SetStepComplete(Spawn,5765,3)
  183. end
  184. FaceTarget(NPC, Spawn)
  185. Dialog.New(NPC, Spawn)
  186. PlayFlavor(NPC, "", "", "nod", 0, 0, Spawn)
  187. Dialog.AddDialog("Ahh ... much better, that brightens up the place. I know the Exchange artisans look forward to your future business. Speaking of business, an account is open for you at the bank. Go let the banker know you're here. Now, I must help other refugees settle in.")
  188. Dialog.AddVoiceover("voiceover/english/caretaker_fairlee/tutorial_island02/caretaker_fairlee004.mp3", 2742172241, 941626191)
  189. Dialog.AddOption("Thank you for your time, caretaker.")
  190. Dialog.Start()
  191. end
  192. -------DIALOG 3
  193. function Dialog3(NPC, Spawn)
  194. if HasQuest(Spawn,5760) and GetQuestStep(Spawn,5760)==5 then
  195. SetStepComplete(Spawn,5760,5)
  196. Quest = GetQuest(Spawn,5760)
  197. GiveQuestItem(Quest, Spawn, "A gift from Ms. Farilee to brighten up your home.", 61914)
  198. elseif HasQuest(Spawn,5761) and GetQuestStep(Spawn,5761)==5 then
  199. SetStepComplete(Spawn,5761,5)
  200. Quest = GetQuest(Spawn,5761)
  201. GiveQuestItem(Quest, Spawn, "A gift from Ms. Farilee to brighten up your home.", 61914)
  202. elseif HasQuest(Spawn,5762) and GetQuestStep(Spawn,5762)==5 then
  203. SetStepComplete(Spawn,5762,5)
  204. Quest = GetQuest(Spawn,5762)
  205. GiveQuestItem(Quest, Spawn, "A gift from Ms. Farilee to brighten up your home.", 61914)
  206. elseif HasQuest(Spawn,5763) and GetQuestStep(Spawn,5763)==5 then
  207. SetStepComplete(Spawn,5763,5)
  208. Quest = GetQuest(Spawn,5763)
  209. GiveQuestItem(Quest, Spawn, "A gift from Ms. Farilee to brighten up your home.", 61914)
  210. elseif HasQuest(Spawn,5764) and GetQuestStep(Spawn,5764)==5 then
  211. SetStepComplete(Spawn,5764,5)
  212. Quest = GetQuest(Spawn,5764)
  213. GiveQuestItem(Quest, Spawn, "A gift from Ms. Farilee to brighten up your home.", 61914)
  214. elseif HasQuest(Spawn,5765) and GetQuestStep(Spawn,5765)==5 then
  215. SetStepComplete(Spawn,5765,5)
  216. Quest = GetQuest(Spawn,5765)
  217. GiveQuestItem(Quest, Spawn, "A gift from Ms. Farilee to brighten up your home.", 61914)
  218. end
  219. FaceTarget(NPC, Spawn)
  220. Dialog.New(NPC, Spawn)
  221. PlayFlavor(NPC, "", "", "agree", 0, 0, Spawn)
  222. Dialog.AddDialog("Your place looked sparse and barren, so I brought you a painting from my home. It's a family heirloom, but being new to the city, I thought you'd appreciate it. Consider it a \"Welcome to Qeynos\" gift. Please put it up. I want to see how it looks in your new home!")
  223. Dialog.AddVoiceover("voiceover/english/caretaker_fairlee/tutorial_island02/caretaker_fairlee005.mp3", 1427721358, 4217975268)
  224. Dialog.AddOption("It looks nice! I'll put it up right now!")
  225. Dialog.Start()
  226. end
  227. -------DIALOG 4
  228. function Dialog4(NPC, Spawn)
  229. FaceTarget(NPC, Spawn)
  230. Dialog.New(NPC, Spawn)
  231. PlayFlavor(NPC, "", "", "thanks", 0, 0, Spawn)
  232. Dialog.AddDialog("Wow! That looks wonderful in your room! That painting is full of history ... yes, indeed, full of history. Now, what will you be doing for work in Qeynos, friend?")
  233. Dialog.AddVoiceover("voiceover/english/caretaker_fairlee/tutorial_island02/caretaker_fairlee006.mp3", 4251128224, 1285165397)
  234. Dialog.AddOption("I'm not sure, do you have any suggestions?","Dialog4a")
  235. Dialog.Start()
  236. end
  237. function Dialog4a(NPC, Spawn)
  238. FaceTarget(NPC, Spawn)
  239. Dialog.New(NPC, Spawn)
  240. Dialog.AddDialog("Vermin lurk in the city. I know some refugees earn coin ridding the catacombs of these nasty creatures, while others patrol the outskirts of the city for the beasts. Hunting the vermin would help Qeynos and add coin to your pocket.")
  241. Dialog.AddVoiceover("voiceover/english/caretaker_fairlee/tutorial_island02/caretaker_fairlee007.mp3", 3930690417, 79244237)
  242. Dialog.AddOption("Where would I find these places?", "Dialog4b")
  243. Dialog.Start()
  244. end
  245. function Dialog4b(NPC, Spawn)
  246. if HasQuest(Spawn,5760) and GetQuestStep(Spawn,5760)==6 then
  247. SetStepComplete(Spawn,5760,6)
  248. elseif HasQuest(Spawn,5761) and GetQuestStep(Spawn,5761)==6 then
  249. SetStepComplete(Spawn,5761,6)
  250. elseif HasQuest(Spawn,5762) and GetQuestStep(Spawn,5762)==6 then
  251. SetStepComplete(Spawn,5762,6)
  252. elseif HasQuest(Spawn,5763) and GetQuestStep(Spawn,5763)==6 then
  253. SetStepComplete(Spawn,5763,6)
  254. elseif HasQuest(Spawn,5764) and GetQuestStep(Spawn,5764)==6 then
  255. SetStepComplete(Spawn,5764,6)
  256. elseif HasQuest(Spawn,5765) and GetQuestStep(Spawn,5765)==6 then
  257. SetStepComplete(Spawn,5765,6)
  258. end
  259. FaceTarget(NPC, Spawn)
  260. Dialog.New(NPC, Spawn)
  261. Dialog.AddDialog("Unfortunately, vermin are all over the city, but you should see for yourself. If you don't mind, I'll borrow your journal and write down directions. Follow my instructions and familiarize yourself with the area. In the mean time, I'll patch up a crack I found in your ceiling.")
  262. Dialog.AddVoiceover("voiceover/english/caretaker_fairlee/tutorial_island02/caretaker_fairlee008.mp3", 1486099295, 409795954)
  263. Dialog.AddOption("That sounds like a good idea. I'll be back soon!")
  264. Dialog.Start()
  265. end
  266. -------DIALOG 5
  267. function Dialog5(NPC, Spawn)
  268. FaceTarget(NPC, Spawn)
  269. Dialog.New(NPC, Spawn)
  270. PlayFlavor(NPC, "", "", "no", 0, 0, Spawn)
  271. Dialog.AddDialog("That crack won't bother you anymore. I must say, nothing is worse than a leaky roof! By the way, your neighbors brought you a housewarming present.")
  272. Dialog.AddVoiceover("voiceover/english/caretaker_fairlee/tutorial_island02/caretaker_fairlee009.mp3", 2517544532, 3349303577)
  273. Dialog.AddOption("That was really nice of them. What is it?","Dialog5a")
  274. Dialog.Start()
  275. end
  276. function Dialog5a(NPC, Spawn)
  277. if HasQuest(Spawn,5760) and GetQuestStep(Spawn,5760)==11 then
  278. SetStepComplete(Spawn,5760,11)
  279. Quest = GetQuest(Spawn,5760)
  280. GiveQuestItem(Quest, Spawn, "Your neighbors have sent you this gift. Place it on the ceiling to brighten up your home.", 61909)
  281. elseif HasQuest(Spawn,5761) and GetQuestStep(Spawn,5761)==11 then
  282. SetStepComplete(Spawn,5761,11)
  283. Quest = GetQuest(Spawn,5761)
  284. GiveQuestItem(Quest, Spawn, "Your neighbors have sent you this gift. Place it on the ceiling to brighten up your home.", 61909)
  285. elseif HasQuest(Spawn,5762) and GetQuestStep(Spawn,5762)==11 then
  286. SetStepComplete(Spawn,5762,11)
  287. Quest = GetQuest(Spawn,5762)
  288. GiveQuestItem(Quest, Spawn, "Your neighbors have sent you this gift. Place it on the ceiling to brighten up your home.", 61909)
  289. elseif HasQuest(Spawn,5763) and GetQuestStep(Spawn,5763)==11 then
  290. SetStepComplete(Spawn,5763,11)
  291. Quest = GetQuest(Spawn,5763)
  292. GiveQuestItem(Quest, Spawn, "Your neighbors have sent you this gift. Place it on the ceiling to brighten up your home.", 61909)
  293. elseif HasQuest(Spawn,5764) and GetQuestStep(Spawn,5764)==11 then
  294. SetStepComplete(Spawn,5764,11)
  295. Quest = GetQuest(Spawn,5764)
  296. GiveQuestItem(Quest, Spawn, "Your neighbors have sent you this gift. Place it on the ceiling to brighten up your home.", 61909)
  297. elseif HasQuest(Spawn,5765) and GetQuestStep(Spawn,5765)==11 then
  298. SetStepComplete(Spawn,5765,11)
  299. Quest = GetQuest(Spawn,5765)
  300. GiveQuestItem(Quest, Spawn, "Your neighbors have sent you this gift. Place it on the ceiling to brighten up your home.", 61909)
  301. end
  302. FaceTarget(NPC, Spawn)
  303. Dialog.New(NPC, Spawn)
  304. PlayFlavor(NPC, "", "", "thanks", 0, 0, Spawn)
  305. Dialog.AddDialog("It's a chandelier to lighten up the place and a fine one at that! I would put it up for you, but you have better decorating taste than I do. Here it is.")
  306. Dialog.AddVoiceover("voiceover/english/caretaker_fairlee/tutorial_island02/caretaker_fairlee010.mp3", 1059075961, 4003557356)
  307. Dialog.AddOption("I think I'll put it up right now.")
  308. Dialog.Start()
  309. end
  310. -------DIALOG 6
  311. function Dialog6(NPC, Spawn)
  312. FaceTarget(NPC, Spawn)
  313. Dialog.New(NPC, Spawn)
  314. PlayFlavor(NPC, "", "", "agree", 0, 0, Spawn)
  315. Dialog.AddDialog("That chandelier looks splendid. Well, friend, that's all I can do for you. Let me know if you need something fixed. Now, do you have any questions?")
  316. Dialog.AddVoiceover("voiceover/english/caretaker_fairlee/tutorial_island02/caretaker_fairlee011.mp3", 912970991, 3975181220)
  317. Dialog.AddOption("Yes. One of the guards told me I couldn't go into the city. Do you know why?","Dialog6a")
  318. Dialog.Start()
  319. end
  320. function Dialog6a(NPC, Spawn)
  321. FaceTarget(NPC, Spawn)
  322. Dialog.New(NPC, Spawn)
  323. PlayFlavor(NPC, "", "", "no", 0, 0, Spawn)
  324. Dialog.AddDialog("Only citizens can enter the city proper, friend. It's nothing personal mind you, just a way to keep chaos from breaking out. The Queen set up these homes in the villages for newly arrived refugees, but she tries to keep the traffic down in the main part of the city. If you're interested, you can apply for citizenship.")
  325. Dialog.AddVoiceover("voiceover/english/caretaker_fairlee/tutorial_island02/caretaker_fairlee012.mp3", 1081515188, 3157929176)
  326. Dialog.AddOption("How would I go about applying for citizenship?","Dialog6b")
  327. Dialog.Start()
  328. end
  329. function Dialog6b(NPC, Spawn)
  330. if HasQuest(Spawn,5760) and GetQuestStep(Spawn,5760)==12 then
  331. SetStepComplete(Spawn,5760,12)
  332. elseif HasQuest(Spawn,5761) and GetQuestStep(Spawn,5761)==12 then
  333. SetStepComplete(Spawn,5761,12)
  334. elseif HasQuest(Spawn,5762) and GetQuestStep(Spawn,5762)==12 then
  335. SetStepComplete(Spawn,5762,12)
  336. elseif HasQuest(Spawn,5763) and GetQuestStep(Spawn,5763)==12 then
  337. SetStepComplete(Spawn,5763,12)
  338. elseif HasQuest(Spawn,5764) and GetQuestStep(Spawn,5764)==12 then
  339. SetStepComplete(Spawn,5764,12)
  340. elseif HasQuest(Spawn,5765) and GetQuestStep(Spawn,5765)==12 then
  341. SetStepComplete(Spawn,5765,12)
  342. end
  343. FaceTarget(NPC, Spawn)
  344. Dialog.New(NPC, Spawn)
  345. PlayFlavor(NPC, "", "", "agree", 0, 0, Spawn)
  346. Dialog.AddDialog("Well, first, you must prove that you will contribute to Qeynos. Let me see your journal. There ... I wrote down the name of the person who can tell you about obtaining citizenship. I'm off now. It was a pleasure meeting you, friend.")
  347. Dialog.AddVoiceover("voiceover/english/caretaker_fairlee/tutorial_island02/caretaker_fairlee013.mp3", 3396172107, 728027367)
  348. Dialog.AddOption("And the same to you, caretaker!")
  349. Dialog.Start()
  350. end
  351. function respawn(NPC)
  352. spawn(NPC)
  353. end