From 2d9b84577457add4b74ce4fa02918e7744879e3d Mon Sep 17 00:00:00 2001 From: Aeshur Date: Fri, 13 Feb 2026 20:10:16 -0500 Subject: [PATCH] [lua] Abyssea - Main story quests Part 2 --- scripts/globals/quests.lua | 10 +-- .../abyssea/An_Officer_and_a_Pirate.lua | 45 +++++++++++++ .../quests/abyssea/Champions_of_Abyssea.lua | 66 +++++++++++++++++++ scripts/quests/abyssea/Dawn_of_Death.lua | 12 ++-- scripts/quests/abyssea/First_Contact.lua | 42 ++++++++++++ scripts/quests/abyssea/Heart_of_Madness.lua | 66 +++++++++++++++++++ scripts/quests/abyssea/Tenuous_Existence.lua | 66 +++++++++++++++++++ scripts/quests/abyssea/The_Truth_Beckons.lua | 2 +- .../La_Theine_Plateau/DefaultActions.lua | 1 + scripts/zones/La_Theine_Plateau/IDs.lua | 1 + 10 files changed, 299 insertions(+), 12 deletions(-) create mode 100644 scripts/quests/abyssea/An_Officer_and_a_Pirate.lua create mode 100644 scripts/quests/abyssea/Champions_of_Abyssea.lua create mode 100644 scripts/quests/abyssea/First_Contact.lua create mode 100644 scripts/quests/abyssea/Heart_of_Madness.lua create mode 100644 scripts/quests/abyssea/Tenuous_Existence.lua diff --git a/scripts/globals/quests.lua b/scripts/globals/quests.lua index 9d91148793f..28325e253ed 100644 --- a/scripts/globals/quests.lua +++ b/scripts/globals/quests.lua @@ -977,11 +977,11 @@ xi.quest.id = TO_PASTE_A_PEISTE = 164, -- + Converted MEGADRILE_MENACE = 165, -- + Converted THE_FORBIDDEN_FRONTIER = 166, -- + Converted - FIRST_CONTACT = 167, - AN_OFFICER_AND_A_PIRATE = 168, - HEART_OF_MADNESS = 169, - TENUOUS_EXISTENCE = 170, - CHAMPIONS_OF_ABYSSEA = 171, + FIRST_CONTACT = 167, -- + Converted + AN_OFFICER_AND_A_PIRATE = 168, -- + Converted + HEART_OF_MADNESS = 169, -- + Converted + TENUOUS_EXISTENCE = 170, -- + Converted + CHAMPIONS_OF_ABYSSEA = 171, -- + Converted THE_BEAST_OF_BASTORE = 172, -- + Converted A_DELECTABLE_DEMON = 173, -- + Converted A_FLUTTERY_FIEND = 174, -- + Converted diff --git a/scripts/quests/abyssea/An_Officer_and_a_Pirate.lua b/scripts/quests/abyssea/An_Officer_and_a_Pirate.lua new file mode 100644 index 00000000000..ab3d35e6b3e --- /dev/null +++ b/scripts/quests/abyssea/An_Officer_and_a_Pirate.lua @@ -0,0 +1,45 @@ +----------------------------------- +-- An Officer and a Pirate +----------------------------------- +-- !addquest 8 168 +-- Joachim : !pos -52.844 0 -9.978 246 +-- Flagged on completion of First Contact. +-- Flags Heart of Madness upon completion. +----------------------------------- + +require('scripts/globals/quests') +require('scripts/globals/interaction/quest') + +local quest = Quest:new(xi.questLog.ABYSSEA, xi.quest.id.abyssea.AN_OFFICER_AND_A_PIRATE) + +quest.reward = {} + +quest.sections = +{ + { + check = function(player, status, vars) + return status == xi.questStatus.QUEST_ACCEPTED + end, + + [xi.zone.PORT_JEUNO] = + { + ['Joachim'] = + { + onTrigger = function(player, npc) + return quest:progressEvent(334) + end, + }, + + onEventFinish = + { + [334] = function(player, csid, option, npc) + if quest:complete(player) then + player:addQuest(xi.questLog.ABYSSEA, xi.quest.id.abyssea.HEART_OF_MADNESS) + end + end, + }, + }, + }, +} + +return quest diff --git a/scripts/quests/abyssea/Champions_of_Abyssea.lua b/scripts/quests/abyssea/Champions_of_Abyssea.lua new file mode 100644 index 00000000000..3a7e3c6a09b --- /dev/null +++ b/scripts/quests/abyssea/Champions_of_Abyssea.lua @@ -0,0 +1,66 @@ +----------------------------------- +-- Champions of Abyssea +----------------------------------- +-- !addquest 8 171 +-- Joachim : !pos -52.844 0 -9.978 246 +-- Flagged on completion of Tenuous Existence. +-- Complete when any 7 of the 9 zone quests are completed and player talks to Joachim. Flags A Sea Dog's Summons upon completion. +----------------------------------- + +local quest = Quest:new(xi.questLog.ABYSSEA, xi.quest.id.abyssea.CHAMPIONS_OF_ABYSSEA) + +quest.reward = {} + +local zoneQuests = +{ + xi.quest.id.abyssea.A_GOLDSTRUCK_GIGAS, + xi.quest.id.abyssea.TO_PASTE_A_PEISTE, + xi.quest.id.abyssea.MEGADRILE_MENACE, + xi.quest.id.abyssea.THE_BEAST_OF_BASTORE, + xi.quest.id.abyssea.A_DELECTABLE_DEMON, + xi.quest.id.abyssea.A_FLUTTERY_FIEND, + xi.quest.id.abyssea.A_BEAKED_BLUSTERER, + xi.quest.id.abyssea.A_MAN_EATING_MITE, + xi.quest.id.abyssea.AN_ULCEROUS_URAGNITE, +} + +local function countCompletedZoneQuests(player) + local count = 0 + for _, questId in ipairs(zoneQuests) do + if player:hasCompletedQuest(xi.questLog.ABYSSEA, questId) then + count = count + 1 + end + end + + return count +end + +quest.sections = +{ + { + check = function(player, status, vars) + return status == xi.questStatus.QUEST_ACCEPTED and countCompletedZoneQuests(player) >= 7 + end, + + [xi.zone.PORT_JEUNO] = + { + ['Joachim'] = + { + onTrigger = function(player, npc) + return quest:progressEvent(342) + end, + }, + + onEventFinish = + { + [342] = function(player, csid, option, npc) + if quest:complete(player) then + player:addQuest(xi.questLog.ABYSSEA, xi.quest.id.abyssea.A_SEA_DOGS_SUMMONS) + end + end, + }, + }, + }, +} + +return quest diff --git a/scripts/quests/abyssea/Dawn_of_Death.lua b/scripts/quests/abyssea/Dawn_of_Death.lua index 2a72b050c0d..f20f317dcf5 100644 --- a/scripts/quests/abyssea/Dawn_of_Death.lua +++ b/scripts/quests/abyssea/Dawn_of_Death.lua @@ -3,15 +3,15 @@ ----------------------------------- -- !addquest 8 162 -- Joachim : !pos -52.844 0 -9.978 246 --- This quest is flagged on completion of The Truth Beckons. --- Complete when any 3 of the 9 zone sub-quests are completed and player talks to Joachim. Flags First Contact upon completion. +-- Flagged on completion of The Truth Beckons. +-- Complete when any 3 of the 9 zone quests are completed and player talks to Joachim. Flags First Contact upon completion. ----------------------------------- local quest = Quest:new(xi.questLog.ABYSSEA, xi.quest.id.abyssea.DAWN_OF_DEATH) quest.reward = {} -local subQuests = +local zoneQuests = { xi.quest.id.abyssea.A_GOLDSTRUCK_GIGAS, xi.quest.id.abyssea.TO_PASTE_A_PEISTE, @@ -24,9 +24,9 @@ local subQuests = xi.quest.id.abyssea.AN_ULCEROUS_URAGNITE, } -local function countCompletedSubQuests(player) +local function countCompletedZoneQuests(player) local count = 0 - for _, questId in ipairs(subQuests) do + for _, questId in ipairs(zoneQuests) do if player:hasCompletedQuest(xi.questLog.ABYSSEA, questId) then count = count + 1 end @@ -39,7 +39,7 @@ quest.sections = { { check = function(player, status, vars) - return status == xi.questStatus.QUEST_ACCEPTED and countCompletedSubQuests(player) >= 3 + return status == xi.questStatus.QUEST_ACCEPTED and countCompletedZoneQuests(player) >= 3 end, [xi.zone.PORT_JEUNO] = diff --git a/scripts/quests/abyssea/First_Contact.lua b/scripts/quests/abyssea/First_Contact.lua new file mode 100644 index 00000000000..4d522ba2a68 --- /dev/null +++ b/scripts/quests/abyssea/First_Contact.lua @@ -0,0 +1,42 @@ +----------------------------------- +-- First Contact +----------------------------------- +-- !addquest 8 167 +-- qm3 : !pos -179 8 254 102 +-- Flagged on completion of Dawn of Death. +-- Click ??? in La Theine Plateau between 18:00 and 5:00. Flags An Officer and a Pirate upon completion. +----------------------------------- + +require('scripts/globals/quests') +require('scripts/globals/interaction/quest') + +local quest = Quest:new(xi.questLog.ABYSSEA, xi.quest.id.abyssea.FIRST_CONTACT) + +quest.reward = {} + +quest.sections = +{ + { + check = function(player, status, vars) + return status == xi.questStatus.QUEST_ACCEPTED and + VanadielHour() >= 18 and + VanadielHour() < 5 + end, + + [xi.zone.LA_THEINE_PLATEAU] = + { + ['qm3'] = quest:progressEvent(11), + + onEventFinish = + { + [11] = function(player, csid, option, npc) + if quest:complete(player) then + player:addQuest(xi.questLog.ABYSSEA, xi.quest.id.abyssea.AN_OFFICER_AND_A_PIRATE) + end + end, + }, + }, + }, +} + +return quest diff --git a/scripts/quests/abyssea/Heart_of_Madness.lua b/scripts/quests/abyssea/Heart_of_Madness.lua new file mode 100644 index 00000000000..2ca39fb0d40 --- /dev/null +++ b/scripts/quests/abyssea/Heart_of_Madness.lua @@ -0,0 +1,66 @@ +----------------------------------- +-- Heart of Madness +----------------------------------- +-- !addquest 8 169 +-- Joachim : !pos -52.844 0 -9.978 246 +-- Flagged on completion of An Officer and a Pirate. +-- Complete when any 5 of the 9 zone quests are completed and player talks to Joachim. Flags Tenuous Existence upon completion. +----------------------------------- + +local quest = Quest:new(xi.questLog.ABYSSEA, xi.quest.id.abyssea.HEART_OF_MADNESS) + +quest.reward = {} + +local zoneQuests = +{ + xi.quest.id.abyssea.A_GOLDSTRUCK_GIGAS, + xi.quest.id.abyssea.TO_PASTE_A_PEISTE, + xi.quest.id.abyssea.MEGADRILE_MENACE, + xi.quest.id.abyssea.THE_BEAST_OF_BASTORE, + xi.quest.id.abyssea.A_DELECTABLE_DEMON, + xi.quest.id.abyssea.A_FLUTTERY_FIEND, + xi.quest.id.abyssea.A_BEAKED_BLUSTERER, + xi.quest.id.abyssea.A_MAN_EATING_MITE, + xi.quest.id.abyssea.AN_ULCEROUS_URAGNITE, +} + +local function countCompletedZoneQuests(player) + local count = 0 + for _, questId in ipairs(zoneQuests) do + if player:hasCompletedQuest(xi.questLog.ABYSSEA, questId) then + count = count + 1 + end + end + + return count +end + +quest.sections = +{ + { + check = function(player, status, vars) + return status == xi.questStatus.QUEST_ACCEPTED and countCompletedZoneQuests(player) >= 5 + end, + + [xi.zone.PORT_JEUNO] = + { + ['Joachim'] = + { + onTrigger = function(player, npc) + return quest:progressEvent(335) + end, + }, + + onEventFinish = + { + [335] = function(player, csid, option, npc) + if quest:complete(player) then + player:addQuest(xi.questLog.ABYSSEA, xi.quest.id.abyssea.TENUOUS_EXISTENCE) + end + end, + }, + }, + }, +} + +return quest diff --git a/scripts/quests/abyssea/Tenuous_Existence.lua b/scripts/quests/abyssea/Tenuous_Existence.lua new file mode 100644 index 00000000000..94c3b359e32 --- /dev/null +++ b/scripts/quests/abyssea/Tenuous_Existence.lua @@ -0,0 +1,66 @@ +----------------------------------- +-- Tenuous Existence +----------------------------------- +-- !addquest 8 170 +-- qm3 : !pos -179 8 254 102 +-- Joachim : !pos -52.844 0 -9.978 246 +-- Flagged on completion of Heart of Madness. +-- Click ??? in La Theine Plateau between 18:00 and 5:00, then return to Joachim. Flags Champions of Abyssea upon completion. +----------------------------------- + +require('scripts/globals/quests') +require('scripts/globals/interaction/quest') + +local quest = Quest:new(xi.questLog.ABYSSEA, xi.quest.id.abyssea.TENUOUS_EXISTENCE) + +quest.reward = {} + +quest.sections = +{ + { + check = function(player, status, vars) + return status == xi.questStatus.QUEST_ACCEPTED and + VanadielHour() >= 18 and + VanadielHour() < 5 + end, + + [xi.zone.LA_THEINE_PLATEAU] = + { + ['qm3'] = quest:progressEvent(12), + + onEventFinish = + { + [12] = function(player, csid, option, npc) + quest:setVar(player, 'Prog', 1) + end, + }, + }, + }, + + { + check = function(player, status, vars) + return status == xi.questStatus.QUEST_ACCEPTED and quest:getVar(player, 'Prog') == 1 + end, + + [xi.zone.PORT_JEUNO] = + { + ['Joachim'] = + { + onTrigger = function(player, npc) + return quest:progressEvent(336) + end, + }, + + onEventFinish = + { + [336] = function(player, csid, option, npc) + if quest:complete(player) then + player:addQuest(xi.questLog.ABYSSEA, xi.quest.id.abyssea.CHAMPIONS_OF_ABYSSEA) + end + end, + }, + }, + }, +} + +return quest diff --git a/scripts/quests/abyssea/The_Truth_Beckons.lua b/scripts/quests/abyssea/The_Truth_Beckons.lua index eee19ae867a..f6b197858a0 100644 --- a/scripts/quests/abyssea/The_Truth_Beckons.lua +++ b/scripts/quests/abyssea/The_Truth_Beckons.lua @@ -3,7 +3,7 @@ ----------------------------------- -- !addquest 8 161 -- Joachim : !pos -52.844 0 -9.978 246 --- This quest is flagged on completion of A Journey Begins. Flags Dawn of Death upon completion. +-- Flagged on completion of A Journey Begins. Flags Dawn of Death upon completion. ----------------------------------- local quest = Quest:new(xi.questLog.ABYSSEA, xi.quest.id.abyssea.THE_TRUTH_BECKONS) diff --git a/scripts/zones/La_Theine_Plateau/DefaultActions.lua b/scripts/zones/La_Theine_Plateau/DefaultActions.lua index af9435f287f..8e0beb02680 100644 --- a/scripts/zones/La_Theine_Plateau/DefaultActions.lua +++ b/scripts/zones/La_Theine_Plateau/DefaultActions.lua @@ -1,6 +1,7 @@ local ID = zones[xi.zone.LA_THEINE_PLATEAU] return { + ['qm3'] = { messageSpecial = ID.text.STRANGE_ENERGY }, ['Augevinne'] = { text = ID.text.RESCUE_DRILL + 33 }, ['Cermet_Headstone'] = { messageSpecial = ID.text.CANNOT_REMOVE_FRAG }, ['Chocobo_Tracks'] = { messageSpecial = ID.text.CHOCOBO_TRACKS }, diff --git a/scripts/zones/La_Theine_Plateau/IDs.lua b/scripts/zones/La_Theine_Plateau/IDs.lua index 3fe1c251d0a..a541788f95a 100644 --- a/scripts/zones/La_Theine_Plateau/IDs.lua +++ b/scripts/zones/La_Theine_Plateau/IDs.lua @@ -29,6 +29,7 @@ zones[xi.zone.LA_THEINE_PLATEAU] = FAURBELLANT_2 = 7445, -- Ah, the ! Thank you for making such a long journey to bring this! May the Gates of Paradise open to all. FAURBELLANT_3 = 7446, -- Please deliver that to the high priest in the San d'Oria Cathedral. FAURBELLANT_4 = 7447, -- My thanks again for your services. May the Gates of Paradise open to all. + STRANGE_ENERGY = 7585, -- Surrounded by these pillars, you feel a strange energy. UNLOCK_SUMMONER = 7588, -- You can now become a summoner. UNLOCK_CARBUNCLE = 7589, -- You can now summon Carbuncle. CANNOT_REMOVE_FRAG = 7603, -- It is an oddly shaped stone monument. A shining stone is embedded in it, but cannot be removed...