9
3

tainted.lua 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  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 ()
  9. Script Author : Scatman
  10. Script Date : 2008.08.13
  11. Modified : 11/12/2020 added additional spawn id for toxic crawlers EmemJR
  12. --]]
  13. function Init(quest)
  14. -- spider fang ring
  15. 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,2530202,2530201)
  16. AddQuestStepCompleteAction(quest, 1, "step1_toxicCrawlers")
  17. end
  18. function Accepted(quest, questGiver, player)
  19. if questGiver ~= nil then
  20. if GetDistance(player, questGiver) < 30 then
  21. FaceTarget(questGiver, player)
  22. conversation = CreateConversation()
  23. PlayFlavor(questGiver, "voiceover/english/tutorial_revamp/deianeira/tutorial_island02_revamp/quest/qst_deianeira_complete_111dc711.mp3", "", "thanks", 796380527, 3559718915, player)
  24. AddConversationOption(conversation, "I'll be back when I'm done with the spiders.")
  25. StartConversation(conversation, questGiver, player, "It's up to us to find the answers; they're never handed to us.")
  26. end
  27. end
  28. end
  29. function Declined(quest, questGiver, player)
  30. end
  31. function step1_toxicCrawlers(quest, questGiver, player)
  32. if player ~= nil then
  33. GiveQuestItem(quest, player, "I've cleared out many spiders and as a result found an unusual item.", 10317)
  34. end
  35. UpdateQuestStepDescription(quest, 1, "I've cleared out many spiders and as a result found an unusual item.")
  36. UpdateQuestTaskGroupDescription(quest, 1, "I've cleared out many spiders and as a result found an unusual item.")
  37. -- SPAWN Parchment Scrap (right-click this item to Examine it), spawn this in the Quest Reward window
  38. -- Description = I've cleared out many spiders and as a result found an unusual item.
  39. -- The edges of the parchment are torn and jagged as though ripped from a much larger document.
  40. -- Examine the parchment ().
  41. -- Put the parchment away.
  42. -- update quest step
  43. -- You can barely make out some writing on this scrap: "The toxic crawlers will be useful to cover our ... the
  44. -- totem ..." The reference to a totem is puzzling. Why would someone want a totem covered in spiders? There must
  45. -- be more pieces of this parchment amongst the toxic crawlers.
  46. -- Put the parchment away.
  47. 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)
  48. AddQuestStepCompleteAction(quest, 2, "step2_complete_examinedParchment")
  49. end
  50. function step2_complete_examinedParchment(quest, questGiver, player)
  51. UpdateQuestStepDescription(quest, 2, "I've examined the scrap.")
  52. 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,2530202,2530201)
  53. AddQuestStepCompleteAction(quest, 3, "step3_complete_toxicCrawlers")
  54. end
  55. function step3_complete_toxicCrawlers(quest, questGiver, player)
  56. UpdateQuestStepDescription(quest, 3, "I've found another piece of parchment.")
  57. -- The edges of the parchment are torn and jagged as though ripped from a much larger document.
  58. -- Put together the parchment pieces. ().
  59. -- Put the parchment away.
  60. -- You line up the parchment pieces. The newest piece adds enough new words that you can read: "The toxic crawlers
  61. -- will be useful to cover our tracks. Leave the totem in the eastern rocks..." Apparently Deianeira's concern
  62. -- about the spiders is well-placed, though not for the reasons she thinks. I must find more of this parchment
  63. -- to learn what this totem means.
  64. -- Roll the parchment up. ()
  65. -- update quest
  66. -- You carefully roll the parchment and stow it away.
  67. -- Put the parchment away.
  68. 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)
  69. AddQuestStepCompleteAction(quest, 4, "step4_complete_putParchmentTogether")
  70. end
  71. function step4_complete_putParchmentTogether(Quest, QuestGiver, Player)
  72. UpdateQuestStepDescription(Quest, 4, "I've put the parchment together.")
  73. 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)
  74. AddQuestStepCompleteAction(Quest, 5, "step5_complete_foundParchment")
  75. -- remove the old parchment
  76. -- summon Parchment Scrap
  77. end
  78. function step5_complete_foundParchment(Quest, QuestGiver, Player)
  79. UpdateQuestStepDescription(Quest, 5, "I've located the rest of the parchment.")
  80. --spawn "a piece of parchment harvestable"
  81. --only let Player see it
  82. --set harvestable to "Parchment Scrap" the one that looks like it was unrolled.
  83. SpawnMob(GetZone(Player), 2530194, true, 92.6042, 1.6355, 123.73, 290)
  84. 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)
  85. AddQuestStepCompleteAction(Quest, 6, "step6_complete_harvestedParchment")
  86. end
  87. function step6_complete_harvestedParchment(Quest, QuestGiver, Player)
  88. UpdateQuestStepDescription(Quest, 6, "I've gathered the pieces of parchment from the spider's nest.")
  89. -- The edges of the parchment are torn and jagged as though ripped from a much larger document.
  90. -- Piece together the parchment ().
  91. -- Put the parchment away.
  92. -- The last bit of parchment was caught on the web near the large pile of rocks. You piece it together and read:
  93. -- "The toxic crawlers will be useful to cover our tracks. Leave the totem in the eastern rocks beneath Direspike."
  94. -- Direspike must be a tainted spider with greater power. You realize you may have to flush him from his lair
  95. -- by picking off the nearby spiders until he appears to meet your challenge.
  96. -- Roll the parchment up. ()
  97. -- update quest
  98. -- You carefully roll the parchment and stow it away.
  99. -- Put the parchment away.
  100. 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)
  101. AddQuestStepCompleteAction(Quest, 7, "step7_complete_putParchmentTogether")
  102. end
  103. function step7_complete_putParchmentTogether(Quest, QuestGiver, Player)
  104. UpdateQuestStepDescription(Quest, 7, "I've pieced the parchment together.")
  105. -- remove old parchment
  106. -- spawn direspike when player gets close to his loc
  107. SpawnMob(GetZone(Player), 2530106, false, 89.7797, 4.85852, 124.289, 300)
  108. 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)
  109. AddQuestStepCompleteAction(Quest, 8, "step8_complete_killedDireSpike")
  110. end
  111. function step8_complete_killedDireSpike(Quest, QuestGiver, Player)
  112. UpdateQuestStepDescription(Quest, 8, "I've slain Direspike and in the process destroyed the tainted totem.")
  113. 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)
  114. AddQuestStepCompleteAction(Quest, 9, "completed")
  115. end
  116. function completed(quest, questGiver, player)
  117. 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.")
  118. GiveQuestReward(quest, player)
  119. end
  120. function Reload(Quest, QuestGiver, Player, Step)
  121. if Step == 1 then
  122. step1_toxicCrawlers(Quest, QuestGiver, Player)
  123. elseif Step == 2 then
  124. step2_complete_examinedParchment(Quest, QuestGiver, Player)
  125. elseif Step == 3 then
  126. step3_complete_toxicCrawlers(Quest, QuestGiver, Player)
  127. elseif Step == 4 then
  128. step4_complete_putParchmentTogether(Quest, QuestGiver, Player)
  129. elseif Step == 5 then
  130. step5_complete_foundParchment(Quest, QuestGiver, Player)
  131. elseif Step == 6 then
  132. step6_complete_harvestedParchment(Quest, QuestGiver, Player)
  133. elseif Step == 7 then
  134. step7_complete_putParchmentTogether(Quest, QuestGiver, Player)
  135. elseif Step == 8 then
  136. step8_complete_killedDireSpike(Quest, QuestGiver, Player)
  137. end
  138. end