into_the_tainted_forest.lua 5.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. --[[
  2. Script Name : Quests/QueensColony/into_the_tainted_forest.lua
  3. Script Author : Zcoretri
  4. Script Date : 2015.09.04
  5. Script Purpose : Handles the quest "Into the Tainted Forest"
  6. Zone : Queen's Colony
  7. Quest Giver:
  8. Preceded by: A Presence of Evil (a_presence_of_evil.lua)
  9. Followed by: Joining the Forward Ranks (joining_the_forward_ranks.lua)
  10. --]]
  11. function Init(Quest)
  12. AddQuestStepChat(Quest, 1, "Seek out Predator Sha'dur in the Tainted Forest. Head west into the Sunset Meadow and then north up the hill.", 1, "I need to seek out Predator Sha'dur in the Tainted Forest. He is collecting tainted wildlife samples and may need my help. The Tainted Forest can be found north up the hill from the Sunset Meadow.", 0, 2530108)
  13. AddQuestStepCompleteAction(Quest, 1, "step1_completed_talkedToPredator")
  14. end
  15. function Accepted(Quest, QuestGiver, Player)
  16. if QuestGiver ~= nil then
  17. if GetDistance(Player, QuestGiver) < 30 then
  18. FaceTarget(QuestGiver, Player)
  19. conversation = CreateConversation()
  20. AddConversationOption(conversation, "Of course.")
  21. StartConversation(conversation, QuestGiver, Player, "Thank you for the help.")
  22. end
  23. end
  24. end
  25. function Declined(Quest, QuestGiver, Player)
  26. end
  27. function step1_completed_talkedToPredator(Quest, QuestGiver, Player)
  28. UpdateQuestStepDescription(Quest, 1, "I found Predator Sha'dur. He was distraught about losing his bow and arrows.")
  29. UpdateQuestTaskGroupDescription(Quest, 1, "I found Predator Sha'dur. He was distraught about losing his bow and arrows.")
  30. AddQuestStepKill(Quest, 2, "One of the nearby Sapswill tappers should have Sha'dur's bow.", 1, 25, "Predator Sha'dur is down on his luck and has lost his bow and arrows. I am to find the goblins that took his bow and get it back through any means necessary.", 629, 2530021)
  31. AddQuestStepCompleteAction(Quest, 2, "step2_complete_killedTapper")
  32. end
  33. function step2_complete_killedTapper(Quest, QuestGiver, Player)
  34. UpdateQuestStepDescription(Quest, 2, "I was able to reclaim Sha'dur's Bow from a group of goblins in the Tainted Forest.")
  35. UpdateQuestTaskGroupDescription(Quest, 2, "I was able to reclaim Sha'dur's Bow from a group of goblins in the Tainted Forest.")
  36. AddQuestStepChat(Quest, 3, "Return the bow to Predator Sha'dur.", 1, "I found Sha'dur's bow off a nearby Sapswill tapper. I should return the bow to him.", 0, 2530108)
  37. AddQuestStepCompleteAction(Quest, 3, "step3_completed_talkedToPredator")
  38. end
  39. function step3_completed_talkedToPredator(Quest, QuestGiver, Player)
  40. UpdateQuestStepDescription(Quest, 3, "I returned Sha'dur his lost bow.")
  41. UpdateQuestTaskGroupDescription(Quest, 3, "I returned Sha'dur his lost bow.")
  42. AddQuestStepObtainItem(Quest, 4, "Search the wood near the spider den in the Tainted Forest. The den is to the southeast within the forest.", 3, 100, "I should find some wood suitable for arrows to replace the ones Sha'dur lost. Sha'dur says he saw some piles of sticks to the east in the Tainted Forest near a large spider den.", 2359, 2394)
  43. AddQuestStepCompleteAction(Quest, 4, "step4_complete_gotSticks")
  44. end
  45. function step4_complete_gotSticks(Quest, QuestGiver, Player)
  46. UpdateQuestStepDescription(Quest, 4, "I gathered enough piles of sticks to provide enough wood for Sha'dur to make new arrows.")
  47. UpdateQuestTaskGroupDescription(Quest, 4, "I gathered enough piles of sticks to provide enough wood for Sha'dur to make new arrows.")
  48. AddQuestStepChat(Quest, 5, "Take the wood back to Predator Sha'dur.", 1, "I need to take the wood back to Predator Sha'dur.", 0, 2530108)
  49. AddQuestStepCompleteAction(Quest, 5, "step5_complete_talkedToPredator")
  50. end
  51. function step5_complete_talkedToPredator(Quest, QuestGiver, Player)
  52. UpdateQuestStepDescription(Quest, 5, "I gathered enough piles of sticks to provide enough wood for Sha'dur to make new arrows.")
  53. UpdateQuestTaskGroupDescription(Quest, 5, "I gathered enough piles of sticks to provide enough wood for Sha'dur to make new arrows.")
  54. AddQuestStepChat(Quest, 6, "Take the samples back to Murrar Shar.", 1, "Predator Sha'dur was able to collect a few samples before he lost his gear. I need to take these samples back to Murrar Shar.", 0, 2530076)
  55. AddQuestStepCompleteAction(Quest, 6, "step6_complete_talkedToMurrar")
  56. end
  57. function step6_complete_talkedToMurrar(Quest, QuestGiver, Player)
  58. UpdateQuestTaskGroupDescription(Quest, 2, "I gave Murrar Shar the samples.")
  59. UpdateQuestDescription(Quest, "I found Predator Sha'dur in the Tainted Forest. He was distraught about being attacked and losing his bow and arrows. I helped him to reclaim his bow and then gathered some sticks for use in making some new arrows. I then returned to Murrar Shar with some samples from the tainted wildlife.")
  60. GiveQuestReward(Quest, Player)
  61. end
  62. function Reload(Quest, QuestGiver, Player, Step)
  63. if Step == 1 then
  64. step1_completed_talkedToPredator(Quest, QuestGiver, Player)
  65. elseif Step == 2 then
  66. step2_complete_killedTapper(Quest, QuestGiver, Player)
  67. elseif Step == 3 then
  68. step3_completed_talkedToPredator(Quest, QuestGiver, Player)
  69. elseif Step == 4 then
  70. step4_complete_gotSticks(Quest, QuestGiver, Player)
  71. elseif Step == 5 then
  72. step5_complete_talkedToPredator(Quest, QuestGiver, Player)
  73. end
  74. end