9
3

disruption_for_distraction.lua 5.9 KB

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