MerchantFalinShaloon.lua 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. --[[
  2. Script Name : SpawnScripts/DownBelow_Classic/MerchantFalinShaloon.lua
  3. Script Author : LordPazuzu
  4. Script Date : 2022.11.09 03:11:20
  5. Script Purpose :
  6. :
  7. --]]
  8. require "SpawnScripts/Generic/DialogModule"
  9. local GoodsDownBelow = 5376
  10. local WorkingTheDownBelow = 5365
  11. function spawn(NPC)
  12. ProvidesQuest(NPC, GoodsDownBelow)
  13. SetPlayerProximityFunction(NPC, 10, "InRange", "LeaveRange")
  14. end
  15. function hailed(NPC, Spawn)
  16. if HasQuest(Spawn,WorkingTheDownBelow) then
  17. NoWork(NPC,Spawn)
  18. elseif not HasQuest(Spawn, GoodsDownBelow) then
  19. StartingHail(NPC,Spawn)
  20. elseif GetQuestStep(Spawn, GoodsDownBelow) < 5 then
  21. Quest_Progress(NPC, Spawn)
  22. elseif GetQuestStep(Spawn, GoodsDownBelow) == 5 then
  23. Again(NPC,Spawn)
  24. end
  25. end
  26. function StartingHail(NPC,Spawn)
  27. FaceTarget(NPC, Spawn)
  28. Dialog.New(NPC, Spawn)
  29. Dialog.AddDialog("Buy something or be on your way! I don't have time to chat with the likes of you...")
  30. Dialog.AddVoiceover("voiceover/english/merchant_falin_shaloon/qey_catacomb01/merchant_shaloon/merchant_shaloon001.mp3", 2831988431, 2273687060)
  31. Dialog.AddOption("How are you able to do business down here?", "Option1")
  32. Dialog.AddOption("I'll be on my way. ")
  33. Dialog.Start()
  34. end
  35. function Option1(NPC, Spawn)
  36. local count = GetQuestCompleteCount(Spawn, WorkingTheDownBelow)
  37. FaceTarget(NPC, Spawn)
  38. Dialog.New(NPC, Spawn)
  39. Dialog.AddDialog("I get requests for this or that, used for who knows what. It seems that the majority of my clientele have to get their supplies here, 'cause it just ain't available top side. Say, how would you like to make yourself useful?")
  40. Dialog.AddVoiceover("voiceover/english/merchant_falin_shaloon/qey_catacomb01/merchant_shaloon/merchant_shaloon002.mp3", 2160282903, 1448473468)
  41. if GetLevel(Spawn) <= 20 and count <= 5 then
  42. Dialog.AddOption("I'm interested.", "offer")
  43. end
  44. Dialog.AddOption("Not today.")
  45. Dialog.Start()
  46. end
  47. function NoWork(NPC,Spawn)
  48. FaceTarget(NPC, Spawn)
  49. Dialog.New(NPC, Spawn)
  50. Dialog.AddDialog("Word gets around quickly down here; so don't think about trying to pull one over on me. I won't have you working for me while you're doing work for Barnes, got it!?")
  51. Dialog.AddVoiceover("voiceover/english/merchant_falin_shaloon/qey_catacomb01/merchant_shaloon/merchant_shaloon006.mp3", 176112027, 123486081)
  52. PlayFlavor(NPC, "", "", "glare", 0, 0, Spawn)
  53. Dialog.AddOption("Maybe I'll come back when I'm through.")
  54. Dialog.Start()
  55. end
  56. function offer(NPC, Spawn)
  57. OfferQuest(NPC, Spawn, GoodsDownBelow)
  58. end
  59. function Quest_Progress(NPC, Spawn)
  60. FaceTarget(NPC, Spawn)
  61. Dialog.New(NPC, Spawn)
  62. Dialog.AddDialog("You're not going back on your word, are you? I expect you to deliver them goods!")
  63. Dialog.AddVoiceover("voiceover/english/merchant_falin_shaloon/qey_catacomb01/merchant_shaloon/merchant_shaloon004.mp3", 718963330, 3239432203)
  64. Dialog.AddOption("Yeah, I'm on it.")
  65. Dialog.Start()
  66. end
  67. function Again(NPC, Spawn)
  68. SetStepComplete(Spawn, GoodsDownBelow, 5)
  69. FaceTarget(NPC, Spawn)
  70. Dialog.New(NPC, Spawn)
  71. Dialog.AddDialog("It's hard to imagine anyone wanting this stuff, let alone paying for it. Anyway, you kept up your end of the bargain. Take this for your trouble.")
  72. Dialog.AddVoiceover("voiceover/english/merchant_falin_shaloon/qey_catacomb01/merchant_shaloon/merchant_shaloon005.mp3", 1650487324, 124661569)
  73. PlayFlavor(NPC, "", "", "sniff", 0, 0, Spawn)
  74. Dialog.AddOption("What do most folks ask you for?", "Option1")
  75. Dialog.AddOption("Thanks.")
  76. Dialog.Start()
  77. end
  78. function InRange(NPC, Spawn)
  79. FaceTarget(NPC, Spawn)
  80. PlayFlavor(NPC, "voiceover/english/merchant_falin_shaloon/qey_catacomb01/merchants/qey_catacomb01_dwarf_merchant_aoi_callout_2aa4e27e.mp3", "If I don't have what you want, you don't need it!", "", 1298570469, 653865762, Spawn)
  81. end
  82. function LeaveRange(NPC, Spawn)
  83. end