Orudormo.lua 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. --[[
  2. Script Name : SpawnScripts/Starcrest/Orudormo.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.02.24 04:02:50
  5. Script Purpose :
  6. :
  7. --]]
  8. require "SpawnScripts/Generic/DialogModule"
  9. function spawn(NPC)
  10. SetPlayerProximityFunction(NPC, 7, "InRange", "LeaveRange")
  11. end
  12. local Deposit = 5490
  13. function respawn(NPC)
  14. spawn(NPC)
  15. end
  16. function InRange(NPC, Spawn)
  17. if HasQuest(Spawn,5762) and GetQuestStep(Spawn,5762)==4 then
  18. FaceTarget(NPC, Spawn)
  19. PlayFlavor(NPC, "voiceover/english/banker_orudormo/qey_village02/100_banker_housing_quest_1_53e2b5fb.mp3", "If you're opening a new account, I can help you over here.", "bye", 2126160201, 1961468077, Spawn)
  20. end
  21. end
  22. function hailed(NPC, Spawn)
  23. if GetFactionAmount(Spawn,11) <0 then
  24. PlayFlavor(NPC, "", "", "shakefist", 0, 0, Spawn)
  25. elseif HasQuest(Spawn,5762) and GetQuestStep(Spawn,5762)==4 then
  26. Dialog2(NPC, Spawn)
  27. else
  28. Dialog1(NPC, Spawn)
  29. end
  30. end
  31. function Dialog1(NPC, Spawn)
  32. FaceTarget(NPC, Spawn)
  33. Dialog.New(NPC, Spawn)
  34. Dialog.AddDialog("Don't worry about the safety of your assets. We meticulously manage our accounts and currancy.")
  35. Dialog.AddVoiceover("voiceover/english/banker_orudormo/qey_village02/bankerorudormo.mp3", 3443069835,648383583)
  36. PlayFlavor(NPC, "", "", "agree", 0, 0, Spawn)
  37. if GetQuestStep(Spawn, Deposit)==1 then
  38. Dialog.AddOption("I'm here to make a deposit for Grekin.", "Deposit1")
  39. end
  40. Dialog.AddOption("That is good to know.")
  41. Dialog.Start()
  42. end
  43. function Dialog2(NPC, Spawn)
  44. FaceTarget(NPC, Spawn)
  45. Dialog.New(NPC, Spawn)
  46. 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?")
  47. Dialog.AddVoiceover("voiceover/english/banker_orudormo/qey_village02/bankerorudormo002.mp3", 1870118793,458195915)
  48. Dialog.AddOption(""..GetName(Spawn).."","Dialog2a")
  49. Dialog.Start()
  50. end
  51. function Dialog2a(NPC, Spawn)
  52. FaceTarget(NPC, Spawn)
  53. Dialog.New(NPC, Spawn)
  54. Dialog.AddDialog("Occupation?")
  55. Dialog.AddVoiceover("voiceover/english/banker_orudormo/qey_village02/bankerorudormo003.mp3", 1158160371,116927725)
  56. Dialog.AddOption("Adventurer","Dialog2b")
  57. Dialog.AddOption("Crafter","Dialog2b")
  58. if GetRace(Spawn)==3 then
  59. Dialog.AddOption("Metaphysical Phylosopher and part-time Adventurer","Dialog2b")
  60. elseif GetRace(Spawn)==9 then
  61. Dialog.AddOption("You think I'm here to work? I'm just looking for some quiet!","Dialog2b")
  62. elseif GetRace(Spawn)==20 then
  63. Dialog.AddOption("A former pawn of a dragon lord? Just put down Mercenary.","Dialog2b")
  64. end
  65. Dialog.Start()
  66. end
  67. function Dialog2b(NPC, Spawn)
  68. FaceTarget(NPC, Spawn)
  69. Dialog.New(NPC, Spawn)
  70. Dialog.AddDialog("That works. Finally, will you follow the rule of not depositing in your account any poison plants, live animals or dangerous potions?")
  71. Dialog.AddVoiceover("voiceover/english/banker_orudormo/qey_village02/bankerorudormo004.mp3", 2550878190,825612435)
  72. PlayFlavor(NPC, "", "", "nod", 0, 0, Spawn)
  73. Dialog.AddOption("Hmmm... okay, I agree.","Dialog2c")
  74. Dialog.AddOption("Do you think me a fool? Of course I won't keep those things here.","Dialog2c")
  75. Dialog.AddOption("Yes... is that really a question?","Dialog2c")
  76. Dialog.Start()
  77. end
  78. function Dialog2c(NPC, Spawn)
  79. if HasQuest(Spawn,5762) and GetQuestStep(Spawn,5762)==4 then
  80. SetStepComplete(Spawn, 5762,4)
  81. end
  82. FaceTarget(NPC, Spawn)
  83. Dialog.New(NPC, Spawn)
  84. 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?")
  85. Dialog.AddVoiceover("voiceover/english/banker_orudormo/qey_village02/bankerorudormo005.mp3", 3256984469,19476986)
  86. PlayFlavor(NPC, "", "", "smile", 0, 0, Spawn)
  87. Dialog.AddOption("Not right now.")
  88. Dialog.AddOption("Can I be certain my items will be safe here?","Dialog1")
  89. Dialog.Start()
  90. end
  91. function Deposit1(NPC, Spawn)
  92. FaceTarget(NPC, Spawn)
  93. Dialog.New(NPC, Spawn)
  94. Dialog.AddDialog("I thought he'd make the deposit, but I suppose it makes no difference who does it as long as it gets to the bank. Do you need anything else?")
  95. Dialog.AddVoiceover("voiceover/english/banker_orudormo/qey_village02/bankerorudormo000.mp3", 3783803084,3333586894)
  96. PlayFlavor(NPC, "", "", "shrug", 0, 0, Spawn)
  97. Dialog.AddOption("I need the receipt. Thank you.", "Deposit2")
  98. Dialog.Start()
  99. end
  100. function Deposit2(NPC, Spawn)
  101. PlayFlavor(NPC, "", "", "nod", 0, 0, Spawn)
  102. SetStepComplete(Spawn, Deposit, 1)
  103. FaceTarget(NPC, Spawn)
  104. Dialog.New(NPC, Spawn)
  105. Dialog.AddDialog("Well, yes, of course you do. Now, be sure Grekin gets this.")
  106. Dialog.AddVoiceover("voiceover/english/banker_orudormo/qey_village02/bankerorudormo001.mp3", 2721158125,3178828545)
  107. Dialog.AddOption("I will.")
  108. Dialog.Start()
  109. end