disruption_for_distraction.lua 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. --[[
  2. Script Name: Quests/OutpostOverlord/disruption_for_distraction.lua
  3. Script Purpose: Handles the quest, "Disruption for Distraction"
  4. Script Author: vo1d
  5. Script Date: 10/4/2019
  6. Zone: Outpost of the Overlord
  7. Quest Giver: Tayil N'Velex
  8. Preceded by: Preventative Maintenance (preventative_maintenance.lua)
  9. Followed by: The Final Assault (the_final_assault.lua)
  10. --]]
  11. local CoercerZlith = 2780072
  12. local TunarianHorseSentry = 2780070
  13. local TunarianMiner = 2780052
  14. local LapisLazuliShards = 8715
  15. function Init(Quest)
  16. AddQuestStepChat(Quest, 1, "Seek out Coercer Zlith at the camp in west Seaside Glade.", 1,
  17. "I need to speak with Coercer Zlith at the camp in west Seaside Glade. " ..
  18. "He will have details regarding the Tunarian mine.", 11, CoercerZlith)
  19. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  20. end
  21. function Accepted(Quest, QuestGiver, Player)
  22. if QuestGiver ~= nil then
  23. if GetDistance(Player, QuestGiver) < 30 then
  24. FaceTarget(QuestGiver, Player)
  25. conversation = CreateConversation()
  26. AddConversationOption(conversation, "I will return.")
  27. StartConversation(conversation, QuestGiver, Player,
  28. "Who better to teach you the fine arts of distraction than a coercer? " ..
  29. "Return to the camp in Seaside Glade where Coercer Zlith will fill you in on the details of our plan. " ..
  30. "Report back to me after you have succeeded against the Tunarians.")
  31. end
  32. end
  33. end
  34. function Declined(Quest, QuestGiver, Player)
  35. -- Add dialog here for when the quest is declined
  36. end
  37. function Deleted(Quest, QuestGiver, Player)
  38. -- Remove any quest specific items here when the quest is deleted
  39. end
  40. function Step1Complete(Quest, QuestGiver, Player)
  41. UpdateQuestStepDescription(Quest, 1, "I spoke with Coercer Zlith.")
  42. UpdateQuestTaskGroupDescription(Quest, 1, "I spoke with Coercer Zlith at the camp in west Seaside Glade.")
  43. AddQuestStepKill(Quest, 2, "Kill Tunarian miners at the mine in the eastern Wilderwood.", 3, 100,
  44. "I need to head to the Tunarian mine and cause the disruption. The mine is in the eastern Wilderwood.",
  45. 611, TunarianMiner)
  46. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  47. end
  48. function Step2Complete(Quest, QuestGiver, Player)
  49. UpdateQuestStepDescription(Quest, 2, "I killed enough Tunarian miners.")
  50. AddQuestStepHarvest(Quest, 3, "Retrieve glimmering ore samples near the mine.", 2, 100,
  51. "I need to head to the Tunarian mine and cause the disruption. The mine is in the eastern Wilderwood.",
  52. 1118, LapisLazuliShards)
  53. AddQuestStepCompleteAction(Quest, 3, "Step3Complete")
  54. end
  55. function Step3Complete(Quest, QuestGiver, Player)
  56. UpdateQuestStepDescription(Quest, 3, "I retrieved enough ore samples.")
  57. UpdateQuestTaskGroupDescription(Quest, 2,
  58. "I killed the miners and retrieved the ore samples that Coercer Zlith requested.")
  59. AddQuestStepChat(Quest, 4, "Return to Coercer Zlith.", 1,
  60. "I've caused some havoc at the mine and should return to Coercer Zlith now.", 11, CoercerZlith)
  61. AddQuestStepCompleteAction(Quest, 4, "Step4Complete")
  62. end
  63. function Step4Complete(Quest, QuestGiver, Player)
  64. UpdateQuestStepDescription(Quest, 4, "I returned to Coercer Zlith.")
  65. UpdateQuestTaskGroupDescription(Quest, 3, "I returned and spoke to Coercer Zlith.")
  66. AddQuestStepKill(Quest, 5,
  67. "Kill Tunarian horse sentries in the Wilderwood.", 2, 100,
  68. "To cause a bigger distraction and take my revenge for their meddling, " ..
  69. "I should head back into the Wilderwood and slay some of the Tunarian horse sentries.",
  70. 2595, TunarianHorseSentry)
  71. AddQuestStepCompleteAction(Quest, 5, "Step5Complete")
  72. end
  73. function Step5Complete(Quest, QuestGiver, Player)
  74. UpdateQuestStepDescription(Quest, 5, "I killed enough horse sentries.")
  75. UpdateQuestTaskGroupDescription(Quest, 4,
  76. "I took out the horse sentries in the Wilderwood. This should really stir up the hornet's nest.")
  77. AddQuestStepChat(Quest, 6, "Return to Coercer Zlith.", 1,
  78. "I've killed the horse sentries and should return to Coercer Zlith.", 11, CoercerZlith)
  79. AddQuestStepCompleteAction(Quest, 6, "QuestComplete")
  80. end
  81. function QuestComplete(Quest, QuestGiver, Player)
  82. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed,
  83. -- parser adds them for completion in case stuff needs to be moved around
  84. UpdateQuestStepDescription(Quest, 6, "I returned to Coercer Zlith.")
  85. UpdateQuestTaskGroupDescription(Quest, 5, "I returned to Coercer Zlith.")
  86. UpdateQuestDescription(Quest,
  87. "I talked with Coercer Zlith at the camp in Seaside Glade and was given details on how to cause the " ..
  88. "distraction at the Tunarian Mine. I attacked the mine and retrieved some ore samples for Tayil, " ..
  89. "and then took out some horse sentries for good measure. " ..
  90. "Zlith said that the distraction worked and forces were being sent to check on my havoc. " ..
  91. "We should now be ready for our final assault.")
  92. GiveQuestReward(Quest, Player)
  93. end
  94. function Reload(Quest, QuestGiver, Player, Step)
  95. if Step == 1 then
  96. Step1Complete(Quest, QuestGiver, Player)
  97. elseif Step == 2 then
  98. Step2Complete(Quest, QuestGiver, Player)
  99. elseif Step == 3 then
  100. Step3Complete(Quest, QuestGiver, Player)
  101. elseif Step == 4 then
  102. Step4Complete(Quest, QuestGiver, Player)
  103. elseif Step == 5 then
  104. Step5Complete(Quest, QuestGiver, Player)
  105. elseif Step == 6 then
  106. QuestComplete(Quest, QuestGiver, Player)
  107. end
  108. end