DigginDiggs.lua 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. --[[
  2. Script Name : SpawnScripts/Baubbleshire/DigginDiggs.lua
  3. Script Purpose : Diggin Diggs <Armor and Shields>
  4. Script Author : Dorbin
  5. Script Date : 2022.01.20
  6. Script Notes : Reconstructed
  7. --]]
  8. -- Quest ID's
  9. local BADGER_PELTS_FOR_DIGGS = 332 -- was 58
  10. local FarSeas_Fifty = 236
  11. local FarSeas_SixtyThree = 237
  12. function spawn(NPC)
  13. ProvidesQuest(NPC, BADGER_PELTS_FOR_DIGGS)
  14. SetPlayerProximityFunction(NPC, 8, "InRange", "LeaveRange")
  15. end
  16. function respawn(NPC)
  17. spawn(NPC)
  18. end
  19. function InRange(NPC, Spawn)
  20. if not HasCompletedQuest(Spawn, BADGER_PELTS_FOR_DIGGS) then
  21. if math.random(0, 100) <= 65 then
  22. 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)
  23. end
  24. else
  25. end
  26. end
  27. function hailed(NPC, Spawn)
  28. FaceTarget(NPC, Spawn)
  29. conversation = CreateConversation()
  30. PlayFlavor(NPC, "voiceover/english/merchant_diggin_diggs/qey_village06/merchantdiggindiggs000.mp3", "", "", 96188472, 2463646265, Spawn)
  31. Begin(NPC, Spawn, conversation)
  32. end
  33. function Begin(NPC, Spawn, conversation)
  34. if not HasQuest(Spawn, BADGER_PELTS_FOR_DIGGS) and not HasCompletedQuest(Spawn, BADGER_PELTS_FOR_DIGGS) then
  35. AddConversationOption(conversation, "I don't need a sales pitch. Got any work?", "GotAnyWork")
  36. elseif HasQuest(Spawn, BADGER_PELTS_FOR_DIGGS) and GetQuestStep(Spawn, BADGER_PELTS_FOR_DIGGS) == 2 then
  37. AddConversationOption(conversation, "Here is your bundle of badget pelts.", "BundleOfPelts")
  38. elseif HasQuest(Spawn, FarSeas_Fifty) and GetQuestStep(Spawn, FarSeas_Fifty) == 4 then
  39. AddConversationOption(conversation, "I've finished your requisition order number fifty.", "FarSeas_FiftyDone")
  40. elseif HasQuest(Spawn, FarSeas_SixtyThree) and GetQuestStep(Spawn, FarSeas_SixtyThree) == 4 then
  41. AddConversationOption(conversation, "I've finished your requisition order number sixty-three.", "FarSeas_SixtyThreeDone")
  42. end
  43. AddConversationOption(conversation, "Sorry. Just passing by.")
  44. StartConversation(conversation, NPC, Spawn, "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.")
  45. end
  46. function GotAnyWork(NPC, Spawn)
  47. PlayFlavor(NPC, "voiceover/english/merchant_diggin_diggs/qey_village06/merchantdiggindiggs001.mp3", "", "", 4059634840, 1440996220, Spawn)
  48. FaceTarget(NPC, Spawn)
  49. conversation = CreateConversation()
  50. AddConversationOption(conversation, "I'm interested.", "ImInterested")
  51. AddConversationOption(conversation, "I don't have time to hunt.")
  52. StartConversation(conversation, NPC, Spawn, "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?")
  53. end
  54. function ImInterested(NPC, Spawn)
  55. PlayFlavor(NPC, "voiceover/english/merchant_diggin_diggs/qey_village06/merchantdiggindiggs002.mp3", "", "", 2590912109, 2110560767, Spawn)
  56. FaceTarget(NPC, Spawn)
  57. conversation = CreateConversation()
  58. AddConversationOption(conversation, "I will return with the bundle of badger pelts. ", "OfferQuest1")
  59. StartConversation(conversation, NPC, Spawn, "Then prepare for a hunting trip in the Forest Ruins. I'll pay you handsomely for a bundle of badger pelts. I may even toss in a bit of Diggs' finest armor.")
  60. end
  61. function OfferQuest1(NPC, Spawn)
  62. FaceTarget(NPC, Spawn)
  63. OfferQuest(NPC, Spawn, BADGER_PELTS_FOR_DIGGS)
  64. end
  65. function BundleOfPelts(NPC, Spawn)
  66. PlayFlavor(NPC, "voiceover/english/merchant_diggin_diggs/qey_village06/merchantdiggindiggs003.mp3", "", "thank", 2263319370, 3568007530, Spawn)
  67. SetStepComplete(Spawn, BADGER_PELTS_FOR_DIGGS, 2)
  68. FaceTarget(NPC, Spawn)
  69. conversation = CreateConversation()
  70. AddConversationOption(conversation, "I guess this is better than nothing.")
  71. StartConversation(conversation, NPC, Spawn, "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!")
  72. end
  73. function FarSeas_FiftyDone(NPC, Spawn)
  74. SetStepComplete(Spawn, FarSeas_Fifty, 4)
  75. FaceTarget(NPC, Spawn)
  76. conversation = CreateConversation()
  77. AddConversationOption(conversation, "I'm glad I could help.")
  78. StartConversation(conversation, NPC, Spawn, "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.")
  79. PlayFlavor(NPC, "voiceover/english/merchant_diggin_diggs/qey_village06/merchantdiggindiggs004.mp3", "", "thank", 1093156454, 3294248254, Spawn)
  80. end
  81. function FarSeas_SixtyThree(NPC, Spawn)
  82. SetStepComplete(Spawn, FarSeas_SixtyThree, 4)
  83. FaceTarget(NPC, Spawn)
  84. conversation = CreateConversation()
  85. AddConversationOption(conversation, "I'm glad I could help.")
  86. StartConversation(conversation, NPC, Spawn, "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.")
  87. PlayFlavor(NPC, "voiceover/english/merchant_diggin_diggs/qey_village06/merchantdiggindiggs004.mp3", "", "thank", 1093156454, 3294248254, Spawn)
  88. end