feed_the_sapling.lua 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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. function Init(Quest)
  12. AddQuestStep(Quest, 1, "Search the alchemy shelves.", 1, 100, "I must search for the alchemist shop in Nettleville to attain the magical plant nutrient.", 182)
  13. AddQuestStepCompleteAction(Quest, 1, "Step1_Complete_FoundNutrients")
  14. end
  15. function Accepted(Quest, QuestGiver, Player)
  16. FaceTarget(QuestGiver, Player)
  17. conversation = CreateConversation()
  18. PlayFlavor(QuestGiver, "voiceover/english/scholar_neola/qey_adv01_oakmyst/scholarneola002.mp3", "", "", 4033827219, 3906200141, Player)
  19. AddConversationOption(conversation, "I will go and find this arcane nutrient.")
  20. StartConversation(conversation, QuestGiver, Player, "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. end
  22. function Declined(Quest, QuestGiver, Player)
  23. end
  24. function Step1_Complete_FoundNutrients(Quest, QuestGiver, Player)
  25. UpdateQuestStepDescription(Quest, 1, "I searched the alchemy shelves.")
  26. UpdateQuestTaskGroupDescription(Quest, 1, "I found Smitelin's Excel-o-gro in Nettleville.")
  27. UpdateQuestZone(Quest, "Oakmyst Forest")
  28. AddQuestStepChat(Quest, 2, "Find the treant sapling.", 1, "I must sprinkle Smitelin's Excel-o-gro into the treant sapling of Oakmyst Forest.", 0, 1950068)
  29. AddQuestStepCompleteAction(Quest, 2, "Step2_Complete_SpokeToSapling")
  30. end
  31. function Step2_Complete_SpokeToSapling(Quest, QuestGiver, Player)
  32. UpdateQuestStepDescription(Quest, 2, "I poured the nutrient on the treant sapling.")
  33. UpdateQuestTaskGroupDescription(Quest, 2, "I sprinkled the magical nutrient, Smitelin's Excel-o-gro onto the treant sapling.")
  34. AddQuestStepChat(Quest, 3, "Speak to Scholar Neola.", 1, "I should inform Scholar Neola that I saved the treant sapling.", 0, 1950079)
  35. AddQuestStepCompleteAction(Quest, 3, "QuestComplete")
  36. end
  37. function QuestComplete(Quest, QuestGiver, Player)
  38. UpdateQuestStepDescription(Quest, 3, "I spoke to Scholar Neola.")
  39. UpdateQuestTaskGroupDescription(Quest, 3, "I spoke to Scholar Neola and informed her the sapling was fed.")
  40. UpdateQuestDescription(Quest, "I found a magical plant food called Smitelin's Excel-o-gro and fed it to the treant sapling in Oakmyst Forest.")
  41. GiveQuestReward(Quest, Player)
  42. end
  43. function Reload(Quest, QuestGiver, Player, Step)
  44. if Step == 1 then
  45. Step1_Complete_FoundNutrients(Quest, QuestGiver, Player)
  46. elseif Step == 2 then
  47. Step2_Complete_SpokeToSapling(Quest, QuestGiver, Player)
  48. end
  49. end