9
3

DurioDexus.lua 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253
  1. --[[
  2. Script Name : SpawnScripts/BeggarsCourt/DurioDexus.lua
  3. Script Purpose : Durio Dexus
  4. Script Author : torsten
  5. Script Date : 2022.07.18
  6. Script Notes :
  7. --]]
  8. require "SpawnScripts/Generic/DialogModule"
  9. local BigTroubleBeggarsCourt = 5669
  10. local TrickingtheTraitor = 5670
  11. local MeettheInquisitor = 5671
  12. function spawn(NPC)
  13. ProvidesQuest(NPC, TrickingtheTraitor)
  14. ProvidesQuest(NPC, MeettheInquisitor)
  15. end
  16. function respawn(NPC)
  17. spawn(NPC)
  18. end
  19. function hailed(NPC, Spawn)
  20. if HasCompletedQuest(Spawn, BigTroubleBeggarsCourt) then
  21. if not HasQuest(Spawn, TrickingtheTraitor) and not HasCompletedQuest(Spawn, TrickingtheTraitor) then
  22. Dialog4(NPC, Spawn)
  23. end
  24. end
  25. if HasCompletedQuest(Spawn, TrickingtheTraitor) then
  26. if not HasQuest(Spawn, GnomoreGnomesteaks) and not HasCompletedQuest(Spawn, GnomoreGnomesteaks) then
  27. Dialog15(NPC, Spawn)
  28. end
  29. end
  30. if GetQuestStep(Spawn, BigTroubleBeggarsCourt) == 1 then
  31. SetStepComplete(Spawn, BigTroubleBeggarsCourt, 1)
  32. Dialog20(NPC, Spawn)
  33. end
  34. if GetQuestStep(Spawn, TrickingtheTraitor) == 2 then
  35. SetStepComplete(Spawn, TrickingtheTraitor, 2)
  36. Dialog15(NPC, Spawn)
  37. end
  38. RandomGreeting(NPC, Spawn)
  39. end
  40. function RandomGreeting(NPC, Spawn)
  41. local choice = MakeRandomInt(1,2)
  42. if choice == 1 then
  43. PlayFlavor(NPC, "", "I do not deal with your kind.", "", 0, 0, Spawn, 0)
  44. elseif choice == 2 then
  45. PlayVoice(NPC, "voiceover/english/voice_emotes/greetings/greetings_3_1004.mp3", 0, 0, Spawn)
  46. end
  47. end
  48. function Dialog20(NPC, Spawn)
  49. FaceTarget(NPC, Spawn)
  50. Dialog.New(NPC, Spawn)
  51. Dialog.AddDialog("Greetings. Who might you be? I do not run into many people over in this area. You must have some purpose for being here.")
  52. Dialog.AddOption("I am Gaikichi, here on behalf of Alucius. I was sent to sell you this package.", "Dialog12")
  53. Dialog.AddOption("I am just a bit lost. I am leaving now.")
  54. Dialog.Start()
  55. end
  56. function Dialog12(NPC, Spawn)
  57. FaceTarget(NPC, Spawn)
  58. Dialog.New(NPC, Spawn)
  59. Dialog.AddDialog("That is odd. It's not like him to trust anyone with his rare goods.")
  60. Dialog.AddOption("Regardless, I have the package you were interested in. Do you still want to purchase it or not?", "Dialog2")
  61. Dialog.Start()
  62. end
  63. function Dialog2(NPC, Spawn)
  64. FaceTarget(NPC, Spawn)
  65. Dialog.New(NPC, Spawn)
  66. Dialog.AddDialog("Very well, I have the platinum I told Alucius I would give him for it. I would like to inspect the goods first if you do not mind.")
  67. Dialog.AddOption("Considering the price, I suppose it's okay to let you take a look first.", "Dialog9")
  68. Dialog.AddOption("I think I will be going now.")
  69. Dialog.Start()
  70. end
  71. function Dialog9(NPC, Spawn)
  72. FaceTarget(NPC, Spawn)
  73. Dialog.New(NPC, Spawn)
  74. Dialog.AddDialog("Tell me, Gaikichi, do you know what is in this package?")
  75. Dialog.AddOption("No, I was only asked to sell it. Why do you ask?", "Dialog17")
  76. Dialog.Start()
  77. end
  78. function Dialog17(NPC, Spawn)
  79. FaceTarget(NPC, Spawn)
  80. Dialog.New(NPC, Spawn)
  81. Dialog.AddDialog("These are some very dangerous papers to have in your possession. No wonder Alucius did not come himself. These documents claim the Overlord is not as valiant as he seems.")
  82. Dialog.AddOption("What? Alucius had me collect those so he could turn them in, not sell them..", "Dialog1")
  83. Dialog.Start()
  84. end
  85. function Dialog1(NPC, Spawn)
  86. FaceTarget(NPC, Spawn)
  87. Dialog.New(NPC, Spawn)
  88. Dialog.AddDialog("Looks like he fooled you. He is more treacherous then he seems, and not a man to be crossed. Even so, I can not buy these papers. My life would be forfeit if I was caught with them. Of course, if you take them back to Alucius, you may end up like the ratonga that used to work for him.")
  89. Dialog.AddOption("What do you mean by that? Alucius said that the ratonga was worthless.", "Dialog11")
  90. Dialog.AddOption("I think I had better go.")
  91. Dialog.Start()
  92. end
  93. function Dialog11(NPC, Spawn)
  94. FaceTarget(NPC, Spawn)
  95. Dialog.New(NPC, Spawn)
  96. Dialog.AddDialog("There were rumors that the ratonga went missing while trying to sell some high-priced goods for Alucius. From what I hear, the merchandise included some obscure documents, probably something like these. The Militia found out and took him away, but they could never find the papers they were looking for. Apparently rats are very good at hiding things.")
  97. Dialog.AddOption("What should I do now? I don't want to end up dead or in jail.", "Dialog8")
  98. Dialog.AddOption("I better find a safe place to hide!")
  99. Dialog.Start()
  100. end
  101. function Dialog8(NPC, Spawn)
  102. FaceTarget(NPC, Spawn)
  103. Dialog.New(NPC, Spawn)
  104. Dialog.AddDialog("Sounds like Alucius put you in quite a fix. Why don't you just turn him over to the Freeport Militia?")
  105. Dialog.AddOption("I can't do that. I have done some... questionable work for Alucius already.", "Dialog18")
  106. Dialog.Start()
  107. end
  108. function Dialog18(NPC, Spawn)
  109. FaceTarget(NPC, Spawn)
  110. Dialog.New(NPC, Spawn)
  111. Dialog.AddDialog("These are some fairly important papers. I know of an opened-minded captain of the Freeport Militia in the area. He does not like to be pestered over menial affairs, but you may be able to hand them to him without getting yourself into trouble. ")
  112. Dialog.AddOption("What should I do about Alucius?", "Dialog19")
  113. Dialog.AddOption("Maybe I should just leave.")
  114. Dialog.Start()
  115. end
  116. function Dialog19(NPC, Spawn)
  117. FaceTarget(NPC, Spawn)
  118. Dialog.New(NPC, Spawn)
  119. Dialog.AddDialog("While you take the papers to Kaseo Volcatius, I will think about what to do concerning Alucius. It's important to get these papers into the proper hands before someone finds out about them. Kaseo is the Militia captain I spoke of earlier.")
  120. Dialog.AddOption("What can you tell me of the Freeport Militia?", "Dialog13")
  121. Dialog.Start()
  122. end
  123. function Dialog13(NPC, Spawn)
  124. FaceTarget(NPC, Spawn)
  125. Dialog.New(NPC, Spawn)
  126. Dialog.AddDialog("They are the Overlord's army and the defenders of Freeport. They are not to be trifled with, for they hold considerable power and authority. I have sometimes seen Kaseo near the gates to North Freeport here in Beggar's Court. Go speak to him, but be careful of what you say. It is probably not wise to speak of the work you have done for Alucius, or even mention Alucius at all.")
  127. Dialog.AddOption("Thank you, I will go speak with Kaseo now.", "Dialog7")
  128. Dialog.Start()
  129. end
  130. function Dialog7(NPC, Spawn)
  131. FaceTarget(NPC, Spawn)
  132. Dialog.New(NPC, Spawn)
  133. Dialog.AddDialog("Good. Come back when you are done and I will help you figure out what to do about Alucius.")
  134. Dialog.AddOption("Thank you for all the help. I will be back.")
  135. Dialog.Start()
  136. end
  137. ------------------------
  138. function Dialog4(NPC, Spawn)
  139. FaceTarget(NPC, Spawn)
  140. Dialog.New(NPC, Spawn)
  141. Dialog.AddDialog("Hello again, Gaikichi. Did you speak to Kaseo like I suggested?")
  142. Dialog.AddVoiceover("voiceover/english/voice_emotes/greetings/greetings_1_1004.mp3", 0, 0)
  143. Dialog.AddOption("Indeed I did. I think I stayed out of trouble.", "Dialog21")
  144. Dialog.AddOption("I had best return later.")
  145. Dialog.Start()
  146. end
  147. function Dialog21(NPC, Spawn)
  148. FaceTarget(NPC, Spawn)
  149. Dialog.New(NPC, Spawn)
  150. Dialog.AddDialog("That is good to hear. You made the right decision by turning those papers over to the Militia. This city could use more people like you. If you're interested, I could introduce you to a friend of mine who would give you work and guide you in a more suitable fashion than Alucius could.")
  151. Dialog.AddOption("I'd like to hear more about this friend.", "Dialog23")
  152. Dialog.AddOption("I'll come back and hear about your friend later.")
  153. Dialog.Start()
  154. end
  155. function Dialog23(NPC, Spawn)
  156. FaceTarget(NPC, Spawn)
  157. Dialog.New(NPC, Spawn)
  158. Dialog.AddDialog("So you diverted suspicion about the documents away from yourself?")
  159. Dialog.AddOption("Yes. Kaseo doesn't believe I had anything to do with it.", "Dialog10")
  160. Dialog.Start()
  161. end
  162. function Dialog10(NPC, Spawn)
  163. FaceTarget(NPC, Spawn)
  164. Dialog.New(NPC, Spawn)
  165. Dialog.AddDialog("Well done! Tell me what happened so I can find a way to help you be rid of Alucius.")
  166. Dialog.AddOption("I told him that I slew a man who tried to sell me the documents. Kaseo was pleased and said he would tell others of my heroism.", "Dialog14")
  167. Dialog.Start()
  168. end
  169. function Dialog14(NPC, Spawn)
  170. FaceTarget(NPC, Spawn)
  171. Dialog.New(NPC, Spawn)
  172. Dialog.AddDialog("Hmm, this might be used to your advantage. Alucius will no doubt hear that the propaganda was given to a member of the Freeport Militia. You may be able to use this to scare Alucius away.")
  173. Dialog.AddOption("What do you purpose I do?", "Dialog3")
  174. Dialog.AddOption("I should be going.")
  175. Dialog.Start()
  176. end
  177. function Dialog3(NPC, Spawn)
  178. FaceTarget(NPC, Spawn)
  179. Dialog.New(NPC, Spawn)
  180. Dialog.AddDialog("Tell him that because of your deeds, the Freeport Militia considers you an ally. He wouldn't act against you if he believes the Militia are watching out for you. No one dares to cross them.")
  181. Dialog.AddOption("I will confront Alucius.", "Dialog22")
  182. Dialog.Start()
  183. end
  184. function Dialog22(NPC, Spawn)
  185. FaceTarget(NPC, Spawn)
  186. Dialog.New(NPC, Spawn)
  187. Dialog.AddDialog("Good. Remember not to back down from him. You must make him fear for his very life if he were to act against you.")
  188. Dialog.AddOption("I will go confront Alucius about his betrayal now.")
  189. Dialog.Start()
  190. OfferQuest(NPC, Spawn, TrickingtheTraitor)
  191. end
  192. ----------------
  193. function Dialog15(NPC, Spawn)
  194. FaceTarget(NPC, Spawn)
  195. Dialog.New(NPC, Spawn)
  196. Dialog.AddDialog("Hello again. Can I assume you handled Alucius?")
  197. Dialog.AddOption("Yes. I don't think I have anything to fear from him.", "Dialog5")
  198. Dialog.Start()
  199. end
  200. function Dialog5(NPC, Spawn)
  201. FaceTarget(NPC, Spawn)
  202. Dialog.New(NPC, Spawn)
  203. Dialog.AddDialog("So, Gaikichi, are you ready to meet my friend Inquisitor Thorson?")
  204. Dialog.AddOption("Yes, please tell me where I can meet him.", "Dialog16")
  205. Dialog.AddOption("Not just yet.")
  206. Dialog.Start()
  207. end
  208. function Dialog16(NPC, Spawn)
  209. FaceTarget(NPC, Spawn)
  210. Dialog.New(NPC, Spawn)
  211. Dialog.AddDialog("You can find him in the Sunken City. To get there, go to the docks and ring the bell to summon transportation outside of Freeport proper. You should be able to locate him quite easily once you arrive in the Sunken City.")
  212. Dialog.AddOption("I will go seek out Inquisitor Thorson.", "Dialog6")
  213. Dialog.Start()
  214. OfferQuest(NPC, Spawn, MeettheInquisitor)
  215. end
  216. function Dialog6(NPC, Spawn)
  217. FaceTarget(NPC, Spawn)
  218. Dialog.New(NPC, Spawn)
  219. Dialog.AddDialog("You have proven yourself well. I'm sure you will be a great help to him. Travel safely, Gaikichi.")
  220. Dialog.AddOption("Thank you again for all of your help.")
  221. Dialog.Start()
  222. end