ghosts_and_goblins.lua 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. --[[
  2. Script Name : Quests/QueensColony/ghosts_and_goblins.lua
  3. Script Purpose : This script is for the quest, "Ghosts and Goblins".
  4. Quest Name : Ghosts and Goblins
  5. Zone : The Queen's Colony
  6. Quest Starter : Deianeira
  7. Preceded By: Tainted (tainted.lua)
  8. Followed By: Nothing
  9. Script Author : Scatman
  10. Script Date : 2008.08.14
  11. --]]
  12. local GhostsAndGoblins = 184
  13. function Init(quest)
  14. -- Sapswill hip sack
  15. -- Sapswill swill
  16. AddQuestStepChat(quest, 1, "The Forest Keeper is a treant who is resisting the corruption spreading through the Queen's Colony.", 1, "I must seek the cause of the corruption in the Tainted Forest.", 0, 2530105)
  17. AddQuestStepCompleteAction(quest, 1, "step1_complete_talkedToKeeper")
  18. end
  19. function Accepted(quest, questGiver, player)
  20. if questGiver ~= nil then
  21. if GetDistance(player, questGiver) < 30 then
  22. FaceTarget(questGiver, player)
  23. conversation = CreateConversation()
  24. PlayFlavor(questGiver, "voiceover/english/tutorial_revamp/deianeira/tutorial_island02_revamp/quest/qst_deianeira_complete_111dc711.mp3", "", "", 796380527, 3559718915, player)
  25. AddConversationOption(conversation, "Glad to be of service.")
  26. StartConversation(conversation, questGiver, player, "It's up to us to find the answers; they're never handed to us.")
  27. end
  28. end
  29. end
  30. function Declined(quest, questGiver, player)
  31. end
  32. function step1_complete_talkedToKeeper(quest, questGiver, player)
  33. UpdateQuestStepDescription(quest, 1, "I've spoken with the Forest Keeper.")
  34. AddQuestStepKill(quest, 2, "The Forest Keeper asked me to release the ghostly treants so that they can be reborn.", 3, 100, "I must seek the cause of the corruption in the Tainted Forest.", 194, 2530012)
  35. AddQuestStepCompleteAction(quest, 2, "step2_complete_killedTreants")
  36. end
  37. function step2_complete_killedTreants(quest, questGiver, player)
  38. UpdateQuestStepDescription(quest, 2, "I've released the ghostly treants.")
  39. AddQuestStepChat(quest, 3, "Return to the Forest Keeper.", 1, "I must seek the cause of the corruption in the Tainted Forest.", 0, 2530105)
  40. AddQuestStepCompleteAction(quest, 3, "step3_complete_talkedToKeeper")
  41. end
  42. function step3_complete_talkedToKeeper(Quest, QuestGiver, Player)
  43. UpdateQuestStepDescription(Quest, 3, "I've spoken to the Forest Keeper.")
  44. AddQuestStepChat(Quest, 4, "The Forest Keeper suggested I speak with a soothsayer at the Last Stand, the old goblin base northeast of the Tainted Forest.", 1, "I must seek the cause of the corruption in the Tainted Forest.", 0, 2530037)
  45. AddQuestStepCompleteAction(Quest, 4, "step4_complete_talkedToSoothsayer")
  46. end
  47. function step4_complete_talkedToSoothsayer(quest, questGiver, player)
  48. UpdateQuestStepDescription(quest, 4, "The Forest Keeper referred me to a Sapswill Soothsayer.")
  49. UpdateQuestTaskGroupDescription(quest, 1, "The Forest Keeper referred me to a Sapswill Soothsayer.", 1)
  50. AddQuestStepLocation(quest, 5, "I must get water from the Hope Falls waterfall.", 30, "The Sapswill soothsayer suggested that if I gather some roots and bring him water, he could remove the taint from the Colony.", 313, -11, 0, -250)
  51. AddQuestStepLocation(quest, 6, "I must get water from the Razortooth Falls waterfall.", 30, "The Sapswill soothsayer suggested that if I gather some roots and bring him water, he could remove the taint from the Colony.", 313, 16, -10, -88)
  52. AddQuestStepLocation(quest, 7, "I must get water from the Sapswill Falls waterfall.", 30, "The Sapswill soothsayer suggested that if I gather some roots and bring him water, he could remove the taint from the Colony.", 313, -72, 0, -251)
  53. AddQuestStepHarvest(quest, 8, "I must gather some roots. They're scattered around the ground in large clumps and should be easy for me to locate.", 3, 100, "The Sapswill soothsayer suggested that if I gather some roots and bring him water, he could remove the taint from the Colony.", 194, 11637)
  54. AddQuestStepCompleteAction(quest, 5, "step5_complete_hopeFalls")
  55. AddQuestStepCompleteAction(quest, 6, "step6_complete_razortoothFalls")
  56. AddQuestStepCompleteAction(quest, 7, "step7_complete_sapswillFalls")
  57. AddQuestStepCompleteAction(quest, 8, "step8_complete_gatheredRoots")
  58. end
  59. function step5_complete_hopeFalls(Quest, QuestGiver, Player)
  60. UpdateQuestStepDescription(quest, 5, "I've collected some water from Hope Falls.")
  61. if QuestIsComplete(Player, GhostsAndGoblins) then
  62. GotWaterAndRoots(Quest, QuestGiver, Player)
  63. end
  64. end
  65. function step6_complete_razortoothFalls(Quest, QuestGiver, Player)
  66. UpdateQuestStepDescription(quest, 6, "I've collected some water from Razortooth falls.")
  67. if QuestIsComplete(Player, GhostsAndGoblins) then
  68. GotWaterAndRoots(Quest, QuestGiver, Player)
  69. end
  70. end
  71. function step7_complete_sapswillFalls(Quest, QuestGiver, Player)
  72. UpdateQuestStepDescription(quest, 7, "I've collected some water from Sapswill Falls.")
  73. if QuestIsComplete(Player, GhostsAndGoblins) then
  74. GotWaterAndRoots(Quest, QuestGiver, Player)
  75. end
  76. end
  77. function step8_complete_gatheredRoots(Quest, QuestGiver, Player)
  78. UpdateQuestStepDescription(quest, 8, "I've gathered some roots.")
  79. if QuestIsComplete(Player, GhostsAndGoblins) then
  80. GotWaterAndRoots(Quest, QuestGiver, Player)
  81. end
  82. end
  83. function GotWaterAndRoots(Quest, QuestGiver, Player)
  84. --UpdateQuestStepDescription(quest, 4, "The Forest Keeper referred me to a Sapswill Soothsayer.")
  85. UpdateQuestTaskGroupDescription(Quest, 2, "I've gathered the resources Sapswill soothsayer needs.")
  86. AddQuestStepChat(Quest, 9, "I must speak with the Sapswill soothsayer and give him these items so that he can remove the Colony's taint!", 1, "Now that I've done what the Sapswill soothsayer asked, I should return to him at the Last Stand.", 0, 2530037)
  87. AddQuestStepCompleteAction(Quest, 9, "questComplete")
  88. end
  89. function questComplete(quest, questGiver, player)
  90. UpdateQuestDescription(quest, "Releasing the ghostly treants did not lessen the corruption seeping through the Tainted Forest, so the Forest Keeper sent me to consult with a Sapswill soothsayer. After gathering some roots and water that I thought would be used for divination, I returned to find out he was only using me to get things to ferment!")
  91. GiveQuestReward(quest, player)
  92. end
  93. function Reload(Quest, QuestGiver, Player, Step)
  94. if Step == 1 then
  95. step1_complete_talkedToKeeper(Quest, QuestGiver, Player)
  96. elseif Step == 2 then
  97. step2_complete_killedTreants(Quest, QuestGiver, Player)
  98. elseif Step == 3 then
  99. step3_complete_talkedToKeeper(Quest, QuestGiver, Player)
  100. elseif Step == 4 then
  101. step4_complete_talkedToSoothsayer(Quest, QuestGiver, Player)
  102. elseif Step == 5 then
  103. step5_complete_hopeFalls(Quest, QuestGiver, Player)
  104. elseif Step == 6 then
  105. step6_complete_razortoothFalls(Quest, QuestGiver, Player)
  106. elseif Step == 7 then
  107. step7_complete_sapswillFalls(Quest, QuestGiver, Player)
  108. elseif Step == 8 then
  109. step8_complete_gatheredRoots(Quest, QuestGiver, Player)
  110. end
  111. end