these_boots_were_made_for.lua 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  1. --[[
  2. Script Name : Quests/Antonica/these_boots_were_made_for.lua
  3. Script Author : Premierio015
  4. Script Date : 2023.04.20 06:04:34
  5. Script Purpose :
  6. Zone : Antonica
  7. Quest Giver:
  8. Preceded by: None
  9. Followed by:
  10. --]]
  11. require "SpawnScripts/Generic/DialogModule"
  12. require "SpawnScripts/Generic/PlayerHistory"
  13. function Init(Quest)
  14. AddQuestStepHarvest(Quest, 1, "Harvest 100 iron clusters in Antonica for Hwal, making sure to save them to give to him.", 100, 100, "Hwal needs me to gather the raw materials for the weapons he's planning to make for the sentries.", 1085, 8395)
  15. AddQuestStepHarvest(Quest, 2, "Harvest 100 severed maple in Antonica for Hwal, making sure to save the wood to give to him.", 100, 100, "Hwal needs me to gather the raw materials for the weapons he's planning to make for the sentries.", 824, 12101)
  16. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  17. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  18. SetQuestFeatherColor(Quest, 1) -- PURPLE FOR HERITAGE QUESTS
  19. SetQuestRewardStatus(Quest, 29666)
  20. end
  21. function Accepted(Quest, QuestGiver, Player)
  22. FaceTarget(QuestGiver, Player)
  23. Dialog.New(QuestGiver, Player)
  24. Dialog.AddDialog("Much thanks to ya, stranger! I'm not sure I could finish the job without your help! I need plenty of iron and wood for these weapons. It's a lot of work, but I'm sure that together we can get it done in half the time that it'd take me to do it alone!")
  25. Dialog.AddVoiceover("voiceover/english/hwal_rucksif/antonica/hwal_rucksif003.mp3", 584697893, 4066288386)
  26. Dialog.AddEmote("nod")
  27. Dialog.AddOption("It'd better be worth my time, dwarf.")
  28. Dialog.Start()
  29. end
  30. function Declined(Quest, QuestGiver, Player)
  31. -- Add dialog here for when the quest is declined
  32. end
  33. function Deleted(Quest, QuestGiver, Player)
  34. -- Remove any quest specific items here when the quest is deleted
  35. end
  36. function Step1Complete(Quest, QuestGiver, Player)
  37. UpdateQuestStepDescription(Quest, 1, "You've harvested 100 iron clusters in Antonica for Hwal.")
  38. CheckProgress(Quest, QuestGiver, Player)
  39. end
  40. function Step2Complete(Quest, QuestGiver, Player)
  41. UpdateQuestStepDescription(Quest, 2, "You've harvested 100 severed maple in Antonica for Hwal.")
  42. CheckProgress(Quest, QuestGiver, Player)
  43. end
  44. function CheckProgress(Quest, QuestGiver, Player)
  45. if QuestStepIsComplete(Player, 5805, 1) and QuestStepIsComplete(Player, 5805, 2) then
  46. UpdateQuestTaskGroupDescription(Quest, 1, "I've gathered the raw materials Hwal needs.")
  47. AddQuestStepChat(Quest, 3, "Return to Hwal with at least 10 iron clusters and 10 maple branches.", 1, "I need to bring back at least 10 iron clusters and 10 severed maple branches.", 11, 120197)
  48. AddQuestStepCompleteAction(Quest, 3, "Step3Complete")
  49. elseif QuestStepIsComplete(Player, 5805, 12) and QuestStepIsComplete(Player, 5805, 13) then
  50. UpdateQuestTaskGroupDescription(Quest, 9, "I've gathered the steel and the leather Hwal's new boots will need.")
  51. AddQuestStepChat(Quest, 14, "Speak with Minty in the Thundermist Village about making the boots.", 1, "Now that I've got the steel and leather for the boots, I should speak with Minty Frostbeard.", 11, 2490173)
  52. AddQuestStepCompleteAction(Quest, 14, "Step14Complete")
  53. end
  54. end
  55. function Step3Complete(Quest, QuestGiver, Player)
  56. if HasItem(Player, 8395) and GetItemCount(8395) >= 100 then
  57. RemoveItem(Player, 8395, 100)
  58. elseif HasItem(Player, 12101) and GetItemCount(12101) >= 100 then
  59. RemoveItem(Player, 12101, 100)
  60. end
  61. UpdateQuestStepDescription(Quest, 3, "You've given Hwal the raw materials he needs.")
  62. UpdateQuestTaskGroupDescription(Quest, 2, "I've given Hwal all the components he needs.")
  63. AddQuestStepKill(Quest, 4, "Search Blackburrow for the ore Hwal needs for the blade.", 1, 50, "Hwal has instructed me to find some rarer components for the guard captain's sword he is smithing.", 1124, 170010, 170029)
  64. AddQuestStepCompleteAction(Quest, 4, "Step4Complete")
  65. end
  66. function Step4Complete(Quest, QuestGiver, Player)
  67. UpdateQuestStepDescription(Quest, 4, "You've found the ore Hwal needs for the captain's sword.")
  68. AddQuestStepKill(Quest, 5, "Deep in Stormhold is a rare wood Hwal must have for the hilt.", 1, 50, "Hwal has instructed me to find some rarer components for the guard captain's sword he is smithing.", 826, 150024, 150239)
  69. AddQuestStepCompleteAction(Quest, 5, "Step5Complete")
  70. end
  71. function Step5Complete(Quest, QuestGiver, Player)
  72. UpdateQuestStepDescription(Quest, 5, "You've found the wood Hwal needs for the captain's sword.")
  73. AddQuestStepKill(Quest, 6, "Hwal specified a rare and tough griffin hide from the Thundering Steppes for the bindings.", 1, 100, "Hwal has instructed me to find some rarer components for the guard captain's sword he is smithing.", 122, 2490072)
  74. AddQuestStepCompleteAction(Quest, 6, "Step6Complete")
  75. end
  76. function Step6Complete(Quest, QuestGiver, Player)
  77. UpdateQuestStepDescription(Quest, 6, "You've found the leather Hwal needs for the captain's sword.")
  78. UpdateQuestTaskGroupDescription(Quest, 3, "I've found the rare components Hwal needs for the captain's sword.")
  79. AddQuestStepChat(Quest, 7, "Return to Hwal with the components.", 1, "I need to return to Hwal with the components I've gathered.", 11, 120197)
  80. AddQuestStepCompleteAction(Quest, 7, "Step7Complete")
  81. end
  82. function Step7Complete(Quest, QuestGiver, Player)
  83. UpdateQuestStepDescription(Quest, 7, "You've returned the components to Hwal.")
  84. UpdateQuestTaskGroupDescription(Quest, 4, "I've returned the components for the captain's sword to Hwal.")
  85. AddQuestStep(Quest, 8, "Search Blackburrow for the stout they create in their brewery for Hwal.", 1, 100, "Hwal is thirsty, and for some reason has decided that he wants me to get him a stout.", 308)
  86. AddQuestStepCompleteAction(Quest, 8, "Step8Complete")
  87. end
  88. function Step8Complete(Quest, QuestGiver, Player)
  89. UpdateQuestStepDescription(Quest, 8, "You've found the Blackburrow stout Hwal wants.")
  90. UpdateQuestTaskGroupDescription(Quest, 5, "I managed to find the Blackburrow stout Hwal wanted to quench his thirst.")
  91. AddQuestStepChat(Quest, 9, "Return to Hwal with the stout you took from Blackburrow.", 1, "Got the Blackburrow stout, now I just need to return with it to Hwal.", 11, 120197)
  92. AddQuestStepCompleteAction(Quest, 9, "Step9Complete")
  93. end
  94. function Step9Complete(Quest, QuestGiver, Player)
  95. UpdateQuestStepDescription(Quest, 9, "You've given Hwal the stout he asked for.")
  96. UpdateQuestTaskGroupDescription(Quest, 6, "I've returned the stout to Hwal.")
  97. AddQuestStepKill(Quest, 10, "Lay Hwal's grandfather's ghost to rest. He resides beneath Vhalen's tower.", 1, 100, "Hwal's grandfather needs to be laid to rest. His current incarnation; however, may be... unwilling...", 11, 8380000)
  98. AddQuestStepCompleteAction(Quest, 10, "Step10Complete")
  99. end
  100. function Step10Complete(Quest, QuestGiver, Player)
  101. UpdateQuestStepDescription(Quest, 10, "You've laid the spirit of Garanel Rucksif to rest.")
  102. UpdateQuestTaskGroupDescription(Quest, 7, "Garanel Rucksif has been laid to rest, and will trouble people no longer.")
  103. AddQuestStepChat(Quest, 11, "Speak with Hwal and let him know that his grandfather has been laid to rest.", 1, "I need to return to Hwal and let him know that I put Garanel.", 11, 120197)
  104. AddQuestStepCompleteAction(Quest, 11, "Step11Complete")
  105. end
  106. function Step11Complete(Quest, QuestGiver, Player)
  107. UpdateQuestStepDescription(Quest, 11, "You've laid the spirit of Garanel Rucksif to rest.")
  108. UpdateQuestTaskGroupDescription(Quest, 8, "I've informed Hwal that his grandfather has been laid to rest.")
  109. AddQuestStepKill(Quest, 12, "Harvest the antelopes in the Steppes for a special leather for Hwal's boots.", 1, 50, "Hwal has given me a list of things I will need for his new pair of boots.", 123, 2490052)
  110. AddQuestStepCompleteAction(Quest, 12, "Step12Complete")
  111. AddQuestStepKill(Quest, 13, "Search the Firerock giants in the Steppes for a special steel for Hwal's boots.", 1, 50, "Hwal has given me a list of things I will need for his new pair of boots.", 775, 2490071)
  112. AddQuestStepCompleteAction(Quest, 13, "Step13Complete")
  113. end
  114. function Step12Complete(Quest, QuestGiver, Player)
  115. UpdateQuestStepDescription(Quest, 12, "You've found the leather for Hwal's boots.")
  116. CheckProgress(Quest, QuestGiver, Player)
  117. end
  118. function Step13Complete(Quest, QuestGiver, Player)
  119. UpdateQuestStepDescription(Quest, 13, "You've found the steel for Hwal's boots.")
  120. CheckProgress(Quest, QuestGiver, Player)
  121. end
  122. function Step14Complete(Quest, QuestGiver, Player)
  123. UpdateQuestStepDescription(Quest, 14, "You've spoken with Minty Frostbeard about making Hwal's boots.")
  124. AddQuestStepChat(Quest, 15, "Speak with Minty again after she's had time to make the boots.", 1, "Now that I've got the steel and leather for the boots, I should speak with Minty Frostbeard.", 11, 2490173)
  125. AddQuestStepCompleteAction(Quest, 15, "Step15Complete")
  126. local time = os.time()
  127. SetPlayerHistory(Player, HISTORY.ANTONICA_BOOTS_HERITAGE_QUEST_WAIT, time)
  128. end
  129. function Step15Complete(Quest, QuestGiver, Player)
  130. UpdateQuestStepDescription(Quest, 15, "You've picked up the boots Minty made for Hwal.")
  131. UpdateQuestTaskGroupDescription(Quest, 10, "I've spoken with Minty and had her make Hwal's boots.")
  132. AddQuestStepChat(Quest, 16, "Return to Hwal with the boots Minty made for him.", 1, "I need to return to Hwal with the boots that Minty made for him.", 11, 120197)
  133. AddQuestStepCompleteAction(Quest, 16, "QuestComplete")
  134. end
  135. function QuestComplete(Quest, QuestGiver, Player)
  136. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  137. UpdateQuestStepDescription(Quest, 16, "You've returned with the boots Minty made for Hwal.")
  138. UpdateQuestTaskGroupDescription(Quest, 11, "I returned the boots Minty made to Hwal.")
  139. UpdateQuestDescription(Quest, "After a grueling series of tasks, Hwal Rucksif had the audacity to reward me with his... old work boots. Imagine that! All that work, and all he leaves me with is a pair of smelly old Dwarven Work Boots. At least they look broken in.")
  140. GiveQuestReward(Quest, Player)
  141. end
  142. function Reload(Quest, QuestGiver, Player, Step)
  143. if Step == 1 then
  144. Step1Complete(Quest, QuestGiver, Player)
  145. elseif Step == 2 then
  146. Step2Complete(Quest, QuestGiver, Player)
  147. elseif Step == 3 then
  148. Step3Complete(Quest, QuestGiver, Player)
  149. elseif Step == 4 then
  150. Step4Complete(Quest, QuestGiver, Player)
  151. elseif Step == 5 then
  152. Step5Complete(Quest, QuestGiver, Player)
  153. elseif Step == 6 then
  154. Step6Complete(Quest, QuestGiver, Player)
  155. elseif Step == 7 then
  156. Step7Complete(Quest, QuestGiver, Player)
  157. elseif Step == 8 then
  158. Step8Complete(Quest, QuestGiver, Player)
  159. elseif Step == 9 then
  160. Step9Complete(Quest, QuestGiver, Player)
  161. elseif Step == 10 then
  162. Step10Complete(Quest, QuestGiver, Player)
  163. elseif Step == 11 then
  164. Step11Complete(Quest, QuestGiver, Player)
  165. elseif Step == 12 then
  166. Step12Complete(Quest, QuestGiver, Player)
  167. elseif Step == 13 then
  168. Step13Complete(Quest, QuestGiver, Player)
  169. elseif Step == 14 then
  170. Step14Complete(Quest, QuestGiver, Player)
  171. elseif Step == 15 then
  172. Step15Complete(Quest, QuestGiver, Player)
  173. elseif Step == 16 then
  174. QuestComplete(Quest, QuestGiver, Player)
  175. end
  176. end