herbs_of_healing_and_growth.lua 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. --[[
  2. Script Name : Quests/GreaterFaydark/herbs_of_healing_and_growth.lua
  3. Script Purpose : Handles the quest "Herbs of Healing and Growth
  4. Script Author : Zcoretri
  5. Script Date : 2009.03.05
  6. Zone : Greater Faydark
  7. Quest Giver: Matron of the Nursery
  8. Preceded by: Grobin Trouble at the Pond
  9. Followed by: Message from the Matron
  10. --]]
  11. function Init(Quest)
  12. AddQuestStepObtainItem(Quest, 1, "I need to gather herbs from the faeicia leaf plants west of the nursery", 5, 100, "I need to gather herbs from the faeicia leaf plant for the Matron of the Nursery. I should be able to find these herbs west of the nursery past the wolves.", 336, 6096)
  13. AddQuestStepCompleteAction(Quest, 1, "CollectedAllLeafs")
  14. end
  15. function Accepted(Quest, QuestGiver, Player)
  16. if QuestGiver ~= nil then
  17. if GetDistance(Player, QuestGiver) < 30 then
  18. FaceTarget(QuestGiver, Player)
  19. conversation = CreateConversation
  20. AddConversationOption(conversation, "I'll be careful")
  21. StartConversation(conversation, QuestGiver, Player, "Be careful of the wolves though, they can be quite feisty if they haven't eaten.")
  22. end
  23. end
  24. end
  25. function Declined(Quest, QuestGiver, Player)
  26. end
  27. function CollectedAllLeafs(Quest, QuestGiver, Player)
  28. UpdateQuestTaskGroupDescription(Quest, 1, "I should have enough of the faeicia leaf herbs for the matron.")
  29. AddQuestStepChat(Quest, 2, "I should take these herbs to the Matron of the Nursery.", 1, "I need to take the faeicia leaf herbs I gathered to the Matron of the Nursery so that she can use them to heal the spirit blooms.", 0, 1140004)
  30. AddQuestStepCompleteAction(Quest, 2, "QuestComplete")
  31. end
  32. function QuestComplete(Quest, QuestGiver, Player)
  33. UpdateQuestDescription(Quest, "The Matron of the Nursery was able to magically heal the spirit blooms with the herbs I gathered for her.")
  34. GiveQuestReward(Quest, Player)
  35. RemoveItem(Player, 6096)
  36. end
  37. function Reload(Quest, QuestGiver, Player, Step)
  38. if Step == 1 then
  39. CollectedAllLeafs(Quest, QuestGiver, Player)
  40. end
  41. end