the_stolen_supplies.lua 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. --[[
  2. Script Name : Quests/GobblerocksHideout/the_stolen_supplies.lua
  3. Script Author : Premierio015
  4. Script Date : 2021.07.16 05:07:41
  5. Script Purpose :
  6. Zone : GobblerocksHideout
  7. Quest Giver:
  8. Preceded by: None
  9. Followed by:
  10. --]]
  11. function Init(Quest)
  12. AddQuestStepKill(Quest, 1, "I need to reclaim 15 pieces of stolen supplies from dead Gobblerock clan goblins", 15, 100, "I must collect all of the stolen supplies from the Sewer System Number 5.", 2287, 3490001, 3490000, 3490002, 3490003, 3490004, 3490005, 3490007, 3490008, 3490009, 3490010, 3490011, 3490012, 3490051, 3490052, 3490053, 3490054, 3490055, 3490056, 3490060, 3490061, 3490062)
  13. AddQuestStepKill(Quest, 2, "I need to collect 4 skins of brambleberry ale from the Gobblerock hooligans", 4, 100, "I must collect all of the stolen supplies from the Sewer System Number 5.", 406, 3490010, 3490061)
  14. AddQuestStep(Quest, 3, "I need to collect the first stolen chest of supplies", 1, 100, "I must collect all of the stolen supplies from the Sewer System Number 5.", 566)
  15. AddQuestStep(Quest, 4, "I need to collect the second stolen chest of supplies", 1, 100, "I must collect all of the stolen supplies from the Sewer System Number 5.", 566)
  16. AddQuestStep(Quest, 5, "I need to collect the third stolen chest of supplies", 1, 100, "I must collect all of the stolen supplies from the Sewer System Number 5.", 566)
  17. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  18. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  19. AddQuestStepCompleteAction(Quest, 3, "Step3Complete")
  20. AddQuestStepCompleteAction(Quest, 4, "Step4Complete")
  21. AddQuestStepCompleteAction(Quest, 5, "Step5Complete")
  22. end
  23. function Accepted(Quest, QuestGiver, Player)
  24. FaceTarget(QuestGiver, Player)
  25. local conversation = CreateConversation()
  26. AddConversationOption(conversation, "I will be back later then.")
  27. StartConversation(conversation, QuestGiver, Player, "Well, then let me know when you have collected everything.")
  28. end
  29. function Declined(Quest, QuestGiver, Player)
  30. -- Add dialog here for when the quest is declined
  31. end
  32. function Deleted(Quest, QuestGiver, Player)
  33. -- Remove any quest specific items here when the quest is deleted
  34. end
  35. function Step1Complete(Quest, QuestGiver, Player)
  36. UpdateQuestStepDescription(Quest, 1, "I have collected the 15 pieces of stolen supplies.")
  37. CheckProgress(Quest, QuestGiver, Player)
  38. end
  39. function Step2Complete(Quest, QuestGiver, Player)
  40. UpdateQuestStepDescription(Quest, 2, "I have collected 4 skins of brambleberry ale.")
  41. CheckProgress(Quest, QuestGiver, Player)
  42. end
  43. function Step3Complete(Quest, QuestGiver, Player)
  44. UpdateQuestStepDescription(Quest, 3, "I have collected the first stolen chest of supplies.")
  45. CheckProgress(Quest, QuestGiver, Player)
  46. end
  47. function Step4Complete(Quest, QuestGiver, Player)
  48. UpdateQuestStepDescription(Quest, 4, "I have collected the second stolen chest of supplies.")
  49. CheckProgress(Quest, QuestGiver, Player)
  50. end
  51. function Step5Complete(Quest, QuestGiver, Player)
  52. UpdateQuestStepDescription(Quest, 5, "I have collected the third stolen chest of supplies.")
  53. CheckProgress(Quest, QuestGiver, Player)
  54. end
  55. function CheckProgress(Quest, QuestGiver, Player)
  56. if QuestStepIsComplete(Player, 5324, 1) and QuestStepIsComplete(Player, 5324, 2) and QuestStepIsComplete(Player, 5324, 3) and QuestStepIsComplete(Player, 5324, 4) and QuestStepIsComplete(Player, 5324, 5) then
  57. UpdateQuestTaskGroupDescription(Quest, 1, "I have collected all of the stolen supplies.")
  58. AddQuestStepChat(Quest, 6, "I must return these stolen goods to Master Jaedra. He better be happy with what I have done.", 1, "I must speak to Master Jaedra and return the stolen supplies to him.", 11, 330245)
  59. AddQuestStepCompleteAction(Quest, 6, "QuestComplete")
  60. end
  61. end
  62. function QuestComplete(Quest, QuestGiver, Player)
  63. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  64. UpdateQuestStepDescription(Quest, 6, "I have completed my task.")
  65. UpdateQuestTaskGroupDescription(Quest, 2, "I have spoken to Master Jaedra.")
  66. UpdateQuestDescription(Quest, "I have completed my task.")
  67. GiveQuestReward(Quest, Player)
  68. end
  69. function Reload(Quest, QuestGiver, Player, Step)
  70. if Step == 1 then
  71. Step1Complete(Quest, QuestGiver, Player)
  72. elseif Step == 2 then
  73. Step2Complete(Quest, QuestGiver, Player)
  74. elseif Step == 3 then
  75. Step3Complete(Quest, QuestGiver, Player)
  76. elseif Step == 4 then
  77. Step4Complete(Quest, QuestGiver, Player)
  78. elseif Step == 5 then
  79. Step5Complete(Quest, QuestGiver, Player)
  80. elseif Step == 6 then
  81. QuestComplete(Quest, QuestGiver, Player)
  82. end
  83. end