never_judge_a_book_by_its_cover.lua 5.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. --[[
  2. Script Name : Quests/NorthQeynos/never_judge_a_book_by_its_cover.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.05.15 03:05:30
  5. Script Purpose :
  6. Zone : NorthQeynos
  7. Quest Giver: Scholar Demini
  8. Preceded by: The Scholar's Search
  9. Followed by: Flight of the Sage
  10. --]]
  11. require "SpawnScripts/Generic/DialogModule"
  12. function Init(Quest)
  13. AddQuestStepHarvest(Quest, 1, "I need to harvest the Critter Dens in the area until I find some clue of the Sage's fate.", 1, 60, "Scholar Demini claimed that some of the bandits in grasslands of Antonica hide their treasures in the animal dens dotting the countryside. Perhaps I can find proof of what happened to the Sage of Ages in their lairs.", 75, 121809,121174)
  14. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  15. end
  16. function Accepted(Quest, QuestGiver, Player)
  17. FaceTarget(QuestGiver, Player)
  18. PlayFlavor(QuestGiver,"","","nod",0,0,Player)
  19. Dialog.New(QuestGiver, Player)
  20. Dialog.AddDialog("Well, I've read that some of the bandits out in the wilds hide their ill-gotten gains inside the animal dens. If you can find the den where they hid their loot, maybe you can find out if the Sage of Ages is still alive.")
  21. Dialog.AddOption("Right! I'm off at once!")
  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 found a ripped journal entry in one of the Critter Dens.")
  32. UpdateQuestTaskGroupDescription(Quest, 1, "I found a ripped page in one of the dens, but nothing more. I can only assume it was left by either the scholar or the Sage himself. Perhaps one of these animals has eaten the other half of the page.")
  33. AddQuestStepKill(Quest, 2, "I need to kill feral timber wolves in hopes of finding the ripped page.", 12, 100, "I should kill these vicious animals in the area in hopes of finding the other half of the ripped page. Perhaps some gnolls got to it first? I should try them, too.", 11, 120293,121402)
  34. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  35. end
  36. function Step2Complete(Quest, QuestGiver, Player)
  37. UpdateQuestStepDescription(Quest, 2, "I've killed a number of feral timber wolves, but didn't find any ripped pages.")
  38. AddQuestStepKill(Quest, 3, "I need to kill young kodiaks in hopes of finding the ripped page.", 12, 100, "I should kill these vicious animals in the area in hopes of finding the other half of the ripped page. Perhaps some gnolls got to it first? I should try them, too.", 11, 120294,121403)
  39. AddQuestStepCompleteAction(Quest, 3, "Step3Complete")
  40. end
  41. function Step3Complete(Quest, QuestGiver, Player)
  42. UpdateQuestStepDescription(Quest, 3, "I've killed a number of young kodiaks, but didn't find any ripped pages.")
  43. AddQuestStepKill(Quest, 4, "I need to kill Sabertooth battlers in hopes of finding the ripped page.", 12, 100, "I should kill these vicious animals in the area in hopes of finding the other half of the ripped page. Perhaps some gnolls got to it first? I should try them, too.", 11, 120184,121324)
  44. AddQuestStepCompleteAction(Quest, 4, "Step4Complete")
  45. end
  46. function Step4Complete(Quest, QuestGiver, Player)
  47. UpdateQuestStepDescription(Quest, 4, "I've killed a number of Sabertooth battlers, but didn't find any ripped pages.")
  48. UpdateQuestTaskGroupDescription(Quest, 2, "I didn't find any pages on the animals or gnolls, but I saw a number of claw marks on their bodies. Looking at the marks, the scratches look like they were caused by the undead.")
  49. AddQuestStepKill(Quest, 5, "I need to kill the defiled squires until I find the ripped page.", 1, 60, "If the ripped page still exists, then I'm certain it will be in the possession of the undead in the area.", 185, 120320,120321,120321,121427)
  50. AddQuestStepCompleteAction(Quest, 5, "Step5Complete")
  51. end
  52. function Step5Complete(Quest, QuestGiver, Player)
  53. UpdateQuestStepDescription(Quest, 5, "I've found the ripped page.")
  54. UpdateQuestTaskGroupDescription(Quest, 3, "I've found the ripped page. The combined page was penned by the Sage of Ages himself, and claims he escaped by claiming he was nothing more than an old man. The last part claims he was fleeing for the Thundering Steppes before the bandits figured out the truth.")
  55. 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)
  56. AddQuestStepCompleteAction(Quest, 6, "QuestComplete")
  57. end
  58. function QuestComplete(Quest, QuestGiver, Player)
  59. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  60. UpdateQuestStepDescription(Quest, 6, "I've spoken with Demini.")
  61. UpdateQuestTaskGroupDescription(Quest, 4, "I've given the pages of the journal to Demini in exchange for a nice reward.")
  62. UpdateQuestDescription(Quest, "I didn't find the Sage of Ages, but was able to confirm that he wasn't killed by the bandits. His note made no mention of his scholar escort, however.")
  63. GiveQuestReward(Quest, Player)
  64. end
  65. function Reload(Quest, QuestGiver, Player, Step)
  66. if Step == 1 then
  67. Step1Complete(Quest, QuestGiver, Player)
  68. elseif Step == 2 then
  69. Step2Complete(Quest, QuestGiver, Player)
  70. elseif Step == 3 then
  71. Step3Complete(Quest, QuestGiver, Player)
  72. elseif Step == 4 then
  73. Step4Complete(Quest, QuestGiver, Player)
  74. elseif Step == 5 then
  75. Step5Complete(Quest, QuestGiver, Player)
  76. elseif Step == 6 then
  77. QuestComplete(Quest, QuestGiver, Player)
  78. end
  79. end