tribute_flowers.lua 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. --[[
  2. Script Name : Quests/WillowWood/tribute_flowers.lua
  3. Script Purpose : Handles the quest, "Tribute Flowers"
  4. Script Author : Scatman
  5. Script Date : 2009.01.17
  6. Zone : The Willow Wood
  7. Quest Giver: Aelis
  8. Preceded by: A Task for Davyn (a_task_for_davyn.lua)
  9. Followed by: A Tribute to Ulinir (a_tribute_to_ulinir.lua)
  10. --]]
  11. function Init(Quest)
  12. -- Tribute Flower
  13. AddQuestStepObtainItem(Quest, 1, "I need to pick some flowers from the Willow Wood and bring them to Aelis.", 8, 100, "I need to collect some flowers for Davyn's tribute and return them to Aelis.", 1952, 14666)
  14. AddQuestStepCompleteAction(Quest, 1, "Step1_Complete_GotFlowers")
  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/aelis021b.mp3", "", "", 810591684, 4247178806, Player)
  20. AddConversationOption(conversation, "All right, I will return.")
  21. StartConversation(conversation, QuestGiver, Player, "By the time you have collected enough, I am sure I will have written the tribute.")
  22. end
  23. function Declined(Quest, QuestGiver, Player)
  24. end
  25. function Step1_Complete_GotFlowers(Quest, QuestGiver, Player)
  26. UpdateQuestStepDescription(Quest, 1, "I have picked the flowers.")
  27. AddQuestStepChat(Quest, 2, "I need to take these flowers Aelis in the Willow Wood.", 1, "I need to collect some flowers 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 flowers she requires.")
  32. -- remove Tribute Flowers
  33. while HasItem(Player, 14666) do
  34. RemoveItem(Player, 14666)
  35. end
  36. -- summon Tribute for Ulinir
  37. if not HasItem(Player, 14667, 1) then
  38. SummonItem(Player, 14667, 1)
  39. end
  40. AddQuestStepChat(Quest, 3, "I need to take the completed tribute to Davyn Thornbranch in Willow Wood.", 1, "I need to collect some flowers for Davyn's tribute and return them to Aelis.", 0, 2370033)
  41. AddQuestStepCompleteAction(Quest, 3, "quest_complete")
  42. end
  43. function quest_complete(Quest, QuestGiver, Player)
  44. UpdateQuestStepDescription(Quest, 3, "I have taken the tribute to Davyn.")
  45. UpdateQuestTaskGroupDescription(Quest, 1, "I have given the flowers to Aelis.")
  46. UpdateQuestDescription(Quest, "I gave Aelis the flowers she requested. She will use them to help build Davyn's tribute.")
  47. GiveQuestReward(Quest, Player)
  48. end
  49. function Reload(Quest, QuestGiver, Player, Step)
  50. if Step == 1 then
  51. Step1_Complete_GotFlowers(Quest, QuestGiver, Player)
  52. elseif Step == 2 then
  53. Step2_Complete_TalkedToAelis(Quest, QuestGiver, Player)
  54. end
  55. end