the_balance_of_life.lua 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  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 Step1Complete(Quest, QuestGiver, Player)
  17. UpdateQuestStepDescription(Quest, 1, "I brought down ten sea turtles.")
  18. UpdateQuestTaskGroupDescription(Quest, 1, "I brought down ten sea turtles.")
  19. UpdateQuestZone(Quest, "The Willow Wood")
  20. 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)
  21. AddQuestStepCompleteAction(Quest, 2, "TurtlesDone")
  22. end
  23. function TurtlesDone(Quest)
  24. UpdateQuestStepDescription(Quest, 2, "I spoke with Daryann.")
  25. UpdateQuestTaskGroupDescription(Quest, 2, "I returned and spoke with Daryann.")
  26. UpdateQuestZone(Quest, "Antonica")
  27. 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)
  28. AddQuestStepCompleteAction(Quest, 3, "HawksDone")
  29. end
  30. function HawksDone(Quest)
  31. UpdateQuestZone(Quest, "The Willow Wood")
  32. UpdateQuestStepDescription(Quest, 3, "I slew three red tailed hawks.")
  33. UpdateQuestTaskGroupDescription(Quest, 3, "I slew three red tailed hawks.")
  34. 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)
  35. AddQuestStepCompleteAction(Quest, 4, "CrabTime")
  36. end
  37. function CrabTime(Quest)
  38. UpdateQuestStepDescription(Quest, 4, "I spoke with Daryann.")
  39. UpdateQuestTaskGroupDescription(Quest, 4, "I returned and spoke with Daryann.")
  40. UpdateQuestZone(Quest, "Antonica")
  41. 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)
  42. AddQuestStepCompleteAction(Quest, 5, "CrabsComplete")
  43. end
  44. function CrabsComplete(Quest, QuestGiver, Player)
  45. UpdateQuestZone(Quest, "The Willow Wood")
  46. UpdateQuestStepDescription(Quest, 5, "I have killed seven darkclaw crabs.")
  47. UpdateQuestTaskGroupDescription(Quest, 5, "I destroyed seven darkclaw crabs.")
  48. 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)
  49. AddQuestStepCompleteAction(Quest, 6, "QuestComplete")
  50. end
  51. function Accepted(Quest, QuestGiver, Player)
  52. -- Add dialog here for when the quest is accepted
  53. end
  54. function Declined(Quest, QuestGiver, Player)
  55. -- Add dialog here for when the quest is declined
  56. end
  57. function Deleted(Quest, QuestGiver, Player)
  58. -- Remove any quest specific items here when the quest is deleted
  59. end
  60. function QuestComplete(Quest, QuestGiver, Player)
  61. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  62. UpdateQuestStepDescription(Quest, 6, "I spoke with Daryann.")
  63. UpdateQuestTaskGroupDescription(Quest, 1, "I returned and spoke with Daryann.")
  64. 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.")
  65. GiveQuestReward(Quest, Player)
  66. end
  67. function Reload(Quest, QuestGiver, Player, Step)
  68. if Step == 1 then
  69. Step1Complete(Quest, QuestGiver, Player)
  70. elseif Step == 2 then
  71. TurtlesDone(Quest, QuestGiver, Player)
  72. elseif Step == 3 then
  73. HawksDone(Quest, QuestGiver, Player)
  74. elseif Step == 4 then
  75. CrabTime(Quest, QuestGiver, Player)
  76. elseif Step == 5 then
  77. CrabsComplete(Quest, QuestGiver, Player)
  78. elseif Step == 6 then
  79. QuestComplete(Quest, QuestGiver, Player)
  80. end
  81. end