CaretakerFairlee.lua 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411
  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. if GetSpawnLocationID(NPC)==133779441 then
  12. SetRequiredQuest(NPC, 5760, 1, 1) --BAUBBLESHIRE
  13. SetRequiredQuest(NPC, 5760, 2, 1)
  14. SetRequiredQuest(NPC, 5760, 3, 1)
  15. SetRequiredQuest(NPC, 5760, 4, 1)
  16. SetRequiredQuest(NPC, 5760, 5, 1)
  17. SetRequiredQuest(NPC, 5760, 6, 1)
  18. SetRequiredQuest(NPC, 5760, 7, 1)
  19. elseif GetSpawnLocationID(NPC)==133786867 then
  20. SetRequiredQuest(NPC, 5760, 11, 1)
  21. SetRequiredQuest(NPC, 5760, 12, 1)
  22. SetRequiredQuest(NPC, 5760, 13, 1)
  23. end
  24. if GetSpawnLocationID(NPC)==133779441 then
  25. SetRequiredQuest(NPC, 5761, 1, 1) --WILLOW WOOD
  26. SetRequiredQuest(NPC, 5761, 2, 1)
  27. SetRequiredQuest(NPC, 5761, 3, 1)
  28. SetRequiredQuest(NPC, 5761, 4, 1)
  29. SetRequiredQuest(NPC, 5761, 5, 1)
  30. SetRequiredQuest(NPC, 5761, 6, 1)
  31. SetRequiredQuest(NPC, 5761, 7, 1)
  32. elseif GetSpawnLocationID(NPC)==133786867 then
  33. SetRequiredQuest(NPC, 5761, 11, 1)
  34. SetRequiredQuest(NPC, 5761, 12, 1)
  35. SetRequiredQuest(NPC, 5761, 13, 1)
  36. end
  37. if GetSpawnLocationID(NPC)==133779441 then
  38. SetRequiredQuest(NPC, 5762, 1, 1) --STARCREST
  39. SetRequiredQuest(NPC, 5762, 2, 1)
  40. SetRequiredQuest(NPC, 5762, 3, 1)
  41. SetRequiredQuest(NPC, 5762, 4, 1)
  42. SetRequiredQuest(NPC, 5762, 5, 1)
  43. SetRequiredQuest(NPC, 5762, 6, 1)
  44. SetRequiredQuest(NPC, 5762, 7, 1)
  45. elseif GetSpawnLocationID(NPC)==133786867 then
  46. SetRequiredQuest(NPC, 5762, 11, 1)
  47. SetRequiredQuest(NPC, 5762, 12, 1)
  48. SetRequiredQuest(NPC, 5762, 13, 1)
  49. end
  50. if GetSpawnLocationID(NPC)==133779441 then
  51. SetRequiredQuest(NPC, 5763, 1, 1) --NETTLEVILLE
  52. SetRequiredQuest(NPC, 5763, 2, 1)
  53. SetRequiredQuest(NPC, 5763, 3, 1)
  54. SetRequiredQuest(NPC, 5763, 4, 1)
  55. SetRequiredQuest(NPC, 5763, 5, 1)
  56. SetRequiredQuest(NPC, 5763, 6, 1)
  57. SetRequiredQuest(NPC, 5763, 7, 1)
  58. elseif GetSpawnLocationID(NPC)==133786867 then
  59. SetRequiredQuest(NPC, 5763, 11, 1)
  60. SetRequiredQuest(NPC, 5763, 12, 1)
  61. SetRequiredQuest(NPC, 5763, 13, 1)
  62. end
  63. if GetSpawnLocationID(NPC)==133779441 then
  64. SetRequiredQuest(NPC, 5764, 1, 1) --GRAYSTONE
  65. SetRequiredQuest(NPC, 5764, 2, 1)
  66. SetRequiredQuest(NPC, 5764, 3, 1)
  67. SetRequiredQuest(NPC, 5764, 4, 1)
  68. SetRequiredQuest(NPC, 5764, 5, 1)
  69. SetRequiredQuest(NPC, 5764, 6, 1)
  70. SetRequiredQuest(NPC, 5764, 7, 1)
  71. elseif GetSpawnLocationID(NPC)==133786867 then
  72. SetRequiredQuest(NPC, 5764, 11, 1)
  73. SetRequiredQuest(NPC, 5764, 12, 1)
  74. SetRequiredQuest(NPC, 5764, 13, 1)
  75. end
  76. if GetSpawnLocationID(NPC)==133779441 then
  77. SetRequiredQuest(NPC, 5765, 1, 1) --CASTLEVIEW
  78. SetRequiredQuest(NPC, 5765, 2, 1)
  79. SetRequiredQuest(NPC, 5765, 3, 1)
  80. SetRequiredQuest(NPC, 5765, 4, 1)
  81. SetRequiredQuest(NPC, 5765, 5, 1)
  82. SetRequiredQuest(NPC, 5765, 6, 1)
  83. SetRequiredQuest(NPC, 5765, 7, 1)
  84. elseif GetSpawnLocationID(NPC)==133786867 then
  85. SetRequiredQuest(NPC, 5765, 11, 1)
  86. SetRequiredQuest(NPC, 5765, 12, 1)
  87. SetRequiredQuest(NPC, 5765, 13, 1)
  88. end
  89. end
  90. function InRange(NPC, Spawn)
  91. 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
  92. FaceTarget(NPC, Spawn)
  93. 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)
  94. 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
  95. FaceTarget(NPC, Spawn)
  96. 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)
  97. 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
  98. FaceTarget(NPC, Spawn)
  99. 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)
  100. end
  101. end
  102. function hailed(NPC, Spawn)
  103. 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
  104. Dialog1 (NPC,Spawn) --GET FURNITURE 1
  105. 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
  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,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
  112. Dialog2(NPC, Spawn) --SPEAK WITH BANKER
  113. 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
  114. Dialog3(NPC,Spawn) --GET FURNITURE 2
  115. 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
  116. if HasItem(Spawn,61914,1) then --CHECK IF HAS PAINTING (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,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
  122. Dialog4b(NPC, Spawn) --IF ALREADY ON THE TASK TO FIND LOCATIONS. CARETAKER DISAPPEARS UNTIL ON THE FINAL STEPS.
  123. 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
  124. Dialog5(NPC,Spawn) -- GET FURNITURE 3
  125. 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
  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,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
  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, "", "", "", 0, 0, Spawn)
  139. 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.")
  140. Dialog.AddVoiceover("voiceover/english/caretaker_fairlee/tutorial_island02/caretaker_fairlee001.mp3", 3717538538, 588872219)
  141. Dialog.AddOption("It's more than I could have ever expected. Thank you!", "AllWeCanDo")
  142. Dialog.Start()
  143. end
  144. function AllWeCanDo(NPC, Spawn)
  145. FaceTarget(NPC, Spawn)
  146. Dialog.New(NPC, Spawn)
  147. PlayFlavor(NPC, "", "", "nod", 0, 0, Spawn)
  148. 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.")
  149. Dialog.AddVoiceover("voiceover/english/caretaker_fairlee/tutorial_island02/caretaker_fairlee002.mp3", 4044688594, 3625376816)
  150. Dialog.AddOption("[continue]", "continue1")
  151. Dialog.Start()
  152. end
  153. function continue1(NPC, Spawn)
  154. if HasQuest(Spawn,5760) and GetQuestStep(Spawn,5760)==2 then
  155. SetStepComplete(Spawn,5760,2)
  156. Quest = GetQuest(Spawn,5760)
  157. GiveQuestItem(Quest, Spawn, "A welcome gift from The Ironforge Exchange. Decorate your inn room with it.", 61915)
  158. elseif HasQuest(Spawn,5761) and GetQuestStep(Spawn,5761)==2 then
  159. SetStepComplete(Spawn,5761,2)
  160. Quest = GetQuest(Spawn,5761)
  161. GiveQuestItem(Quest, Spawn, "A welcome gift from The Ironforge Exchange. Decorate your inn room with it.", 61915)
  162. elseif HasQuest(Spawn,5762) and GetQuestStep(Spawn,5762)==2 then
  163. SetStepComplete(Spawn,5762,2)
  164. Quest = GetQuest(Spawn,5762)
  165. GiveQuestItem(Quest, Spawn, "A welcome gift from The Ironforge Exchange. Decorate your inn room with it.", 61915)
  166. elseif HasQuest(Spawn,5763) and GetQuestStep(Spawn,5763)==2 then
  167. SetStepComplete(Spawn,5763,2)
  168. Quest = GetQuest(Spawn,5763)
  169. GiveQuestItem(Quest, Spawn, "A welcome gift from The Ironforge Exchange. Decorate your inn room with it.", 61915)
  170. elseif HasQuest(Spawn,5764) and GetQuestStep(Spawn,5764)==2 then
  171. SetStepComplete(Spawn,5764,2)
  172. Quest = GetQuest(Spawn,5764)
  173. GiveQuestItem(Quest, Spawn, "A welcome gift from The Ironforge Exchange. Decorate your inn room with it.", 61915)
  174. elseif HasQuest(Spawn,5765) and GetQuestStep(Spawn,5765)==2 then
  175. SetStepComplete(Spawn,5765,2)
  176. Quest = GetQuest(Spawn,5765)
  177. GiveQuestItem(Quest, Spawn, "A welcome gift from The Ironforge Exchange. Decorate your inn room with it.", 61915)
  178. end
  179. FaceTarget(NPC, Spawn)
  180. Dialog.New(NPC, Spawn)
  181. PlayFlavor(NPC, "", "", "", 0, 0, Spawn)
  182. 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.")
  183. Dialog.AddVoiceover("voiceover/english/caretaker_fairlee/tutorial_island02/caretaker_fairlee003.mp3", 3943554629, 4275156589)
  184. Dialog.AddOption("Thank you. Let me place it now.")
  185. Dialog.Start()
  186. end
  187. -------DIALOG 2
  188. function Dialog2(NPC, Spawn)
  189. if HasQuest(Spawn,5760) and GetQuestStep(Spawn,5760)==3 then
  190. SetStepComplete(Spawn,5760,3)
  191. elseif HasQuest(Spawn,5761) and GetQuestStep(Spawn,5761)==3 then
  192. SetStepComplete(Spawn,5761,3)
  193. elseif HasQuest(Spawn,5762) and GetQuestStep(Spawn,5762)==3 then
  194. SetStepComplete(Spawn,5762,3)
  195. elseif HasQuest(Spawn,5763) and GetQuestStep(Spawn,5763)==3 then
  196. SetStepComplete(Spawn,5763,3)
  197. elseif HasQuest(Spawn,5764) and GetQuestStep(Spawn,5764)==3 then
  198. SetStepComplete(Spawn,5764,3)
  199. elseif HasQuest(Spawn,5765) and GetQuestStep(Spawn,5765)==3 then
  200. SetStepComplete(Spawn,5765,3)
  201. end
  202. FaceTarget(NPC, Spawn)
  203. Dialog.New(NPC, Spawn)
  204. PlayFlavor(NPC, "", "", "nod", 0, 0, Spawn)
  205. 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.")
  206. Dialog.AddVoiceover("voiceover/english/caretaker_fairlee/tutorial_island02/caretaker_fairlee004.mp3", 2742172241, 941626191)
  207. Dialog.AddOption("Thank you for your time, caretaker.")
  208. Dialog.Start()
  209. end
  210. -------DIALOG 3
  211. function Dialog3(NPC, Spawn)
  212. if HasQuest(Spawn,5760) and GetQuestStep(Spawn,5760)==5 then
  213. SetStepComplete(Spawn,5760,5)
  214. Quest = GetQuest(Spawn,5760)
  215. GiveQuestItem(Quest, Spawn, "A gift from Ms. Farilee to brighten up your home.", 61914)
  216. elseif HasQuest(Spawn,5761) and GetQuestStep(Spawn,5761)==5 then
  217. SetStepComplete(Spawn,5761,5)
  218. Quest = GetQuest(Spawn,5761)
  219. GiveQuestItem(Quest, Spawn, "A gift from Ms. Farilee to brighten up your home.", 61914)
  220. elseif HasQuest(Spawn,5762) and GetQuestStep(Spawn,5762)==5 then
  221. SetStepComplete(Spawn,5762,5)
  222. Quest = GetQuest(Spawn,5762)
  223. GiveQuestItem(Quest, Spawn, "A gift from Ms. Farilee to brighten up your home.", 61914)
  224. elseif HasQuest(Spawn,5763) and GetQuestStep(Spawn,5763)==5 then
  225. SetStepComplete(Spawn,5763,5)
  226. Quest = GetQuest(Spawn,5763)
  227. GiveQuestItem(Quest, Spawn, "A gift from Ms. Farilee to brighten up your home.", 61914)
  228. elseif HasQuest(Spawn,5764) and GetQuestStep(Spawn,5764)==5 then
  229. SetStepComplete(Spawn,5764,5)
  230. Quest = GetQuest(Spawn,5764)
  231. GiveQuestItem(Quest, Spawn, "A gift from Ms. Farilee to brighten up your home.", 61914)
  232. elseif HasQuest(Spawn,5765) and GetQuestStep(Spawn,5765)==5 then
  233. SetStepComplete(Spawn,5765,5)
  234. Quest = GetQuest(Spawn,5765)
  235. GiveQuestItem(Quest, Spawn, "A gift from Ms. Farilee to brighten up your home.", 61914)
  236. end
  237. FaceTarget(NPC, Spawn)
  238. Dialog.New(NPC, Spawn)
  239. PlayFlavor(NPC, "", "", "agree", 0, 0, Spawn)
  240. 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!")
  241. Dialog.AddVoiceover("voiceover/english/caretaker_fairlee/tutorial_island02/caretaker_fairlee005.mp3", 1427721358, 4217975268)
  242. Dialog.AddOption("It looks nice! I'll put it up right now!")
  243. Dialog.Start()
  244. end
  245. -------DIALOG 4
  246. function Dialog4(NPC, Spawn)
  247. FaceTarget(NPC, Spawn)
  248. Dialog.New(NPC, Spawn)
  249. PlayFlavor(NPC, "", "", "thanks", 0, 0, Spawn)
  250. 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?")
  251. Dialog.AddVoiceover("voiceover/english/caretaker_fairlee/tutorial_island02/caretaker_fairlee006.mp3", 4251128224, 1285165397)
  252. Dialog.AddOption("I'm not sure, do you have any suggestions?","Dialog4a")
  253. Dialog.Start()
  254. end
  255. function Dialog4a(NPC, Spawn)
  256. FaceTarget(NPC, Spawn)
  257. Dialog.New(NPC, Spawn)
  258. 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.")
  259. Dialog.AddVoiceover("voiceover/english/caretaker_fairlee/tutorial_island02/caretaker_fairlee007.mp3", 3930690417, 79244237)
  260. Dialog.AddOption("Where would I find these places?", "Dialog4b")
  261. Dialog.Start()
  262. end
  263. function Dialog4b(NPC, Spawn)
  264. if HasQuest(Spawn,5760) and GetQuestStep(Spawn,5760)==6 then
  265. SetStepComplete(Spawn,5760,6)
  266. elseif HasQuest(Spawn,5761) and GetQuestStep(Spawn,5761)==6 then
  267. SetStepComplete(Spawn,5761,6)
  268. elseif HasQuest(Spawn,5762) and GetQuestStep(Spawn,5762)==6 then
  269. SetStepComplete(Spawn,5762,6)
  270. elseif HasQuest(Spawn,5763) and GetQuestStep(Spawn,5763)==6 then
  271. SetStepComplete(Spawn,5763,6)
  272. elseif HasQuest(Spawn,5764) and GetQuestStep(Spawn,5764)==6 then
  273. SetStepComplete(Spawn,5764,6)
  274. elseif HasQuest(Spawn,5765) and GetQuestStep(Spawn,5765)==6 then
  275. SetStepComplete(Spawn,5765,6)
  276. end
  277. FaceTarget(NPC, Spawn)
  278. Dialog.New(NPC, Spawn)
  279. 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.")
  280. Dialog.AddVoiceover("voiceover/english/caretaker_fairlee/tutorial_island02/caretaker_fairlee008.mp3", 1486099295, 409795954)
  281. Dialog.AddOption("That sounds like a good idea. I'll be back soon!")
  282. Dialog.Start()
  283. end
  284. -------DIALOG 5
  285. function Dialog5(NPC, Spawn)
  286. FaceTarget(NPC, Spawn)
  287. Dialog.New(NPC, Spawn)
  288. PlayFlavor(NPC, "", "", "no", 0, 0, Spawn)
  289. 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.")
  290. Dialog.AddVoiceover("voiceover/english/caretaker_fairlee/tutorial_island02/caretaker_fairlee009.mp3", 2517544532, 3349303577)
  291. Dialog.AddOption("That was really nice of them. What is it?","Dialog5a")
  292. Dialog.Start()
  293. end
  294. function Dialog5a(NPC, Spawn)
  295. if HasQuest(Spawn,5760) and GetQuestStep(Spawn,5760)==11 then
  296. SetStepComplete(Spawn,5760,11)
  297. Quest = GetQuest(Spawn,5760)
  298. GiveQuestItem(Quest, Spawn, "Your neighbors have sent you this gift. Place it on the ceiling to brighten up your home.", 61909)
  299. elseif HasQuest(Spawn,5761) and GetQuestStep(Spawn,5761)==11 then
  300. SetStepComplete(Spawn,5761,11)
  301. Quest = GetQuest(Spawn,5761)
  302. GiveQuestItem(Quest, Spawn, "Your neighbors have sent you this gift. Place it on the ceiling to brighten up your home.", 61909)
  303. elseif HasQuest(Spawn,5762) and GetQuestStep(Spawn,5762)==11 then
  304. SetStepComplete(Spawn,5762,11)
  305. Quest = GetQuest(Spawn,5762)
  306. GiveQuestItem(Quest, Spawn, "Your neighbors have sent you this gift. Place it on the ceiling to brighten up your home.", 61909)
  307. elseif HasQuest(Spawn,5763) and GetQuestStep(Spawn,5763)==11 then
  308. SetStepComplete(Spawn,5763,11)
  309. Quest = GetQuest(Spawn,5763)
  310. GiveQuestItem(Quest, Spawn, "Your neighbors have sent you this gift. Place it on the ceiling to brighten up your home.", 61909)
  311. elseif HasQuest(Spawn,5764) and GetQuestStep(Spawn,5764)==11 then
  312. SetStepComplete(Spawn,5764,11)
  313. Quest = GetQuest(Spawn,5764)
  314. GiveQuestItem(Quest, Spawn, "Your neighbors have sent you this gift. Place it on the ceiling to brighten up your home.", 61909)
  315. elseif HasQuest(Spawn,5765) and GetQuestStep(Spawn,5765)==11 then
  316. SetStepComplete(Spawn,5765,11)
  317. Quest = GetQuest(Spawn,5765)
  318. GiveQuestItem(Quest, Spawn, "Your neighbors have sent you this gift. Place it on the ceiling to brighten up your home.", 61909)
  319. end
  320. FaceTarget(NPC, Spawn)
  321. Dialog.New(NPC, Spawn)
  322. PlayFlavor(NPC, "", "", "thanks", 0, 0, Spawn)
  323. 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.")
  324. Dialog.AddVoiceover("voiceover/english/caretaker_fairlee/tutorial_island02/caretaker_fairlee010.mp3", 1059075961, 4003557356)
  325. Dialog.AddOption("I think I'll put it up right now.")
  326. Dialog.Start()
  327. end
  328. -------DIALOG 6
  329. function Dialog6(NPC, Spawn)
  330. FaceTarget(NPC, Spawn)
  331. Dialog.New(NPC, Spawn)
  332. PlayFlavor(NPC, "", "", "agree", 0, 0, Spawn)
  333. 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?")
  334. Dialog.AddVoiceover("voiceover/english/caretaker_fairlee/tutorial_island02/caretaker_fairlee011.mp3", 912970991, 3975181220)
  335. Dialog.AddOption("Yes. One of the guards told me I couldn't go into the city. Do you know why?","Dialog6a")
  336. Dialog.Start()
  337. end
  338. function Dialog6a(NPC, Spawn)
  339. FaceTarget(NPC, Spawn)
  340. Dialog.New(NPC, Spawn)
  341. PlayFlavor(NPC, "", "", "no", 0, 0, Spawn)
  342. 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.")
  343. Dialog.AddVoiceover("voiceover/english/caretaker_fairlee/tutorial_island02/caretaker_fairlee012.mp3", 1081515188, 3157929176)
  344. Dialog.AddOption("How would I go about applying for citizenship?","Dialog6b")
  345. Dialog.Start()
  346. end
  347. function Dialog6b(NPC, Spawn)
  348. if HasQuest(Spawn,5760) and GetQuestStep(Spawn,5760)==12 then
  349. SetStepComplete(Spawn,5760,12)
  350. elseif HasQuest(Spawn,5761) and GetQuestStep(Spawn,5761)==12 then
  351. SetStepComplete(Spawn,5761,12)
  352. elseif HasQuest(Spawn,5762) and GetQuestStep(Spawn,5762)==12 then
  353. SetStepComplete(Spawn,5762,12)
  354. elseif HasQuest(Spawn,5763) and GetQuestStep(Spawn,5763)==12 then
  355. SetStepComplete(Spawn,5763,12)
  356. elseif HasQuest(Spawn,5764) and GetQuestStep(Spawn,5764)==12 then
  357. SetStepComplete(Spawn,5764,12)
  358. elseif HasQuest(Spawn,5765) and GetQuestStep(Spawn,5765)==12 then
  359. SetStepComplete(Spawn,5765,12)
  360. end
  361. FaceTarget(NPC, Spawn)
  362. Dialog.New(NPC, Spawn)
  363. PlayFlavor(NPC, "", "", "agree", 0, 0, Spawn)
  364. 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.")
  365. Dialog.AddVoiceover("voiceover/english/caretaker_fairlee/tutorial_island02/caretaker_fairlee013.mp3", 3396172107, 728027367)
  366. Dialog.AddOption("And the same to you, caretaker!")
  367. Dialog.Start()
  368. end
  369. function respawn(NPC)
  370. spawn(NPC)
  371. end