tribute_leaves.lua 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. --[[
  2. Script Name : Quests/WillowWood/tribute_leaves.lua
  3. Script Purpose : Handles the quest, "Tribute Leaves"
  4. Script Author : Scatman
  5. Script Date : 2009.09.26
  6. Zone : The Willow Wood
  7. Quest Giver: Aelis
  8. Preceded by: Offering Help (offering_help.lua)
  9. Followed by: A Task for Davyn (a_task_for_davyn.lua)
  10. --]]
  11. function Init(Quest)
  12. -- Tribute Leaf
  13. AddQuestStepObtainItem(Quest, 1, "I need to collect some leaves from the Dewdrop bushes in Willow Wood and bring them to Aelis.", 6, 100, "I need to collect some leaves for Davyn's tribute and return them to Aelis.", 2098, 14668)
  14. AddQuestStepCompleteAction(Quest, 1, "Step1_Complete_GotLeaves")
  15. end
  16. function Accepted(Quest, QuestGiver, Player)
  17. FaceTarget(QuestGiver, Player)
  18. conversation = CreateConversation()
  19. PlayFlavor(QuestGiver, "voiceover/english/tutorial_revamp/aelis/qey_village05/quests/aelis/aelis006a.mp3", "", "", 1165853979, 3023910277, Player)
  20. AddConversationOption(conversation, "All right.")
  21. StartConversation(conversation, QuestGiver, Player, "As you collect them I will determine what will next be required for the tribute.")
  22. end
  23. function Declined(Quest, QuestGiver, Player)
  24. end
  25. function Step1_Complete_GotLeaves(Quest, QuestGiver, Player)
  26. UpdateQuestStepDescription(Quest, 1, "I have collected the leaves.")
  27. AddQuestStepChat(Quest, 2, "I need to take these leaves back to Aelis in the Willow Wood.", 1, "I need to collect some leaves for Davyn's tribute and return them to Aelis.", 0, 2370038)
  28. AddQuestStepCompleteAction(Quest, 2, "Step2_Complete_TalkedToAelis")
  29. end
  30. function Step2_Complete_TalkedToAelis(Quest, QuestGiver, Player)
  31. UpdateQuestStepDescription(Quest, 2, "I have given Aelis the leaves she requires.")
  32. -- Tribute Leaf
  33. while HasItem(Player, 14668) do
  34. RemoveItem(Player, 14668)
  35. end
  36. AddQuestStepChat(Quest, 3, "I need to speak with Davyn and do a task for him.", 1, "I need to collect some leaves for Davyn's tribute and return them to Aelis.", 0, 2370033)
  37. AddQuestStepCompleteAction(Quest, 3, "Quest_Complete")
  38. end
  39. function Quest_Complete(Quest, QuestGiver, Player)
  40. UpdateQuestStepDescription(Quest, 3, "I have collected the leaves.")
  41. UpdateQuestTaskGroupDescription(Quest, 1, "I have collected the leaves.")
  42. UpdateQuestDescription(Quest, "I have given Aelis the leaves she asked for and spoken with Davyn. While Aelis works on the first part of the tribute, she has asked that I do a favor for Davyn.")
  43. GiveQuestReward(Quest, Player)
  44. end
  45. function Reload(Quest, QuestGiver, Player, Step)
  46. if Step == 1 then
  47. Step1_Complete_GotLeaves(Quest, QuestGiver, Player)
  48. elseif Step == 2 then
  49. Step2_Complete_TalkedToAelis(Quest, QuestGiver, Player)
  50. end
  51. end