VengeanceforShoreside.lua 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. --[[
  2. Script Name : VengeanceforShoreside.lua
  3. Script Purpose : Handles the quest, "Vengeance for Shoreside"
  4. Script Author : jakejp
  5. Script Date : 12/29/2018
  6. Script Notes : Wiki says mobs are chosen randomly, attempt at making quest steps random
  7. Zone : The Ruins
  8. Quest Giver : Lieutenant Imperidus
  9. Preceded by : Knock the Fight Out of 'Em
  10. Followed by : Identifying the Lonetusk Ally
  11. --]]
  12. local VengeanceforShoreside = 393
  13. local LieutenantImperidus = 1270031
  14. local LonetuskSentry = 1270021
  15. local LonetuskWarrior = 1270032
  16. local LonetuskCrusher = 1270036
  17. local LonetuskPounder = 1270026
  18. local LonetuskShaman = 1270023
  19. local LonetuskProphet = 1270037
  20. choice = math.random(1, 6)
  21. function Init(Quest)
  22. AddQuestStepKill(Quest, 1, "Slay Lonetusk sentries", 5, 100, "In memory of the fallen citizens of Shoreside, I will take revenge upon the Lonetusk orcs in the Ruins. I can reach the Ruins by using any of the bells in and around the City of Freeport.", 2489, LonetuskSentry)
  23. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  24. AddQuestStepKill(Quest, 2, "Slay Lonetusk warriors", 5, 100, "In memory of the fallen citizens of Shoreside, I will take revenge upon the Lonetusk orcs in the Ruins. I can reach the Ruins by using any of the bells in and around the City of Freeport.", 2489, LonetuskWarrior)
  25. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  26. if choice == 1 then
  27. AddQuestStepKill(Quest, 3, "Slay Lonetusk crushers", 5, 100, "In memory of the fallen citizens of Shoreside, I will take revenge upon the Lonetusk orcs in the Ruins. I can reach the Ruins by using any of the bells in and around the City of Freeport.", 2489, LonetuskCrusher)
  28. AddQuestStepCompleteAction(Quest, 3, "Step3Complete")
  29. AddQuestStepKill(Quest, 4, "Slay Lonetusk pounders", 5, 100, "In memory of the fallen citizens of Shoreside, I will take revenge upon the Lonetusk orcs in the Ruins. I can reach the Ruins by using any of the bells in and around the City of Freeport.", 2489, LonetuskPounder)
  30. AddQuestStepCompleteAction(Quest, 4, "Step4Complete")
  31. elseif choice == 2 then
  32. AddQuestStepKill(Quest, 3, "Slay Lonetusk crushers", 5, 100, "In memory of the fallen citizens of Shoreside, I will take revenge upon the Lonetusk orcs in the Ruins. I can reach the Ruins by using any of the bells in and around the City of Freeport.", 2489, LonetuskCrusher)
  33. AddQuestStepCompleteAction(Quest, 3, "Step3Complete")
  34. AddQuestStepKill(Quest, 4, "Slay Lonetusk shamans", 5, 100, "In memory of the fallen citizens of Shoreside, I will take revenge upon the Lonetusk orcs in the Ruins. I can reach the Ruins by using any of the bells in and around the City of Freeport.", 2489, LonetuskShaman)
  35. AddQuestStepCompleteAction(Quest, 4, "Step5Complete")
  36. elseif choice == 3 then
  37. AddQuestStepKill(Quest, 3, "Slay Lonetusk crushers", 5, 100, "In memory of the fallen citizens of Shoreside, I will take revenge upon the Lonetusk orcs in the Ruins. I can reach the Ruins by using any of the bells in and around the City of Freeport.", 2489, LonetuskCrusher)
  38. AddQuestStepCompleteAction(Quest, 3, "Step3Complete")
  39. AddQuestStepKill(Quest, 4, "Slay Lonetusk prophets", 5, 100, "In memory of the fallen citizens of Shoreside, I will take revenge upon the Lonetusk orcs in the Ruins. I can reach the Ruins by using any of the bells in and around the City of Freeport.", 2489, LonetuskProphet)
  40. AddQuestStepCompleteAction(Quest, 4, "Step6Complete")
  41. elseif choice == 4 then
  42. AddQuestStepKill(Quest, 3, "Slay Lonetusk pounders", 5, 100, "In memory of the fallen citizens of Shoreside, I will take revenge upon the Lonetusk orcs in the Ruins. I can reach the Ruins by using any of the bells in and around the City of Freeport.", 2489, LonetuskPounder)
  43. AddQuestStepCompleteAction(Quest, 3, "Step4Complete")
  44. AddQuestStepKill(Quest, 4, "Slay Lonetusk shamans", 5, 100, "In memory of the fallen citizens of Shoreside, I will take revenge upon the Lonetusk orcs in the Ruins. I can reach the Ruins by using any of the bells in and around the City of Freeport.", 2489, LonetuskShaman)
  45. AddQuestStepCompleteAction(Quest, 4, "Step5Complete")
  46. elseif choice == 5 then
  47. AddQuestStepKill(Quest, 3, "Slay Lonetusk pounders", 5, 100, "In memory of the fallen citizens of Shoreside, I will take revenge upon the Lonetusk orcs in the Ruins. I can reach the Ruins by using any of the bells in and around the City of Freeport.", 2489, LonetuskPounder)
  48. AddQuestStepCompleteAction(Quest, 3, "Step4Complete")
  49. AddQuestStepKill(Quest, 4, "Slay Lonetusk prophets", 5, 100, "In memory of the fallen citizens of Shoreside, I will take revenge upon the Lonetusk orcs in the Ruins. I can reach the Ruins by using any of the bells in and around the City of Freeport.", 2489, LonetuskProphet)
  50. AddQuestStepCompleteAction(Quest, 4, "Step6Complete")
  51. elseif choice == 6 then
  52. AddQuestStepKill(Quest, 3, "Slay Lonetusk shamans", 5, 100, "In memory of the fallen citizens of Shoreside, I will take revenge upon the Lonetusk orcs in the Ruins. I can reach the Ruins by using any of the bells in and around the City of Freeport.", 2489, LonetuskShaman)
  53. AddQuestStepCompleteAction(Quest, 3, "Step5Complete")
  54. AddQuestStepKill(Quest, 4, "Slay Lonetusk prophets", 5, 100, "In memory of the fallen citizens of Shoreside, I will take revenge upon the Lonetusk orcs in the Ruins. I can reach the Ruins by using any of the bells in and around the City of Freeport.", 2489, LonetuskProphet)
  55. AddQuestStepCompleteAction(Quest, 4, "Step6Complete")
  56. end
  57. --AddQuestStepKill(Quest, 3, "Slay Lonetusk crushers", 5, 100, "In memory of the fallen citizens of Shoreside, I will take revenge upon the Lonetusk orcs in the Ruins. I can reach the Ruins by using any of the bells in and around the City of Freeport.", 2489, --[[ ID's --]])
  58. --AddQuestStepCompleteAction(Quest, 3, "Step3Complete")
  59. --AddQuestStepKill(Quest, 4, "Slay Lonetusk pounders", 5, 100, "In memory of the fallen citizens of Shoreside, I will take revenge upon the Lonetusk orcs in the Ruins. I can reach the Ruins by using any of the bells in and around the City of Freeport.", 2489, --[[ ID's --]])
  60. --AddQuestStepCompleteAction(Quest, 4, "Step4Complete")
  61. --AddQuestStepKill(Quest, 5, "Slay Lonetusk shamans", 5, 100, "In memory of the fallen citizens of Shoreside, I will take revenge upon the Lonetusk orcs in the Ruins. I can reach the Ruins by using any of the bells in and around the City of Freeport.", 2489, --[[ ID's --]])
  62. --AddQuestStepCompleteAction(Quest, 5, "Step5Complete")
  63. --AddQuestStepKill(Quest, 6, "Slay Lonetusk prophets", 5, 100, "In memory of the fallen citizens of Shoreside, I will take revenge upon the Lonetusk orcs in the Ruins. I can reach the Ruins by using any of the bells in and around the City of Freeport.", 2489, --[[ ID's --]])
  64. --AddQuestStepCompleteAction(Quest, 6, "Step6Complete")
  65. end
  66. function CheckProgress(Quest, QuestGiver, Player)
  67. if QuestStepIsComplete(Player, VengeanceforShoreside, 1) and QuestStepIsComplete(Player, VengeanceforShoreside, 2) and QuestStepIsComplete(Player, VengeanceforShoreside, 3) and QuestStepIsComplete(Player, VengeanceforShoreside, 4) then
  68. LastStep(Quest, QuestGiver, Player)
  69. end
  70. end
  71. function Step1Complete(Quest, QuestGiver, Player)
  72. UpdateQuestStepDescription(Quest, 1, "I have slain five Lonetusk sentries.")
  73. CheckProgress(Quest, QuestGiver, Player)
  74. end
  75. function Step2Complete(Quest, QuestGiver, Player)
  76. UpdateQuestStepDescription(Quest, 2, "I have slain five Lonetusk warriors.")
  77. CheckProgress(Quest, QuestGiver, Player)
  78. end
  79. function Step3Complete(Quest, QuestGiver, Player)
  80. UpdateQuestStepDescription(Quest, 3, "I have slain five Lonetusk crushers.")
  81. CheckProgress(Quest, QuestGiver, Player)
  82. end
  83. function Step4Complete(Quest, QuestGiver, Player)
  84. if choice == 1 then
  85. UpdateQuestStepDescription(Quest, 4, "I have slain five Lonetusk pounders.")
  86. elseif choice == 4 then
  87. UpdateQuestStepDescription(Quest, 3, "I have slain five Lonetusk pounders.")
  88. elseif choice == 5 then
  89. UpdateQuestStepDescription(Quest, 3, "I have slain five Lonetusk pounders.")
  90. end
  91. CheckProgress(Quest, QuestGiver, Player)
  92. end
  93. function Step5Complete(Quest, QuestGiver, Player)
  94. if choice == 2 then
  95. UpdateQuestStepDescription(Quest, 4, "I have slain five Lonetusk shamans.")
  96. elseif choice == 4 then
  97. UpdateQuestStepDescription(Quest, 4, "I have slain five Lonetusk shamans.")
  98. elseif choice == 6 then
  99. UpdateQuestStepDescription(Quest, 3, "I have slain five Lonetusk shamans.")
  100. end
  101. CheckProgress(Quest, QuestGiver, Player)
  102. end
  103. function Step6Complete(Quest, QuestGiver, Player)
  104. if choice == 3 then
  105. UpdateQuestStepDescription(Quest, 4, "I have slain five Lonetusk prophets.")
  106. elseif choice == 5 then
  107. UpdateQuestStepDescription(Quest, 4, "I have slain five Lonetusk prophets.")
  108. elseif choice == 6 then
  109. UpdateQuestStepDescription(Quest, 4, "I have slain five Lonetusk prophets.")
  110. end
  111. CheckProgress(Quest, QuestGiver, Player)
  112. end
  113. function LastStep(Quest, QuestGiver, Player)
  114. UpdateQuestTaskGroupDescription(Quest, 1, "I have honored the memory of Freeport's fallen by taking revenge on the Lonetusk.")
  115. AddQuestStepChat(Quest, 5, "Report to Lieutenant Imperidus", 1, "Having wiped out a considerable number of Lonetusk, I should report back to Lieutenant Imperidus in the Ruins. I can reach the Ruins by using any of the bells in and around the City of Freeport.", 11, LieutenantImperidus)
  116. AddQuestStepCompleteAction(Quest, 5, "QuestComplete")
  117. end
  118. function QuestComplete(Quest, QuestGiver, Player)
  119. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  120. UpdateQuestStepDescription(Quest, 5, "I have reported back to the lieutenant.")
  121. UpdateQuestTaskGroupDescription(Quest, 2, "I have reported back to Lieutenant Imperidus.")
  122. UpdateQuestDescription(Quest, "I killed Lonetusk orcs. Lots and lots of orcs. Lieutenant Imperidus and I both feel that we're making progress against these foul beasts, but more must be done to ensure Freeport's safety. The lieutenant has further orders for me that will hopefully help us turn the tide. Perhaps my efforts here have brought some measure of peace to the dead citizens of Shoreside.")
  123. GiveQuestReward(Quest, Player)
  124. end
  125. function Reload(Quest, QuestGiver, Player, Step)
  126. if Step == 1 then
  127. Step1Complete(Quest, QuestGiver, Player)
  128. elseif Step == 2 then
  129. Step2Complete(Quest, QuestGiver, Player)
  130. elseif Step == 3 then
  131. Step3Complete(Quest, QuestGiver, Player)
  132. elseif Step == 4 then
  133. Step4Complete(Quest, QuestGiver, Player)
  134. elseif Step == 5 then
  135. Step5Complete(Quest, QuestGiver, Player)
  136. elseif Step == 6 then
  137. Step6Complete(Quest, QuestGiver, Player)
  138. elseif Step == 7 then
  139. QuestComplete(Quest, QuestGiver, Player)
  140. end
  141. end
  142. function Accepted(Quest, QuestGiver, Player)
  143. FaceTarget(QuestGiver, Player)
  144. conversation = CreateConversation()
  145. PlayFlavor(QuestGiver, "voiceover/english/tutorial_revamp/lieutenant_imperidus/fprt_adv04_ruins/revamp/lieutenant_imperidus013.mp3", "", "", 1435258692, 228785667, Player)
  146. AddConversationOption(conversation, "I like the sound of this plan.", "dlg_6_3")
  147. StartConversation(conversation, QuestGiver, Player, "The surest way to take the fight out of the orcs is to thin their numbers. We have to show we will not tolerate their presence anymore. I need you to make a serious dent in the Lonetusk population. The streets of Shoreside must swell with the blood of these brutes.")
  148. end
  149. function Declined(Quest, QuestGiver, Player)
  150. -- Add dialog here for when the quest is declined
  151. end