9
3

OutlyingQeynosCreatureCataloging.lua 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200
  1. --[[
  2. Script Name : OutlyingQeynosCreatureCataloging.lua
  3. Script Purpose : Handles the quest, "Outlying Qeynos Creature Cataloging"
  4. Script Author : Shatou
  5. Script Date : 1/9/2020
  6. Script Notes : Updated for skill use and updates - Dorbin 9/12/2023
  7. Zone : Catalog
  8. Quest Giver : Outlying Qeynos Creature Catalog from Sage Indis Surion
  9. Preceded by : None
  10. Followed by : None
  11. --]]
  12. local THIS_QUEST_ID = 519
  13. local AN_OAKMYST_FAIRY_ID = 1950018
  14. local AN_OAKMYST_FAIRY_ID_2 = 1950019
  15. local AN_OAKMYST_FAIRY_ID_3 = 1950026
  16. local AN_OAKMYST_FAIRY_ID_4 = 1950056
  17. local A_SUNSHIMMER_SPIRTE_ID = 1950034
  18. local A_SUNSHIMMER_SPIRTE_ID_2 = 1950036
  19. local A_SUNSHIMMER_SPIRTE_ID_3 = 1950054
  20. local A_BADGER_CUB_ID = 1950035
  21. local A_SKITTERING_SCAVENGER_ID = 1960022
  22. local A_SPECTRAL_STUDENT_ID = 1960077
  23. local A_CORRUPTED_DRYAD_ID = 1950013
  24. local A_CORRUPTED_DRYAD_ID_2 = 1950070
  25. local AN_ALABASTER_GOLEM_ID = 1970022
  26. local AN_ALABASTER_GOLEM_ID_2 = 1970030
  27. local A_DUSTPAW_GUARD_ID = 1970017
  28. local AN_ALBINO_PYTHON_ID = 1970009
  29. local A_BOG_SLUDGE_ID = 1980002
  30. local A_MARSH_HATCHLING_ID = 1980047
  31. local A_BOG_FAERIE_ID = 1980007
  32. local A_BOG_FAERIE_ID_2 = 1980008
  33. local A_BOG_FAERIE_ID_3 = 1980010
  34. local A_BOG_FAERIE_ID_4 = 1980052
  35. local Catalogue = 42 --2550196
  36. local Catalogue2 = 2550196 --
  37. function Init(Quest)
  38. UpdateQuestZone(Quest,"Multiple Zones")
  39. AddQuestStep (Quest, 1, "I must find an Oakmyst fairy.", 1, 100, "I am tracking down several creatures and cataloging them.", 11)
  40. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  41. AddQuestStep(Quest, 2, "I must find a sunshimmer sprite.", 1, 100, "I am tracking down several creatures and cataloging them.", 11)
  42. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  43. AddQuestStep(Quest, 3, "I must find a badger cub.", 1, 100, "I am tracking down several creatures and cataloging them.", 11)
  44. AddQuestStepCompleteAction(Quest, 3, "Step3Complete")
  45. AddQuestStep(Quest, 4, "I must find a ruins skulker.", 1, 100, "I am tracking down several creatures and cataloging them.", 11)
  46. AddQuestStepCompleteAction(Quest, 4, "Step4Complete")
  47. AddQuestStep(Quest, 5, "I must find a Flamepaw loyalist.", 1, 100, "I am tracking down several creatures and cataloging them.", 11)
  48. AddQuestStepCompleteAction(Quest, 5, "Step5Complete")
  49. AddQuestStep(Quest, 6, "I must find a sleepless one.", 1, 100, "I am tracking down several creatures and cataloging them.", 11)
  50. AddQuestStepCompleteAction(Quest, 6, "Step6Complete")
  51. AddQuestStep(Quest, 7, "I must find an alabaster golem.", 1, 100, "I am tracking down several creatures and cataloging them.", 11)
  52. AddQuestStepCompleteAction(Quest, 7, "Step7Complete")
  53. AddQuestStep(Quest, 8, "I must find a Dustpaw guard.", 1, 100, "I am tracking down several creatures and cataloging them.", 11)
  54. AddQuestStepCompleteAction(Quest, 8, "Step8Complete")
  55. AddQuestStep(Quest, 9, "I must find an albino python.", 1, 100, "I am tracking down several creatures and cataloging them.", 11)
  56. AddQuestStepCompleteAction(Quest, 9, "Step9Complete")
  57. AddQuestStep(Quest, 10, "I must find a bog sludge.", 1, 100, "I am tracking down several creatures and cataloging them.", 11)
  58. AddQuestStepCompleteAction(Quest, 10, "Step10Complete")
  59. AddQuestStep(Quest, 11, "I must find a marsh hatchling.", 1, 100, "I am tracking down several creatures and cataloging them.", 11)
  60. AddQuestStepCompleteAction(Quest, 11, "Step11Complete")
  61. AddQuestStep(Quest, 12, "I must find a bog faerie.", 1, 100, "I am tracking down several creatures and cataloging them.", 11)
  62. AddQuestStepCompleteAction(Quest, 12, "Step12Complete")
  63. end
  64. function CheckProgress(Quest, QuestGiver, Player)
  65. if QuestStepIsComplete(Player, THIS_QUEST_ID, 1) and
  66. QuestStepIsComplete(Player, THIS_QUEST_ID, 2) and
  67. QuestStepIsComplete(Player, THIS_QUEST_ID, 3) and
  68. QuestStepIsComplete(Player, THIS_QUEST_ID, 4) and
  69. QuestStepIsComplete(Player, THIS_QUEST_ID, 5) and
  70. QuestStepIsComplete(Player, THIS_QUEST_ID, 6) and
  71. QuestStepIsComplete(Player, THIS_QUEST_ID, 7) and
  72. QuestStepIsComplete(Player, THIS_QUEST_ID, 8) and
  73. QuestStepIsComplete(Player, THIS_QUEST_ID, 9) and
  74. QuestStepIsComplete(Player, THIS_QUEST_ID, 10) and
  75. QuestStepIsComplete(Player, THIS_QUEST_ID, 11) and
  76. QuestStepIsComplete(Player, THIS_QUEST_ID, 12) then
  77. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  78. UpdateQuestTaskGroupDescription(Quest, 1, "I have located all of the creatures I was looking for.")
  79. UpdateQuestDescription(Quest, "I've successfully catalogued all the creatures in the Outlying Qeynos creature guide.")
  80. GiveQuestReward(Quest, Player)
  81. if HasItem(Player,1001109) then
  82. RemoveItem(Player,1001109,1)
  83. end
  84. end
  85. end
  86. function Step1Complete(Quest, QuestGiver, Player)
  87. UpdateQuestStepDescription(Quest, 1, "I have found an Oakmyst fairy.")
  88. CheckProgress(Quest, QuestGiver, Player)
  89. end
  90. function Step2Complete(Quest, QuestGiver, Player)
  91. UpdateQuestStepDescription(Quest, 2, "I have found a sunshimmer sprite.")
  92. CheckProgress(Quest, QuestGiver, Player)
  93. end
  94. function Step3Complete(Quest, QuestGiver, Player)
  95. UpdateQuestStepDescription(Quest, 3, "I have found a badger cub.")
  96. CheckProgress(Quest, QuestGiver, Player)
  97. end
  98. function Step4Complete(Quest, QuestGiver, Player)
  99. UpdateQuestStepDescription(Quest, 4, "I have found a skittering scavenger.")
  100. CheckProgress(Quest, QuestGiver, Player)
  101. end
  102. function Step5Complete(Quest, QuestGiver, Player)
  103. UpdateQuestStepDescription(Quest, 5, "I have found a spectral student.")
  104. CheckProgress(Quest, QuestGiver, Player)
  105. end
  106. function Step6Complete(Quest, QuestGiver, Player)
  107. UpdateQuestStepDescription(Quest, 6, "I have found a corrupted dryad.")
  108. CheckProgress(Quest, QuestGiver, Player)
  109. end
  110. function Step7Complete(Quest, QuestGiver, Player)
  111. UpdateQuestStepDescription(Quest, 7, "I have found an alabaster golem.")
  112. CheckProgress(Quest, QuestGiver, Player)
  113. end
  114. function Step8Complete(Quest, QuestGiver, Player)
  115. UpdateQuestStepDescription(Quest, 8, "I have found a Dustpaw guard.")
  116. CheckProgress(Quest, QuestGiver, Player)
  117. end
  118. function Step9Complete(Quest, QuestGiver, Player)
  119. UpdateQuestStepDescription(Quest, 9, "I have found an albino python.")
  120. CheckProgress(Quest, QuestGiver, Player)
  121. end
  122. function Step10Complete(Quest, QuestGiver, Player)
  123. UpdateQuestStepDescription(Quest, 10, "I have found a bog sludge.")
  124. CheckProgress(Quest, QuestGiver, Player)
  125. end
  126. function Step11Complete(Quest, QuestGiver, Player)
  127. UpdateQuestStepDescription(Quest, 11, "I have found a marsh hatchling.")
  128. CheckProgress(Quest, QuestGiver, Player)
  129. end
  130. function Step12Complete(Quest, QuestGiver, Player)
  131. UpdateQuestStepDescription(Quest, 12, "I have found a bog faerie.")
  132. CheckProgress(Quest, QuestGiver, Player)
  133. end
  134. function Reload(Quest, QuestGiver, Player, Step)
  135. if Step == 1 then
  136. Step1Complete(Quest, QuestGiver, Player)
  137. elseif Step == 2 then
  138. Step2Complete(Quest, QuestGiver, Player)
  139. elseif Step == 3 then
  140. Step3Complete(Quest, QuestGiver, Player)
  141. elseif Step == 4 then
  142. Step4Complete(Quest, QuestGiver, Player)
  143. elseif Step == 5 then
  144. Step5Complete(Quest, QuestGiver, Player)
  145. elseif Step == 6 then
  146. Step6Complete(Quest, QuestGiver, Player)
  147. elseif Step == 7 then
  148. Step7Complete(Quest, QuestGiver, Player)
  149. elseif Step == 8 then
  150. Step8Complete(Quest, QuestGiver, Player)
  151. elseif Step == 9 then
  152. Step9Complete(Quest, QuestGiver, Player)
  153. elseif Step == 10 then
  154. Step10Complete(Quest, QuestGiver, Player)
  155. elseif Step == 11 then
  156. Step11Complete(Quest, QuestGiver, Player)
  157. elseif Step == 12 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