MerchantAdairBarnes.lua 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. --[[
  2. Script Name : SpawnScripts/DownBelow_Classic/MerchantAdairBarnes.lua
  3. Script Author : LordPazuzu
  4. Script Date : 2022.11.09 03:11:55
  5. Script Purpose :
  6. :
  7. --]]
  8. require "SpawnScripts/Generic/DialogModule"
  9. local WorkingTheDownBelow = 5365
  10. local Goods = 5376
  11. function hailed(NPC, Spawn)
  12. if HasQuest(Spawn,Goods) then
  13. NoWork(NPC,Spawn)
  14. elseif not HasQuest(Spawn, WorkingTheDownBelow) then
  15. StartingHail(NPC,Spawn)
  16. elseif GetQuestStep(Spawn, WorkingTheDownBelow) == 2 or GetQuestStep(Spawn, WorkingTheDownBelow) == 3 or GetQuestStep(Spawn, WorkingTheDownBelow) == 1 then
  17. Quest_Progress(NPC, Spawn)
  18. elseif GetQuestStep(Spawn, WorkingTheDownBelow) == 4 then
  19. Again(NPC,Spawn)
  20. end
  21. end
  22. function NoWork(NPC,Spawn)
  23. FaceTarget(NPC, Spawn)
  24. Dialog.New(NPC, Spawn)
  25. Dialog.AddDialog("Now listen here, Falin and I have an agreement. This means while you're helping him, you're not helping me. Got it? Now, when you're done helping him, that's another story...")
  26. Dialog.AddVoiceover("voiceover/english/merchant_adair_barnes/qey_catacomb01/merchant_barnes/merchant_barnes006.mp3", 3753500674, 2879312497)
  27. PlayFlavor(NPC, "", "", "scold", 0, 0, Spawn)
  28. Dialog.AddOption("Sure, I understand.")
  29. Dialog.Start()
  30. end
  31. function StartingHail(NPC,Spawn)
  32. FaceTarget(NPC, Spawn)
  33. Dialog.New(NPC, Spawn)
  34. Dialog.AddDialog("Are you looking for anything in particular?")
  35. Dialog.AddVoiceover("voiceover/english/merchant_adair_barnes/qey_catacomb01/merchant_barnes/merchant_barnes001.mp3", 1654451675, 1398785579)
  36. Dialog.AddOption("What are you doing down here?", "Option1")
  37. Dialog.AddOption("Not really.")
  38. Dialog.Start()
  39. end
  40. function Again(NPC,Spawn)
  41. SetStepComplete(Spawn, WorkingTheDownBelow, 4)
  42. FaceTarget(NPC, Spawn)
  43. Dialog.New(NPC, Spawn)
  44. Dialog.AddDialog("I see that you got everything. Good. Keep in mind that I always need help retrieving goods. If you're ever looking for something to do that'll pass the time, think of me!")
  45. Dialog.AddVoiceover("voiceover/english/merchant_adair_barnes/qey_catacomb01/merchant_barnes/merchant_barnes005.mp3", 1632932876, 2455444862)
  46. PlayFlavor(NPC, "", "", "nod", 0, 0, Spawn)
  47. Dialog.AddOption("I still don't see why you're down here.", "Option1")
  48. Dialog.AddOption("Ok.")
  49. Dialog.Start()
  50. end
  51. function Option1(NPC, Spawn)
  52. local count = GetQuestCompleteCount(Spawn, WorkingTheDownBelow)
  53. FaceTarget(NPC, Spawn)
  54. Dialog.New(NPC, Spawn)
  55. Dialog.AddDialog("Aren't you a curious bugger! I'll tell you why, it fills my pockets with coin. You'd be surprised by the folks who come down here to buy this or that. Say, why don't you help me fill some orders? There's coin in it for you.")
  56. Dialog.AddVoiceover("voiceover/english/merchant_adair_barnes/qey_catacomb01/merchant_barnes/merchant_barnes002.mp3", 1226253735, 3601518165)
  57. if not HasQuest(Spawn, WorkingTheDownBelow) and count <= 5 then
  58. Dialog.AddOption("Yeah, I'll help.", "offer")
  59. end
  60. Dialog.AddOption("Not now.")
  61. Dialog.Start()
  62. end
  63. function offer(NPC, Spawn)
  64. OfferQuest(NPC, Spawn, WorkingTheDownBelow)
  65. end
  66. function Quest_Progress(NPC, Spawn)
  67. FaceTarget(NPC, Spawn)
  68. Dialog.New(NPC, Spawn)
  69. Dialog.AddDialog("No time for dawdling! Hurry up and fill those orders.")
  70. Dialog.AddVoiceover("voiceover/english/merchant_adair_barnes/qey_catacomb01/merchant_barnes/merchant_barnes004.mp3", 1486605195, 3427920459)
  71. PlayFlavor(NPC, "", "", "no", 0, 0, Spawn)
  72. Dialog.AddOption("Ok.")
  73. Dialog.Start()
  74. end
  75. function spawn(NPC)
  76. ProvidesQuest(NPC, WorkingTheDownBelow)
  77. SetPlayerProximityFunction(NPC, 10, "InRange")
  78. end
  79. function respawn(NPC)
  80. spawn(NPC)
  81. end
  82. function InRange(NPC, Spawn)
  83. if not HasQuest(Spawn, WorkingTheDownBelow) then
  84. PlayFlavor(NPC, "voiceover/english/merchant_adair_barnes/qey_catacomb01/merchants/qey_catacombs01_merchants_adair_barnes_aoi_callout_4830e9a5.mp3", "Ahhh... bringing yourself down into the muck, eh? Gets mighty dark down these parts. Interest you in a fine torch?", "", 3184947609, 3872372210, Spawn)
  85. end
  86. end