flight_of_the_sage_.lua 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. --[[
  2. Script Name : Quests/NorthQeynos/flight_of_the_sage_.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.05.15 03:05:37
  5. Script Purpose :
  6. Zone : NorthQeynos
  7. Quest Giver: Scholar Demini
  8. Preceded by: Never Judge A Book By It's Cover
  9. Followed by: None
  10. --]]
  11. require "SpawnScripts/Generic/DialogModule"
  12. function Init(Quest)
  13. AddQuestStepLocation(Quest, 1, "I need to run to the Bridge Keep to see if the Sage of Ages is there.", 6, "If I'm going to track down the Sage of Ages in time, I should see if he was wise enough to head for the safety of the Bridge Keep in the Thundering Steppes.", 11, 201, 1, -226)
  14. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  15. end
  16. function Accepted(Quest, QuestGiver, Player)
  17. FaceTarget(QuestGiver, Player)
  18. PlayFlavor(QuestGiver,"","","bow",0,0,Player)
  19. Dialog.New(QuestGiver, Player)
  20. Dialog.AddDialog("Oh, thank you so much, friend! I'm not too familiar with the Steppes, but I do remember being told that if I get in trouble while I'm there, I should run straight for the Bridge Keep. Maybe the Sage knew to do the same thing?")
  21. Dialog.AddOption("I'll check there first, then. Wish me luck!")
  22. Dialog.Start()
  23. end
  24. function Declined(Quest, QuestGiver, Player)
  25. -- Add dialog here for when the quest is declined
  26. end
  27. function Deleted(Quest, QuestGiver, Player)
  28. -- Remove any quest specific items here when the quest is deleted
  29. end
  30. function Step1Complete(Quest, QuestGiver, Player)
  31. UpdateQuestStepDescription(Quest, 1, "I've made it to the Bridge Keep, but found no trace of the Sage of Ages.")
  32. UpdateQuestTaskGroupDescription(Quest, 1, "I've found no trace of the Sage of Ages at the Bridge Keep. I did however see a number of creatures milling about in the ravine below.")
  33. AddQuestStepKill(Quest, 2, "I need to kill the stronger undead in the area for clues to the Sages whereabouts.", 1, 60, "Perhaps some of the creatures contain clues as to the whereabouts of the Sage of Ages. This may be my last chance to find him.", 75, 2490218,2490155,2490356,2490136)
  34. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  35. end
  36. function Step2Complete(Quest, QuestGiver, Player)
  37. UpdateQuestStepDescription(Quest, 2, "I found a scholarly tool on one of the undead.")
  38. AddQuestStepKill(Quest, 3, "I need to kill the stronger hawks in the area for clues to the Sages whereabouts.", 1, 60, "Perhaps some of the creatures contain clues as to the whereabouts of the Sage of Ages. This may be my last chance to find him.", 75, 2490183)
  39. AddQuestStepCompleteAction(Quest, 3, "Step3Complete")
  40. end
  41. function Step3Complete(Quest, QuestGiver, Player)
  42. UpdateQuestStepDescription(Quest, 3, "I found a scholarly tool on one of the hawks.")
  43. AddQuestStepKill(Quest, 4, "I need to kill the stronger beetles in the area for clues to the Sages whereabouts.", 1, 60, "Perhaps some of the creatures contain clues as to the whereabouts of the Sage of Ages. This may be my last chance to find him.", 75, 2490050)
  44. AddQuestStepCompleteAction(Quest, 4, "Step4Complete")
  45. end
  46. function Step4Complete(Quest, QuestGiver, Player)
  47. UpdateQuestStepDescription(Quest, 4, "I found a scholarly tool on one of the beetles.")
  48. AddQuestStepKill(Quest, 5, "I need to kill the stronger deer in the area for clues to the Sages whereabouts.", 1, 60, "Perhaps some of the creatures contain clues as to the whereabouts of the Sage of Ages. This may be my last chance to find him.", 75, 2490052)
  49. AddQuestStepCompleteAction(Quest, 5, "Step5Complete")
  50. end
  51. function Step5Complete(Quest, QuestGiver, Player)
  52. UpdateQuestStepDescription(Quest, 5, "I found a scholarly tool on one of the deer.")
  53. AddQuestStepKill(Quest, 6, "I need to kill the stronger snakes in the area for clues to the Sages whereabouts.", 1, 60, "Perhaps some of the creatures contain clues as to the whereabouts of the Sage of Ages. This may be my last chance to find him.", 75, 2490110,2490048)
  54. AddQuestStepCompleteAction(Quest, 6, "Step6Complete")
  55. end
  56. function Step6Complete(Quest, QuestGiver, Player)
  57. UpdateQuestStepDescription(Quest, 6, "I found a scholarly tool on one of the snakes.")
  58. AddQuestStepKill(Quest, 7, "I need to kill the stronger crabs in the area for clues to the Sages whereabouts.", 1, 60, "Perhaps some of the creatures contain clues as to the whereabouts of the Sage of Ages. This may be my last chance to find him.", 397,2490128,2490007)
  59. AddQuestStepCompleteAction(Quest, 7, "Step7Complete")
  60. end
  61. function Step7Complete(Quest, QuestGiver, Player)
  62. UpdateQuestStepDescription(Quest, 7, "I found a torn pouch on one of the crabs.")
  63. AddQuestStepKill(Quest, 8, "I need to kill the stronger sirens in the area for clues to the Sages whereabouts.", 1, 100, "Perhaps some of the creatures contain clues as to the whereabouts of the Sage of Ages. This may be my last chance to find him.", 402, 2490300,2490245)
  64. AddQuestStepCompleteAction(Quest, 8, "Step8Complete")
  65. end
  66. function Step8Complete(Quest, QuestGiver, Player)
  67. UpdateQuestStepDescription(Quest, 8, "I found a torn backpack on one of the sirens.")
  68. UpdateQuestTaskGroupDescription(Quest, 2, "I've found what looks like scholarly objects on these creatures. It's as if the Sage dropped everything in hopes of eluding his predators. From where I found the objects, it looks as if he was heading to the docks in the Steppes.")
  69. AddQuestStepLocation(Quest, 9, "I need to search the barrels and crates on the dock for some sign of the Sage.", 1, "If I don't find the Sage of Ages down by the docks, then that tells me he made it safely away from the Steppes. Maybe I can find one final clue of his ultimate fate.", 11, 2490539)
  70. AddQuestStepCompleteAction(Quest, 9, "Step9Complete")
  71. end
  72. function Step9Complete(Quest, QuestGiver, Player)
  73. UpdateQuestStepDescription(Quest, 9, "I've found a ship's receipt chit.")
  74. UpdateQuestTaskGroupDescription(Quest, 3, "I've found a receipt chit in a barrel on the docks. It's made out to a "SoA" and signed with a letter "D". That Sage sure is a clever fellow.")
  75. AddQuestStepChat(Quest, 10, "I need to speak to Demini in North Qeynos.", 1, "I should return to Demini and let him know that the Sage was able to make it to safety. I'm not too sure he'll be too happy to learn that he won't be meeting the Sage, though.", 11, 2220086 )
  76. AddQuestStepCompleteAction(Quest, 10, "QuestComplete")
  77. end
  78. function QuestComplete(Quest, QuestGiver, Player)
  79. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  80. UpdateQuestStepDescription(Quest, 10, "I've spoken with Demini.")
  81. UpdateQuestTaskGroupDescription(Quest, 4, "I've let Demini know what happened to the Sage of Ages.")
  82. UpdateQuestDescription(Quest, "The Sage of Ages has managed to book passage on a ship and set sail across the ocean. Though I'm glad he made it safely away from the perils he faced, I'm rather disappointed I never got a chance to meet him.")
  83. GiveQuestReward(Quest, Player)
  84. end
  85. function Reload(Quest, QuestGiver, Player, Step)
  86. if Step == 1 then
  87. Step1Complete(Quest, QuestGiver, Player)
  88. elseif Step == 2 then
  89. Step2Complete(Quest, QuestGiver, Player)
  90. elseif Step == 3 then
  91. Step3Complete(Quest, QuestGiver, Player)
  92. elseif Step == 4 then
  93. Step4Complete(Quest, QuestGiver, Player)
  94. elseif Step == 5 then
  95. Step5Complete(Quest, QuestGiver, Player)
  96. elseif Step == 6 then
  97. Step6Complete(Quest, QuestGiver, Player)
  98. elseif Step == 7 then
  99. Step7Complete(Quest, QuestGiver, Player)
  100. elseif Step == 8 then
  101. Step8Complete(Quest, QuestGiver, Player)
  102. elseif Step == 9 then
  103. Step9Complete(Quest, QuestGiver, Player)
  104. elseif Step == 10 then
  105. QuestComplete(Quest, QuestGiver, Player)
  106. end
  107. end