the_age_of_rediscovery.lua 5.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. --[[
  2. Script Name : Quests/NorthQeynos/the_age_of_rediscovery.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.05.15 04:05:46
  5. Script Purpose :
  6. Zone : NorthQeynos
  7. Quest Giver: Demini
  8. Preceded by: None
  9. Followed by: The Scholar's Search
  10. --]]
  11. function Init(Quest)
  12. AddQuestStepKill(Quest, 1, "I need to kill the glade deer to see if they have any of the journal's pages.", 12, 100, "I need to see if any of the animals in the wilds of Antonica might still have the pages of Demini's book.", 103, 121374,120265)
  13. AddQuestStepKill(Quest, 2, "I need to kill the young brown bears to see if they have any of the journal's pages.", 12, 100, "I need to see if any of the animals in the wilds of Antonica might still have the pages of Demini's book.", 93, 120011,121191)
  14. AddQuestStepKill(Quest, 3, "I need to kill the timber wolves to see if they have any of the journal's pages.", 12, 100, "I need to see if any of the animals in the wilds of Antonica might still have the pages of Demini's book.", 104, 121188,121375,120293,120266,120008)
  15. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  16. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  17. AddQuestStepCompleteAction(Quest, 3, "Step3Complete")
  18. UpdateQuestZone(Quest,"Antonica")
  19. end
  20. function Accepted(Quest, QuestGiver, Player)
  21. -- Add dialog here for when the quest is accepted
  22. end
  23. function Declined(Quest, QuestGiver, Player)
  24. -- Add dialog here for when the quest is declined
  25. end
  26. function Deleted(Quest, QuestGiver, Player)
  27. -- Remove any quest specific items here when the quest is deleted
  28. end
  29. function Step1Complete(Quest, QuestGiver, Player)
  30. UpdateQuestStepDescription(Quest, 1, "I've killed a number of deer, but wasn't able to find any pages.")
  31. CheckProgress(Quest, QuestGiver, Player)
  32. end
  33. function Step2Complete(Quest, QuestGiver, Player)
  34. UpdateQuestStepDescription(Quest, 2, "I've killed a number of bears, but wasn't able to find any pages.")
  35. CheckProgress(Quest, QuestGiver, Player)
  36. end
  37. function Step3Complete(Quest, QuestGiver, Player)
  38. UpdateQuestStepDescription(Quest, 3, "I've killed a number of wolves, but wasn't able to find any pages.")
  39. CheckProgress(Quest, QuestGiver, Player)
  40. end
  41. function CheckProgress(Quest, QuestGiver, Player)
  42. if QuestStepIsComplete(Player, 5550, 1) and QuestStepIsComplete(Player, 5550, 2) and QuestStepIsComplete(Player, 5550, 3) then
  43. UpdateQuestTaskGroupDescription(Quest, 1, "After much searching, I wasn't able to find any pages on any of these wild animals.")
  44. AddQuestStepKill(Quest, 4, "I need to kill the cruel forest wardens in Archer Woods until I find a clue where the pages might be.", 1, 33, "I should check with the unfriendly wardens of the forest to see if anyone of them found the pages of the book already. I doubt they'll be willing to just hand them over.", 75, 120408)
  45. AddQuestStepCompleteAction(Quest, 4, "Step4Complete")
  46. end
  47. end
  48. function Step4Complete(Quest, QuestGiver, Player)
  49. UpdateQuestStepDescription(Quest, 4, "I've found a clue of the page's whereabouts on one of the forest wardens.")
  50. UpdateQuestTaskGroupDescription(Quest, 2, "I've found a note on one of the wardens. It seems the warden found the pages and buried them under a rock for safekeeping.")
  51. AddQuestStepChat(Quest, 5, "I need to search for a rock that the warden buried the pages under.", 1, "The forest warden buried the pages under a rock here in Antonica. I can only hope the warden buried it near the Archer's Wood forest.", 11, 120906)
  52. AddQuestStepCompleteAction(Quest, 5, "Step5Complete")
  53. end
  54. function Step5Complete(Quest, QuestGiver, Player)
  55. UpdateQuestStepDescription(Quest, 5, "I've found the buried pages.")
  56. UpdateQuestTaskGroupDescription(Quest, 3, "I've found the pages of the book Demini was looking for.")
  57. UpdateQuestZone(Quest,"North Qeynos")
  58. AddQuestStepChat(Quest, 6, "I need to speak to Demini in North Qeynos.", 1, "I should bring these pages back to Demini for my reward that he promised me.", 11,2220086)
  59. AddQuestStepCompleteAction(Quest, 6, "QuestComplete")
  60. end
  61. function QuestComplete(Quest, QuestGiver, Player)
  62. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  63. UpdateQuestStepDescription(Quest, 6, "I've spoken with Demini.")
  64. UpdateQuestTaskGroupDescription(Quest, 4, "I've given the pages of the journal to Demini in exchange for a nice reward.")
  65. UpdateQuestDescription(Quest, "I've been able to collect the pages of the book that Scholar Demini was searching for.")
  66. GiveQuestReward(Quest, Player)
  67. end
  68. function Reload(Quest, QuestGiver, Player, Step)
  69. if Step == 1 then
  70. Step1Complete(Quest, QuestGiver, Player)
  71. elseif Step == 2 then
  72. Step2Complete(Quest, QuestGiver, Player)
  73. elseif Step == 3 then
  74. Step3Complete(Quest, QuestGiver, Player)
  75. elseif Step == 4 then
  76. Step4Complete(Quest, QuestGiver, Player)
  77. elseif Step == 5 then
  78. Step5Complete(Quest, QuestGiver, Player)
  79. elseif Step == 6 then
  80. QuestComplete(Quest, QuestGiver, Player)
  81. end
  82. end