Deephathom.lua 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. --[[
  2. Script Name : SpawnScripts/WillowWood/Deephathom.lua
  3. Script Purpose : Deephathom <Banker>
  4. Script Author : Dorbin
  5. Script Date : 2022.05.15
  6. Script Notes :
  7. --]]
  8. require "SpawnScripts/Generic/DialogModule"
  9. function spawn(NPC)
  10. end
  11. function respawn(NPC)
  12. spawn(NPC)
  13. end
  14. function InRange(NPC, Spawn)
  15. if HasQuest(Spawn,5760) and GetQuestStep(Spawn,5760)==4 then
  16. FaceTarget(NPC, Spawn)
  17. PlayFlavor(NPC, "voiceover/english/banker_deephathom/qey_village05/100_banker_halfelf_deephathom_housing_quest_1_53e2b5fb.mp3", "If you're opening a new account, I can help you over here.", "bye", 2132928459, 1021738095, Spawn)
  18. end
  19. end
  20. function hailed(NPC, Spawn)
  21. FaceTarget(NPC, Spawn)
  22. conversation = CreateConversation()
  23. PlayFlavor(NPC, "voiceover/english/banker_deephathom/qey_village05/banker_deephathom001.mp3", "", "", 1593106270, 3129539503, Spawn)
  24. AddConversationOption(conversation, "No, I'm not.")
  25. StartConversation(conversation, NPC, Spawn, "Please tell me you're not trying to get a loan with livestock collateral!")
  26. end
  27. function hailed(NPC, Spawn)
  28. if GetFactionAmount(Spawn,11) <0 then
  29. PlayFlavor(NPC, "", "", "shakefist", 0, 0, Spawn)
  30. elseif HasQuest(Spawn,5761) and GetQuestStep(Spawn,5761)==4 then
  31. Dialog2(NPC, Spawn)
  32. else
  33. Dialog1(NPC, Spawn)
  34. end
  35. end
  36. function Dialog1(NPC, Spawn)
  37. FaceTarget(NPC, Spawn)
  38. Dialog.New(NPC, Spawn)
  39. Dialog.AddDialog("Please tell me you're not trying to get a loan with livestock collateral!")
  40. Dialog.AddVoiceover("voiceover/english/banker_deephathom/qey_village05/banker_deephathom001.mp3", 1593106270, 3129539503)
  41. PlayFlavor(NPC, "", "", "tapfoot", 0, 0, Spawn)
  42. Dialog.AddOption("No, I'm not.")
  43. Dialog.Start()
  44. end
  45. function Dialog2(NPC, Spawn)
  46. FaceTarget(NPC, Spawn)
  47. Dialog.New(NPC, Spawn)
  48. 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?")
  49. Dialog.AddVoiceover("voiceover/english/banker_deephathom/qey_village05/banker_deephathom002.mp3", 568039140, 269795142)
  50. Dialog.AddOption(""..GetName(Spawn).."","Dialog2a")
  51. Dialog.Start()
  52. end
  53. function Dialog2a(NPC, Spawn)
  54. FaceTarget(NPC, Spawn)
  55. Dialog.New(NPC, Spawn)
  56. Dialog.AddDialog("Occupation?")
  57. Dialog.AddVoiceover("voiceover/english/banker_deephathom/qey_village05/banker_deephathom003.mp3", 3528419430, 537050664)
  58. Dialog.AddOption("Adventurer","Dialog2b")
  59. Dialog.AddOption("Crafter","Dialog2b")
  60. if GetRace(Spawn)==5 then
  61. Dialog.AddOption("Part-Adventurer, Part-Crafter","Dialog2b")
  62. Dialog.AddOption("I've never really settled on one thing. ","Dialog2b")
  63. elseif GetRace(Spawn)==15 then
  64. Dialog.AddOption("Well, I can tell you I'm NOT part tree... but let's Harvester?","Dialog2b")
  65. Dialog.AddOption("Collector! All the shinies and their insects, rocks, and feathers are my passion!","Dialog2b")
  66. elseif GetRace(Spawn)==16 then
  67. Dialog.AddOption("If you put down sprite I'll...","Dialog2b")
  68. end
  69. Dialog.Start()
  70. end
  71. function Dialog2b(NPC, Spawn)
  72. FaceTarget(NPC, Spawn)
  73. Dialog.New(NPC, Spawn)
  74. Dialog.AddDialog("That works. Finally, will you follow the rule of not depositing in your account any poison plants, live animals or dangerous potions?")
  75. Dialog.AddVoiceover("voiceover/english/banker_deephathom/qey_village05/banker_deephathom004.mp3", 1349974634, 2262781770)
  76. PlayFlavor(NPC, "", "", "nod", 0, 0, Spawn)
  77. Dialog.AddOption("Hmmm... okay, I agree.","Dialog2c")
  78. Dialog.AddOption("Ugh, well that takes all the fun out of it. Fine.","Dialog2c")
  79. Dialog.AddOption("Yes... is that really a question?","Dialog2c")
  80. Dialog.Start()
  81. end
  82. function Dialog2c(NPC, Spawn)
  83. if HasQuest(Spawn,5761) and GetQuestStep(Spawn,5761)==4 then
  84. SetStepComplete(Spawn, 5761,4)
  85. end
  86. FaceTarget(NPC, Spawn)
  87. Dialog.New(NPC, Spawn)
  88. 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?")
  89. Dialog.AddVoiceover("voiceover/english/banker_deephathom/qey_village05/banker_deephathom005.mp3", 1554235105, 516416947)
  90. PlayFlavor(NPC, "", "", "agree", 0, 0, Spawn)
  91. Dialog.AddOption("Not right now.")
  92. Dialog.AddOption("Yes, do you offer lines of credit?","Dialog1")
  93. Dialog.Start()
  94. end