tainted.lua 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  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. UpdateQuestStepDescription(Quest, 1, "I've cleared out many spiders and as a result found an unusual item.")
  33. UpdateQuestTaskGroupDescription(Quest, 1, "I've cleared out many spiders and as a result found an unusual item.")
  34. if Player ~= nil and not HasItem(Player,10317) then
  35. GiveQuestItem(Quest, Player, "I've cleared out many spiders and as a result found an unusual item.", 10317)
  36. end
  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. UpdateQuestTaskGroupDescription(Quest, 2, "I've examined the scrap.")
  53. 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)
  54. AddQuestStepCompleteAction(Quest, 3, "step3_complete_toxicCrawlers")
  55. end
  56. function step3_complete_toxicCrawlers(Quest, QuestGiver, Player)
  57. UpdateQuestStepDescription(Quest, 3, "I've found another piece of parchment.")
  58. UpdateQuestTaskGroupDescription(Quest, 3, "I've found another piece of parchment.")
  59. -- The edges of the parchment are torn and jagged as though ripped from a much larger document.
  60. -- Put together the parchment pieces. ().
  61. -- Put the parchment away.
  62. -- You line up the parchment pieces. The newest piece adds enough new words that you can read: "The toxic crawlers
  63. -- will be useful to cover our tracks. Leave the totem in the eastern rocks..." Apparently Deianeira's concern
  64. -- about the spiders is well-placed, though not for the reasons she thinks. I must find more of this parchment
  65. -- to learn what this totem means.
  66. -- Roll the parchment up. ()
  67. -- update quest
  68. -- You carefully roll the parchment and stow it away.
  69. -- Put the parchment away.
  70. 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)
  71. AddQuestStepCompleteAction(Quest, 4, "step4_complete_putParchmentTogether")
  72. end
  73. function step4_complete_putParchmentTogether(Quest, QuestGiver, Player)
  74. UpdateQuestStepDescription(Quest, 4, "I've put the parchment together.")
  75. UpdateQuestTaskGroupDescription(Quest, 4, "I've put the parchment together.")
  76. 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)
  77. AddQuestStepCompleteAction(Quest, 5, "step5_complete_foundParchment")
  78. -- remove the old parchment
  79. -- summon Parchment Scrap
  80. end
  81. function step5_complete_foundParchment(Quest, QuestGiver, Player)
  82. UpdateQuestStepDescription(Quest, 5, "I've located the rest of the parchment.")
  83. UpdateQuestTaskGroupDescription(Quest, 5, "I've located the rest of the parchment.")
  84. --spawn "a piece of parchment harvestable"
  85. --only let Player see it
  86. --set harvestable to "Parchment Scrap" the one that looks like it was unrolled.
  87. SpawnMob(GetZone(Player), 2530194, true, 92.6042, 1.6355, 123.73, 290)
  88. 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)
  89. AddQuestStepCompleteAction(Quest, 6, "step6_complete_harvestedParchment")
  90. end
  91. function step6_complete_harvestedParchment(Quest, QuestGiver, Player)
  92. UpdateQuestStepDescription(Quest, 6, "I've gathered the pieces of parchment from the spider's nest.")
  93. UpdateQuestTaskGroupDescription(Quest, 6, "I've gathered the pieces of parchment from the spider's nest.")
  94. -- The edges of the parchment are torn and jagged as though ripped from a much larger document.
  95. -- Piece together the parchment ().
  96. -- Put the parchment away.
  97. -- The last bit of parchment was caught on the web near the large pile of rocks. You piece it together and read:
  98. -- "The toxic crawlers will be useful to cover our tracks. Leave the totem in the eastern rocks beneath Direspike."
  99. -- Direspike must be a tainted spider with greater power. You realize you may have to flush him from his lair
  100. -- by picking off the nearby spiders until he appears to meet your challenge.
  101. -- Roll the parchment up. ()
  102. -- update quest
  103. -- You carefully roll the parchment and stow it away.
  104. -- Put the parchment away.
  105. 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)
  106. AddQuestStepCompleteAction(Quest, 7, "step7_complete_putParchmentTogether")
  107. end
  108. function step7_complete_putParchmentTogether(Quest, QuestGiver, Player)
  109. UpdateQuestStepDescription(Quest, 7, "I've pieced the parchment together.")
  110. UpdateQuestTaskGroupDescription(Quest, 7, "I've pieced the parchment together.")
  111. -- remove old parchment
  112. -- spawn direspike when player gets close to his loc
  113. local zone = GetZone(Player)
  114. local Direspike = GetSpawnByLocationID(zone, 133770663, false)
  115. if Direspike == nil then
  116. SpawnByLocationID(zone, 133770663,false)
  117. end
  118. --SpawnByLocationID(zone, 133770663,false)SpawnMob(GetZone(Player), 2530106, false, 89.7797, 4.85852, 124.289, 300)
  119. 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)
  120. AddQuestStepCompleteAction(Quest, 8, "step8_complete_killedDireSpike")
  121. end
  122. function step8_complete_killedDireSpike(Quest, QuestGiver, Player)
  123. UpdateQuestStepDescription(Quest, 8, "I've slain Direspike and in the process destroyed the tainted totem.")
  124. UpdateQuestTaskGroupDescription(Quest, 8, "I've slain Direspike and in the process destroyed the tainted totem.")
  125. 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)
  126. AddQuestStepCompleteAction(Quest, 9, "completed")
  127. end
  128. function completed(Quest, QuestGiver, Player)
  129. UpdateQuestStepDescription(Quest, 9, "I've spoken with Deianeira.")
  130. UpdateQuestTaskGroupDescription(Quest, 9, "I've spoken with Deianeira.")
  131. 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.")
  132. GiveQuestReward(Quest, Player)
  133. end
  134. function Reload(Quest, QuestGiver, Player, Step)
  135. if Step == 1 then
  136. step1_toxicCrawlers(Quest, QuestGiver, Player)
  137. elseif Step == 2 then
  138. step2_complete_examinedParchment(Quest, QuestGiver, Player)
  139. elseif Step == 3 then
  140. step3_complete_toxicCrawlers(Quest, QuestGiver, Player)
  141. elseif Step == 4 then
  142. step4_complete_putParchmentTogether(Quest, QuestGiver, Player)
  143. elseif Step == 5 then
  144. step5_complete_foundParchment(Quest, QuestGiver, Player)
  145. elseif Step == 6 then
  146. step6_complete_harvestedParchment(Quest, QuestGiver, Player)
  147. elseif Step == 7 then
  148. step7_complete_putParchmentTogether(Quest, QuestGiver, Player)
  149. elseif Step == 8 then
  150. step8_complete_killedDireSpike(Quest, QuestGiver, Player)
  151. elseif Step == 9 then
  152. completed(Quest, QuestGiver, Player)
  153. end
  154. end