9
3

tainted.lua 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. --[[
  2. Script Name : Quests/QueensColony/tainted.lua
  3. Script Purpose : This script is for the quest, "Tainted".
  4. Quest Name : Tainted
  5. Zone : The Queen's Colony
  6. Quest Starter : Deianeira
  7. Preceded By: Nothing
  8. Followed By: Ghosts and Goblins (<ghosts_and_goblins.lua>)
  9. Script Author : Scatman
  10. Script Date : 2008.08.13
  11. --]]
  12. function Init(quest)
  13. -- spider fang ring
  14. AddQuestStepKill(quest, 1, "I need to clear the Tainted Forest of these toxic crawlers!", 4, 100, "I need to clear out the toxic crawlers to keep their poison from spreading throughout the Colony.", 1857, 2530084)
  15. AddQuestStepCompleteAction(quest, 1, "step1_toxicCrawlers")
  16. end
  17. function Accepted(quest, questGiver, player)
  18. if questGiver ~= nil then
  19. if GetDistance(player, questGiver) < 30 then
  20. FaceTarget(questGiver, player)
  21. conversation = CreateConversation()
  22. PlayFlavor(questGiver, "voiceover/english/tutorial_revamp/deianeira/tutorial_island02_revamp/quest/qst_deianeira_complete_111dc711.mp3", "", "", 796380527, 3559718915, player)
  23. AddConversationOption(conversation, "I'll be back when I'm done with the spiders.")
  24. StartConversation(conversation, questGiver, player, "It's up to us to find the answers; they're never handed to us.")
  25. end
  26. end
  27. end
  28. function Declined(quest, questGiver, player)
  29. end
  30. function step1_toxicCrawlers(quest, questGiver, player)
  31. if player ~= nil then
  32. GiveQuestItem(quest, player, "I've cleared out many spiders and as a result found an unusual item.", 10317)
  33. end
  34. UpdateQuestStepDescription(quest, 1, "I've cleared out many spiders and as a result found an unusual item.")
  35. UpdateQuestTaskGroupDescription(quest, 1, "I've cleared out many spiders and as a result found an unusual item.")
  36. -- SPAWN Parchment Scrap (right-click this item to Examine it), spawn this in the Quest Reward window
  37. -- Description = I've cleared out many spiders and as a result found an unusual item.
  38. -- The edges of the parchment are torn and jagged as though ripped from a much larger document.
  39. -- Examine the parchment ().
  40. -- Put the parchment away.
  41. -- update quest step
  42. -- You can barely make out some writing on this scrap: "The toxic crawlers will be useful to cover our ... the
  43. -- totem ..." The reference to a totem is puzzling. Why would someone want a totem covered in spiders? There must
  44. -- be more pieces of this parchment amongst the toxic crawlers.
  45. -- Put the parchment away.
  46. AddQuestStepChat(quest, 2, "I need to examine the parchment scrap to see if I can decipher anything.", 1, "There is more to be learned in the Tainted Forest.", 0, 2530092)
  47. AddQuestStepCompleteAction(quest, 2, "step2_complete_examinedParchment")
  48. end
  49. function step2_complete_examinedParchment(quest, questGiver, player)
  50. UpdateQuestStepDescription(quest, 2, "I've examined the scrap.")
  51. AddQuestStepKill(quest, 3, "While hard to decipher, the writings indicate that there is a problem with the toxic crawlers. I'll try to find another piece of parchment on one of these spiders though it may take me a while to find one with more of this parchment.", 1, 25, "There is more to be learned in the Tainted Forest.", 2180, 2530084)
  52. AddQuestStepCompleteAction(quest, 3, "step3_complete_toxicCrawlers")
  53. end
  54. function step3_complete_toxicCrawlers(quest, questGiver, player)
  55. UpdateQuestStepDescription(quest, 3, "I've found another piece of parchment.")
  56. -- The edges of the parchment are torn and jagged as though ripped from a much larger document.
  57. -- Put together the parchment pieces. ().
  58. -- Put the parchment away.
  59. -- You line up the parchment pieces. The newest piece adds enough new words that you can read: "The toxic crawlers
  60. -- will be useful to cover our tracks. Leave the totem in the eastern rocks..." Apparently Deianeira's concern
  61. -- about the spiders is well-placed, though not for the reasons she thinks. I must find more of this parchment
  62. -- to learn what this totem means.
  63. -- Roll the parchment up. ()
  64. -- update quest
  65. -- You carefully roll the parchment and stow it away.
  66. -- Put the parchment away.
  67. AddQuestStepChat(quest, 4, "I need to put the parchment pieces together to learn more about the toxic crawlers.", 1, "There is more to be learned in the Tainted Forest.", 0, 2530092)
  68. AddQuestStepCompleteAction(quest, 4, "step4_complete_putParchmentTogether")
  69. end
  70. function step4_complete_putParchmentTogether(Quest, QuestGiver, Player)
  71. UpdateQuestStepDescription(Quest, 4, "I've put the parchment together.")
  72. AddQuestStepLocation(Quest, 5, "According to the parchment, there is something hidden in the rockpile at the eastern end of the Tainted Forest. I'll need to take a closer look.", 15, "There is more to be learned in the Tainted Forest.", 0, 92, 1, 122)
  73. AddQuestStepCompleteAction(Quest, 5, "step5_complete_foundParchment")
  74. -- remove the old parchment
  75. -- summon Parchment Scrap
  76. RemoveItem(Player, 10317)
  77. SummonItem(Player, 10313, 0)
  78. end
  79. function step5_complete_foundParchment(Quest, QuestGiver, Player)
  80. UpdateQuestStepDescription(Quest, 5, "I've located the rest of the parchment.")
  81. --spawn "a piece of parchment harvestable"
  82. --only let Player see it
  83. --set harvestable to "Parchment Scrap" the one that looks like it was unrolled.
  84. SpawnMob(GetZone(Player), 2530194, true, 92.6042, 1.6355, 123.73, 290)
  85. AddQuestStepObtainItem(Quest, 6, "Now I need to gather the parchment pieces from the spider's nest. Hopefully they are from the parchment I'm trying to put together!", 1, 100, "There is more to be learned in the Tainted Forest.", 75, 10315)
  86. AddQuestStepCompleteAction(Quest, 6, "step6_complete_harvestedParchment")
  87. end
  88. function step6_complete_harvestedParchment(Quest, QuestGiver, Player)
  89. UpdateQuestStepDescription(Quest, 6, "I've gathered the pieces of parchment from the spider's nest.")
  90. -- The edges of the parchment are torn and jagged as though ripped from a much larger document.
  91. -- Piece together the parchment ().
  92. -- Put the parchment away.
  93. -- The last bit of parchment was caught on the web near the large pile of rocks. You piece it together and read:
  94. -- "The toxic crawlers will be useful to cover our tracks. Leave the totem in the eastern rocks beneath Direspike."
  95. -- Direspike must be a tainted spider with greater power. You realize you may have to flush him from his lair
  96. -- by picking off the nearby spiders until he appears to meet your challenge.
  97. -- Roll the parchment up. ()
  98. -- update quest
  99. -- You carefully roll the parchment and stow it away.
  100. -- Put the parchment away.
  101. AddQuestStepChat(Quest, 7, "I need to put together all the pieces of the parchment.", 1, "There is more to be learned in the Tainted Forest.", 0, 2530092)
  102. AddQuestStepCompleteAction(Quest, 7, "step7_complete_putParchmentTogether")
  103. end
  104. function step7_complete_putParchmentTogether(Quest, QuestGiver, Player)
  105. UpdateQuestStepDescription(Quest, 7, "I've pieced the parchment together.")
  106. -- remove old parchment
  107. RemoveItem(Player, 10313)
  108. RemoveItem(Player, 10315)
  109. -- spawn direspike when player gets close to his loc
  110. SpawnMob(GetZone(Player), 2530106, false, 89.7797, 4.85852, 124.289, 300)
  111. AddQuestStepKill(Quest, 8, "The parchment refers to Direspike. I must slay Direspike, the spider that must be at the root of this problem.", 1, 100, "There is more to be learned in the Tainted Forest.", 1859, 2530106)
  112. AddQuestStepCompleteAction(Quest, 8, "step8_complete_killedDireSpike")
  113. end
  114. function step8_complete_killedDireSpike(Quest, QuestGiver, Player)
  115. UpdateQuestStepDescription(Quest, 8, "I've slain Direspike and in the process destroyed the tainted totem.")
  116. AddQuestStepChat(Quest, 9, "I should tell Deianeira that the toxic crawlers are not the source of the taint.", 1, "There is more to be learned in the Tainted Forest.", 0, 2530107)
  117. AddQuestStepCompleteAction(Quest, 9, "completed")
  118. end
  119. function completed(quest, questGiver, player)
  120. UpdateQuestDescription(quest, "While killing toxic crawlers to test Deianeira's theory on poison, I found a piece of parchment hinting that someone had influenced the toxic crawlers by hiding some kind of totem in their main nest. After I removed Direspike from the lair, the totem shattered on its own. The poison theory seems shattered as well.")
  121. GiveQuestReward(quest, player)
  122. end
  123. function Reload(Quest, QuestGiver, Player, Step)
  124. if Step == 1 then
  125. step1_toxicCrawlers(Quest, QuestGiver, Player)
  126. elseif Step == 2 then
  127. step2_complete_examinedParchment(Quest, QuestGiver, Player)
  128. elseif Step == 3 then
  129. step3_complete_toxicCrawlers(Quest, QuestGiver, Player)
  130. elseif Step == 4 then
  131. step4_complete_putParchmentTogether(Quest, QuestGiver, Player)
  132. elseif Step == 5 then
  133. step5_complete_foundParchment(Quest, QuestGiver, Player)
  134. elseif Step == 6 then
  135. step6_complete_harvestedParchment(Quest, QuestGiver, Player)
  136. elseif Step == 7 then
  137. step7_complete_putParchmentTogether(Quest, QuestGiver, Player)
  138. elseif Step == 8 then
  139. step8_complete_killedDireSpike(Quest, QuestGiver, Player)
  140. end
  141. end