CoinForTheCaptain.lua 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. --[[
  2. Script Name : Quests/ButcherblockMountains/CoinForTheCaptain
  3. Script Purpose : Handles the quest, "Coin for the Captain"
  4. Script Author : jakejp
  5. Script Date : 6/2/2018
  6. Script Notes :
  7. Zone : Butcherblock Mountains
  8. Quest Giver : Dockmaster Waulon
  9. Preceded by : None
  10. Followed by : None
  11. --]]
  12. local CoinForTheCaptain = 255
  13. local CaptainSays = 251
  14. function Accepted(Quest, QuestGiver, Player)
  15. -- Add dialog here for when the quest is accepted
  16. end
  17. function Declined(Quest, QuestGiver, Player)
  18. -- Add dialog here for when the quest is declined
  19. end
  20. function Init(Quest)
  21. AddQuestStepChat(Quest, 1, "I need to deliver this sack of coins to Captain Stonnacky.", 1, "I need to deliver a sack of coins to Captain Stonnacky at once.", 11, 1081077)
  22. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  23. end
  24. function Step1Complete(Quest, QuestGiver, Player)
  25. UpdateQuestStepDescription(Quest, 1, "I have delivered the coins to Captain Stonnacky.")
  26. AddQuestStep(Quest, 2, "I need to help Captain Stonnacky with his task.", 1, 100, "I need to deliver a sack of coins to Captain Stonnacky at once.", 11)
  27. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  28. end
  29. function Step2Complete(Quest, QuestGiver, Player)
  30. UpdateQuestStepDescription(Quest, 2, "I have helped Captain Stonnacky.")
  31. UpdateQuestTaskGroupDescription(Quest, 1, "I've delivered the sack of coins to Captain Stonnacky.")
  32. AddQuestStepChat(Quest, 3, "I need to speak with Dockmaster Waulon.", 1, "I need to let Dockmaster Waulon know I delivered the sack of coins to Captain Stonnacky, safetly.", 11, 1080008)
  33. AddQuestStepCompleteAction(Quest, 3, "QuestComplete")
  34. end
  35. function QuestComplete(Quest, QuestGiver, Player)
  36. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  37. UpdateQuestStepDescription(Quest, 3, "I spoke with Dockmaster Waulon.")
  38. UpdateQuestTaskGroupDescription(Quest, 2, "I spoke with Dockmaster Waulon.")
  39. UpdateQuestDescription(Quest, "After delivering the sack of coin to the venerable captain, I took some time to assist him in an errand. Now that I've completed his quest, I need to report back to Dockmaster Waulon.")
  40. GiveQuestReward(Quest, Player)
  41. end
  42. function Reload(Quest, QuestGiver, Player, Step)
  43. if Step == 1 then
  44. Step1Complete(Quest, QuestGiver, Player)
  45. elseif Step == 2 then
  46. Step2Complete(Quest, QuestGiver, Player)
  47. elseif Step == 3 then
  48. QuestComplete(Quest, QuestGiver, Player)
  49. end
  50. end