DigginDiggs.lua 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. --[[
  2. Script Name : SpawnScripts/Baubbleshire/DigginDiggs.lua
  3. Script Purpose : Diggin Diggs <Armor and Shields>
  4. Script Author : Dorbin
  5. Script Date : Reconstructed 2022.01.20
  6. Script Notes : Using Dialog Module 2022.08.20
  7. --]]
  8. require "SpawnScripts/Generic/DialogModule"
  9. -- Quest ID's
  10. local BADGER_PELTS_FOR_DIGGS = 332 -- was 58
  11. local FarSeas_Fifty = 236
  12. local FarSeas_SixtyThree = 237
  13. function spawn(NPC)
  14. ProvidesQuest(NPC, BADGER_PELTS_FOR_DIGGS)
  15. SetPlayerProximityFunction(NPC, 8, "InRange", "LeaveRange")
  16. end
  17. function respawn(NPC)
  18. spawn(NPC)
  19. end
  20. function InRange(NPC, Spawn)
  21. if GetFactionAmount(Spawn,11) >0 then
  22. if not HasCompletedQuest(Spawn, BADGER_PELTS_FOR_DIGGS) then
  23. if math.random(0, 100) <= 75 then
  24. PlayFlavor(NPC, "voiceover/english/merchant_diggin_diggs/qey_village06/100_merchant_diggin_diggs_callout_5e1e6098.mp3", "Hear ye, hear ye! Digg's Trading Company seeks part-time hunters! Heavy coin handed out!", "", 2413237497, 889891316, Spawn)
  25. end
  26. else
  27. end
  28. end
  29. end
  30. function hailed(NPC, Spawn)
  31. if GetFactionAmount(Spawn,11) <0 then
  32. FaceTarget(NPC, Spawn)
  33. PlayFlavor(NPC, "", "", "shakefist", 0, 0, Spawn)
  34. else
  35. FaceTarget(NPC, Spawn)
  36. Dialog.New(NPC, Spawn)
  37. Dialog.AddDialog("You're looking a might shabby there. You could use some fine armor from Diggs' inventory. I carry only the finest quality and sell at outrageously low, low prices! I live for the community.")
  38. Dialog.AddVoiceover("voiceover/english/merchant_diggin_diggs/qey_village06/merchantdiggindiggs000.mp3", 96188472, 2463646265)
  39. if GetQuestStep(Spawn, FarSeas_SixtyThree) == 4 or GetQuestStep(Spawn, FarSeas_Fifty) == 4 then
  40. Dialog.AddOption("I believed I've finished your requisition order.", "FarseasDone")
  41. end
  42. Dialog.AddOption("I don't need a sales pitch. Got any work?", "GotAnyWork")
  43. Dialog.AddOptionRequirement(REQ_QUEST_DOESNT_HAVE_QUEST, BADGER_PELTS_FOR_DIGGS)
  44. Dialog.AddOptionRequirement(REQ_QUEST_NOT_HAS_COMPLETED_QUEST, BADGER_PELTS_FOR_DIGGS)
  45. Dialog.AddOption("Here is your bundle of badget pelts.", "BundleOfPelts")
  46. Dialog.AddOptionRequirement(REQ_QUEST_ON_STEP, BADGER_PELTS_FOR_DIGGS , 2)
  47. Dialog.AddOption("Oh right, I'm still looking for those pelts!")
  48. Dialog.AddOptionRequirement(REQ_QUEST_HAS_QUEST, BADGER_PELTS_FOR_DIGGS)
  49. Dialog.AddOptionRequirement(REQ_QUEST_BEFORE_STEP, BADGER_PELTS_FOR_DIGGS, 2)
  50. Dialog.AddOption("Sorry. Just passing by.")
  51. Dialog.Start()
  52. end
  53. end
  54. function GotAnyWork(NPC, Spawn)
  55. FaceTarget(NPC, Spawn)
  56. Dialog.New(NPC, Spawn)
  57. Dialog.AddDialog("So, you're a worker with no task, eh? If you're itchin' to fill your pockets with heavy coin, then I have a task for you. Are you interested in hunting?")
  58. Dialog.AddVoiceover("voiceover/english/merchant_diggin_diggs/qey_village06/merchantdiggindiggs001.mp3", 4059634840, 1440996220)
  59. PlayFlavor(NPC, "", "", "nod", 0, 0, Spawn)
  60. Dialog.AddOption("I'm interested.", "OfferQuest1")
  61. Dialog.AddOption("I don't have time to hunt.")
  62. Dialog.Start()
  63. end
  64. function OfferQuest1(NPC, Spawn)
  65. FaceTarget(NPC, Spawn)
  66. OfferQuest(NPC, Spawn, BADGER_PELTS_FOR_DIGGS)
  67. end
  68. function BundleOfPelts(NPC, Spawn)
  69. SetStepComplete(Spawn, BADGER_PELTS_FOR_DIGGS, 2)
  70. FaceTarget(NPC, Spawn)
  71. Dialog.New(NPC, Spawn)
  72. Dialog.AddDialog("Fine work ... fine work! I must tell you, I just paid my merchant taxes. 'Fraid the coin ain't as heavy as I promised. Sorry, taxes you know? I speak the truth!")
  73. Dialog.AddVoiceover("voiceover/english/merchant_diggin_diggs/qey_village06/merchantdiggindiggs003.mp3", 2263319370, 3568007530)
  74. PlayFlavor(NPC, "", "", "thanks", 0, 0, Spawn)
  75. Dialog.AddOption("I guess this is better than nothing.")
  76. Dialog.Start()
  77. end
  78. function FarseasDone(NPC, Spawn)
  79. if GetQuestStep(Spawn, FarSeas_Fifty) == 4 then
  80. SetStepComplete(Spawn, FarSeas_Fifty, 4)
  81. end
  82. if GetQuestStep(Spawn, FarSeas_SixtyThree) == 4 then
  83. SetStepComplete(Spawn, FarSeas_SixtyThree, 4)
  84. end
  85. FaceTarget(NPC, Spawn)
  86. Dialog.New(NPC, Spawn)
  87. Dialog.AddDialog("Grand work! A bit late, but grand none-the-less. These items will soon become fine garments and armor, Diggs Armor. Thank you, huntsman! Here is the payment for your labor.")
  88. Dialog.AddVoiceover("voiceover/english/merchant_diggin_diggs/qey_village06/merchantdiggindiggs004.mp3", 1093156454, 3294248254)
  89. PlayFlavor(NPC, "", "", "thanks", 0, 0, Spawn)
  90. Dialog.AddOption("I'm glad I could help.")
  91. Dialog.Start()
  92. end
  93. function Dialog8(NPC, Spawn)
  94. FaceTarget(NPC, Spawn)
  95. Dialog.New(NPC, Spawn)
  96. Dialog.AddDialog("Try to make them high quality pelts!")
  97. Dialog.AddOption("Ok.")
  98. Dialog.Start()
  99. end