the_balance_of_life.lua 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. --[[
  2. Script Name : Quests/TheWillowWood/the_balance_of_life.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.02.16 05:02:53
  5. Script Purpose :
  6. Zone : TheWillowWood
  7. Quest Giver: Daryann Stormrider
  8. Preceded by: This is the classic version of the quest in WillowWood
  9. Followed by:
  10. --]]
  11. function Init(Quest)
  12. AddQuestStepKill(Quest, 1, "I must kill ten sea turtles in the waters near Antonica.", 10, 100, "I must bring down ten sea turtles to lower their population.", 201, 120033, 121212)
  13. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  14. UpdateQuestZone(Quest, "Antonica")
  15. end
  16. function Accepted(Quest, QuestGiver, Player)
  17. FaceTarget(QuestGiver, Player)
  18. local conversation = CreateConversation()
  19. PlayFlavor(QuestGiver, "voiceover/english/daryann_stormrider/qey_village05/quests/daryann_stormrider/daryann003.mp3", "", "nod", 1849804125, 150143999, Player)
  20. AddConversationOption(conversation, "I will return.")
  21. StartConversation(conversation, QuestGiver, Player, "Sometimes a population grows rapidly, and we must hunt weak and sickly creatures to ensure others in the population remain healthy. Other times, predators disrupt nature's balance. I need you to hunt ten sea turtles near Antonica's shore before their egg laying season begins. Please return to me when you finish.")
  22. end
  23. function Step1Complete(Quest, QuestGiver, Player)
  24. UpdateQuestStepDescription(Quest, 1, "I brought down ten sea turtles.")
  25. UpdateQuestTaskGroupDescription(Quest, 1, "I brought down ten sea turtles.")
  26. UpdateQuestZone(Quest, "The Willow Wood")
  27. AddQuestStepChat(Quest, 2, "I need to speak with Daryann at The Willow Wood.", 1, "I must return to speak with Daryann in The Willow Wood.", 201, 2370108)
  28. AddQuestStepCompleteAction(Quest, 2, "TurtlesDone")
  29. end
  30. function TurtlesDone(Quest)
  31. UpdateQuestStepDescription(Quest, 2, "I spoke with Daryann.")
  32. UpdateQuestTaskGroupDescription(Quest, 2, "I returned and spoke with Daryann.")
  33. UpdateQuestZone(Quest, "Antonica")
  34. AddQuestStepKill(Quest, 3, "I must kill some red tailed hawks in Antonica.", 3, 100, "I must slay three of the red tailed hawks in Antonica.", 80, 120029, 121208)
  35. AddQuestStepCompleteAction(Quest, 3, "HawksDone")
  36. end
  37. function HawksDone(Quest)
  38. UpdateQuestZone(Quest, "The Willow Wood")
  39. UpdateQuestStepDescription(Quest, 3, "I slew three red tailed hawks.")
  40. UpdateQuestTaskGroupDescription(Quest, 3, "I slew three red tailed hawks.")
  41. AddQuestStepChat(Quest, 4, "I need to speak with Daryann at The Willow Wood.", 1, "I must return to speak with Daryann in The Willow Woode.", 80, 2370108)
  42. AddQuestStepCompleteAction(Quest, 4, "CrabTime")
  43. end
  44. function CrabTime(Quest)
  45. UpdateQuestStepDescription(Quest, 4, "I spoke with Daryann.")
  46. UpdateQuestTaskGroupDescription(Quest, 4, "I returned and spoke with Daryann.")
  47. UpdateQuestZone(Quest, "Antonica")
  48. AddQuestStepKill(Quest, 5, "I must kill seven darkclaw crabs on the shores of Antonica.", 7, 100, "I must destroy seven darkclaw crabs on the shores of Antonica.", 77, 120118, 120762, 121265)
  49. AddQuestStepCompleteAction(Quest, 5, "CrabsComplete")
  50. end
  51. function CrabsComplete(Quest, QuestGiver, Player)
  52. UpdateQuestZone(Quest, "The Willow Wood")
  53. UpdateQuestStepDescription(Quest, 5, "I have killed seven darkclaw crabs.")
  54. UpdateQuestTaskGroupDescription(Quest, 5, "I destroyed seven darkclaw crabs.")
  55. AddQuestStepChat(Quest, 6, "I need to speak with Daryann at The Willow Wood.", 1, "I must return to speak with Daryann in The Willow Wood.", 77, 2370108)
  56. AddQuestStepCompleteAction(Quest, 6, "QuestComplete")
  57. end
  58. function Declined(Quest, QuestGiver, Player)
  59. -- Add dialog here for when the quest is declined
  60. end
  61. function Deleted(Quest, QuestGiver, Player)
  62. -- Remove any quest specific items here when the quest is deleted
  63. end
  64. function QuestComplete(Quest, QuestGiver, Player)
  65. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  66. UpdateQuestStepDescription(Quest, 6, "I spoke with Daryann.")
  67. UpdateQuestTaskGroupDescription(Quest, 1, "I returned and spoke with Daryann.")
  68. UpdateQuestDescription(Quest, "I've done what's necessary as a good steward of the lands. I've learned that every animal must have its numbers managed or life's balance is upset. Daryann appreciated my help.")
  69. GiveQuestReward(Quest, Player)
  70. end
  71. function Reload(Quest, QuestGiver, Player, Step)
  72. if Step == 1 then
  73. Step1Complete(Quest, QuestGiver, Player)
  74. elseif Step == 2 then
  75. TurtlesDone(Quest, QuestGiver, Player)
  76. elseif Step == 3 then
  77. HawksDone(Quest, QuestGiver, Player)
  78. elseif Step == 4 then
  79. CrabTime(Quest, QuestGiver, Player)
  80. elseif Step == 5 then
  81. CrabsComplete(Quest, QuestGiver, Player)
  82. elseif Step == 6 then
  83. QuestComplete(Quest, QuestGiver, Player)
  84. end
  85. end