9
3

a_tour_of_the_commonlands_.lua 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. --[[
  2. Script Name : Quests/TheCommonlands/a_tour_of_the_commonlands_.lua
  3. Script Author : Premierio015
  4. Script Date : 2021.05.31 03:05:05
  5. Script Purpose :
  6. Zone : Commonlands
  7. Quest Giver: Bootstrutter's Field Guide to the Commonlands(Item)
  8. Preceded by: None
  9. Followed by: None
  10. --]]
  11. function Init(Quest)
  12. AddQuestStepLocation(Quest, 1, "Visit 'Turmoil Cemetery'", 15, "I am searching for 'Turmoil Cemetery' in the Commonlands.", 0, -1301, -70, 320)
  13. AddQuestStepLocation(Quest, 2, "Visit 'The Lonely Tower'", 15, "I am searching for 'The Lonely Tower' in the Commonlands.", 0, -1312, -51, 579)
  14. AddQuestStepLocation(Quest, 3, "Visit 'Dog Pond'", 15, "I am searching for 'Dog Pond' in the Commonlands.", 0, -1054, -47, -219)
  15. AddQuestStepLocation(Quest, 4, "Visit 'Barrage Meadow'", 15, "I am searching for 'Barrage Meadow' in the Commonlands.", 0, -1270, -73, -285)
  16. AddQuestStepLocation(Quest, 5, "Visit 'Valor's End'", 15, "I am searching for 'Valor's End' in the Commonlands.", 0, -592, -49, -625)
  17. AddQuestStepLocation(Quest, 6, "Visit 'The Crossroads'", 15, "I am searching for 'Crossroads' in the Commonlands.", 0, -486, -45, -301)
  18. AddQuestStepLocation(Quest, 7, "Visit 'The Wailing Caves'", 15, "I am searching for 'The Wailing Caves' in the Commonlands.", 0, -205, -44, -916)
  19. AddQuestStepLocation(Quest, 8, "Visit 'Lucan's Mount'", 15, "I am searching for 'Lucan's Mount' in the Commonlands.", 0, 8, -12, -767)
  20. AddQuestStepLocation(Quest, 9, "Visit 'The Wall of Taros'", 15, "I am searching for 'The Wall of Taros' in the Commonlands.", 0, 157, -48, -691)
  21. AddQuestStepLocation(Quest, 10, "Visit 'Enlightenment Cemetery'", 15, "I am searching for 'Enlightenment Cemetery' in the Commonlands.", 0, 140, -48, -262)
  22. AddQuestStepLocation(Quest, 11, "Visit 'The Ruins of Val'marr'", 15, "I am searching for 'The Ruins of Valmarr' in the Commonlands.", 0, 384, -46, 250)
  23. AddQuestStepLocation(Quest, 12, "Visit 'The Ring of Nature'", 15, "I am searching for 'The Ring of Nature' in the Commonlands.", 0, 683, -58, -99)
  24. AddQuestStepLocation(Quest, 13, "Visit 'The Tower of Zarvonn'", 15, "I am searching for 'The Tower of Zarvonn' in the Commonlands.", 0, 897, -45, -513)
  25. AddQuestStepLocation(Quest, 14, "Visit 'The Captain's Deck'", 15, "I am searching for 'The Captain's Deck' in the Commonlands.", 0, 1415, -16, 281)
  26. AddQuestStepLocation(Quest, 15, "Visit 'The Black Gates'", 15, "I am searching for 'The Black Gates' in the Commonlands.", 0, 1481, -38, -393)
  27. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  28. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  29. AddQuestStepCompleteAction(Quest, 3, "Step3Complete")
  30. AddQuestStepCompleteAction(Quest, 4, "Step4Complete")
  31. AddQuestStepCompleteAction(Quest, 5, "Step5Complete")
  32. AddQuestStepCompleteAction(Quest, 6, "Step6Complete")
  33. AddQuestStepCompleteAction(Quest, 7, "Step7Complete")
  34. AddQuestStepCompleteAction(Quest, 8, "Step8Complete")
  35. AddQuestStepCompleteAction(Quest, 9, "Step9Complete")
  36. AddQuestStepCompleteAction(Quest, 10, "Step10Complete")
  37. AddQuestStepCompleteAction(Quest, 11, "Step11Complete")
  38. AddQuestStepCompleteAction(Quest, 12, "Step12Complete")
  39. AddQuestStepCompleteAction(Quest, 13, "Step13Complete")
  40. AddQuestStepCompleteAction(Quest, 14, "Step14Complete")
  41. end
  42. function Step1Complete(Quest, QuestGiver, Player)
  43. UpdateQuestStepDescription(Quest, 1, "I visited 'Turmoil Cemetery' in the Commonlands.")
  44. CheckProgress(Quest, QuestGiver, Player)
  45. end
  46. function Step2Complete(Quest, QuestGiver, Player)
  47. UpdateQuestStepDescription(Quest, 2, "I visited 'The Lonely Tower' in the Commonlands.")
  48. CheckProgress(Quest, QuestGiver, Player)
  49. end
  50. function Step3Complete(Quest, QuestGiver, Player)
  51. UpdateQuestStepDescription(Quest, 3, "I visited 'Dog Pond' in the Commonlands.")
  52. CheckProgress(Quest, QuestGiver, Player)
  53. end
  54. function Step4Complete(Quest, QuestGiver, Player)
  55. UpdateQuestStepDescription(Quest, 4, "I visited 'Barrage Meadow' in the Commonlands.")
  56. CheckProgress(Quest, QuestGiver, Player)
  57. end
  58. function Step5Complete(Quest, QuestGiver, Player)
  59. UpdateQuestStepDescription(Quest, 5, "I visited 'Valor's End' in the Commonlands.")
  60. CheckProgress(Quest, QuestGiver, Player)
  61. end
  62. function Step6Complete(Quest, QuestGiver, Player)
  63. UpdateQuestStepDescription(Quest, 6, "I visited 'The Crossroads' in the Commonlands.")
  64. CheckProgress(Quest, QuestGiver, Player)
  65. end
  66. function Step7Complete(Quest, QuestGiver, Player)
  67. UpdateQuestStepDescription(Quest, 7, "I visited 'The Wailing Caves' in the Commonlands.")
  68. CheckProgress(Quest, QuestGiver, Player)
  69. end
  70. function Step8Complete(Quest, QuestGiver, Player)
  71. UpdateQuestStepDescription(Quest, 8, "I visited 'Lucan's Mount' in the Commonlands.")
  72. CheckProgress(Quest, QuestGiver, Player)
  73. end
  74. function Step9Complete(Quest, QuestGiver, Player)
  75. UpdateQuestStepDescription(Quest, 9, "I visited 'The Wall of Taros' in the Commonlands.")
  76. CheckProgress(Quest, QuestGiver, Player)
  77. end
  78. function Step10Complete(Quest, QuestGiver, Player)
  79. UpdateQuestStepDescription(Quest, 10, "I visited 'Enlightenment Cemetery' in the Commonlands.")
  80. CheckProgress(Quest, QuestGiver, Player)
  81. end
  82. function Step11Complete(Quest, QuestGiver, Player)
  83. UpdateQuestStepDescription(Quest, 11, "I visited 'The Ruins of Val'marr' in the Commonlands.")
  84. CheckProgress(Quest, QuestGiver, Player)
  85. end
  86. function Step12Complete(Quest, QuestGiver, Player)
  87. UpdateQuestStepDescription(Quest, 12, "I visited 'The Ring of Nature' in the Commonlands.")
  88. CheckProgress(Quest, QuestGiver, Player)
  89. end
  90. function Step13Complete(Quest, QuestGiver, Player)
  91. UpdateQuestStepDescription(Quest, 13, "I visited 'The Tower of Zarvonn' in the Commonlands.")
  92. CheckProgress(Quest, QuestGiver, Player)
  93. end
  94. function Step14Complete(Quest, QuestGiver, Player)
  95. UpdateQuestStepDescription(Quest, 14, "I visited 'The Captain's Deck' in the Commonlands.")
  96. CheckProgress(Quest, QuestGiver, Player)
  97. end
  98. function Step15Complete(Quest, QuestGiver, Player)
  99. UpdateQuestStepDescription(Quest, 15, " I visited 'The Black Gates' in the Commonlands.")
  100. CheckProgress(Quest, QuestGiver, Player)
  101. end
  102. function CheckProgress(Quest, QuestGiver, Player)
  103. if QuestStepIsComplete(Player, 5248, 1) and QuestStepIsComplete(Player, 5248, 2) and QuestStepIsComplete(Player, 5248, 3) and QuestStepIsComplete(Player, 5248, 4) and QuestStepIsComplete(Player, 5248, 5) and QuestStepIsComplete(Player, 5248, 6) and QuestStepIsComplete(Player, 5248, 7) and QuestStepIsComplete(Player, 5248, 8) and QuestStepIsComplete(Player, 5248, 9) and QuestStepIsComplete(Player, 5248, 10) and QuestStepIsComplete(Player, 5248, 11) and QuestStepIsComplete(Player, 5248, 12) and QuestStepIsComplete(Player, 5248, 13) and QuestStepIsComplete(Player, 5248, 14) and QuestStepIsComplete(Player, 5248, 15) then
  104. AddQuestStepChat(Quest, 16, "Seek the Tome Warden of the Academy of Arcane Science", 1, "I should turn this Bootstrutter Field Guide into the Freeport Academy of Arcane Science.", 0, 5590251)
  105. end
  106. end
  107. function QuestComplete(Quest, QuestGiver, Player)
  108. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  109. UpdateQuestStepDescription(Quest, 16, "I turned the field guide into the Tome Warden.")
  110. UpdateQuestTaskGroupDescription(Quest, 1, "I turned the Bootstrutter Field Guide of the Commonlands into the Freeport Academy of Arcane Science.")
  111. UpdateQuestDescription(Quest, "I visited all the locations listed in 'Bootstrutter's Field Guide to the Commonlands', having done so I decided to return the book to Freeport's Academy of Arcane Science, keeper of all knowledge. The Tome Warden was delighted and rewarded me with a valuable piece of Bootstrutter Gear.")
  112. GiveQuestReward(Quest, Player)
  113. end
  114. function Accepted(Quest, QuestGiver, Player)
  115. end
  116. function Declined(Quest, QuestGiver, Player)
  117. end
  118. function Reload(Quest, QuestGiver, Player, Step)
  119. if Step == 1 then
  120. Step1Complete(Quest, QuestGiver, Player)
  121. elseif Step == 2 then
  122. Step2Complete(Quest, QuestGiver, Player)
  123. elseif Step == 3 then
  124. Step3Complete(Quest, QuestGiver, Player)
  125. elseif Step == 4 then
  126. Step4Complete(Quest, QuestGiver, Player)
  127. elseif Step == 5 then
  128. Step5Complete(Quest, QuestGiver, Player)
  129. elseif Step == 6 then
  130. Step6Complete(Quest, QuestGiver, Player)
  131. elseif Step == 7 then
  132. Step7Complete(Quest, QuestGiver, Player)
  133. elseif Step == 8 then
  134. Step8Complete(Quest, QuestGiver, Player)
  135. elseif Step == 9 then
  136. Step9Complete(Quest, QuestGiver, Player)
  137. elseif Step == 10 then
  138. Step10Complete(Quest, QuestGiver, Player)
  139. elseif Step == 11 then
  140. Step11Complete(Quest, QuestGiver, Player)
  141. elseif Step == 12 then
  142. Step12Complete(Quest, QuestGiver, Player)
  143. elseif Step == 13 then
  144. Step13Complete(Quest, QuestGiver, Player)
  145. elseif Step == 14 then
  146. Step14Complete(Quest, QuestGiver, Player)
  147. elseif Step == 15 then
  148. Step15Complete(Quest, QuestGiver, Player)
  149. elseif Step == 16 then
  150. QuestComplete(Quest, QuestGiver, Player)
  151. end
  152. end