goods_down_below.lua 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  1. --[[
  2. Script Name : Quests/TheDownBelow/goods_down_below.lua
  3. Script Author : Premierio015
  4. Script Date : 2021.10.28 06:10:27
  5. Script Purpose :
  6. Zone : TheDownBelow
  7. Quest Giver: Falin Shaloon(1990040)
  8. Preceded by: None
  9. Followed by:
  10. --]]
  11. function Init(Quest)
  12. local RandomChoice = MakeRandomInt(1, 3)
  13. SetQuestFeatherColor(Quest, 3)
  14. SetQuestRepeatable(Quest)
  15. if RandomChoice == 1 then
  16. AddQuestStepKill(Quest, 1, "Get six malefic arachnid fangs.", 6, 100, "I need to collect an assortment of beetle part; spider parts; and rotting humanoids while here in the Down Below.", 163, 1990020, 1990021, 8340032)
  17. AddQuestStepKill(Quest, 2, "Get six venom spitter fangs.", 6, 100, "I need to collect an assortment of beetle part; spider parts; and rotting humanoids while here in the Down Below.", 163, 1990029, 1990035, 8340049)
  18. AddQuestStepKill(Quest, 3, "Get four crypt substances' slime.", 4, 100, "I need to collect an assortment of beetle part; spider parts; and rotting humanoids while here in the Down Below.", 158, 1990003, 8340022)
  19. AddQuestStepKill(Quest, 4, "Get four tomb rifter pest shells.", 4, 100, "I need to collect an assortment of beetle part; spider parts; and rotting humanoids while here in the Down Below.", 162, 1990033, 8340047)
  20. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  21. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  22. AddQuestStepCompleteAction(Quest, 3, "Step3Complete")
  23. AddQuestStepCompleteAction(Quest, 4, "Step4Complete")
  24. elseif RandomChoice == 2 then
  25. AddQuestStepKill(Quest, 1, "Get five coiled burrower skins.", 5, 100, "I need to collect an assortment of beetle part; spider parts; and rotting humanoids while here in the Down Below.", 172, 1990009, 8340020)
  26. AddQuestStepKill(Quest, 2, "Get five tomb forager skulls.", 5, 100, "I need to collect an assortment of beetle part; spider parts; and rotting humanoids while here in the Down Below.", 91, 1990002, 1990005, 8340043)
  27. AddQuestStepKill(Quest, 3, "Get four tomb rifter hatchling shells.", 4, 100, "I need to collect an assortment of beetle part; spider parts; and rotting humanoids while here in the Down Below.", 162, 1990019, 1990031, 8340046)
  28. AddQuestStepKill(Quest, 4, "Get six malefic arachnid fangs.", 6, 100, "I need to collect an assortment of beetle part; spider parts; and rotting humanoids while here in the Down Below.", 163, 1990020, 1990021, 8340032)
  29. AddQuestStepCompleteAction(Quest, 1, "Step1_2Complete")
  30. AddQuestStepCompleteAction(Quest, 2, "Step2_2Complete")
  31. AddQuestStepCompleteAction(Quest, 3, "Step3_2Complete")
  32. AddQuestStepCompleteAction(Quest, 4, "Step4_4Complete")
  33. elseif RandomChoice == 3 then
  34. AddQuestStepKill(Quest, 1, "Get four tomb rifter bleeder shells.", 4, 100, "I need to collect an assortment of beetle part; spider parts; and rotting humanoids while here in the Down Below.", 162, 1990045, 1990046, 1990047, 1990044, 8340044, 8340045)
  35. AddQuestStepKill(Quest, 2, "Get five coiled burrower skins.", 5, 100, "I need to collect an assortment of beetle part; spider parts; and rotting humanoids while here in the Down Below.", 172, 1990009, 8340020)
  36. AddQuestStepKill(Quest, 3, "Get six venom spitter fangs.", 6, 100, "I need to collect an assortment of beetle part; spider parts; and rotting humanoids while here in the Down Below.", 163, 1990029, 1990035, 8340049)
  37. AddQuestStepKill(Quest, 4, "Get five tomb forager skulls.", 5, 100, "I need to collect an assortment of beetle part; spider parts; and rotting humanoids while here in the Down Below.", 91, 1990002, 1990005, 8340043)
  38. AddQuestStepCompleteAction(Quest, 1, "Step1_3Complete")
  39. AddQuestStepCompleteAction(Quest, 2, "Step2_3Complete")
  40. AddQuestStepCompleteAction(Quest, 3, "Step3_3Complete")
  41. AddQuestStepCompleteAction(Quest, 4, "Step4_3Complete")
  42. end
  43. end
  44. function Step1Complete(Quest, QuestGiver, Player)
  45. UpdateQuestStepDescription(Quest, 1, "I've got the malefic arachnid fangs.")
  46. CheckProgress(Quest, QuestGiver, Player)
  47. end
  48. function Step2Complete(Quest, QuestGiver, Player)
  49. UpdateQuestStepDescription(Quest, 2, "I've got the venom spitter fangs.")
  50. CheckProgress(Quest, QuestGiver, Player)
  51. end
  52. function Step3Complete(Quest, QuestGiver, Player)
  53. UpdateQuestStepDescription(Quest, 3, "I've gotten the crypt substances' slime.")
  54. CheckProgress(Quest, QuestGiver, Player)
  55. end
  56. function Step4Complete(Quest, QuestGiver, Player)
  57. UpdateQuestStepDescription(Quest, 4, "I've got the coiled burrower skins.")
  58. CheckProgress(Quest, QuestGiver, Player)
  59. end
  60. -----
  61. function Step1_2Complete(Quest, QuestGiver, Player)
  62. UpdateQuestStepDescription(Quest, 1, "I've got the coiled burrower skins.")
  63. CheckProgress(Quest, QuestGiver, Player)
  64. end
  65. function Step2_2Complete(Quest, QuestGiver, Player)
  66. UpdateQuestStepDescription(Quest, 2, "I've got the tomb forager skulls.")
  67. CheckProgress(Quest, QuestGiver, Player)
  68. end
  69. function Step3_2Complete(Quest, QuestGiver, Player)
  70. UpdateQuestStepDescription(Quest, 3, "I've got the tomb rifter hatchling shells.")
  71. CheckProgress(Quest, QuestGiver, Player)
  72. end
  73. function Step4_2Complete(Quest, QuestGiver, Player)
  74. UpdateQuestStepDescription(Quest, 4, "I've got the malefic arachnid fangs.")
  75. CheckProgress(Quest, QuestGiver, Player)
  76. end
  77. -----
  78. function Step1_3Complete(Quest, QuestGiver, Player)
  79. UpdateQuestStepDescription(Quest, 1, "I've got the tomb rifter bleeder shells.")
  80. CheckProgress(Quest, QuestGiver, Player)
  81. end
  82. function Step2_3Complete(Quest, QuestGiver, Player)
  83. UpdateQuestStepDescription(Quest, 2, "I've got the coiled burrower skins.")
  84. CheckProgress(Quest, QuestGiver, Player)
  85. end
  86. function Step3_3Complete(Quest, QuestGiver, Player)
  87. UpdateQuestStepDescription(Quest, 3, "I've got the venom spitter fangs.")
  88. CheckProgress(Quest, QuestGiver, Player)
  89. end
  90. function Step4_3Complete(Quest, QuestGiver, Player)
  91. UpdateQuestStepDescription(Quest, 4, "I've got the tomb forager skulls.")
  92. CheckProgress(Quest, QuestGiver, Player)
  93. end
  94. function CheckProgress(Quest, QuestGiver, Player)
  95. if QuestStepIsComplete(Player, 5376, 1) and QuestStepIsComplete(Player, 5376, 2) and QuestStepIsComplete(Player, 5376, 3) and QuestStepIsComplete(Player, 5376, 4) then
  96. UpdateQuestTaskGroupDescription(Quest, 1, "I've gathered all of the items Falin wanted. I should bring them back to him now.")
  97. AddQuestStepChat(Quest, 5, "I need to return to merchant Falin Shaloon.", 1, "I need to return to merchant Failin Shaloon and give him all of his "supplies".", 11, 8340002)
  98. AddQuestStepCompleteAction(Quest, 5, "QuestComplete")
  99. end
  100. end
  101. function Accepted(Quest, QuestGiver, Player)
  102. end
  103. function Declined(Quest, QuestGiver, Player)
  104. end
  105. function QuestComplete(Quest, QuestGiver, Player)
  106. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  107. UpdateQuestStepDescription(Quest, 5, "I've completed my task for Falin.")
  108. UpdateQuestTaskGroupDescription(Quest, 2, "I've spoken with Falin and gave him his supplies.")
  109. UpdateQuestDescription(Quest, "I got everything Falin wanted, though I'm not sure if it was worth my time, but if I'm going to be down here anyway maybe I'll help him again.")
  110. GiveQuestReward(Quest, Player)
  111. end
  112. function Reload(Quest, QuestGiver, Player, Step)
  113. local RandomChoice = MakeRandomInt(1, 3)
  114. if Step == 1 then
  115. if RandomChoice == 1 then
  116. Step1Complete(Quest, QuestGiver, Player)
  117. elseif RandomChoice == 2 then
  118. Step1_2Complete(Quest, QuestGiver, Player)
  119. elseif RandomChoice == 3 then
  120. Step1_3Complete(Quest, QuestGiver, Player)
  121. end
  122. elseif Step == 2 then
  123. if RandomChoice == 1 then
  124. Step2Complete(Quest, QuestGiver, Player)
  125. elseif RandomChoice == 2 then
  126. Step2_2Complete(Quest, QuestGiver, Player)
  127. elseif RandomChoice == 3 then
  128. Step2_3Complete(Quest, QuestGiver, Player)
  129. end
  130. elseif Step == 3 then
  131. if RandomChoice == 1 then
  132. Step3Complete(Quest, QuestGiver, Player)
  133. elseif RandomChoice == 2 then
  134. Step3_2Complete(Quest, QuestGiver, Player)
  135. elseif RandomChoice == 3 then
  136. Step3_3Complete(Quest, QuestGiver, Player)
  137. end
  138. elseif Step == 4 then
  139. if RandomChoice == 1 then
  140. Step4Complete(Quest, QuestGiver, Player)
  141. elseif RandomChoice == 2 then
  142. Step4_4Complete(Quest, QuestGiver, Player)
  143. elseif RandomChoice == 3 then
  144. Step4_3Complete(Quest, QuestGiver, Player)
  145. end
  146. elseif Step == 5 then
  147. QuestComplete(Quest, QuestGiver, Player)
  148. end
  149. end