feed_the_sapling.lua 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. --[[
  2. Script Name : Quests/Oakmyst/feed_the_sapling.lua
  3. Script Purpose : Handles the quest, "Feed the Sapling"
  4. Script Author : Scatman
  5. Script Date : 2009.10.08
  6. Zone : Oakmyst Forest
  7. Quest Giver: Scholar Neola
  8. Preceded by: None
  9. Followed by: Judgement of the Dryads (judgement_of_the_dryads.lua)
  10. --]]
  11. require "SpawnScripts/Generic/DialogModule"
  12. function Init(Quest)
  13. AddQuestStep(Quest, 1, "Search the alchemy shelves.", 1, 100, "I must search alchemist shops in Qeynos to attain the magical plant nutrient.", 182)
  14. AddQuestStepCompleteAction(Quest, 1, "Step1_Complete_FoundNutrients")
  15. UpdateQuestZone(Quest, "Multiple Zones")
  16. end
  17. function Accepted(Quest, QuestGiver, Player)
  18. FaceTarget(QuestGiver, Player)
  19. Dialog.New(QuestGiver, Player)
  20. Dialog.AddDialog("I cannot leave this woodland, but you can. Within the villages of Qeynos an alchemist has created a powerful nutrient that will aid the sapling. Retrieve this prized item and feed it to the growing tree. ")
  21. Dialog.AddVoiceover("voiceover/english/scholar_neola/qey_adv01_oakmyst/scholarneola002.mp3", 4033827219, 3906200141)
  22. Dialog.AddOption("I will go and find this arcane nutrient.")
  23. Dialog.Start()
  24. end
  25. function Declined(Quest, QuestGiver, Player)
  26. end
  27. function Step1_Complete_FoundNutrients(Quest, QuestGiver, Player)
  28. UpdateQuestStepDescription(Quest, 1, "I searched the alchemy shelves.")
  29. UpdateQuestTaskGroupDescription(Quest, 1, "I found Smitelin's Excel-o-gro in Nettleville.")
  30. UpdateQuestZone(Quest, "Oakmyst Forest")
  31. AddQuestStepChat(Quest, 2, "Find the treant sapling.", 1, "I must sprinkle Smitelin's Excel-o-gro into the treant sapling of Oakmyst Forest.", 0, 1950052,8300007)
  32. AddQuestStepCompleteAction(Quest, 2, "Step2_Complete_SpokeToSapling")
  33. end
  34. function Step2_Complete_SpokeToSapling(Quest, QuestGiver, Player)
  35. UpdateQuestStepDescription(Quest, 2, "I poured the nutrient on the treant sapling.")
  36. UpdateQuestTaskGroupDescription(Quest, 2, "I sprinkled the magical nutrient, Smitelin's Excel-o-gro onto the treant sapling.")
  37. AddQuestStepChat(Quest, 3, "Speak to Scholar Neola.", 1, "I should inform Scholar Neola that I saved the treant sapling.", 0, 1950051,8300030)
  38. AddQuestStepCompleteAction(Quest, 3, "QuestComplete")
  39. end
  40. function QuestComplete(Quest, QuestGiver, Player)
  41. UpdateQuestStepDescription(Quest, 3, "I spoke to Scholar Neola.")
  42. UpdateQuestTaskGroupDescription(Quest, 3, "I spoke to Scholar Neola and informed her the sapling was fed.")
  43. UpdateQuestDescription(Quest, "I found a magical plant food called Smitelin's Excel-o-gro and fed it to the treant sapling in Oakmyst Forest.")
  44. GiveQuestReward(Quest, Player)
  45. end
  46. function Reload(Quest, QuestGiver, Player, Step)
  47. if Step == 1 then
  48. Step1_Complete_FoundNutrients(Quest, QuestGiver, Player)
  49. elseif Step == 2 then
  50. Step2_Complete_SpokeToSapling(Quest, QuestGiver, Player)
  51. elseif Step == 3 then
  52. QuestComplete(Quest, QuestGiver, Player)
  53. end
  54. end