IrontoeBrigadeRequisitionLists.lua 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. --[[
  2. Script Name : IrontoeBrigadeRequisitionLists.lua
  3. Script Purpose : Handles the quest, "Irontoe Brigade Requisition Lists"
  4. Script Author : jakejp
  5. Script Date : 6/8/2018
  6. Script Notes :
  7. Zone : Butcherblock Mountains
  8. Quest Giver :
  9. Preceded by : None
  10. Followed by : None
  11. --]]
  12. local IrontoeBrigadeRequisitionLists = 282
  13. function Init(Quest)
  14. AddQuestStepChat(Quest, 1, "I need the requisition list from the first Irontoe Brigade miner foreman.", 1, "I need the requisition lists from the Irontoe Brigade miner foremans.", 75, 1080328)
  15. AddQuestStepChat(Quest, 2, "I need the requisition list from the second Irontoe Brigade miner foreman.", 1, "I need the requisition lists from the Irontoe Brigade miner foremans.", 75, 1081245)
  16. AddQuestStepChat(Quest, 3, "I need the requisition list from the third Irontoe Brigade miner foreman.", 1, "I need the requisition lists from the Irontoe Brigade miner foremans.", 75, 1080324)
  17. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  18. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  19. AddQuestStepCompleteAction(Quest, 3, "Step3Complete")
  20. end
  21. function CheckProgress(Quest, QuestGiver, Player)
  22. if QuestStepIsComplete(Player, IrontoeBrigadeRequisitionLists, 1) and QuestStepIsComplete(Player, IrontoeBrigadeRequisitionLists, 2) and QuestStepIsComplete(Player, IrontoeBrigadeRequisitionLists, 3) then
  23. HandInQuest(Quest, QuestGiver, Player)
  24. end
  25. end
  26. function Step1Complete(Quest, QuestGiver, Player)
  27. UpdateQuestStepDescription(Quest, 1, "I have the first requisition list.")
  28. CheckProgress(Quest, QuestGiver, Player)
  29. end
  30. function Step2Complete(Quest, QuestGiver, Player)
  31. UpdateQuestStepDescription(Quest, 2, "I have the second requisition list.")
  32. CheckProgress(Quest, QuestGiver, Player)
  33. end
  34. function Step3Complete(Quest, QuestGiver, Player)
  35. UpdateQuestStepDescription(Quest, 3, "I have the third requisition list.")
  36. CheckProgress(Quest, QuestGiver, Player)
  37. end
  38. function HandInQuest(Quest, QuestGiver, Player)
  39. UpdateQuestTaskGroupDescription(Quest, 1, "I have collected the requisition lists.")
  40. AddQuestStepChat(Quest, 4, "I need to return to Argro.", 1, "I need to bring these requisition lists to Argro.", 11, 1081147)
  41. AddQuestStepCompleteAction(Quest, 4, "QuestComplete")
  42. end
  43. function QuestComplete(Quest, QuestGiver, Player)
  44. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  45. UpdateQuestStepDescription(Quest, 4, "I have spoken with Argro.")
  46. UpdateQuestTaskGroupDescription(Quest, 2, "I have given Argro the requision lists.")
  47. UpdateQuestDescription(Quest, "I got the requisition lists from the dig foremen for Argro.")
  48. GiveQuestReward(Quest, Player)
  49. end
  50. function Reload(Quest, QuestGiver, Player, Step)
  51. if Step == 1 then
  52. Step1Complete(Quest, QuestGiver, Player)
  53. elseif Step == 2 then
  54. Step2Complete(Quest, QuestGiver, Player)
  55. elseif Step == 3 then
  56. Step3Complete(Quest, QuestGiver, Player)
  57. elseif Step == 4 then
  58. QuestComplete(Quest, QuestGiver, Player)
  59. end
  60. end
  61. function Accepted(Quest, QuestGiver, Player)
  62. -- Add dialog here for when the quest is accepted
  63. end
  64. function Declined(Quest, QuestGiver, Player)
  65. -- Add dialog here for when the quest is declined
  66. end