9
3

OutlyingQeynosCreatureCataloging.lua 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  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 :
  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. function Init(Quest)
  36. AddQuestStepSpell(Quest, 1, "I must find an Oakmyst fairy.", 1, 100, "I am tracking down several creatures and cataloging them.", 11, AN_OAKMYST_FAIRY_ID, AN_OAKMYST_FAIRY_ID_2, AN_OAKMYST_FAIRY_ID_3, AN_OAKMYST_FAIRY_ID_4)
  37. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  38. AddQuestStepSpell(Quest, 2, "I must find a sunshimmer sprite.", 1, 100, "I am tracking down several creatures and cataloging them.", 11, A_SUNSHIMMER_SPIRTE_ID, A_SUNSHIMMER_SPIRTE_ID_2, A_SUNSHIMMER_SPIRTE_ID_3)
  39. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  40. AddQuestStepSpell(Quest, 3, "I must find a badger cub.", 1, 100, "I am tracking down several creatures and cataloging them.", 11, A_BADGER_CUB_ID)
  41. AddQuestStepCompleteAction(Quest, 3, "Step3Complete")
  42. AddQuestStepSpell(Quest, 4, "I must find a skittering scavenger.", 1, 100, "I am tracking down several creatures and cataloging them.", 11, A_SKITTERING_SCAVENGER_ID)
  43. AddQuestStepCompleteAction(Quest, 4, "Step4Complete")
  44. AddQuestStepSpell(Quest, 5, "I must find a spectral student.", 1, 100, "I am tracking down several creatures and cataloging them.", 11, A_SPECTRAL_STUDENT_ID)
  45. AddQuestStepCompleteAction(Quest, 5, "Step5Complete")
  46. AddQuestStepSpell(Quest, 6, "I must find a corrupted dryad.", 1, 100, "I am tracking down several creatures and cataloging them.", 11, A_CORRUPTED_DRYAD_ID, A_CORRUPTED_DRYAD_ID_2)
  47. AddQuestStepCompleteAction(Quest, 6, "Step6Complete")
  48. AddQuestStepSpell(Quest, 7, "I must find an alabaster golem.", 1, 100, "I am tracking down several creatures and cataloging them.", 11, AN_ALABASTER_GOLEM_ID, AN_ALABASTER_GOLEM_ID_2)
  49. AddQuestStepCompleteAction(Quest, 7, "Step7Complete")
  50. AddQuestStepSpell(Quest, 8, "I must find a Dustpaw guard.", 1, 100, "I am tracking down several creatures and cataloging them.", 11, A_DUSTPAW_GUARD_ID)
  51. AddQuestStepCompleteAction(Quest, 8, "Step8Complete")
  52. AddQuestStepSpell(Quest, 9, "I must find an albino python.", 1, 100, "I am tracking down several creatures and cataloging them.", 11, AN_ALBINO_PYTHON_ID)
  53. AddQuestStepCompleteAction(Quest, 9, "Step9Complete")
  54. AddQuestStepSpell(Quest, 10, "I must find a bog sludge.", 1, 100, "I am tracking down several creatures and cataloging them.", 11, A_BOG_SLUDGE_ID)
  55. AddQuestStepCompleteAction(Quest, 10, "Step10Complete")
  56. AddQuestStepSpell(Quest, 11, "I must find a marsh hatchling.", 1, 100, "I am tracking down several creatures and cataloging them.", 11, A_MARSH_HATCHLING_ID)
  57. AddQuestStepCompleteAction(Quest, 11, "Step11Complete")
  58. AddQuestStepSpell(Quest, 12, "I must find a bog faerie.", 1, 100, "I am tracking down several creatures and cataloging them.", 11, A_BOG_FAERIE_ID, A_BOG_FAERIE_ID_2, A_BOG_FAERIE_ID_3, A_BOG_FAERIE_ID_4)
  59. AddQuestStepCompleteAction(Quest, 12, "Step12Complete")
  60. end
  61. function CheckProgress(Quest, QuestGiver, Player)
  62. if QuestStepIsComplete(Player, THIS_QUEST_ID, 1) and QuestStepIsComplete(Player, THIS_QUEST_ID, 2) and QuestStepIsComplete(Player, THIS_QUEST_ID, 3) and QuestStepIsComplete(Player, THIS_QUEST_ID, 4) and QuestStepIsComplete(Player, THIS_QUEST_ID, 5) and QuestStepIsComplete(Player, THIS_QUEST_ID, 6) and QuestStepIsComplete(Player, THIS_QUEST_ID, 7) and QuestStepIsComplete(Player, THIS_QUEST_ID, 8) and QuestStepIsComplete(Player, THIS_QUEST_ID, 9) and QuestStepIsComplete(Player, THIS_QUEST_ID, 10) and QuestStepIsComplete(Player, THIS_QUEST_ID, 11) then
  63. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  64. UpdateQuestTaskGroupDescription(Quest, 1, "I have located all of the creatures I was looking for.")
  65. UpdateQuestDescription(Quest, "I've successfully catalogued all the creatures in the Outlying Qeynos creature guide.")
  66. GiveQuestReward(Quest, Player)
  67. end
  68. end
  69. function Step1Complete(Quest, QuestGiver, Player)
  70. UpdateQuestStepDescription(Quest, 1, "I have found an Oakmyst fairy.")
  71. CheckProgress(Quest, QuestGiver, Player)
  72. end
  73. function Step2Complete(Quest, QuestGiver, Player)
  74. UpdateQuestStepDescription(Quest, 2, "I have found a sunshimmer sprite.")
  75. CheckProgress(Quest, QuestGiver, Player)
  76. end
  77. function Step3Complete(Quest, QuestGiver, Player)
  78. UpdateQuestStepDescription(Quest, 3, "I have found a badger cub.")
  79. CheckProgress(Quest, QuestGiver, Player)
  80. end
  81. function Step4Complete(Quest, QuestGiver, Player)
  82. UpdateQuestStepDescription(Quest, 4, "I have found a skittering scavenger.")
  83. CheckProgress(Quest, QuestGiver, Player)
  84. end
  85. function Step5Complete(Quest, QuestGiver, Player)
  86. UpdateQuestStepDescription(Quest, 5, "I have found a spectral student.")
  87. CheckProgress(Quest, QuestGiver, Player)
  88. end
  89. function Step6Complete(Quest, QuestGiver, Player)
  90. UpdateQuestStepDescription(Quest, 6, "I have found a corrupted dryad.")
  91. CheckProgress(Quest, QuestGiver, Player)
  92. end
  93. function Step7Complete(Quest, QuestGiver, Player)
  94. UpdateQuestStepDescription(Quest, 7, "I have found an alabaster golem.")
  95. CheckProgress(Quest, QuestGiver, Player)
  96. end
  97. function Step8Complete(Quest, QuestGiver, Player)
  98. UpdateQuestStepDescription(Quest, 8, "I have found a Dustpaw guard.")
  99. CheckProgress(Quest, QuestGiver, Player)
  100. end
  101. function Step9Complete(Quest, QuestGiver, Player)
  102. UpdateQuestStepDescription(Quest, 9, "I have found an albino python.")
  103. CheckProgress(Quest, QuestGiver, Player)
  104. end
  105. function Step10Complete(Quest, QuestGiver, Player)
  106. UpdateQuestStepDescription(Quest, 10, "I have found a bog sludge.")
  107. CheckProgress(Quest, QuestGiver, Player)
  108. end
  109. function Step11Complete(Quest, QuestGiver, Player)
  110. UpdateQuestStepDescription(Quest, 11, "I have found a marsh hatchling.")
  111. CheckProgress(Quest, QuestGiver, Player)
  112. end
  113. function Step12Complete(Quest, QuestGiver, Player)
  114. UpdateQuestStepDescription(Quest, 12, "I have found a bog faerie.")
  115. CheckProgress(Quest, QuestGiver, Player)
  116. end
  117. function Reload(Quest, QuestGiver, Player, Step)
  118. if Step == 1 then
  119. Step1Complete(Quest, QuestGiver, Player)
  120. elseif Step == 2 then
  121. Step2Complete(Quest, QuestGiver, Player)
  122. elseif Step == 3 then
  123. Step3Complete(Quest, QuestGiver, Player)
  124. elseif Step == 4 then
  125. Step4Complete(Quest, QuestGiver, Player)
  126. elseif Step == 5 then
  127. Step5Complete(Quest, QuestGiver, Player)
  128. elseif Step == 6 then
  129. Step6Complete(Quest, QuestGiver, Player)
  130. elseif Step == 7 then
  131. Step7Complete(Quest, QuestGiver, Player)
  132. elseif Step == 8 then
  133. Step8Complete(Quest, QuestGiver, Player)
  134. elseif Step == 9 then
  135. Step9Complete(Quest, QuestGiver, Player)
  136. elseif Step == 10 then
  137. Step10Complete(Quest, QuestGiver, Player)
  138. elseif Step == 11 then
  139. Step11Complete(Quest, QuestGiver, Player)
  140. elseif Step == 12 then
  141. Step12Complete(Quest, QuestGiver, Player)
  142. end
  143. end
  144. function Accepted(Quest, QuestGiver, Player)
  145. -- Add dialog here for when the quest is accepted
  146. end
  147. function Declined(Quest, QuestGiver, Player)
  148. -- Add dialog here for when the quest is declined
  149. end