9
3

Drizzcopper.lua 3.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. --[[
  2. Script Name : SpawnScripts/Baubbleshire/Drizzcopper.lua
  3. Script Purpose : Drizzcopper <Banker>
  4. Script Author : Dorbin
  5. Script Date : 2022.10.30
  6. Script Notes :
  7. --]]
  8. require "SpawnScripts/Generic/DialogModule"
  9. function spawn(NPC)
  10. SetPlayerProximityFunction(NPC, 10, "InRange", "LeaveRange")
  11. end
  12. function respawn(NPC)
  13. spawn(NPC)
  14. end
  15. function InRange(NPC, Spawn)
  16. if HasQuest(Spawn,5760) and GetQuestStep(Spawn,5760)==4 then
  17. FaceTarget(NPC, Spawn)
  18. PlayFlavor(NPC, "voiceover/english/banker_drizzcopper/qey_village06/100_banker_gnome_drizzcopper_housing_quest_1_53e2b5fb.mp3", "If you're opening a new account, I can help you over here.", "bye", 2700288666, 57326922, Spawn)
  19. end
  20. end
  21. function hailed(NPC, Spawn)
  22. if GetFactionAmount(Spawn,11) <0 then
  23. PlayFlavor(NPC, "", "", "shakefist", 0, 0, Spawn)
  24. elseif HasQuest(Spawn,5760) and GetQuestStep(Spawn,5760)==4 then
  25. Dialog2(NPC, Spawn)
  26. else
  27. Dialog1(NPC, Spawn)
  28. end
  29. end
  30. function Dialog1(NPC, Spawn)
  31. FaceTarget(NPC, Spawn)
  32. Dialog.New(NPC, Spawn)
  33. Dialog.AddDialog("The answer to your question is no. I'm afraid we don't extend lines of credit at this time.")
  34. Dialog.AddVoiceover("voiceover/english/banker_drizzcopper/qey_village06/banker_drizzcopper001.mp3", 2748969711, 2912964073)
  35. PlayFlavor(NPC, "", "", "no", 0, 0, Spawn)
  36. Dialog.AddOption("Oh. Thank you anyway.")
  37. Dialog.Start()
  38. end
  39. function Dialog2(NPC, Spawn)
  40. FaceTarget(NPC, Spawn)
  41. Dialog.New(NPC, Spawn)
  42. 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?")
  43. Dialog.AddVoiceover("voiceover/english/banker_drizzcopper/qey_village06/banker_drizzcopper002.mp3", 214257203, 180096028)
  44. Dialog.AddOption(""..GetName(Spawn).."","Dialog2a")
  45. Dialog.Start()
  46. end
  47. function Dialog2a(NPC, Spawn)
  48. FaceTarget(NPC, Spawn)
  49. Dialog.New(NPC, Spawn)
  50. Dialog.AddDialog("Occupation?")
  51. Dialog.AddVoiceover("voiceover/english/banker_drizzcopper/qey_village06/banker_drizzcopper003.mp3", 1581259590, 1356751138)
  52. Dialog.AddOption("Adventurer","Dialog2b")
  53. Dialog.AddOption("Crafter","Dialog2b")
  54. if GetRace(Spawn)==7 then
  55. Dialog.AddOption("Very hungry?","Dialog2b")
  56. elseif GetRace(Spawn)==5 then
  57. Dialog.AddOption("Tinkering Enthusiast?","Dialog2b")
  58. end
  59. Dialog.Start()
  60. end
  61. function Dialog2b(NPC, Spawn)
  62. FaceTarget(NPC, Spawn)
  63. Dialog.New(NPC, Spawn)
  64. Dialog.AddDialog("That works. Finally, will you follow the rule of not depositing in your account any poison plants, live animals or dangerous potions?")
  65. Dialog.AddVoiceover("voiceover/english/banker_drizzcopper/qey_village06/banker_drizzcopper004.mp3", 819707609, 118168926)
  66. PlayFlavor(NPC, "", "", "nod", 0, 0, Spawn)
  67. Dialog.AddOption("Hmmm... okay, I agree.","Dialog2c")
  68. Dialog.AddOption("I guess so?","Dialog2c")
  69. Dialog.AddOption("Yes... is that really a question?","Dialog2c")
  70. Dialog.Start()
  71. end
  72. function Dialog2c(NPC, Spawn)
  73. if HasQuest(Spawn,5760) and GetQuestStep(Spawn,5760)==4 then
  74. SetStepComplete(Spawn, 5760,4)
  75. end
  76. FaceTarget(NPC, Spawn)
  77. Dialog.New(NPC, Spawn)
  78. 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?")
  79. Dialog.AddVoiceover("voiceover/english/banker_drizzcopper/qey_village06/banker_drizzcopper005.mp3", 1903748694, 1697244413)
  80. PlayFlavor(NPC, "", "", "smile", 0, 0, Spawn)
  81. Dialog.AddOption("Not right now.")
  82. Dialog.AddOption("Yes, do you offer lines of credit?","Dialog1")
  83. Dialog.Start()
  84. end