the_final_assault.lua 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. --[[
  2. Script Name : Quests/OutpostOverlord/the_final_assault.lua
  3. Script Purpose : Handles the quest, "The Final Assault"
  4. Script Author : Scatman (Updated by Cynnar 2018.09.24 12:09:08)
  5. Script Date : 2008.12.29
  6. Zone : Outpost of the Overlord
  7. Quest Giver : Tayil N'Velex
  8. Preceded by : Disruption for Distraction (disruption_for_distraction.lua)
  9. Followed by : None
  10. --]]
  11. local CaptainTyreth = 2780099
  12. local KeyOfTheElders = 8588
  13. local TayilNVelex = 3480005
  14. local OverseerAdrium = 2780101
  15. function Init(Quest)
  16. -- Freeportian Bard's Dagger
  17. -- Freeportian Brawler's Wraps
  18. -- Freeportian Cleric's Hammer
  19. -- Freeportian Crusader's Greatsword
  20. -- Freeportian Druid's Scimitar
  21. -- Freeportian Enchanter's Wand
  22. -- Freeportian Predator's Dagger
  23. -- Freeportian Rogue's Rapier
  24. -- Freeportian Shaman's Spear
  25. -- Freeportian Sorcerer's Staff
  26. -- Freeportian Summoner's Dagger
  27. -- Freeportian Warrior's Axe
  28. AddQuestStepChat(Quest, 1, "Find Captain Tyreth in the Valley of Discipline, north of Cliffdiver Canyon. The camp is setup in an alcove on the eastern side of the valley near an archway.", 1, "I need to speak with Captain Tyreth in the Valley of Discipline. The forward camp is north past Cliffdiver Canyon and then east through the valley.", 0, CaptainTyreth)
  29. AddQuestStepCompleteAction(Quest, 1, "step1_complete_talkedToCaptain")
  30. end
  31. function Accepted(Quest, QuestGiver, Player)
  32. if QuestGiver ~= nil then
  33. if GetDistance(Player, QuestGiver) < 30 then
  34. FaceTarget(QuestGiver, Player)
  35. conversation = CreateConversation()
  36. AddConversationOption(conversation, "He will not be disappointed.")
  37. StartConversation(conversation, QuestGiver, Player, "The Overlord is counting on you.")
  38. end
  39. end
  40. end
  41. function Declined(Quest, QuestGiver, Player)
  42. end
  43. function step1_complete_talkedToCaptain(Quest, QuestGiver, Player)
  44. UpdateQuestStepDescription(Quest, 1, "I found and spoke with Captain Tyreth.")
  45. UpdateQuestTaskGroupDescription(Quest, 1, "I found and spoke with Captain Tyreth.")
  46. AddQuestStepKill(Quest, 2, "Set fire to Tunarian tents with the torch Tyreth gave me. There are tents in the Valley of Discipline and farther northeast through the archway.", 2, 100, "The attack has begun. I am to use a torch Captain Tyreth gave me to burn down a couple of the Tunarian tents in the Valley of Discipline and also to the end near Fisher Falls. If I lose the torch, I should return to Tyreth for another.", 611, 2780220, 2780216)
  47. AddQuestStepCompleteAction(Quest, 2, "step2_complete_burntTents")
  48. end
  49. function step2_complete_burntTents(Quest, QuestGiver, Player)
  50. UpdateQuestStepDescription(Quest, 2, "I burned down the Tunarian tents and should return to Captain Tyreth.")
  51. UpdateQuestTaskGroupDescription(Quest, 2, "I burned down the Tunarian tents and should return to Captain Tyreth.")
  52. AddQuestStepChat(Quest, 3, "Return to Captain Tyreth and tell him you burned the tents.", 1, "The tents are burning. I should return to Captain Tyreth.", 0, CaptainTyreth)
  53. AddQuestStepCompleteAction(Quest, 3, "step3_complete_talkedToCaptain")
  54. end
  55. function step3_complete_talkedToCaptain(Quest, QuestGiver, Player)
  56. UpdateQuestStepDescription(Quest, 3, "I returned and spoke to Captain Tyreth.")
  57. UpdateQuestTaskGroupDescription(Quest, 3, "I returned and spoke to Captain Tyreth.")
  58. AddQuestStepKill(Quest, 4, "Kill Overseer Adrium in his tree house near Fisher Falls to the east of the Valley of Discipline.", 1, 100, "The leader of the Tunarians on the island resides in a tree house to the east of the Valley of Discipline. I am to find Overseer Adrium and kill the Qeynosian before he has a chance to escape.", 611, OverseerAdrium)
  59. AddQuestStepCompleteAction(Quest, 4, "step4_complete_killedOverseer")
  60. end
  61. function step4_complete_killedOverseer(Quest, QuestGiver, Player)
  62. UpdateQuestStepDescription(Quest, 4, "I found Overseer Adrium in the tree house and killed him.")
  63. UpdateQuestTaskGroupDescription(Quest, 4, "I found Overseer Adrium in the tree house and killed him.")
  64. --key of the elders
  65. SummonItem(Spawn, KeyOfTheElders)
  66. AddQuestStepChat(Quest, 5, "I should return to Captain Tyreth and tell him that I have slain the Tunarian leader.", 1, "I need to report back to Captain Tyreth and tell him that I have slain the Tunarian leader.", 0, CaptainTyreth)
  67. AddQuestStepCompleteAction(Quest, 5, "step5_complete_talkedToCaptain")
  68. end
  69. function step5_complete_talkedToCaptain(Quest, QuestGiver, Player)
  70. UpdateQuestStepDescription(Quest, 5, "I returned to Captain Tyreth.")
  71. UpdateQuestTaskGroupDescription(Quest, 5, "I returned to Captain Tyreth.")
  72. AddQuestStepChat(Quest, 6, "Head into the cave north of Adrium's tree house and take out the Tunarian Circle of Elders.", 1, "A larger plot has emerged. Adrium was not the leader of the Tunarians. I am to use the key I found to enter a cave to the north of Adrium's tree house and confront the true leaders, the Circle of Elders. The precious gems from the Tunarian mine have also been stockpiled there, which is of interest to Tayil.", 0, TayilNVelex)
  73. AddQuestStepCompleteAction(Quest, 6, "QuestComplete")
  74. end
  75. function QuestComplete(Quest, QuestGiver, Player)
  76. UpdateQuestDescription(Quest, "I burned down the Tunarian tents and killed what I thought to be the Tunarian leader, Overseer Adrium. It turned out that Tayil had known all along that there was a Circle of Elders and a horde of treasure. I was sent inside the Cave of Elders and destroyed them, with a little help from Tyil. I was given my choice from the treasure and have finished my duties helping Tayil N'Velex to take the island.")
  77. GiveQuestReward(Quest, Player)
  78. end
  79. function Reload(Quest, QuestGiver, Player, Step)
  80. if Step == 1 then
  81. step1_complete_talkedToCaptain(Quest, QuestGiver, Player)
  82. elseif Step == 2 then
  83. step2_complete_burntTents(Quest, QuestGiver, Player)
  84. elseif Step == 3 then
  85. step3_complete_talkedToCaptain(Quest, QuestGiver, Player)
  86. elseif Step == 4 then
  87. step4_complete_killedOverseer(Quest, QuestGiver, Player)
  88. elseif Step == 5 then
  89. step5_complete_talkedToCaptain(Quest, QuestGiver, Player)
  90. end
  91. end