Dori.lua 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. --[[
  2. Script Name : SpawnScripts/Graystone/Dori.lua
  3. Script Purpose : Dori <Banker>
  4. Script Author : Dorbin
  5. Script Date : 2022.03.11
  6. Script Notes :
  7. --]]
  8. require "SpawnScripts/Generic/DialogModule"
  9. local Tally = 5508
  10. function spawn(NPC)
  11. SetPlayerProximityFunction(NPC, 10, "InRange", "LeaveRange")
  12. ProvidesQuest(NPC,Tally)
  13. end
  14. function InRange(NPC, Spawn)
  15. if HasQuest(Spawn,5764) and GetQuestStep(Spawn,5764)==4 then
  16. FaceTarget(NPC, Spawn)
  17. PlayFlavor(NPC, "voiceover/english/banker_dori/qey_village03/100_banker_dwarf_dori_housing_quest_1_53e2b5fb.mp3", "If you're opening a new account, I can help you over here.", "bye", 1929454221, 2462501876, Spawn)
  18. end
  19. end
  20. function hailed(NPC, Spawn)
  21. if GetFactionAmount(Spawn,11) <0 then
  22. PlayFlavor(NPC, "", "", "shakefist", 0, 0, Spawn)
  23. elseif HasQuest(Spawn,5764) and GetQuestStep(Spawn,5764)==4 then
  24. Dialog2(NPC, Spawn)
  25. else
  26. MainDialog(NPC, Spawn)
  27. end
  28. end
  29. function MainDialog(NPC,Spawn)
  30. FaceTarget(NPC, Spawn)
  31. Dialog.New(NPC, Spawn)
  32. Dialog.AddDialog("Greetin's, young'n. My name's Dori and this here is my bank. As a customer of the Qeynos Exchange, you can be certain your money's safe with us!")
  33. Dialog.AddVoiceover("voiceover/english/banker_dori/qey_village03/bankerdori.mp3", 2952818839, 2577303477)
  34. PlayFlavor(NPC, "", "", "hello", 0, 0, Spawn)
  35. if not HasCompletedQuest (Spawn, Tally) and not HasQuest (Spawn, Tally) and GetLevel(Spawn)>=7 then
  36. Dialog.AddOption("You look pretty busy, is there anything I can help out with?", "DeliveryStart")
  37. end
  38. if GetQuestStep(Spawn,Tally)==2 then
  39. Dialog.AddOption("The banker sent me back with this sealed note for you.", "DeliveryDone")
  40. end
  41. Dialog.AddOption("Thanks Dori.")
  42. Dialog.Start()
  43. end
  44. function DeliveryStart(NPC, Spawn)
  45. FaceTarget(NPC, Spawn)
  46. Dialog.New(NPC, Spawn)
  47. Dialog.AddDialog("Sure ya can. Its nothing much, but if you take my daily tally into the Qeynos Exchange at the harbor, it would save me a trip into the city! You think you're up to it?")
  48. Dialog.AddVoiceover("voiceover/english/banker_dori/qey_village03/bankerdori000.mp3", 3527195543,3811393839)
  49. PlayFlavor(NPC, "", "", "agree", 0, 0, Spawn)
  50. Dialog.AddOption("Of course! I'll drop it by as soon as possible.", "QuestBegin")
  51. Dialog.AddOption("Another time. Sorry.")
  52. Dialog.Start()
  53. end
  54. function QuestBegin (NPC, Spawn)
  55. FaceTarget(NPC, Spawn)
  56. OfferQuest(NPC, Spawn, Tally)
  57. end
  58. function DeliveryDone(NPC, Spawn)
  59. SetStepComplete(Spawn, Tally, 2)
  60. FaceTarget(NPC, Spawn)
  61. Dialog.New(NPC, Spawn)
  62. Dialog.AddDialog("Oh dear. I hope its not a bank audit! I do hate those tedious things! Poor Jalan will never get to leave if its an audit! No time for chatt'n. Its time to buckle down and get to work. At any rate, thanks for all your help.")
  63. Dialog.AddVoiceover("voiceover/english/banker_dori/qey_village03/bankerdori002.mp3", 2001766624,322751976)
  64. PlayFlavor(NPC, "", "", "doh", 0, 0, Spawn)
  65. Dialog.AddOption("I only wish I could have brought back better news. ")
  66. Dialog.Start()
  67. end
  68. function Dialog2(NPC, Spawn)
  69. FaceTarget(NPC, Spawn)
  70. Dialog.New(NPC, Spawn)
  71. Dialog.AddDialog("I see the caretaker gave you my message. I'll help you open your account. First, I need some information from you. What's your name?")
  72. Dialog.AddVoiceover("voiceover/english/banker_dori/qey_village03/bankerdori003.mp3", 731366027,1183378874)
  73. Dialog.AddOption(""..GetName(Spawn).."","Dialog2a")
  74. Dialog.Start()
  75. end
  76. function Dialog2a(NPC, Spawn)
  77. FaceTarget(NPC, Spawn)
  78. Dialog.New(NPC, Spawn)
  79. Dialog.AddDialog("Occupation?")
  80. Dialog.AddVoiceover("voiceover/english/banker_dori/qey_village03/bankerdori004.mp3", 2681845326,423161298)
  81. Dialog.AddOption("Adventurer","Dialog2b")
  82. Dialog.AddOption("Crafter","Dialog2b")
  83. if GetRace(Spawn)==0 then
  84. Dialog.AddOption("Tarven brawling counts if you win, right?","Dialog2b")
  85. elseif GetRace(Spawn)==2 then
  86. Dialog.AddOption("Collector. Shiny rocks in particular.","Dialog2b")
  87. end
  88. Dialog.Start()
  89. end
  90. function Dialog2b(NPC, Spawn)
  91. FaceTarget(NPC, Spawn)
  92. Dialog.New(NPC, Spawn)
  93. Dialog.AddDialog("That works. Finally, will you follow the rule of not depositing in your account any poison plants, live animals or dangerous potions?")
  94. Dialog.AddVoiceover("voiceover/english/banker_dori/qey_village03/bankerdori005.mp3", 371751012,3783954000)
  95. PlayFlavor(NPC, "", "", "nod", 0, 0, Spawn)
  96. Dialog.AddOption("Hmmm... okay, I agree.","Dialog2c")
  97. Dialog.AddOption("I guess so?","Dialog2c")
  98. Dialog.AddOption("Yes... is that really a question?","Dialog2c")
  99. Dialog.Start()
  100. end
  101. function Dialog2c(NPC, Spawn)
  102. if HasQuest(Spawn,5764) and GetQuestStep(Spawn,5764)==4 then
  103. SetStepComplete(Spawn, 5764,4)
  104. end
  105. FaceTarget(NPC, Spawn)
  106. Dialog.New(NPC, Spawn)
  107. Dialog.AddDialog("Excellent! Your account is open, and a spot is reserved for you in the vaults. Please visit us anytime with your banking needs. Do you need anything else?")
  108. Dialog.AddVoiceover("voiceover/english/banker_dori/qey_village03/bankerdori006.mp3", 1127160953,942233474)
  109. PlayFlavor(NPC, "", "", "smile", 0, 0, Spawn)
  110. Dialog.AddOption("Not right now.")
  111. Dialog.Start()
  112. end