antonica_creature_cataloging.lua 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  1. --[[
  2. Script Name : Quests/Antonica/antonica_creature_cataloging.lua
  3. Script Author : Dorbin
  4. Script Date : 2023.09.14 11:09:09
  5. Script Purpose :
  6. Zone : Antonica
  7. Quest Giver:
  8. Preceded by: None
  9. Followed by:
  10. --]]
  11. function Init(Quest)
  12. AddQuestStep (Quest, 1, "I must find a young kodiak.", 1, 100, "I am tracking down several creatures and cataloging them.", 11)
  13. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  14. AddQuestStep(Quest, 2, "I must find a grizzled badger.", 1, 100, "I am tracking down several creatures and cataloging them.", 11)
  15. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  16. AddQuestStep(Quest, 3, "I must find a lowland viper.", 1, 100, "I am tracking down several creatures and cataloging them.", 11)
  17. AddQuestStepCompleteAction(Quest, 3, "Step3Complete")
  18. AddQuestStep(Quest, 4, "I must find a Coldwind octopus.", 1, 100, "I am tracking down several creatures and cataloging them.", 11)
  19. AddQuestStepCompleteAction(Quest, 4, "Step4Complete")
  20. AddQuestStep(Quest, 5, "I must find a sonic shrieker.", 1, 100, "I am tracking down several creatures and cataloging them.", 11)
  21. AddQuestStepCompleteAction(Quest, 5, "Step5Complete")
  22. AddQuestStep(Quest, 6, "I must find a klicnik warrior.", 1, 100, "I am tracking down several creatures and cataloging them.", 11)
  23. AddQuestStepCompleteAction(Quest, 6, "Step6Complete")
  24. AddQuestStep(Quest, 7, "I must find a timberclaw gnoll.", 1, 100, "I am tracking down several creatures and cataloging them.", 11)
  25. AddQuestStepCompleteAction(Quest, 7, "Step7Complete")
  26. AddQuestStep(Quest, 8, "I must find a dankfur gnoll.", 1, 100, "I am tracking down several creatures and cataloging them.", 11)
  27. AddQuestStepCompleteAction(Quest, 8, "Step8Complete")
  28. AddQuestStep(Quest, 9, "I must find a pond beaver.", 1, 100, "I am tracking down several creatures and cataloging them.", 11)
  29. AddQuestStepCompleteAction(Quest, 9, "Step9Complete")
  30. AddQuestStep(Quest, 10, "I must find a sogbone skeleton.", 1, 100, "I am tracking down several creatures and cataloging them.", 11)
  31. AddQuestStepCompleteAction(Quest, 10, "Step10Complete")
  32. AddQuestStep(Quest, 11, "I must find a kodiak.", 1, 100, "I am tracking down several creatures and cataloging them.", 11)
  33. AddQuestStepCompleteAction(Quest, 11, "Step11Complete")
  34. AddQuestStep(Quest, 12, "I must find a tidewalker behemoth.", 1, 100, "I am tracking down several creatures and cataloging them.", 11)
  35. AddQuestStepCompleteAction(Quest, 12, "Step12Complete")
  36. AddQuestStep(Quest, 13, "I must find a root strangler.", 1, 100, "I am tracking down several creatures and cataloging them.", 11)
  37. AddQuestStepCompleteAction(Quest, 13, "Step13Complete")
  38. AddQuestStep(Quest, 14, "I must find an earth burrower.", 1, 100, "I am tracking down several creatures and cataloging them.", 11)
  39. AddQuestStepCompleteAction(Quest, 14, "Step14Complete")
  40. AddQuestStep(Quest, 15, "I must find a wandering bat.", 1, 100, "I am tracking down several creatures and cataloging them.", 11)
  41. AddQuestStepCompleteAction(Quest, 15, "Step15Complete")
  42. end
  43. function CheckProgress(Quest, QuestGiver, Player)
  44. if QuestStepIsComplete(Player, THIS_QUEST_ID, 1) and
  45. QuestStepIsComplete(Player, THIS_QUEST_ID, 2) and
  46. QuestStepIsComplete(Player, THIS_QUEST_ID, 3) and
  47. QuestStepIsComplete(Player, THIS_QUEST_ID, 4) and
  48. QuestStepIsComplete(Player, THIS_QUEST_ID, 5) and
  49. QuestStepIsComplete(Player, THIS_QUEST_ID, 6) and
  50. QuestStepIsComplete(Player, THIS_QUEST_ID, 7) and
  51. QuestStepIsComplete(Player, THIS_QUEST_ID, 8) and
  52. QuestStepIsComplete(Player, THIS_QUEST_ID, 9) and
  53. QuestStepIsComplete(Player, THIS_QUEST_ID, 10) and
  54. QuestStepIsComplete(Player, THIS_QUEST_ID, 11) and
  55. QuestStepIsComplete(Player, THIS_QUEST_ID, 12) and
  56. QuestStepIsComplete(Player, THIS_QUEST_ID, 13) and
  57. QuestStepIsComplete(Player, THIS_QUEST_ID, 14) and
  58. QuestStepIsComplete(Player, THIS_QUEST_ID, 15)then
  59. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  60. UpdateQuestTaskGroupDescription(Quest, 1, "I have located all of the creatures I was looking for.")
  61. UpdateQuestDescription(Quest, "I've successfully catalogued all the creatures in the Antonica creature guide.")
  62. GiveQuestReward(Quest, Player)
  63. if HasItem(Player,1001110) then
  64. RemoveItem(Player,1001110,1)
  65. end
  66. end
  67. end
  68. function Step1Complete(Quest, QuestGiver, Player)
  69. UpdateQuestStepDescription(Quest, 1, "I have found a young kodiak.")
  70. CheckProgress(Quest, QuestGiver, Player)
  71. end
  72. function Step2Complete(Quest, QuestGiver, Player)
  73. UpdateQuestStepDescription(Quest, 2, "I have found a grizzled badger.")
  74. CheckProgress(Quest, QuestGiver, Player)
  75. end
  76. function Step3Complete(Quest, QuestGiver, Player)
  77. UpdateQuestStepDescription(Quest, 3, " I have found a lowland viper.")
  78. CheckProgress(Quest, QuestGiver, Player)
  79. end
  80. function Step4Complete(Quest, QuestGiver, Player)
  81. UpdateQuestStepDescription(Quest, 4, " I have found a Coldwind octopus.")
  82. CheckProgress(Quest, QuestGiver, Player)
  83. end
  84. function Step5Complete(Quest, QuestGiver, Player)
  85. UpdateQuestStepDescription(Quest, 5, " I have found a sonic shrieker.")
  86. CheckProgress(Quest, QuestGiver, Player)
  87. end
  88. function Step6Complete(Quest, QuestGiver, Player)
  89. UpdateQuestStepDescription(Quest, 6, " I have found a klicnik warrior.")
  90. CheckProgress(Quest, QuestGiver, Player)
  91. end
  92. function Step7Complete(Quest, QuestGiver, Player)
  93. UpdateQuestStepDescription(Quest, 7, " I have found a timberclaw gnoll.")
  94. CheckProgress(Quest, QuestGiver, Player)
  95. end
  96. function Step8Complete(Quest, QuestGiver, Player)
  97. UpdateQuestStepDescription(Quest, 8, "I have found a dankfur gnoll.")
  98. CheckProgress(Quest, QuestGiver, Player)
  99. end
  100. function Step9Complete(Quest, QuestGiver, Player)
  101. UpdateQuestStepDescription(Quest, 9, "I have found a pond beaver.")
  102. CheckProgress(Quest, QuestGiver, Player)
  103. end
  104. function Step10Complete(Quest, QuestGiver, Player)
  105. UpdateQuestStepDescription(Quest, 10, " I have found a sogbone skeleton.")
  106. CheckProgress(Quest, QuestGiver, Player)
  107. end
  108. function Step11Complete(Quest, QuestGiver, Player)
  109. UpdateQuestStepDescription(Quest, 11, "I have found a kodiak.")
  110. CheckProgress(Quest, QuestGiver, Player)
  111. end
  112. function Step12Complete(Quest, QuestGiver, Player)
  113. UpdateQuestStepDescription(Quest, 12, " I have found a tidewalker behemoth.")
  114. CheckProgress(Quest, QuestGiver, Player)
  115. end
  116. function Step13Complete(Quest, QuestGiver, Player)
  117. UpdateQuestStepDescription(Quest, 13, " I have found a root strangler.")
  118. CheckProgress(Quest, QuestGiver, Player)
  119. end
  120. function Step14Complete(Quest, QuestGiver, Player)
  121. UpdateQuestStepDescription(Quest, 14, "I have found an earth burrower.")
  122. CheckProgress(Quest, QuestGiver, Player)
  123. end
  124. function Step15Complete(Quest, QuestGiver, Player)
  125. UpdateQuestStepDescription(Quest, 15, " I have found a wandering bat.")
  126. CheckProgress(Quest, QuestGiver, Player)
  127. end
  128. function Reload(Quest, QuestGiver, Player, Step)
  129. if Step == 1 then
  130. Step1Complete(Quest, QuestGiver, Player)
  131. elseif Step == 2 then
  132. Step2Complete(Quest, QuestGiver, Player)
  133. elseif Step == 3 then
  134. Step3Complete(Quest, QuestGiver, Player)
  135. elseif Step == 4 then
  136. Step4Complete(Quest, QuestGiver, Player)
  137. elseif Step == 5 then
  138. Step5Complete(Quest, QuestGiver, Player)
  139. elseif Step == 6 then
  140. Step6Complete(Quest, QuestGiver, Player)
  141. elseif Step == 7 then
  142. Step7Complete(Quest, QuestGiver, Player)
  143. elseif Step == 8 then
  144. Step8Complete(Quest, QuestGiver, Player)
  145. elseif Step == 9 then
  146. Step9Complete(Quest, QuestGiver, Player)
  147. elseif Step == 10 then
  148. Step10Complete(Quest, QuestGiver, Player)
  149. elseif Step == 11 then
  150. Step11Complete(Quest, QuestGiver, Player)
  151. elseif Step == 12 then
  152. Step12Complete(Quest, QuestGiver, Player)
  153. elseif Step == 13 then
  154. Step10Complete(Quest, QuestGiver, Player)
  155. elseif Step == 14 then
  156. Step11Complete(Quest, QuestGiver, Player)
  157. elseif Step == 15 then
  158. Step12Complete(Quest, QuestGiver, Player)
  159. end
  160. end
  161. function Accepted(Quest, QuestGiver, Player)
  162. AddSpellBookEntry(Player, 2550196, 1) --CREATURE CATALOGUE
  163. end
  164. function Declined(Quest, QuestGiver, Player)
  165. -- Add dialog here for when the quest is declined
  166. end