9
3

a_task_for_davyn.lua 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. --[[
  2. Script Name : Quests/WillowWood/a_task_for_davyn.lua
  3. Script Purpose : Handles the quest, "A Task for Davyn"
  4. Script Author : Scatman
  5. Script Date : 2009.01.17
  6. Zone : The Willow Wood
  7. Quest Giver: Davyn Thornbranch
  8. Preceded by: Tribute Leaves (tribute_leaves.lua)
  9. Followed by: Tribute Flowers (tribute_flowers.lua)
  10. --]]
  11. function Init(Quest)
  12. AddQuestStepChat(Quest, 1, "Davyn mentioned that Taval Zane, an inn patron, was the most recent person to report seeing the rabid wolf. I should start by speaking with him in the in.", 1, "Davyn has told me of reports of a rabid wolf in the Willow Wood. He has asked that I find it and put it out of its misery before anyone is harmed.", 0, 2370009)
  13. AddQuestStepCompleteAction(Quest, 1, "Step1_Complete_TalkedToTaval")
  14. end
  15. function Accepted(Quest, QuestGiver, Player)
  16. FaceTarget(QuestGiver, Player)
  17. conversation = CreateConversation()
  18. PlayFlavor(QuestGiver, "voiceover/english/tutorial_revamp/davyn_thornbranch/qey_village05/quests/davyn_thornbranch/davyn_thornbranch023.mp3", "", "", 2446328740, 3651016951, Player)
  19. AddConversationOption(conversation, "No problem.")
  20. StartConversation(conversation, QuestGiver, Player, "Thank you for looking into this matter. Oh! If you have not already done so, you can get lodgings at the inn by speaking with Innkeeper Yeoni.")
  21. end
  22. function Declined(Quest, QuestGiver, Player)
  23. end
  24. function Step1_Complete_TalkedToTaval(Quest, QuestGiver, Player)
  25. UpdateQuestStepDescription(Quest, 1, "Taval said he saw the wolf run toward the scribe's shop.")
  26. AddQuestStepChat(Quest, 2, "I should speak to Jana Windstream outside the scribe shop.", 1, "Davyn has told me of reports of a rabid wolf in the Willow Wood. He has asked that I find it and put it out of its misery before anyone is harmed.", 0, 2370024)
  27. AddQuestStepCompleteAction(Quest, 2, "Step2_Complete_TalkedToJana")
  28. end
  29. function Step2_Complete_TalkedToJana(Quest, QuestGiver, Player)
  30. UpdateQuestStepDescription(Quest, 2, "Jana said the wolf was probably after something in the cart.")
  31. AddQuestStep(Quest, 3, "I should search the cart Jana mentioned. She said it was at the northern edge of the scribe shop.", 1, 100, "Davyn has told me of reports of a rabid wolf in the Willow Wood. He has asked that I find it and put it out of its misery before anyone is harmed.", 0)
  32. AddQuestStepCompleteAction(Quest, 3, "Step3_Complete_SearchedCrate")
  33. end
  34. function Step3_Complete_SearchedCrate(Quest, QuestGiver, Player)
  35. UpdateQuestStepDescription(Quest, 3, "I found wolf tracks.")
  36. UpdateQuestTaskGroupDescription(Quest, 1, "I found wolf tracks.")
  37. AddQuestStepKill(Quest, 4, "I should follow the wolf tracks that lead eastward up the hill behind the scribe's shop.", 1, 100, "Some wolf tracks lead east of the scribe's shop from the cart. Where there are tracks, there may be a wolf.", 0, 2370107)
  38. AddQuestStepCompleteAction(Quest, 4, "Step4_Complete_KilledWolf")
  39. end
  40. function Step4_Complete_KilledWolf(Quest, QuestGiver, Player)
  41. UpdateQuestStepDescription(Quest, 4, "The rabid wolf has been slain.")
  42. UpdateQuestTaskGroupDescription(Quest, 2, "The rabid wolf has been slain.")
  43. AddQuestStepChat(Quest, 5, "I must speak with Davyn.", 1, "Now that the wolf has been slain, I need to speak with Davyn and then Aelis.", 0, 2370033)
  44. AddQuestStepCompleteAction(Quest, 5, "Step5_Complete_TalkedToDavyn")
  45. end
  46. function Step5_Complete_TalkedToDavyn(Quest, QuestGiver, Player)
  47. UpdateQuestStepDescription(Quest, 5, "I spoke to Davyn.")
  48. AddQuestStepChat(Quest, 6, "I need to speak with Aelis now that I have done a task for Davyn.", 1, "Now that the wolf has been slain, I need to speak with Davyn and then Aelis.", 0, 2370038)
  49. AddQuestStepCompleteAction(Quest, 6, "Quest_Complete")
  50. end
  51. function Quest_Complete(Quest, QuestGiver, Player)
  52. UpdateQuestStepDescription(Quest, 6, "I have spoken with Aelis.")
  53. UpdateQuestTaskGroupDescription(Quest, 3, "I have spoken with Davyn and Aelis.")
  54. UpdateQuestDescription(Quest, "I have slain the rabid wolf that was living in the Willow Wood as Davyn Thornbranch requested.")
  55. GiveQuestReward(Quest, Player)
  56. end
  57. function Reload(Quest, QuestGiver, Player, Step)
  58. if Step == 1 then
  59. Step1_Complete_TalkedToTaval(Quest, QuestGiver, Player)
  60. elseif Step == 2 then
  61. Step2_Complete_TalkedToJana(Quest, QuestGiver, Player)
  62. elseif Step == 3 then
  63. Step3_Complete_SearchedCrate(Quest, QuestGiver, Player)
  64. elseif Step == 4 then
  65. Step4_Complete_KilledWolf(Quest, QuestGiver, Player)
  66. elseif Step == 5 then
  67. Step5_Complete_TalkedToDavyn(Quest, QuestGiver, Player)
  68. end
  69. end