From 6ff9e191c91afaf24aa50e6c156540e8a2f2693f Mon Sep 17 00:00:00 2001 From: Aeshur Date: Sat, 14 Feb 2026 22:29:10 -0500 Subject: [PATCH] [lua] Abyssea - Main story quests Part 3 --- scripts/globals/quests.lua | 8 +- scripts/quests/abyssea/A_Sea_Dogs_Summons.lua | 43 ++++++++ .../abyssea/Beneath_a_Blood_Red_Sky.lua | 42 ++++++++ scripts/quests/abyssea/Death_and_Rebirth.lua | 91 +++++++++++++++++ scripts/quests/abyssea/Emissaries_of_God.lua | 97 +++++++++++++++++++ scripts/zones/Abyssea-Attohwa/mobs/Yaanei.lua | 14 +++ .../zones/Abyssea-Empyreal_Paradox/Zone.lua | 2 +- scripts/zones/Abyssea-Grauberg/mobs/Raja.lua | 14 +++ .../zones/Abyssea-Misareaux/mobs/Kutharei.lua | 14 +++ .../npcs/Transcendental_Radiance.lua | 60 ++++++++++++ sql/npc_list.sql | 4 +- 11 files changed, 382 insertions(+), 7 deletions(-) create mode 100644 scripts/quests/abyssea/A_Sea_Dogs_Summons.lua create mode 100644 scripts/quests/abyssea/Beneath_a_Blood_Red_Sky.lua create mode 100644 scripts/quests/abyssea/Death_and_Rebirth.lua create mode 100644 scripts/quests/abyssea/Emissaries_of_God.lua create mode 100644 scripts/zones/Abyssea-Attohwa/mobs/Yaanei.lua create mode 100644 scripts/zones/Abyssea-Grauberg/mobs/Raja.lua create mode 100644 scripts/zones/Abyssea-Misareaux/mobs/Kutharei.lua create mode 100644 scripts/zones/Qufim_Island/npcs/Transcendental_Radiance.lua diff --git a/scripts/globals/quests.lua b/scripts/globals/quests.lua index 5d27e9cf81f..9da42b5c55e 100644 --- a/scripts/globals/quests.lua +++ b/scripts/globals/quests.lua @@ -990,10 +990,10 @@ xi.quest.id = A_MAN_EATING_MITE = 177, -- + Converted AN_ULCEROUS_URAGNITE = 178, -- + Converted HEROES_OF_ABYSSEA = 179, -- + Converted - A_SEA_DOGS_SUMMONS = 180, - DEATH_AND_REBIRTH = 181, - EMISSARIES_OF_GOD = 182, - BENEATH_A_BLOOD_RED_SKY = 183, + A_SEA_DOGS_SUMMONS = 180, -- + Converted + DEATH_AND_REBIRTH = 181, -- + Converted + EMISSARIES_OF_GOD = 182, -- + Converted + BENEATH_A_BLOOD_RED_SKY = 183, -- + Converted THE_WYRM_GOD = 184, MEANWHILE_BACK_ON_ABYSSEA = 185, A_MOONLIGHT_REQUITE = 186, diff --git a/scripts/quests/abyssea/A_Sea_Dogs_Summons.lua b/scripts/quests/abyssea/A_Sea_Dogs_Summons.lua new file mode 100644 index 00000000000..d087f6e9dfb --- /dev/null +++ b/scripts/quests/abyssea/A_Sea_Dogs_Summons.lua @@ -0,0 +1,43 @@ +----------------------------------- +-- A Sea Dog's Summons +----------------------------------- +-- !addquest 8 180 +-- Flagged on completion of Champions of Abyssea. +-- Zone into the Hall of the Gods between 18:00 and 5:00. Flags Death and Rebirth upon completion. +----------------------------------- + +require('scripts/globals/quests') +require('scripts/globals/interaction/quest') + +local quest = Quest:new(xi.questLog.ABYSSEA, xi.quest.id.abyssea.A_SEA_DOGS_SUMMONS) + +quest.reward = {} + +quest.sections = +{ + { + check = function(player, status, vars) + return status == xi.questStatus.QUEST_ACCEPTED and + VanadielHour() >= 18 and + VanadielHour() < 5 + end, + + [xi.zone.HALL_OF_THE_GODS] = + { + onZoneIn = function(player, prevZone) + return 6 + end, + + onEventFinish = + { + [6] = function(player, csid, option, npc) + if quest:complete(player) then + player:addQuest(xi.questLog.ABYSSEA, xi.quest.id.abyssea.DEATH_AND_REBIRTH) + end + end, + }, + }, + }, +} + +return quest diff --git a/scripts/quests/abyssea/Beneath_a_Blood_Red_Sky.lua b/scripts/quests/abyssea/Beneath_a_Blood_Red_Sky.lua new file mode 100644 index 00000000000..03c646724d8 --- /dev/null +++ b/scripts/quests/abyssea/Beneath_a_Blood_Red_Sky.lua @@ -0,0 +1,42 @@ +----------------------------------- +-- Beneath a Blood Red Sky +----------------------------------- +-- !addquest 8 183 +-- Transcendental Radiance : !pos -259.433 -21.581 220.498 126 +-- Flagged on completion of Emissaries of God. +-- Zone into Abyssea - Empyreal Paradox. Flag The Wyrm God upon completion. +----------------------------------- + +require('scripts/globals/quests') +require('scripts/globals/interaction/quest') + +local quest = Quest:new(xi.questLog.ABYSSEA, xi.quest.id.abyssea.BENEATH_A_BLOOD_RED_SKY) + +quest.reward = {} + +quest.sections = +{ + { + check = function(player, status, vars) + return status == xi.questStatus.QUEST_ACCEPTED + end, + + [xi.zone.ABYSSEA_EMPYREAL_PARADOX] = + { + onZoneIn = function(player, prevZone) + return 202 + end, + + onEventFinish = + { + [202] = function(player, csid, option, npc) + if quest:complete(player) then + player:addQuest(xi.questLog.ABYSSEA, xi.quest.id.abyssea.THE_WYRM_GOD) + end + end, + }, + }, + }, +} + +return quest diff --git a/scripts/quests/abyssea/Death_and_Rebirth.lua b/scripts/quests/abyssea/Death_and_Rebirth.lua new file mode 100644 index 00000000000..ba589078f34 --- /dev/null +++ b/scripts/quests/abyssea/Death_and_Rebirth.lua @@ -0,0 +1,91 @@ +----------------------------------- +-- Death and Rebirth +----------------------------------- +-- !addquest 8 181 +-- Joachim : !pos -52.844 0 -9.978 246 +-- Flagged on completion of A Sea Dog's Summons. +-- Complete all 9 zone quests, then talk to Joachim. Zone into the Hall of the Gods between 18:00 and 5:00. Flags Emissaries of God upon completion. +----------------------------------- + +require('scripts/globals/quests') +require('scripts/globals/interaction/quest') + +local quest = Quest:new(xi.questLog.ABYSSEA, xi.quest.id.abyssea.DEATH_AND_REBIRTH) + +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 allZoneQuestsComplete(player) + for _, questId in ipairs(zoneQuests) do + if not player:hasCompletedQuest(xi.questLog.ABYSSEA, questId) then + return false + end + end + + return true +end + +quest.sections = +{ + { + check = function(player, status, vars) + return status == xi.questStatus.QUEST_ACCEPTED and allZoneQuestsComplete(player) + end, + + [xi.zone.PORT_JEUNO] = + { + ['Joachim'] = + { + onTrigger = function(player, npc) + return quest:progressEvent(343) + end, + }, + + onEventFinish = + { + [343] = 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.HALL_OF_THE_GODS] = + { + onZoneIn = function(player, prevZone) + local hour = VanadielHour() + if hour >= 18 or hour < 5 then + return 7 + end + end, + + onEventFinish = + { + [7] = function(player, csid, option, npc) + if quest:complete(player) then + player:addQuest(xi.questLog.ABYSSEA, xi.quest.id.abyssea.EMISSARIES_OF_GOD) + end + end, + }, + }, + }, +} + +return quest diff --git a/scripts/quests/abyssea/Emissaries_of_God.lua b/scripts/quests/abyssea/Emissaries_of_God.lua new file mode 100644 index 00000000000..9de6e5effee --- /dev/null +++ b/scripts/quests/abyssea/Emissaries_of_God.lua @@ -0,0 +1,97 @@ +----------------------------------- +-- Emissaries of God +----------------------------------- +-- !addquest 8 182 +-- Joachim : !pos -52.844 0 -9.978 246 +-- Caturae NMs : +-- Iratham (Abyssea - Tahrongi) : !spawnmob 16961945 +-- Kutharei (Abyssea - Misareaux) : !spawnmob 17662497 +-- Sippoy (Abyssea - Vunkerl) : !spawnmob 17666511 +-- Yaanei (Abyssea - Attohwa) : !spawnmob 17658292 +-- Rani (Abyssea - Altepa) : !spawnmob 17670551 +-- Raja (Abyssea - Grauberg) : !spawnmob 17818051 +-- Flagged on completion of Death and Rebirth. +-- Obtain all 6 caturae titles, then talk to Joachim for CS and Abyssite of Discernment. Zone into the Hall of the Gods between 18:00 and 5:00. Flags Beneath a Blood-red Sky upon completion. +----------------------------------- + +require('scripts/globals/quests') +require('scripts/globals/npc_util') +require('scripts/globals/interaction/quest') + +local quest = Quest:new(xi.questLog.ABYSSEA, xi.quest.id.abyssea.EMISSARIES_OF_GOD) + +quest.reward = {} -- Key item given in first cutscene, not on quest complete + +local caturaeTitles = +{ + xi.title.IRATHAM_CAPTURER, + xi.title.KUTHAREI_UNHORSER, + xi.title.SIPPOY_CAPTURER, + xi.title.YAANEI_CRASHER, + xi.title.RANI_DECROWNER, + xi.title.RAJA_REGICIDE, +} + +local function hasAllCaturaeTitles(player) + for _, titleId in ipairs(caturaeTitles) do + if not player:hasTitle(titleId) then + return false + end + end + + return true +end + +quest.sections = +{ + { + check = function(player, status, vars) + return status == xi.questStatus.QUEST_ACCEPTED and hasAllCaturaeTitles(player) + end, + + [xi.zone.PORT_JEUNO] = + { + ['Joachim'] = + { + onTrigger = function(player, npc) + return quest:progressEvent(344) + end, + }, + + onEventFinish = + { + [344] = function(player, csid, option, npc) + npcUtil.giveKeyItem(player, xi.ki.ABYSSITE_OF_DISCERNMENT) + 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.HALL_OF_THE_GODS] = + { + onZoneIn = function(player, prevZone) + local hour = VanadielHour() + if hour >= 18 or hour < 5 then + return 8 + end + end, + + onEventFinish = + { + [8] = function(player, csid, option, npc) + if quest:complete(player) then + player:addQuest(xi.questLog.ABYSSEA, xi.quest.id.abyssea.BENEATH_A_BLOOD_RED_SKY) + end + end, + }, + }, + }, +} + +return quest diff --git a/scripts/zones/Abyssea-Attohwa/mobs/Yaanei.lua b/scripts/zones/Abyssea-Attohwa/mobs/Yaanei.lua new file mode 100644 index 00000000000..39709693df8 --- /dev/null +++ b/scripts/zones/Abyssea-Attohwa/mobs/Yaanei.lua @@ -0,0 +1,14 @@ +----------------------------------- +-- Area: Abyssea - Attohwa +-- NM: Yaanei +----------------------------------- +---@type TMobEntity +local entity = {} + +entity.onMobDeath = function(mob, player, optParams) + if player then + player:addTitle(xi.title.YAANEI_CRASHER) + end +end + +return entity diff --git a/scripts/zones/Abyssea-Empyreal_Paradox/Zone.lua b/scripts/zones/Abyssea-Empyreal_Paradox/Zone.lua index a6b83aa7a2f..d628e52b642 100644 --- a/scripts/zones/Abyssea-Empyreal_Paradox/Zone.lua +++ b/scripts/zones/Abyssea-Empyreal_Paradox/Zone.lua @@ -15,7 +15,7 @@ zoneObject.onZoneIn = function(player, prevZone) player:getYPos() == 0 and player:getZPos() == 0 then - player:setPos(540, -500, -565, 64) + player:setPos(540, -500, -571, 64) end return cs diff --git a/scripts/zones/Abyssea-Grauberg/mobs/Raja.lua b/scripts/zones/Abyssea-Grauberg/mobs/Raja.lua new file mode 100644 index 00000000000..c1138c2e3ab --- /dev/null +++ b/scripts/zones/Abyssea-Grauberg/mobs/Raja.lua @@ -0,0 +1,14 @@ +----------------------------------- +-- Area: Abyssea - Grauberg +-- NM: Raja +----------------------------------- +---@type TMobEntity +local entity = {} + +entity.onMobDeath = function(mob, player, optParams) + if player then + player:addTitle(xi.title.RAJA_REGICIDE) + end +end + +return entity diff --git a/scripts/zones/Abyssea-Misareaux/mobs/Kutharei.lua b/scripts/zones/Abyssea-Misareaux/mobs/Kutharei.lua new file mode 100644 index 00000000000..baba44882c5 --- /dev/null +++ b/scripts/zones/Abyssea-Misareaux/mobs/Kutharei.lua @@ -0,0 +1,14 @@ +----------------------------------- +-- Area: Abyssea - Misareaux +-- NM: Kutharei +----------------------------------- +---@type TMobEntity +local entity = {} + +entity.onMobDeath = function(mob, player, optParams) + if player then + player:addTitle(xi.title.KUTHAREI_UNHORSER) + end +end + +return entity diff --git a/scripts/zones/Qufim_Island/npcs/Transcendental_Radiance.lua b/scripts/zones/Qufim_Island/npcs/Transcendental_Radiance.lua new file mode 100644 index 00000000000..419eb7c6c6a --- /dev/null +++ b/scripts/zones/Qufim_Island/npcs/Transcendental_Radiance.lua @@ -0,0 +1,60 @@ +----------------------------------- +-- Area: Qufim Island (126) +-- NPC: Transcendental Radiance +-- !pos -259.433 -21.581 220.498 126 +-- Warp to Abyssea - Empyreal Paradox. +-- Requires Beneath a Blood Red Sky accepted or completed. +-- Entry: Crimson Traverser Stone (free) or 1+ Traverser Stone and 10000+ cruor. +-- Event 46 = completed quest dialogue; Event 47 = accepted (not completed) dialogue. +----------------------------------- +---@type TNpcEntity +local entity = {} + +entity.onTrigger = function(player, npc) + local status = player:getQuestStatus(xi.questLog.ABYSSEA, xi.quest.id.abyssea.BENEATH_A_BLOOD_RED_SKY) + if status < xi.questStatus.QUEST_ACCEPTED then + return + end + + local hasCrimson = player:hasKeyItem(xi.ki.CRIMSON_TRAVERSER_STONE) + local traverserStones = xi.abyssea.getHeldTraverserStones(player) + local cruor = player:getCurrency('cruor') + + if not hasCrimson and (traverserStones < 1 or cruor < 10000) then + return + end + + if status >= xi.questStatus.QUEST_COMPLETED then + player:startEvent(46, 0, 0, cruor, 10000, 0, 0, 0) + else + player:startEvent(47, 0, 0, cruor, 10000, 0, 0, 0) + end +end + +entity.onEventUpdate = function(player, csid, option, npc) + local cruor = player:getCurrency('cruor') + player:updateEvent(7, 1, cruor, 10000, 0, 848559, 4095, 131186) +end + +entity.onEventFinish = function(player, csid, option, npc) + if option ~= 1 then + return + end + + if not player:hasKeyItem(xi.ki.CRIMSON_TRAVERSER_STONE) then + if + player:getCurrency('cruor') >= 10000 and + xi.abyssea.getHeldTraverserStones(player) >= 1 + then + player:delCurrency('cruor', 10000) + npcUtil.giveKeyItem(player, xi.ki.CRIMSON_TRAVERSER_STONE) + xi.abyssea.spendTravStones(player, 1) + else + return + end + end + + player:setPos(540, -500, -571, 64, xi.zone.ABYSSEA_EMPYREAL_PARADOX) +end + +return entity diff --git a/sql/npc_list.sql b/sql/npc_list.sql index 208c5f4a43f..d099d1ed7be 100644 --- a/sql/npc_list.sql +++ b/sql/npc_list.sql @@ -16341,7 +16341,7 @@ INSERT INTO `npc_list` VALUES (17293812,'Riftworn_Pyxis','Riftworn Pyxis',0,-119 INSERT INTO `npc_list` VALUES (17293813,'Riftworn_Pyxis','Riftworn Pyxis',0,73.099,-20.000,244.000,1,40,40,0,4,100,2,3,0x0000C90300000000000000000000000000000000,2,'VOIDWATCH',1); INSERT INTO `npc_list` VALUES (17293814,'Atmacite_Refiner','Atmacite Refiner',0,144.000,20.719,-408.000,21,50,50,0,8,0,0,3,0x01000602141019200C3002400250006000700000,0,'VOIDWATCH',1); INSERT INTO `npc_list` VALUES (17293815,'Voidwatch_Officer','Voidwatch Officer',0,143.000,20.934,-410.000,15,50,50,0,0,0,0,3,0x01000408141019200C3002400250006000700000,0,'VOIDWATCH',1); -INSERT INTO `npc_list` VALUES (17293816,'Transcendental_Radiance','Transcendental Radiance',24,-259.433,-21.581,220.498,32769,40,40,0,8,96,0,515,0x00003B0500000000000000000000000000000000,2,'ROV',1); +INSERT INTO `npc_list` VALUES (17293816,'Transcendental_Radiance','Transcendental Radiance',24,-259.433,-21.581,220.498,32769,40,40,0,8,96,0,515,0x00003B0500000000000000000000000000000000,2,'ABYSSEA',1); INSERT INTO `npc_list` VALUES (17293817,'blank','',0,0.000,0.000,0.000,1,40,40,0,0,0,2,2051,0x0000340000000000000000000000000000000000,0,NULL,1); INSERT INTO `npc_list` VALUES (17293818,'blank','',0,0.000,0.000,0.000,1,40,40,0,0,0,2,2051,0x0000340000000000000000000000000000000000,0,NULL,1); INSERT INTO `npc_list` VALUES (17293819,'Geomantic_Reservoir','Geomantic Reservoir',0,185.136,20.528,-208.424,1,40,40,0,0,112,0,3,0x0000160900000000000000000000000000000000,0,'SOA',1); @@ -32851,7 +32851,7 @@ INSERT INTO `npc_list` VALUES (17821705,'Unity_Master','Unity Master',0,0.000,0. INSERT INTO `npc_list` VALUES (17821710,'Cruor_Prospector','Cruor Prospector',235,535.000,-500.500,-584.000,6,50,50,0,0,0,0,3,0x0000150400000000000000000000000000000000,0,'ABYSSEA',1); INSERT INTO `npc_list` VALUES (17821711,'Atma_Infusionist','Atma Infusionist',168,545.000,-500.500,-584.000,7,50,50,0,0,0,0,1539,0x0000150400000000000000000000000000000000,0,'ABYSSEA',1); -INSERT INTO `npc_list` VALUES (17821713,'Cavernous_Maw','Cavernous Maw',64,540.018,-499.999,-565.867,32769,50,50,0,0,96,0,3,0x0000140900000000000000000000000000000000,0,'ABYSSEA',1); +INSERT INTO `npc_list` VALUES (17821713,'Cavernous_Maw','Cavernous Maw',64,540.018,-499.999,-565.867,32769,50,50,0,0,96,0,3,0x0000150900000000000000000000000000000000,0,'ABYSSEA',1); INSERT INTO `npc_list` VALUES (17821714,'TR_Entrance','Transcendental Radiance',0,540.000,-500.000,-599.000,1,50,50,0,8,96,0,3,0x00006A0900000000000000000000000000000000,2,'ABYSSEA',1); INSERT INTO `npc_list` VALUES (17821715,'Transcendental_Radiance','Transcendental Radiance',0,-480.000,0.000,480.000,1,50,50,0,8,96,0,3,0x00006A0900000000000000000000000000000000,2,'ABYSSEA',1); INSERT INTO `npc_list` VALUES (17821716,'Transcendental_Radiance','Transcendental Radiance',195,520.000,-500.000,480.000,1,50,50,0,8,96,0,3,0x00006A0900000000000000000000000000000000,2,'ABYSSEA',1);