9
3

ritual_of_hearth.lua 3.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. --[[
  2. Script Name : Quests/Nettleville/ritual_of_hearth.lua
  3. Script Purpose : Handles the quest, "Ritual of Hearth"
  4. Script Author : Scatman
  5. Script Date : 2009.08.21
  6. Zone : Nettleville
  7. Quest Giver: Lakosha Maera
  8. Preceded by: None
  9. Followed by: Curious Findings (curious_findings.lua)
  10. --]]
  11. -- Item ID's
  12. local LOOSE_SOIL = 9143
  13. -- Quest ID's
  14. local RITUAL_OF_HEALTH = 300
  15. function Init(Quest)
  16. AddQuestStep(Quest, 1, "I need to collect some dirt from under the tree on the west side of The Nettleville Market Row in the south western side of Nettleville.", 1, 100, "Lakosha Maera has asked that I collect some soil from around Nettleville.", 181)
  17. AddQuestStep(Quest, 2, "I need to collect some dirt from under the tree near the entrance to the Peat Bog.", 1, 100, "Lakosha Maera has asked that I collect some soil from around Nettleville.", 181)
  18. AddQuestStep(Quest, 3, "I need to collect some dirt from in front of the gates to South Qeynos in northwestern Nettleville.", 1, 100, "Lakosha Maera has asked that I collect some soil from around Nettleville.", 181)
  19. AddQuestStepCompleteAction(Quest, 1, "step1_complete_gotDirtMarket")
  20. AddQuestStepCompleteAction(Quest, 2, "step2_complete_gotDirtPeatBog")
  21. AddQuestStepCompleteAction(Quest, 3, "step3_complete_gotDirtGates")
  22. end
  23. function Accepted(Quest, QuestGiver, Player)
  24. FaceTarget(QuestGiver, Player)
  25. conversation = CreateConversation()
  26. PlayFlavor(QuestGiver, "voiceover/english/tutorial_revamp/lakosha_maera/qey_village01/quests/lakosha_maera/lakosha_maera007.mp3", "", "", 127670911, 3559521649, Player)
  27. AddConversationOption(conversation, "All right.")
  28. StartConversation(conversation, QuestGiver, Player, "Just a handful from each spot should be fine. Bring it back to me once you have it collected.")
  29. end
  30. function Declined(Quest, QuestGiver, Player)
  31. end
  32. function Deleted(Quest, QuestGiver, Player)
  33. end
  34. function step1_complete_gotDirtMarket(Quest, QuestGiver, Player)
  35. UpdateQuestStepDescription(Quest, 1, "I have collected some dirt from under the tree on the west side of The Nettleville Mark Row.")
  36. if QuestIsComplete(Player, RITUAL_OF_HEALTH) then
  37. HarvestedAllDirt(Quest, QuestGiver, Player)
  38. end
  39. end
  40. function step2_complete_gotDirtPeatBog(Quest, QuestGiver, Player)
  41. UpdateQuestStepDescription(Quest, 2, "I have collected some dirt from under the tree on the west side of The Nettleville Mark Row.")
  42. if QuestIsComplete(Player, RITUAL_OF_HEALTH) then
  43. HarvestedAllDirt(Quest, QuestGiver, Player)
  44. end
  45. end
  46. function step3_complete_gotDirtGates(Quest, QuestGiver, Player)
  47. UpdateQuestStepDescription(Quest, 3, "I have collected some dirt from in front of the gates to South Qeynos.")
  48. if QuestIsComplete(Player, RITUAL_OF_HEALTH) then
  49. HarvestedAllDirt(Quest, QuestGiver, Player)
  50. end
  51. end
  52. function HarvestedAllDirt(Quest, QuestGiver, Player)
  53. UpdateQuestTaskGroupDescription(Quest, 1, "I have collected all the needed soil.")
  54. AddQuestStepChat(Quest, 4, "I need to return to Lakosha Maera on the west side of Nettleville.", 1, "Now that I have collected all of the soil I should return to Lakosha", 0, 2330053)
  55. AddQuestStepCompleteAction(Quest, 4, "Quest_Complete")
  56. end
  57. function Quest_Complete(Quest, QuestGiver, Player)
  58. -- loose soil
  59. while HasItem(Player, LOOSE_SOIL, 1) do
  60. RemoveItem(Player, LOOSE_SOIL)
  61. end
  62. UpdateQuestStepDescription(Quest, 4, "I have spoken with Lakosha Maera.")
  63. UpdateQuestTaskGroupDescription(Quest, 2, "I have spoken with Lakosha.")
  64. UpdateQuestDescription(Quest, "I have gathered the needed soil to complete Lakosha's ritual. Within the gathered soil Lakosha found something disturbing, however.")
  65. GiveQuestReward(Quest, Player)
  66. end
  67. function Reload(Quest, QuestGiver, Player, Step)
  68. if Step == 1 then
  69. step1_complete_gotDirtMarket(Quest, QuestGiver, Player)
  70. elseif Step == 2 then
  71. step2_complete_gotDirtPeatBog(Quest, QuestGiver, Player)
  72. elseif Step == 3 then
  73. step3_complete_gotDirtGates(Quest, QuestGiver, Player)
  74. end
  75. end