9
3

the_balance_of_life.lua 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. --[[
  2. Script Name : Quests/Antonica/the_balance_of_life.lua
  3. Script Author : Premierio015
  4. Script Date : 2021.08.27 09:08:38
  5. Script Purpose :
  6. Zone : Antonica
  7. Quest Giver:
  8. Preceded by: None
  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. AddQuestStepKill(Quest, 2, "I must kill some red tailed hawks in Antonica.", 3, 100, "I must slay three of the red tailed hawks in Antonica.", 201, 120029, 121208) -- need correct icon
  14. AddQuestStepKill(Quest, 3, "I must kill seven darkclaw crabs on the shores of Antonica.", 7, 100, "I must destroy seven darkclaw crabs on the shores of Antonica.", 201, 120118, 120762, 121265) -- need correct icon
  15. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  16. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  17. AddQuestStepCompleteAction(Quest, 3, "Step3Complete")
  18. end
  19. function Step1Complete(Quest, QuestGiver, Player)
  20. UpdateQuestStepDescription(Quest, 1, "I brought down ten sea turtles.")
  21. CheckProgress(Quest, QuestGiver, Player)
  22. end
  23. function Step2Complete(Quest, QuestGiver, Player)
  24. UpdateQuestStepDescription(Quest, 2, "I slew three red tailed hawks.")
  25. CheckProgress(Quest, QuestGiver, Player)
  26. end
  27. function Step3Complete(Quest, QuestGiver, Player)
  28. UpdateQuestStepDescription(Quest, 3, "I destroyed seven darkclaw crabs.")
  29. CheckProgress(Quest, QuestGiver, Player)
  30. end
  31. function CheckProgress(Quest, QuestGiver, Player)
  32. if QuestStepIsComplete(Player, 5349, 1) and QuestStepIsComplete(Player, 5349, 2) and QuestStepIsComplete(Player, 5349, 3) then
  33. AddQuestStepChat(Quest, 4, "I need to speak with Daryann at Windstalker Village.", 1, "I must return to speak with Daryann in Windstalker Village.", 11, 121302)
  34. AddQuestStepCompleteAction(Quest, 4, "QuestComplete")
  35. end
  36. end
  37. function Accepted(Quest, QuestGiver, Player)
  38. -- Add dialog here for when the quest is accepted
  39. end
  40. function Declined(Quest, QuestGiver, Player)
  41. -- Add dialog here for when the quest is declined
  42. end
  43. function Deleted(Quest, QuestGiver, Player)
  44. -- Remove any quest specific items here when the quest is deleted
  45. end
  46. function QuestComplete(Quest, QuestGiver, Player)
  47. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  48. UpdateQuestStepDescription(Quest, 4, "I spoke with Daryann.")
  49. UpdateQuestTaskGroupDescription(Quest, 4, "I returned and spoke with Daryann.")
  50. 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.")
  51. GiveQuestReward(Quest, Player)
  52. end
  53. function Reload(Quest, QuestGiver, Player, Step)
  54. if Step == 1 then
  55. Step1Complete(Quest, QuestGiver, Player)
  56. elseif Step == 2 then
  57. Step2Complete(Quest, QuestGiver, Player)
  58. elseif Step == 3 then
  59. Step3Complete(Quest, QuestGiver, Player)
  60. elseif Step == 4 then
  61. QuestComplete(Quest, QuestGiver, Player)
  62. end
  63. end