CarolineCopperstone.lua 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. --[[
  2. Script Name : SpawnScripts/Nettleville/CarolineCopperstone.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.06.25 05:06:38
  5. Script Purpose :
  6. :
  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,5763) and GetQuestStep(Spawn,5763)==4 then
  17. FaceTarget(NPC, Spawn)
  18. PlayFlavor(NPC, "voiceover/english/banker_caroline_copperstone/qey_village01/qey_village01_banker_carolyn_copperstone_housing_quest_1_53e2b5fb.mp3", "If you're opening a new account, I can help you over here.", "bye", 550141816, 3234724547, 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,5763) and GetQuestStep(Spawn,5763)==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("Welcome friend. How can we at the Qeynos Exchange help you?")
  34. Dialog.AddVoiceover("voiceover/english/banker_caroline_copperstone/qey_village01/banker_carolyn_copperstone001.mp3", 3418604126,1802065171)
  35. PlayFlavor(NPC, "", "", "hello", 0, 0, Spawn)
  36. Dialog.AddOption("Nothing right now, thank you.")
  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_caroline_copperstone/qey_village01/banker_carolyn_copperstone002.mp3", 2567141347, 2451251964)
  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_caroline_copperstone/qey_village01/banker_carolyn_copperstone003.mp3", 1449224739, 333296052)
  52. Dialog.AddOption("Adventurer","Dialog2b")
  53. Dialog.AddOption("Crafter","Dialog2b")
  54. if GetRace(Spawn)==9 then
  55. Dialog.AddOption("Formerly a used horse salesperson before the cataclysm.","Dialog2b")
  56. Dialog.AddOption("Jack-of-all-trades?","Dialog2b")
  57. elseif GetRace(Spawn)==11 then
  58. Dialog.AddOption("I'd say box inspector, but I guess I should just put down Adventurer.","Dialog2b")
  59. elseif GetRace(Spawn)==19 then
  60. Dialog.AddOption("Moonlighter, perhaps? I prefer to be discrete.","Dialog2b")
  61. end
  62. Dialog.Start()
  63. end
  64. function Dialog2b(NPC, Spawn)
  65. FaceTarget(NPC, Spawn)
  66. Dialog.New(NPC, Spawn)
  67. Dialog.AddDialog("That works. Finally, will you follow the rule of not depositing in your account any poison plants, live animals or dangerous potions?")
  68. Dialog.AddVoiceover("voiceover/english/banker_caroline_copperstone/qey_village01/banker_carolyn_copperstone004.mp3", 1001305873, 3055692898)
  69. PlayFlavor(NPC, "", "", "nod", 0, 0, Spawn)
  70. Dialog.AddOption("Hmmm... okay, I agree.","Dialog2c")
  71. Dialog.AddOption("You've got warnings for everything! Yes, I understand.","Dialog2c")
  72. Dialog.AddOption("Yes... is that really a question?","Dialog2c")
  73. Dialog.Start()
  74. end
  75. function Dialog2c(NPC, Spawn)
  76. if HasQuest(Spawn,5763) and GetQuestStep(Spawn,5763)==4 then
  77. SetStepComplete(Spawn, 5763,4)
  78. end
  79. FaceTarget(NPC, Spawn)
  80. Dialog.New(NPC, Spawn)
  81. Dialog.AddDialog("Excellent! Your account with our bank is open. We've reserved a spot in the vault for you. Please feel free to visit us anytime with your banking needs. Do you need anything else?")
  82. Dialog.AddVoiceover("voiceover/english/banker_caroline_copperstone/qey_village01/banker_carolyn_copperstone005.mp3", 2301459090, 3948003852)
  83. PlayFlavor(NPC, "", "", "smile", 0, 0, Spawn)
  84. Dialog.AddOption("Not right now.")
  85. Dialog.Start()
  86. end