9
3

BuildingFawnsGarden.lua 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. --[[
  2. Script Name : BuildingFawnsGarden.lua
  3. Script Purpose : Handles the quest, "Building Fawn's Garden"
  4. Script Author : Ememjr
  5. Script Date : 10/29/2017
  6. Script Notes : Overhauled by Dorbin to connect update check and added standard quest reload script if player zones to retain progress.
  7. NOTE: This quest info is NOT the classic version. Should flow: FawnStarts -> 15Wolves -> Fawn -> 5Octopuses -> FawnDone
  8. Zone : Starcrest Commune
  9. Quest Giver : Fawn
  10. Preceded by : None
  11. Followed by : None
  12. --]]
  13. require "SpawnScripts/Generic/DialogModule"
  14. function Init(Quest)
  15. UpdateQuestZone(Quest,"Antonica")
  16. AddQuestStepKill(Quest, 1, "I need to kill sand covered crabs to obtain their diatomaceous sand for Fawn's garden.", 5, 90, "She told me that I can probably find what she requires off of various creatures in Antonica. Some diatomaceous sand to add to her soil will help protect her garden, some fish eggs for fertilizer and some seeds to get her started should be a good start.", 113, 120417,120750,121479)
  17. AddQuestStepKill(Quest, 2, "I need to gather some fish eggs from Coldwind barracuda off the coast of Antonica.", 5, 90, "She told me that I can probably find what she requires off of various creatures in Antonica. Some diatomaceous sand to add to her soil will help protect her garden, some fish eggs for fertilizer and some seeds to get her started should be a good start.", 144, 120081, 121238)
  18. AddQuestStepKill(Quest, 3, "I need to gather some seeds from the fur of Antonican mammals.", 5, 90, "She told me that I can probably find what she requires off of various creatures in Antonica. Some diatomaceous sand to add to her soil will help protect her garden, some fish eggs for fertilizer and some seeds to get her started should be a good start.", 2314, 120257,120119,120008)
  19. AddQuestStepCompleteAction(Quest, 1, "Step1_Complete")
  20. AddQuestStepCompleteAction(Quest, 2, "Step2_Complete")
  21. AddQuestStepCompleteAction(Quest, 3, "Step3_Complete")
  22. end
  23. function step1_complete(Quest, QuestGiver, Player)
  24. UpdateQuestStepDescription(Quest, 1, "I've managed to gather the sand needed for Fawn's garden.")
  25. giveitemstoFawn(Quest, QuestGiver, Player)
  26. end
  27. function step2_complete(Quest, QuestGiver, Player)
  28. UpdateQuestStepDescription(Quest, 2, "I've gathered enough fish eggs for Fawn's garden.")
  29. giveitemstoFawn(Quest, QuestGiver, Player)
  30. end
  31. function step3_complete(Quest, QuestGiver, Player)
  32. UpdateQuestStepDescription(Quest, 3, "I've gathered enough seeds for Fawn to use in her garden.")
  33. giveitemstoFawn(Quest, QuestGiver, Player)
  34. end
  35. function giveitemstoFawn(Quest, QuestGiver, Player)
  36. if QuestStepIsComplete(Player,241,1) and QuestStepIsComplete(Player,241,2) and QuestStepIsComplete(Player,241,3) then
  37. QuestStep4(Quest, QuestGiver, Player)
  38. end
  39. end
  40. function QuestStep4(Quest, QuestGiver, Player)
  41. UpdateQuestTaskGroupDescription(Quest, 1, "I've managed to gather everything for Fawn Starstone's garden.")
  42. AddQuestStepChat(Quest, 4, "Return to Fawn in Starcrest Commune.", 1, "I need to give these items to Fawn for her garden.", 0, 2340032)
  43. AddQuestStepCompleteAction(Quest, 4, "quest_complete_gaveitemstoFawn")
  44. end
  45. function quest_complete_gaveitemstoFawn(Quest, QuestGiver, Player)
  46. UpdateQuestStepDescription(Quest, 4, "I've given Fawn the items she needs for her garden.")
  47. UpdateQuestTaskGroupDescription(Quest, 4, "I've given Fawn the items she needs for her garden.")
  48. UpdateQuestDescription(Quest, "I've gathered the items Fawn needs for her garden. She was so appreciative, she gave me a little gift for my efforts.")
  49. GiveQuestReward(Quest, Player)
  50. end
  51. function Reload(Quest, QuestGiver, Player, Step)
  52. if Step == 1 then
  53. step1_complete(Quest, QuestGiver, Player)
  54. elseif Step == 2 then
  55. step2_complete(Quest, QuestGiver, Player)
  56. elseif Step == 3 then
  57. step3_complete(Quest, QuestGiver, Player)
  58. elseif Step == 4 then
  59. QuestStep4(Quest, QuestGiver, Player)
  60. end
  61. end
  62. function Accepted(Quest, QuestGiver, Player)
  63. FaceTarget(QuestGiver, Player)
  64. Dialog.New(QuestGiver, Player)
  65. Dialog.AddDialog("Wonderful! Thank you so much.")
  66. Dialog.AddOption("I'll be back.")
  67. Dialog.Start()
  68. end
  69. function Declined(Quest, QuestGiver, Player)
  70. -- Add dialog here for when the quest is declined
  71. end