the_stein_of_moggok_it_can_be_rebuilt.lua 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. --[[
  2. Script Name : Quests/CityofFreeport/the_stein_of_moggok_it_can_be_rebuilt.lua
  3. Script Purpose : Handles the quest, "The Stein of Moggok: It Can Be Rebuilt..."
  4. Script Author : premierio015
  5. Script Date : 02.04.2022
  6. Script Notes :
  7. Zone : Freeport
  8. Quest Giver : Rumdum
  9. Preceded by : None
  10. Followed by : None
  11. --]]
  12. function Init(Quest)
  13. AddQuestStepKill(Quest, 1, "I need to recover the left half of the Stein from the Feerrott Bouncers.", 1, 100, "I need to collect the four pieces of the Stein of Moggok from the Bouncers in the Feerrott.", 11, 1210139)
  14. AddQuestStepKill(Quest, 2, "I need to recover the right half of the Stein from the Feerrott Bouncers.", 1, 100, "I need to collect the four pieces of the Stein of Moggok from the Bouncers in the Feerrott.", 11, 1210156)
  15. AddQuestStepKill(Quest, 3, "I need to recover the handle of the Stein from the Feerrott Bouncers.", 1, 100, "I need to collect the four pieces of the Stein of Moggok from the Bouncers in the Feerrott.", 11, 1210148)
  16. AddQuestStepKill(Quest, 4, "I need to recover the lid of the Stein from the Feerrott Bouncers.", 1, 100, "I need to collect the four pieces of the Stein of Moggok from the Bouncers in the Feerrott.", 11, 1210098)
  17. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  18. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  19. AddQuestStepCompleteAction(Quest, 3, "Step3Complete")
  20. AddQuestStepCompleteAction(Quest, 4, "Step4Complete")
  21. SetQuestRewardStatus(Quest, 44800)
  22. end
  23. function Accepted(Quest, QuestGiver, Player)
  24. -- Add dialog here for when the quest is accepted
  25. end
  26. function Declined(Quest, QuestGiver, Player)
  27. -- Add dialog here for when the quest is declined
  28. end
  29. function Deleted(Quest, QuestGiver, Player)
  30. -- Remove any quest specific items here when the quest is deleted
  31. end
  32. function Step1Complete(Quest, QuestGiver, Player)
  33. UpdateQuestStepDescription(Quest, 1, "I got the left half of the Stein from Bouncer Flerb.")
  34. CheckProgress(Quest, QuestGiver, Player)
  35. end
  36. function Step2Complete(Quest, QuestGiver, Player)
  37. UpdateQuestStepDescription(Quest, 2, "I got the right half of the Stein from Bouncer Fug.")
  38. CheckProgress(Quest, QuestGiver, Player)
  39. end
  40. function Step3Complete(Quest, QuestGiver, Player)
  41. UpdateQuestStepDescription(Quest, 3, "I got the handle of the Stein from Bouncer Hurd.")
  42. CheckProgress(Quest, QuestGiver, Player)
  43. end
  44. function CheckProgress(Quest, QuestGiver, Player)
  45. if QuestStepIsComplete(Player, 5511, 1) and QuestStepIsComplete(Player, 5511, 2) and QuestStepIsComplete(Player, 5511, 3) and QuestStepIsComplete(Player, 5511, 4) then
  46. Step4Complete(Quest, QuestGiver, Player)
  47. end
  48. end
  49. function Step4Complete(Quest, QuestGiver, Player)
  50. UpdateQuestStepDescription(Quest, 4, "I got the lid of the Stein from Bouncer Prud.")
  51. UpdateQuestTaskGroupDescription(Quest, 1, "I collected all four pieces of the Stein of Moggok.")
  52. AddQuestStepChat(Quest, 5, "I should speak with Rumdum.", 1, "I should speak with Rumdum.", 11, 1280030, 5590392)
  53. AddQuestStepCompleteAction(Quest, 5, "Step5Complete")
  54. end
  55. function Step5Complete(Quest, QuestGiver, Player)
  56. UpdateQuestStepDescription(Quest, 5, "I spoke with Rumdum.")
  57. UpdateQuestTaskGroupDescription(Quest, 2, "I spoke with Rumdum.")
  58. AddQuestStepKill(Quest, 6, "I need to get the Blood Ruby.", 1, 100, "I need to find the resting place of Clurg in the Feerrott and find a Blood Ruby.", 1194, 1210294)
  59. AddQuestStepCompleteAction(Quest, 6, "Step6Complete")
  60. end
  61. function Step6Complete(Quest, QuestGiver, Player)
  62. UpdateQuestStepDescription(Quest, 6, "I got the Blood Ruby from Clurg.")
  63. UpdateQuestTaskGroupDescription(Quest, 3, "I got the Blood Ruby from Clurg.")
  64. AddQuestStepChat(Quest, 7, "I should speak with Rumdum.", 1, "I should speak with Rumdum.", 11, 1280030, 5590392)
  65. AddQuestStepCompleteAction(Quest, 7, "Step7Complete")
  66. end
  67. function Step7Complete(Quest, QuestGiver, Player)
  68. UpdateQuestStepDescription(Quest, 7, "I spoke with Rumdum.")
  69. UpdateQuestTaskGroupDescription(Quest, 4, "I spoke with Rumdum.")
  70. GiveQuestItem(Quest, Player, "I spoke with Rumdum." , 13961, 14072, 31562)
  71. AddQuestStepCraft(Quest, 8, "I need to remake the Stein of Moggok.", 1, 100, "I need to remake the Stein of Moggok using Rumdum's family Recipe.", 11, 54775)
  72. AddQuestStepCompleteAction(Quest, 8, "QuestComplete")
  73. end
  74. function QuestComplete(Quest, QuestGiver, Player)
  75. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  76. UpdateQuestStepDescription(Quest, 8, "I remade the Stein of Moggok!")
  77. UpdateQuestTaskGroupDescription(Quest, 5, "I remade the Stein of Moggok!")
  78. UpdateQuestDescription(Quest, "I was able to rebuild the Stein of Moggok! I'll be sure not to mention this to Rumdum...")
  79. GiveQuestReward(Quest, Player)
  80. end
  81. function Reload(Quest, QuestGiver, Player, Step)
  82. if Step == 1 then
  83. Step1Complete(Quest, QuestGiver, Player)
  84. elseif Step == 2 then
  85. Step2Complete(Quest, QuestGiver, Player)
  86. elseif Step == 3 then
  87. Step3Complete(Quest, QuestGiver, Player)
  88. elseif Step == 4 then
  89. Step4Complete(Quest, QuestGiver, Player)
  90. elseif Step == 5 then
  91. Step5Complete(Quest, QuestGiver, Player)
  92. elseif Step == 6 then
  93. Step6Complete(Quest, QuestGiver, Player)
  94. elseif Step == 7 then
  95. Step7Complete(Quest, QuestGiver, Player)
  96. elseif Step == 8 then
  97. QuestComplete(Quest, QuestGiver, Player)
  98. end
  99. end