9
3

the_final_assault.lua 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  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. function Init(Quest)
  15. -- Freeportian Bard's Dagger
  16. -- Freeportian Brawler's Wraps
  17. -- Freeportian Cleric's Hammer
  18. -- Freeportian Crusader's Greatsword
  19. -- Freeportian Druid's Scimitar
  20. -- Freeportian Enchanter's Wand
  21. -- Freeportian Predator's Dagger
  22. -- Freeportian Rogue's Rapier
  23. -- Freeportian Shaman's Spear
  24. -- Freeportian Sorcerer's Staff
  25. -- Freeportian Summoner's Dagger
  26. -- Freeportian Warrior's Axe
  27. 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)
  28. AddQuestStepCompleteAction(Quest, 1, "step1_complete_talkedToCaptain")
  29. end
  30. function Accepted(Quest, QuestGiver, Player)
  31. if QuestGiver ~= nil then
  32. if GetDistance(Player, QuestGiver) < 30 then
  33. FaceTarget(QuestGiver, Player)
  34. conversation = CreateConversation()
  35. AddConversationOption(conversation, "He will not be disappointed.")
  36. StartConversation(conversation, QuestGiver, Player, "The Overlord is counting on you.")
  37. end
  38. end
  39. end
  40. function Declined(Quest, QuestGiver, Player)
  41. end
  42. function step1_complete_talkedToCaptain(Quest, QuestGiver, Player)
  43. UpdateQuestStepDescription(Quest, 1, "I found and spoke with Captain Tyreth.")
  44. UpdateQuestTaskGroupDescription(Quest, 1, "I found and spoke with Captain Tyreth.")
  45. 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)
  46. AddQuestStepCompleteAction(Quest, 2, "step2_complete_burntTents")
  47. end
  48. function step2_complete_burntTents(Quest, QuestGiver, Player)
  49. UpdateQuestStepDescription(Quest, 2, "I burned down the Tunarian tents and should return to Captain Tyreth.")
  50. UpdateQuestTaskGroupDescription(Quest, 2, "I burned down the Tunarian tents and should return to Captain Tyreth.")
  51. 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)
  52. AddQuestStepCompleteAction(Quest, 3, "step3_complete_talkedToCaptain")
  53. end
  54. function step3_complete_talkedToCaptain(Quest, QuestGiver, Player)
  55. UpdateQuestStepDescription(Quest, 3, "I returned and spoke to Captain Tyreth.")
  56. UpdateQuestTaskGroupDescription(Quest, 3, "I returned and spoke to Captain Tyreth.")
  57. 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, 2780166)
  58. AddQuestStepCompleteAction(Quest, 4, "step4_complete_killedOverseer")
  59. end
  60. function step4_complete_killedOverseer(Quest, QuestGiver, Player)
  61. UpdateQuestStepDescription(Quest, 4, "I found Overseer Adrium in the tree house and killed him.")
  62. UpdateQuestTaskGroupDescription(Quest, 4, "I found Overseer Adrium in the tree house and killed him.")
  63. --key of the elders
  64. SummonItem(Spawn, KeyOfTheElders)
  65. 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)
  66. AddQuestStepCompleteAction(Quest, 5, "step5_complete_talkedToCaptain")
  67. end
  68. function step5_complete_talkedToCaptain(Quest, QuestGiver, Player)
  69. UpdateQuestStepDescription(Quest, 5, "I returned to Captain Tyreth.")
  70. UpdateQuestTaskGroupDescription(Quest, 5, "I returned to Captain Tyreth.")
  71. 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)
  72. AddQuestStepCompleteAction(Quest, 6, "QuestComplete")
  73. end
  74. function QuestComplete(Quest, QuestGiver, Player)
  75. 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.")
  76. GiveQuestReward(Quest, Player)
  77. end
  78. function Reload(Quest, QuestGiver, Player, Step)
  79. if Step == 1 then
  80. step1_complete_talkedToCaptain(Quest, QuestGiver, Player)
  81. elseif Step == 2 then
  82. step2_complete_burntTents(Quest, QuestGiver, Player)
  83. elseif Step == 3 then
  84. step3_complete_talkedToCaptain(Quest, QuestGiver, Player)
  85. elseif Step == 4 then
  86. step4_complete_killedOverseer(Quest, QuestGiver, Player)
  87. elseif Step == 5 then
  88. step5_complete_talkedToCaptain(Quest, QuestGiver, Player)
  89. end
  90. end