sowing_beauty.lua 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. --[[
  2. Script Name : Quests/Castleview/sowing_beauty.lua
  3. Script Purpose : Handles the quest, "Sowing Beauty"
  4. Script Author : Scatman
  5. Script Date : 2009.10.02
  6. Zone : Castleview Hamlet
  7. Quest Giver: Vindain Greenfaith
  8. Preceded by: Components of Growth (components_of_growth.lua)
  9. Followed by: Targeting Corruption (targeting_corruption.lua)
  10. --]]
  11. local SowingBeauty = 224
  12. function Init(Quest)
  13. AddQuestStep(Quest, 1, "I need to plant a Green Wisp in the planter northwest of The Fountain of Valor, just south of the inn.", 1, 100, "Vindain has asked that I take the seeds, soil, and water and plant Green Wisps at the planter boxes around Castleview Hamlet.", 0)
  14. AddQuestStep(Quest, 2, "I need to plant a Green Wisp in the planter southwest of the inn.", 1, 100, "Vindain has asked that I take the seeds, soil, and water and plant Green Wisps at the planter boxes around Castleview Hamlet.", 0)
  15. AddQuestStep(Quest, 3, "I need to plant a Green Wisp in the planter north of the bank on its northwestern corner.", 1, 100, "Vindain has asked that I take the seeds, soil, and water and plant Green Wisps at the planter boxes around Castleview Hamlet.", 0)
  16. AddQuestStep(Quest, 4, "I need to plant a Green Wisp in the planter north of the bank on its northeastern corner.", 1, 100, "Vindain has asked that I take the seeds, soil, and water and plant Green Wisps at the planter boxes around Castleview Hamlet.", 0)
  17. AddQuestStep(Quest, 5, "I need to plant a Green Wisp in the planter northwest of the scribe's shop.", 1, 100, "Vindain has asked that I take the seeds, soil, and water and plant Green Wisps at the planter boxes around Castleview Hamlet.", 0)
  18. AddQuestStep(Quest, 6, "I need to plant a Green Wisp in the planter just west of the scribe's shop.", 1, 100, "Vindain has asked that I take the seeds, soil, and water and plant Green Wisps at the planter boxes around Castleview Hamlet.", 0)
  19. AddQuestStep(Quest, 7, "I need to plant a Green Wisp in the planter north of the armor shop, on the level about the Fountain of Valor.", 1, 100, "Vindain has asked that I take the seeds, soil, and water and plant Green Wisps at the planter boxes around Castleview Hamlet.", 0)
  20. AddQuestStep(Quest, 8, "I need to plant a Green Wisp in the planter on the northeast corner of the armor shop.", 1, 100, "Vindain has asked that I take the seeds, soil, and water and plant Green Wisps at the planter boxes around Castleview Hamlet.", 0)
  21. AddQuestStepCompleteAction(Quest, 1, "step1_complete_plantedSeed1")
  22. AddQuestStepCompleteAction(Quest, 2, "step2_complete_plantedSeed2")
  23. AddQuestStepCompleteAction(Quest, 3, "step3_complete_plantedSeed3")
  24. AddQuestStepCompleteAction(Quest, 4, "step4_complete_plantedSeed4")
  25. AddQuestStepCompleteAction(Quest, 5, "step5_complete_plantedSeed5")
  26. AddQuestStepCompleteAction(Quest, 6, "step6_complete_plantedSeed6")
  27. AddQuestStepCompleteAction(Quest, 7, "step7_complete_plantedSeed7")
  28. AddQuestStepCompleteAction(Quest, 8, "step8_complete_plantedSeed8")
  29. end
  30. function Accepted(Quest, QuestGiver, Player)
  31. FaceTarget(QuestGiver, Player)
  32. conversation = CreateConversation()
  33. PlayFlavor(QuestGiver, "voiceover/english/tutorial_revamp/vindain_greenfaith/qey_village04/quests/vindain/vindain019a.mp3", "", "", 4093998099, 2772552275, Player)
  34. AddConversationOption(conversation, "I will return.")
  35. StartConversation(conversation, QuestGiver, Player, "Good. I cannot wait to see how they look.")
  36. end
  37. function Declined(Quest, QuestGiver, Player)
  38. end
  39. function step1_complete_plantedSeed1(Quest, QuestGiver, Player)
  40. UpdateQuestStepDescription(Quest, 1, "I have planted a Green Wisp in the planter northwest of The Fountain of Valor.")
  41. if QuestIsComplete(Player, SowingBeauty) then
  42. seeds_planted(Quest, QuestGiver, Player)
  43. end
  44. end
  45. function step2_complete_plantedSeed2(Quest, QuestGiver, Player)
  46. UpdateQuestStepDescription(Quest, 2, "I have planted a Green Wisp in the planter southwest of the inn.")
  47. if QuestIsComplete(Player, SowingBeauty) then
  48. seeds_planted(Quest, QuestGiver, Player)
  49. end
  50. end
  51. function step3_complete_plantedSeed3(Quest, QuestGiver, Player)
  52. UpdateQuestStepDescription(Quest, 3, "I have planted a Green Wisp in the planter north of the bank on its northwestern corner.")
  53. if QuestIsComplete(Player, SowingBeauty) then
  54. seeds_planted(Quest, QuestGiver, Player)
  55. end
  56. end
  57. function step4_complete_plantedSeed4(Quest, QuestGiver, Player)
  58. UpdateQuestStepDescription(Quest, 4, "I have planted a Green Wisp in the planter north of the bank's northeastern corner.")
  59. if QuestIsComplete(Player, SowingBeauty) then
  60. seeds_planted(Quest, QuestGiver, Player)
  61. end
  62. end
  63. function step5_complete_plantedSeed5(Quest, QuestGiver, Player)
  64. UpdateQuestStepDescription(Quest, 5, "I tried to plant a Green Wisp northwest of the scribe's shop but it came to life and attacked me.")
  65. if QuestIsComplete(Player, SowingBeauty) then
  66. seeds_planted(Quest, QuestGiver, Player)
  67. end
  68. end
  69. function step6_complete_plantedSeed6(Quest, QuestGiver, Player)
  70. UpdateQuestStepDescription(Quest, 6, "I have planted a Green Wisp in the planter just west of the scribe's shop.")
  71. if QuestIsComplete(Player, SowingBeauty) then
  72. seeds_planted(Quest, QuestGiver, Player)
  73. end
  74. end
  75. function step7_complete_plantedSeed7(Quest, QuestGiver, Player)
  76. UpdateQuestStepDescription(Quest, 7, "I have planted a Green Wisp in the planter north of the armor shop, on the level above The Found of Valor.")
  77. if QuestIsComplete(Player, SowingBeauty) then
  78. seeds_planted(Quest, QuestGiver, Player)
  79. end
  80. end
  81. function step8_complete_plantedSeed8(Quest, QuestGiver, Player)
  82. UpdateQuestStepDescription(Quest, 8, "I have planted a Green Wisp in the planter on the northeast corner of the armor shop.")
  83. if QuestIsComplete(Player, SowingBeauty) then
  84. seeds_planted(Quest, QuestGiver, Player)
  85. end
  86. end
  87. function seeds_planted(Quest, QuestGiver, Player)
  88. UpdateQuestTaskGroupDescription(Quest, 1, "I have planted all of the seeds.")
  89. AddQuestStepChat(Quest, 9, "I need to return to Vindain near The Fountain of Valor.", 1, "I need to return to Vindain and let him know of the planted seeds, especially the one that went wrong.", 0, 2360007)
  90. AddQuestStepCompleteAction(Quest, 9, "quest_complete")
  91. end
  92. function quest_complete(Quest, QuestGiver, Player)
  93. UpdateQuestStepDescription(Quest, 9, "I have spoken with Vindain.")
  94. UpdateQuestTaskGroupDescription(Quest, 2, "I have spoken with Vindain.")
  95. UpdateQuestDescription(Quest, "I have planted all of the seeds. One seedling came to life and attacked me.")
  96. GiveQuestReward(Quest, Player)
  97. end
  98. function Reload(Quest, QuestGiver, Player, Step)
  99. if Step == 1 then
  100. step1_complete_plantedSeed1(Quest, QuestGiver, Player)
  101. elseif Step == 2 then
  102. step2_complete_plantedSeed2(Quest, QuestGiver, Player)
  103. elseif Step == 3 then
  104. step3_complete_plantedSeed3(Quest, QuestGiver, Player)
  105. elseif Step == 4 then
  106. step4_complete_plantedSeed4(Quest, QuestGiver, Player)
  107. elseif Step == 5 then
  108. step5_complete_plantedSeed5(Quest, QuestGiver, Player)
  109. elseif Step == 6 then
  110. step6_complete_plantedSeed6(Quest, QuestGiver, Player)
  111. elseif Step == 7 then
  112. step7_complete_plantedSeed7(Quest, QuestGiver, Player)
  113. elseif Step == 8 then
  114. step8_complete_plantedSeed8(Quest, QuestGiver, Player)
  115. end
  116. end