From d1816cf0c08b79c6b73b73e58a9e6a01d7a7c7a5 Mon Sep 17 00:00:00 2001 From: Aeshur Date: Mon, 9 Feb 2026 21:47:02 -0500 Subject: [PATCH] [lua] Abyssea - Dawn of Death, Maws Clean up --- scripts/globals/abyssea.lua | 78 +++++++++++++++++++ scripts/globals/quests.lua | 16 ++-- scripts/globals/teleports.lua | 11 --- scripts/quests/abyssea/A_Beaked_Blusterer.lua | 2 + scripts/quests/abyssea/A_Delectable_Demon.lua | 71 +++++++++++++++++ scripts/quests/abyssea/A_Fluttery_Fiend.lua | 71 +++++++++++++++++ scripts/quests/abyssea/A_Goldstruck_Gigas.lua | 2 + scripts/quests/abyssea/A_Man-eating_Mite.lua | 71 +++++++++++++++++ .../quests/abyssea/An_Ulcerous_Uragnite.lua | 71 +++++++++++++++++ scripts/quests/abyssea/Dawn_of_Death.lua | 66 ++++++++++++++++ scripts/quests/abyssea/Heroes_of_Abyssea.lua | 71 +++++++++++++++++ scripts/quests/abyssea/Megadrile_Menace.lua | 10 ++- scripts/quests/abyssea/Scars_of_Abyssea.lua | 2 + .../quests/abyssea/The_Beast_of_Bastore.lua | 71 +++++++++++++++++ .../quests/abyssea/The_Forbidden_Frontier.lua | 71 +++++++++++++++++ scripts/quests/abyssea/The_Truth_Beckons.lua | 2 +- scripts/quests/abyssea/To_Paste_a_Peiste.lua | 2 + scripts/zones/Abyssea-Altepa/mobs/Bennu.lua | 14 ++++ .../Abyssea-Altepa/npcs/Cavernous_Maw.lua | 6 +- .../Abyssea-Attohwa/mobs/Itzpapalotl.lua | 14 ++++ .../Abyssea-Attohwa/npcs/Cavernous_Maw.lua | 6 +- .../Abyssea-Grauberg/mobs/Amphitrite.lua | 14 ++++ .../Abyssea-Grauberg/npcs/Cavernous_Maw.lua | 8 +- .../Abyssea-Konschtat/npcs/Cavernous_Maw.lua | 6 +- .../Abyssea-La_Theine/npcs/Cavernous_Maw.lua | 8 +- .../Abyssea-Misareaux/mobs/Cirein-croin.lua | 14 ++++ .../Abyssea-Misareaux/npcs/Cavernous_Maw.lua | 8 +- .../zones/Abyssea-Tahrongi/mobs/Glavoid.lua | 14 ++++ .../Abyssea-Tahrongi/npcs/Cavernous_Maw.lua | 8 +- .../zones/Abyssea-Uleguerand/mobs/Resheph.lua | 14 ++++ .../Abyssea-Uleguerand/npcs/Cavernous_Maw.lua | 8 +- scripts/zones/Abyssea-Vunkerl/mobs/Sedna.lua | 14 ++++ .../Abyssea-Vunkerl/npcs/Cavernous_Maw.lua | 6 +- .../Buburimu_Peninsula/npcs/Cavernous_Maw.lua | 27 +------ .../Jugner_Forest/npcs/Cavernous_Maw_2.lua | 24 +----- .../npcs/Cavernous_Maw.lua | 26 +------ .../La_Theine_Plateau/npcs/Cavernous_Maw.lua | 27 +------ .../North_Gustaberg/npcs/Cavernous_Maw_2.lua | 26 +------ .../South_Gustaberg/npcs/Cavernous_Maw.lua | 26 +------ .../Tahrongi_Canyon/npcs/Cavernous_Maw.lua | 26 +------ .../Valkurm_Dunes/npcs/Cavernous_Maw.lua | 28 +------ .../zones/Xarcabard/npcs/Cavernous_Maw.lua | 27 +------ 42 files changed, 811 insertions(+), 276 deletions(-) create mode 100644 scripts/quests/abyssea/A_Delectable_Demon.lua create mode 100644 scripts/quests/abyssea/A_Fluttery_Fiend.lua create mode 100644 scripts/quests/abyssea/A_Man-eating_Mite.lua create mode 100644 scripts/quests/abyssea/An_Ulcerous_Uragnite.lua create mode 100644 scripts/quests/abyssea/Dawn_of_Death.lua create mode 100644 scripts/quests/abyssea/Heroes_of_Abyssea.lua create mode 100644 scripts/quests/abyssea/The_Beast_of_Bastore.lua create mode 100644 scripts/quests/abyssea/The_Forbidden_Frontier.lua create mode 100644 scripts/zones/Abyssea-Altepa/mobs/Bennu.lua create mode 100644 scripts/zones/Abyssea-Attohwa/mobs/Itzpapalotl.lua create mode 100644 scripts/zones/Abyssea-Grauberg/mobs/Amphitrite.lua create mode 100644 scripts/zones/Abyssea-Misareaux/mobs/Cirein-croin.lua create mode 100644 scripts/zones/Abyssea-Tahrongi/mobs/Glavoid.lua create mode 100644 scripts/zones/Abyssea-Uleguerand/mobs/Resheph.lua create mode 100644 scripts/zones/Abyssea-Vunkerl/mobs/Sedna.lua diff --git a/scripts/globals/abyssea.lua b/scripts/globals/abyssea.lua index 9bf96e6cd1a..75f65006a7d 100644 --- a/scripts/globals/abyssea.lua +++ b/scripts/globals/abyssea.lua @@ -1234,6 +1234,84 @@ xi.abyssea.onWardTriggerAreaEnter = function(player) player:setLocalVar('tetherTimer', 0) end +----------------------------------- +-- Abyssea Cavernous Maw Entrance Functions +-- TODO: Use retail capture data for more precise entrance coords +----------------------------------- +local abysseaEntranceMawData = +{ + [xi.zone.LA_THEINE_PLATEAU] = { warpCsid = 218, dest = { -480, 0, 794, 62, xi.zone.ABYSSEA_LA_THEINE } }, + [xi.zone.KONSCHTAT_HIGHLANDS] = { warpCsid = 107, dest = { 153, -72, -840, 140, xi.zone.ABYSSEA_KONSCHTAT } }, + [xi.zone.TAHRONGI_CANYON] = { warpCsid = 100, dest = { -24, 44, -678, 240, xi.zone.ABYSSEA_TAHRONGI } }, + [xi.zone.JUGNER_FOREST] = { warpCsid = 47, dest = { -351, -46, 699, 10, xi.zone.ABYSSEA_VUNKERL } }, + [xi.zone.VALKURM_DUNES] = { warpCsid = 55, dest = { 670, -15, 318, 119, xi.zone.ABYSSEA_MISAREAUX } }, + [xi.zone.BUBURIMU_PENINSULA] = { warpCsid = 61, dest = { -140, 20, -181, 131, xi.zone.ABYSSEA_ATTOHWA } }, + [xi.zone.SOUTH_GUSTABERG] = { warpCsid = 914, dest = { 432, 0, 321, 125, xi.zone.ABYSSEA_ALTEPA } }, + [xi.zone.XARCABARD] = { warpCsid = 204, dest = { -240, -40, -520, 251, xi.zone.ABYSSEA_ULEGUERAND } }, + [xi.zone.NORTH_GUSTABERG] = { warpCsid = 908, dest = { -555, 31, -760, 0, xi.zone.ABYSSEA_GRAUBERG } }, +} + +xi.abyssea.entranceMawOnTrigger = function(player, npc) + local zoneId = player:getZoneID() + local ID = zones[zoneId] + + if xi.settings.main.ENABLE_ABYSSEA == 0 then + player:messageSpecial(ID.text.NOTHING_HAPPENS) + return + end + + if player:getMainLvl() < 30 then + player:messageSpecial(ID.text.NOTHING_HAPPENS) + return + end + + local maw = abysseaEntranceMawData[zoneId] + if not maw then + player:messageSpecial(ID.text.NOTHING_HAPPENS) + return + end + + player:startEvent(maw.warpCsid, 0, 1) +end + +xi.abyssea.entranceMawOnEventFinish = function(player, csid, option, npc) + local maw = abysseaEntranceMawData[player:getZoneID()] + if maw and csid == maw.warpCsid and option == 1 then + player:setPos(unpack(maw.dest)) + end +end + +----------------------------------- +-- Abyssea Cavernous Maw Exit Functions +-- TODO: Use retail capture data for more precise exit coords +----------------------------------- +local abysseaExitMawData = +{ + [xi.zone.ABYSSEA_LA_THEINE ] = { exitCsid = 200, dest = { -561.837, 0.000, 641.772, 158, xi.zone.LA_THEINE_PLATEAU } }, + [xi.zone.ABYSSEA_KONSCHTAT ] = { exitCsid = 200, dest = { 91, -68, -582, 237, xi.zone.KONSCHTAT_HIGHLANDS } }, + [xi.zone.ABYSSEA_TAHRONGI ] = { exitCsid = 200, dest = { -28.597, 46.166, -680.254, 192, xi.zone.TAHRONGI_CANYON } }, + [xi.zone.ABYSSEA_VUNKERL ] = { exitCsid = 200, dest = { 242.979, 0.235, 8.721, 157, xi.zone.JUGNER_FOREST } }, + [xi.zone.ABYSSEA_MISAREAUX ] = { exitCsid = 200, dest = { 362, 0.001, -119, 4, xi.zone.VALKURM_DUNES } }, + [xi.zone.ABYSSEA_ATTOHWA ] = { exitCsid = 200, dest = { -339.979, -23.372, 48.493, 31, xi.zone.BUBURIMU_PENINSULA } }, + [xi.zone.ABYSSEA_ALTEPA ] = { exitCsid = 200, dest = { 343, 0, -679, 199, xi.zone.SOUTH_GUSTABERG } }, + [xi.zone.ABYSSEA_ULEGUERAND] = { exitCsid = 200, dest = { 269, -7, -75, 192, xi.zone.XARCABARD } }, + [xi.zone.ABYSSEA_GRAUBERG ] = { exitCsid = 200, dest = { -72.890, 0.057, 600.131, 122, xi.zone.NORTH_GUSTABERG } }, +} + +xi.abyssea.exitMawOnTrigger = function(player, npc) + local exitMaw = abysseaExitMawData[player:getZoneID()] + if exitMaw then + player:startEvent(exitMaw.exitCsid) + end +end + +xi.abyssea.exitMawOnEventFinish = function(player, csid, option, npc) + local exitMaw = abysseaExitMawData[player:getZoneID()] + if exitMaw and csid == exitMaw.exitCsid and option == 1 then + player:setPos(unpack(exitMaw.dest)) + end +end + ----------------------------------- -- Support NPC Functions -- Traverser Stone, Abyssea Warp diff --git a/scripts/globals/quests.lua b/scripts/globals/quests.lua index 8efa44c63ea..9d91148793f 100644 --- a/scripts/globals/quests.lua +++ b/scripts/globals/quests.lua @@ -972,24 +972,24 @@ xi.quest.id = A_MIGHTIER_MARTELLO_GRAUBERG = 159, A_JOURNEY_BEGINS = 160, -- + Converted THE_TRUTH_BECKONS = 161, -- + Converted - DAWN_OF_DEATH = 162, + DAWN_OF_DEATH = 162, -- + Converted A_GOLDSTRUCK_GIGAS = 163, -- + Converted TO_PASTE_A_PEISTE = 164, -- + Converted MEGADRILE_MENACE = 165, -- + Converted - THE_FORBIDDEN_FRONTIER = 166, + 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, - THE_BEAST_OF_BASTORE = 172, - A_DELECTABLE_DEMON = 173, - A_FLUTTERY_FIEND = 174, + THE_BEAST_OF_BASTORE = 172, -- + Converted + A_DELECTABLE_DEMON = 173, -- + Converted + A_FLUTTERY_FIEND = 174, -- + Converted SCARS_OF_ABYSSEA = 175, -- + Converted A_BEAKED_BLUSTERER = 176, -- + Converted - A_MAN_EATING_MITE = 177, - AN_ULCEROUS_URAGNITE = 178, - HEROES_OF_ABYSSEA = 179, + 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, diff --git a/scripts/globals/teleports.lua b/scripts/globals/teleports.lua index 77c23a86631..5b40e913adf 100644 --- a/scripts/globals/teleports.lua +++ b/scripts/globals/teleports.lua @@ -264,17 +264,6 @@ xi.teleport.toCampaign = function(player, option) end end - -- TODO: Abyessa Maws: - -- Tahrongi Canyon (H-12) - -- Konschtat Highlands (I-12) - -- La Theine Plateau (E-4) - -- Valkurm Dunes (I-9) - -- Jugner Forest (J-8) - -- Buburimu Peninsula (F-7) - -- South Gustaberg (J-10) - -- North Gustaberg (G-6) - -- Xarcabard (H-8) - ----------------------------------- -- TELEPORT TO REGIONAL OUTPOST ----------------------------------- diff --git a/scripts/quests/abyssea/A_Beaked_Blusterer.lua b/scripts/quests/abyssea/A_Beaked_Blusterer.lua index dd2d7fcb9ac..b4e0d178980 100644 --- a/scripts/quests/abyssea/A_Beaked_Blusterer.lua +++ b/scripts/quests/abyssea/A_Beaked_Blusterer.lua @@ -2,6 +2,8 @@ -- A_Beaked_Blusterer ----------------------------------- -- !addquest 8 176 +-- Cavernous Maw : !pos 340.000 -0.500 -680.000 107 +-- Bennu : !spawnmob 17670554 ----------------------------------- local quest = Quest:new(xi.questLog.ABYSSEA, xi.quest.id.abyssea.A_BEAKED_BLUSTERER) diff --git a/scripts/quests/abyssea/A_Delectable_Demon.lua b/scripts/quests/abyssea/A_Delectable_Demon.lua new file mode 100644 index 00000000000..4472ac39554 --- /dev/null +++ b/scripts/quests/abyssea/A_Delectable_Demon.lua @@ -0,0 +1,71 @@ +----------------------------------- +-- A Delectable Demon +----------------------------------- +-- !addquest 8 173 +-- Cavernous Maw : !pos 367.980 -0.443 -119.874 103 +-- Cirein-croin : !spawnmob 17662476 +----------------------------------- + +local quest = Quest:new(xi.questLog.ABYSSEA, xi.quest.id.abyssea.A_DELECTABLE_DEMON) + +quest.reward = {} + +quest.sections = +{ + { + check = function(player, status, vars) + return status == xi.questStatus.QUEST_AVAILABLE and + xi.abyssea.getHeldTraverserStones(player) >= 1 and + player:getQuestStatus(xi.questLog.ABYSSEA, xi.quest.id.abyssea.DAWN_OF_DEATH) >= xi.questStatus.QUEST_ACCEPTED + end, + + [xi.zone.VALKURM_DUNES] = + { + ['Cavernous_Maw'] = + { + onTrigger = function(player, npc) + return quest:progressEvent(56) + end, + }, + + onEventFinish = + { + [56] = function(player, csid, option, npc) + quest:begin(player) + end, + }, + }, + }, + + { + check = function(player, status, vars) + return status == xi.questStatus.QUEST_ACCEPTED and player:hasTitle(xi.title.CIREIN_CROIN_HARPOONER) + end, + + [xi.zone.VALKURM_DUNES] = + { + onZoneIn = function(player, prevZone) + return 57 + end, + + onEventUpdate = + { + [57] = function(player, csid, option, npc) + if option == 1 then + player:updateEvent(xi.abyssea.getZoneKIReward(player)) + end + end, + }, + + onEventFinish = + { + [57] = function(player, csid, option, npc) + npcUtil.giveKeyItem(player, xi.abyssea.getZoneKIReward(player)) + quest:complete(player) + end, + }, + }, + }, +} + +return quest diff --git a/scripts/quests/abyssea/A_Fluttery_Fiend.lua b/scripts/quests/abyssea/A_Fluttery_Fiend.lua new file mode 100644 index 00000000000..5e4d6b365ae --- /dev/null +++ b/scripts/quests/abyssea/A_Fluttery_Fiend.lua @@ -0,0 +1,71 @@ +----------------------------------- +-- A Fluttery Fiend +----------------------------------- +-- !addquest 8 174 +-- Cavernous Maw : !pos -344.396 -24.941 52.581 118 +-- Itzpapalotl : !spawnmob 17658277 +----------------------------------- + +local quest = Quest:new(xi.questLog.ABYSSEA, xi.quest.id.abyssea.A_FLUTTERY_FIEND) + +quest.reward = {} + +quest.sections = +{ + { + check = function(player, status, vars) + return status == xi.questStatus.QUEST_AVAILABLE and + xi.abyssea.getHeldTraverserStones(player) >= 1 and + player:getQuestStatus(xi.questLog.ABYSSEA, xi.quest.id.abyssea.DAWN_OF_DEATH) >= xi.questStatus.QUEST_ACCEPTED + end, + + [xi.zone.BUBURIMU_PENINSULA] = + { + ['Cavernous_Maw'] = + { + onTrigger = function(player, npc) + return quest:progressEvent(62) + end, + }, + + onEventFinish = + { + [62] = function(player, csid, option, npc) + quest:begin(player) + end, + }, + }, + }, + + { + check = function(player, status, vars) + return status == xi.questStatus.QUEST_ACCEPTED and player:hasTitle(xi.title.ITZPAPALOTL_DECLAWER) + end, + + [xi.zone.BUBURIMU_PENINSULA] = + { + onZoneIn = function(player, prevZone) + return 63 + end, + + onEventUpdate = + { + [63] = function(player, csid, option, npc) + if option == 1 then + player:updateEvent(xi.abyssea.getZoneKIReward(player)) + end + end, + }, + + onEventFinish = + { + [63] = function(player, csid, option, npc) + npcUtil.giveKeyItem(player, xi.abyssea.getZoneKIReward(player)) + quest:complete(player) + end, + }, + }, + }, +} + +return quest diff --git a/scripts/quests/abyssea/A_Goldstruck_Gigas.lua b/scripts/quests/abyssea/A_Goldstruck_Gigas.lua index 87a99964e12..5e41947194d 100644 --- a/scripts/quests/abyssea/A_Goldstruck_Gigas.lua +++ b/scripts/quests/abyssea/A_Goldstruck_Gigas.lua @@ -2,6 +2,8 @@ -- A Goldstruck Gigas ----------------------------------- -- !addquest 8 163 +-- Cavernous Maw : !pos -557.900 0.001 637.846 102 +-- Briareus : !spawnmob 17318446 ----------------------------------- local quest = Quest:new(xi.questLog.ABYSSEA, xi.quest.id.abyssea.A_GOLDSTRUCK_GIGAS) diff --git a/scripts/quests/abyssea/A_Man-eating_Mite.lua b/scripts/quests/abyssea/A_Man-eating_Mite.lua new file mode 100644 index 00000000000..7316b8e3461 --- /dev/null +++ b/scripts/quests/abyssea/A_Man-eating_Mite.lua @@ -0,0 +1,71 @@ +----------------------------------- +-- A Man-eating Mite +----------------------------------- +-- !addquest 8 177 +-- Cavernous Maw : !pos 270.000 -9.000 -70.000 112 +-- Resheph : !spawnmob 17813913 +----------------------------------- + +local quest = Quest:new(xi.questLog.ABYSSEA, xi.quest.id.abyssea.A_MAN_EATING_MITE) + +quest.reward = {} + +quest.sections = +{ + { + check = function(player, status, vars) + return status == xi.questStatus.QUEST_AVAILABLE and + xi.abyssea.getHeldTraverserStones(player) >= 1 and + player:getQuestStatus(xi.questLog.ABYSSEA, xi.quest.id.abyssea.DAWN_OF_DEATH) >= xi.questStatus.QUEST_ACCEPTED + end, + + [xi.zone.XARCABARD] = + { + ['Cavernous_Maw'] = + { + onTrigger = function(player, npc) + return quest:progressEvent(58) + end, + }, + + onEventFinish = + { + [58] = function(player, csid, option, npc) + quest:begin(player) + end, + }, + }, + }, + + { + check = function(player, status, vars) + return status == xi.questStatus.QUEST_ACCEPTED and player:hasTitle(xi.title.RESHEPH_ERADICATOR) + end, + + [xi.zone.XARCABARD] = + { + onZoneIn = function(player, prevZone) + return 59 + end, + + onEventUpdate = + { + [59] = function(player, csid, option, npc) + if option == 1 then + player:updateEvent(xi.abyssea.getZoneKIReward(player)) + end + end, + }, + + onEventFinish = + { + [59] = function(player, csid, option, npc) + npcUtil.giveKeyItem(player, xi.abyssea.getZoneKIReward(player)) + quest:complete(player) + end, + }, + }, + }, +} + +return quest diff --git a/scripts/quests/abyssea/An_Ulcerous_Uragnite.lua b/scripts/quests/abyssea/An_Ulcerous_Uragnite.lua new file mode 100644 index 00000000000..c57abbd42c0 --- /dev/null +++ b/scripts/quests/abyssea/An_Ulcerous_Uragnite.lua @@ -0,0 +1,71 @@ +----------------------------------- +-- An Ulcerous Uragnite +----------------------------------- +-- !addquest 8 178 +-- Cavernous Maw : !pos -78.000 -0.500 600.000 106 +-- Amphitrite : !spawnmob 17818054 +----------------------------------- + +local quest = Quest:new(xi.questLog.ABYSSEA, xi.quest.id.abyssea.AN_ULCEROUS_URAGNITE) + +quest.reward = {} + +quest.sections = +{ + { + check = function(player, status, vars) + return status == xi.questStatus.QUEST_AVAILABLE and + xi.abyssea.getHeldTraverserStones(player) >= 1 and + player:getQuestStatus(xi.questLog.ABYSSEA, xi.quest.id.abyssea.DAWN_OF_DEATH) >= xi.questStatus.QUEST_ACCEPTED + end, + + [xi.zone.NORTH_GUSTABERG] = + { + ['Cavernous_Maw_2'] = + { + onTrigger = function(player, npc) + return quest:progressEvent(0) + end, + }, + + onEventFinish = + { + [0] = function(player, csid, option, npc) + quest:begin(player) + end, + }, + }, + }, + + { + check = function(player, status, vars) + return status == xi.questStatus.QUEST_ACCEPTED and player:hasTitle(xi.title.AMPHITRITE_SHUCKER) + end, + + [xi.zone.NORTH_GUSTABERG] = + { + onZoneIn = function(player, prevZone) + return 1 + end, + + onEventUpdate = + { + [1] = function(player, csid, option, npc) + if option == 1 then + player:updateEvent(xi.abyssea.getZoneKIReward(player)) + end + end, + }, + + onEventFinish = + { + [1] = function(player, csid, option, npc) + npcUtil.giveKeyItem(player, xi.abyssea.getZoneKIReward(player)) + quest:complete(player) + end, + }, + }, + }, +} + +return quest diff --git a/scripts/quests/abyssea/Dawn_of_Death.lua b/scripts/quests/abyssea/Dawn_of_Death.lua new file mode 100644 index 00000000000..2a72b050c0d --- /dev/null +++ b/scripts/quests/abyssea/Dawn_of_Death.lua @@ -0,0 +1,66 @@ +----------------------------------- +-- Dawn of Death +----------------------------------- +-- !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. +----------------------------------- + +local quest = Quest:new(xi.questLog.ABYSSEA, xi.quest.id.abyssea.DAWN_OF_DEATH) + +quest.reward = {} + +local subQuests = +{ + 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 countCompletedSubQuests(player) + local count = 0 + for _, questId in ipairs(subQuests) 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 countCompletedSubQuests(player) >= 3 + end, + + [xi.zone.PORT_JEUNO] = + { + ['Joachim'] = + { + onTrigger = function(player, npc) + return quest:progressEvent(333) + end, + }, + + onEventFinish = + { + [333] = function(player, csid, option, npc) + if quest:complete(player) then + player:addQuest(xi.questLog.ABYSSEA, xi.quest.id.abyssea.FIRST_CONTACT) + end + end, + }, + }, + }, +} + +return quest diff --git a/scripts/quests/abyssea/Heroes_of_Abyssea.lua b/scripts/quests/abyssea/Heroes_of_Abyssea.lua new file mode 100644 index 00000000000..410d981e217 --- /dev/null +++ b/scripts/quests/abyssea/Heroes_of_Abyssea.lua @@ -0,0 +1,71 @@ +----------------------------------- +-- Heroes of Abyssea +----------------------------------- +-- !addquest 8 179 +-- Joachim : !pos -52.844 0 -9.978 246 +-- Flag when any of An Ulcerous Uragnite, A Beaked Blusterer, A Man-eating Mite started. +-- Complete when all three are completed and player talks to Joachim again. +----------------------------------- + +local quest = Quest:new(xi.questLog.ABYSSEA, xi.quest.id.abyssea.HEROES_OF_ABYSSEA) + +quest.reward = {} + +quest.sections = +{ + { + check = function(player, status, vars) + return status == xi.questStatus.QUEST_AVAILABLE and + ( + player:getQuestStatus(xi.questLog.ABYSSEA, xi.quest.id.abyssea.AN_ULCEROUS_URAGNITE) > xi.questStatus.QUEST_AVAILABLE or + player:getQuestStatus(xi.questLog.ABYSSEA, xi.quest.id.abyssea.A_BEAKED_BLUSTERER) > xi.questStatus.QUEST_AVAILABLE or + player:getQuestStatus(xi.questLog.ABYSSEA, xi.quest.id.abyssea.A_MAN_EATING_MITE) > xi.questStatus.QUEST_AVAILABLE + ) + end, + + [xi.zone.PORT_JEUNO] = + { + ['Joachim'] = + { + onTrigger = function(player, npc) + return quest:progressEvent(340) + end, + }, + + onEventFinish = + { + [340] = function(player, csid, option, npc) + quest:begin(player) + end, + }, + }, + }, + + { + check = function(player, status, vars) + return status == xi.questStatus.QUEST_ACCEPTED and + player:hasCompletedQuest(xi.questLog.ABYSSEA, xi.quest.id.abyssea.AN_ULCEROUS_URAGNITE) and + player:hasCompletedQuest(xi.questLog.ABYSSEA, xi.quest.id.abyssea.A_BEAKED_BLUSTERER) and + player:hasCompletedQuest(xi.questLog.ABYSSEA, xi.quest.id.abyssea.A_MAN_EATING_MITE) + end, + + [xi.zone.PORT_JEUNO] = + { + ['Joachim'] = + { + onTrigger = function(player, npc) + return quest:progressEvent(341) + end, + }, + + onEventFinish = + { + [341] = function(player, csid, option, npc) + quest:complete(player) + end, + }, + }, + }, +} + +return quest diff --git a/scripts/quests/abyssea/Megadrile_Menace.lua b/scripts/quests/abyssea/Megadrile_Menace.lua index b3d3c840fa4..62be88189bb 100644 --- a/scripts/quests/abyssea/Megadrile_Menace.lua +++ b/scripts/quests/abyssea/Megadrile_Menace.lua @@ -2,8 +2,10 @@ -- Megadrile Menace ----------------------------------- -- !addquest 8 165 +-- Cavernous Maw : !pos -28.000 46.000 -685.000 117 +-- Glavoid : !spawnmob 16961930 ----------------------------------- -local tahrongiID = zones[xi.zone.TAHRONGI_CANYON] +local ID = zones[xi.zone.TAHRONGI_CANYON] ----------------------------------- local quest = Quest:new(xi.questLog.ABYSSEA, xi.quest.id.abyssea.MEGADRILE_MENACE) @@ -19,7 +21,7 @@ quest.sections = player:getQuestStatus(xi.questLog.ABYSSEA, xi.quest.id.abyssea.DAWN_OF_DEATH) >= xi.questStatus.QUEST_ACCEPTED end, - [xi.zone.LA_THEINE_PLATEAU] = + [xi.zone.TAHRONGI_CANYON] = { ['Cavernous_Maw'] = { @@ -33,7 +35,7 @@ quest.sections = [38] = function(player, csid, option, npc) quest:begin(player) player:addCurrency('cruor', 50) - player:messageSpecial(tahrongiID.text.CRUOR_OBTAINED, 50, player:getCurrency('cruor')) + player:messageSpecial(ID.text.CRUOR_TOTAL, 50, player:getCurrency('cruor')) end, }, }, @@ -44,7 +46,7 @@ quest.sections = return status == xi.questStatus.QUEST_ACCEPTED and player:hasTitle(xi.title.GLAVOID_STAMPEDER) end, - [xi.zone.LA_THEINE_PLATEAU] = + [xi.zone.TAHRONGI_CANYON] = { onZoneIn = function(player, prevZone) return 39 diff --git a/scripts/quests/abyssea/Scars_of_Abyssea.lua b/scripts/quests/abyssea/Scars_of_Abyssea.lua index e8bdaab3f7c..060ed1bdb52 100644 --- a/scripts/quests/abyssea/Scars_of_Abyssea.lua +++ b/scripts/quests/abyssea/Scars_of_Abyssea.lua @@ -3,6 +3,8 @@ ----------------------------------- -- !addquest 8 175 -- Joachim : !pos -52.844 0 -9.978 246 +-- Flag when any of A Fluttery Fiend, The Beast of Bastore, A Delectable Demon started. +-- Complete when all three are completed and player talks to Joachim again. ----------------------------------- local quest = Quest:new(xi.questLog.ABYSSEA, xi.quest.id.abyssea.SCARS_OF_ABYSSEA) diff --git a/scripts/quests/abyssea/The_Beast_of_Bastore.lua b/scripts/quests/abyssea/The_Beast_of_Bastore.lua new file mode 100644 index 00000000000..ed29c90b349 --- /dev/null +++ b/scripts/quests/abyssea/The_Beast_of_Bastore.lua @@ -0,0 +1,71 @@ +----------------------------------- +-- The Beast of Bastore +----------------------------------- +-- !addquest 8 172 +-- Cavernous Maw : !pos 246.318 -0.709 5.706 104 +-- Sedna : !spawnmob 17666500 +----------------------------------- + +local quest = Quest:new(xi.questLog.ABYSSEA, xi.quest.id.abyssea.THE_BEAST_OF_BASTORE) + +quest.reward = {} + +quest.sections = +{ + { + check = function(player, status, vars) + return status == xi.questStatus.QUEST_AVAILABLE and + xi.abyssea.getHeldTraverserStones(player) >= 1 and + player:getQuestStatus(xi.questLog.ABYSSEA, xi.quest.id.abyssea.DAWN_OF_DEATH) >= xi.questStatus.QUEST_ACCEPTED + end, + + [xi.zone.JUGNER_FOREST] = + { + ['Cavernous_Maw_2'] = + { + onTrigger = function(player, npc) + return quest:progressEvent(48) + end, + }, + + onEventFinish = + { + [48] = function(player, csid, option, npc) + quest:begin(player) + end, + }, + }, + }, + + { + check = function(player, status, vars) + return status == xi.questStatus.QUEST_ACCEPTED and player:hasTitle(xi.title.SEDNA_TUSKBREAKER) + end, + + [xi.zone.JUGNER_FOREST] = + { + onZoneIn = function(player, prevZone) + return 49 + end, + + onEventUpdate = + { + [49] = function(player, csid, option, npc) + if option == 1 then + player:updateEvent(xi.abyssea.getZoneKIReward(player)) + end + end, + }, + + onEventFinish = + { + [49] = function(player, csid, option, npc) + npcUtil.giveKeyItem(player, xi.abyssea.getZoneKIReward(player)) + quest:complete(player) + end, + }, + }, + }, +} + +return quest diff --git a/scripts/quests/abyssea/The_Forbidden_Frontier.lua b/scripts/quests/abyssea/The_Forbidden_Frontier.lua new file mode 100644 index 00000000000..c372bdf73bc --- /dev/null +++ b/scripts/quests/abyssea/The_Forbidden_Frontier.lua @@ -0,0 +1,71 @@ +----------------------------------- +-- The Forbidden Frontier +----------------------------------- +-- !addquest 8 166 +-- Joachim : !pos -52.844 0 -9.978 246 +-- Flag when any of A Goldstruck Gigas, To Paste a Peiste, Megadrile Menace started. +-- Complete when all three are completed and player talks to Joachim again. +----------------------------------- + +local quest = Quest:new(xi.questLog.ABYSSEA, xi.quest.id.abyssea.THE_FORBIDDEN_FRONTIER) + +quest.reward = {} + +quest.sections = +{ + { + check = function(player, status, vars) + return status == xi.questStatus.QUEST_AVAILABLE and + ( + player:getQuestStatus(xi.questLog.ABYSSEA, xi.quest.id.abyssea.A_GOLDSTRUCK_GIGAS) > xi.questStatus.QUEST_AVAILABLE or + player:getQuestStatus(xi.questLog.ABYSSEA, xi.quest.id.abyssea.TO_PASTE_A_PEISTE) > xi.questStatus.QUEST_AVAILABLE or + player:getQuestStatus(xi.questLog.ABYSSEA, xi.quest.id.abyssea.MEGADRILE_MENACE) > xi.questStatus.QUEST_AVAILABLE + ) + end, + + [xi.zone.PORT_JEUNO] = + { + ['Joachim'] = + { + onTrigger = function(player, npc) + return quest:progressEvent(331) + end, + }, + + onEventFinish = + { + [331] = function(player, csid, option, npc) + quest:begin(player) + end, + }, + }, + }, + + { + check = function(player, status, vars) + return status == xi.questStatus.QUEST_ACCEPTED and + player:hasCompletedQuest(xi.questLog.ABYSSEA, xi.quest.id.abyssea.A_GOLDSTRUCK_GIGAS) and + player:hasCompletedQuest(xi.questLog.ABYSSEA, xi.quest.id.abyssea.TO_PASTE_A_PEISTE) and + player:hasCompletedQuest(xi.questLog.ABYSSEA, xi.quest.id.abyssea.MEGADRILE_MENACE) + end, + + [xi.zone.PORT_JEUNO] = + { + ['Joachim'] = + { + onTrigger = function(player, npc) + return quest:progressEvent(332) + end, + }, + + onEventFinish = + { + [332] = function(player, csid, option, npc) + quest:complete(player) + end, + }, + }, + }, +} + +return quest diff --git a/scripts/quests/abyssea/The_Truth_Beckons.lua b/scripts/quests/abyssea/The_Truth_Beckons.lua index 2fd1a67f252..eee19ae867a 100644 --- a/scripts/quests/abyssea/The_Truth_Beckons.lua +++ b/scripts/quests/abyssea/The_Truth_Beckons.lua @@ -3,6 +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. ----------------------------------- local quest = Quest:new(xi.questLog.ABYSSEA, xi.quest.id.abyssea.THE_TRUTH_BECKONS) @@ -15,7 +16,6 @@ end quest.sections = { - -- This quest is flagged on completion of A Journey Begins. { check = function(player, status, vars) return status == xi.questStatus.QUEST_ACCEPTED diff --git a/scripts/quests/abyssea/To_Paste_a_Peiste.lua b/scripts/quests/abyssea/To_Paste_a_Peiste.lua index 6dac9eaf9a5..cad28f101af 100644 --- a/scripts/quests/abyssea/To_Paste_a_Peiste.lua +++ b/scripts/quests/abyssea/To_Paste_a_Peiste.lua @@ -2,6 +2,8 @@ -- To Paste a Peiste ----------------------------------- -- !addquest 8 164 +-- Cavernous Maw : !pos 95.344 -69.080 -580.008 108 +-- Kukulkan : !spawnmob 16838872 ----------------------------------- local quest = Quest:new(xi.questLog.ABYSSEA, xi.quest.id.abyssea.TO_PASTE_A_PEISTE) diff --git a/scripts/zones/Abyssea-Altepa/mobs/Bennu.lua b/scripts/zones/Abyssea-Altepa/mobs/Bennu.lua new file mode 100644 index 00000000000..0d9d69b13ed --- /dev/null +++ b/scripts/zones/Abyssea-Altepa/mobs/Bennu.lua @@ -0,0 +1,14 @@ +----------------------------------- +-- Area: Abyssea - Altepa +-- NM: Bennu +----------------------------------- +---@type TMobEntity +local entity = {} + +entity.onMobDeath = function(mob, player, optParams) + if player then + player:addTitle(xi.title.BENNU_DEPLUMER) + end +end + +return entity diff --git a/scripts/zones/Abyssea-Altepa/npcs/Cavernous_Maw.lua b/scripts/zones/Abyssea-Altepa/npcs/Cavernous_Maw.lua index f1b7d72aaa7..ecb01cf7bd3 100644 --- a/scripts/zones/Abyssea-Altepa/npcs/Cavernous_Maw.lua +++ b/scripts/zones/Abyssea-Altepa/npcs/Cavernous_Maw.lua @@ -8,13 +8,11 @@ local entity = {} entity.onTrigger = function(player, npc) - player:startEvent(200) + xi.abyssea.exitMawOnTrigger(player, npc) end entity.onEventFinish = function(player, csid, option, npc) - if csid == 200 and option == 1 then - player:setPos(343, 0, -679, 199, 107) - end + xi.abyssea.exitMawOnEventFinish(player, csid, option, npc) end return entity diff --git a/scripts/zones/Abyssea-Attohwa/mobs/Itzpapalotl.lua b/scripts/zones/Abyssea-Attohwa/mobs/Itzpapalotl.lua new file mode 100644 index 00000000000..183fe184b41 --- /dev/null +++ b/scripts/zones/Abyssea-Attohwa/mobs/Itzpapalotl.lua @@ -0,0 +1,14 @@ +----------------------------------- +-- Area: Abyssea - Attohwa +-- NM: Itzpapalotl +----------------------------------- +---@type TMobEntity +local entity = {} + +entity.onMobDeath = function(mob, player, optParams) + if player then + player:addTitle(xi.title.ITZPAPALOTL_DECLAWER) + end +end + +return entity diff --git a/scripts/zones/Abyssea-Attohwa/npcs/Cavernous_Maw.lua b/scripts/zones/Abyssea-Attohwa/npcs/Cavernous_Maw.lua index 5b8b2b962f2..182abc36eb2 100644 --- a/scripts/zones/Abyssea-Attohwa/npcs/Cavernous_Maw.lua +++ b/scripts/zones/Abyssea-Attohwa/npcs/Cavernous_Maw.lua @@ -8,13 +8,11 @@ local entity = {} entity.onTrigger = function(player, npc) - player:startEvent(200) + xi.abyssea.exitMawOnTrigger(player, npc) end entity.onEventFinish = function(player, csid, option, npc) - if csid == 200 and option == 1 then - player:setPos(-338, -23, 47, 167, 118) - end + xi.abyssea.exitMawOnEventFinish(player, csid, option, npc) end return entity diff --git a/scripts/zones/Abyssea-Grauberg/mobs/Amphitrite.lua b/scripts/zones/Abyssea-Grauberg/mobs/Amphitrite.lua new file mode 100644 index 00000000000..15111cc64ee --- /dev/null +++ b/scripts/zones/Abyssea-Grauberg/mobs/Amphitrite.lua @@ -0,0 +1,14 @@ +----------------------------------- +-- Area: Abyssea - Grauberg +-- NM: Amphitrite +----------------------------------- +---@type TMobEntity +local entity = {} + +entity.onMobDeath = function(mob, player, optParams) + if player then + player:addTitle(xi.title.AMPHITRITE_SHUCKER) + end +end + +return entity diff --git a/scripts/zones/Abyssea-Grauberg/npcs/Cavernous_Maw.lua b/scripts/zones/Abyssea-Grauberg/npcs/Cavernous_Maw.lua index ed41d4b244e..8e964ceb1b4 100644 --- a/scripts/zones/Abyssea-Grauberg/npcs/Cavernous_Maw.lua +++ b/scripts/zones/Abyssea-Grauberg/npcs/Cavernous_Maw.lua @@ -1,20 +1,18 @@ ----------------------------------- -- Area: Abyssea - Grauberg -- NPC: Cavernous Maw --- !pos -564.000, 30.300, -760.000 254 +-- !pos -564.000 30.300 -760.000 254 -- Teleports Players to North Gustaberg ----------------------------------- ---@type TNpcEntity local entity = {} entity.onTrigger = function(player, npc) - player:startEvent(200) + xi.abyssea.exitMawOnTrigger(player, npc) end entity.onEventFinish = function(player, csid, option, npc) - if csid == 200 and option == 1 then - player:setPos(-71, 0.001, 601, 126, 106) - end + xi.abyssea.exitMawOnEventFinish(player, csid, option, npc) end return entity diff --git a/scripts/zones/Abyssea-Konschtat/npcs/Cavernous_Maw.lua b/scripts/zones/Abyssea-Konschtat/npcs/Cavernous_Maw.lua index 519209648a7..b1d9accfb33 100644 --- a/scripts/zones/Abyssea-Konschtat/npcs/Cavernous_Maw.lua +++ b/scripts/zones/Abyssea-Konschtat/npcs/Cavernous_Maw.lua @@ -8,13 +8,11 @@ local entity = {} entity.onTrigger = function(player, npc) - player:startEvent(200) + xi.abyssea.exitMawOnTrigger(player, npc) end entity.onEventFinish = function(player, csid, option, npc) - if csid == 200 and option == 1 then - player:setPos(91, -68, -582, 237, 108) - end + xi.abyssea.exitMawOnEventFinish(player, csid, option, npc) end return entity diff --git a/scripts/zones/Abyssea-La_Theine/npcs/Cavernous_Maw.lua b/scripts/zones/Abyssea-La_Theine/npcs/Cavernous_Maw.lua index 15118f0af5f..0515e12b705 100644 --- a/scripts/zones/Abyssea-La_Theine/npcs/Cavernous_Maw.lua +++ b/scripts/zones/Abyssea-La_Theine/npcs/Cavernous_Maw.lua @@ -1,20 +1,18 @@ ----------------------------------- -- Area: Abyssea - La Theine -- NPC: Cavernous Maw --- !pos -480.009, 0.000, 799.927 132 +-- !pos -480.009 0.000 799.927 132 -- Teleports Players to La Theine Plateau ----------------------------------- ---@type TNpcEntity local entity = {} entity.onTrigger = function(player, npc) - player:startEvent(200) + xi.abyssea.exitMawOnTrigger(player, npc) end entity.onEventFinish = function(player, csid, option, npc) - if csid == 200 and option == 1 then - player:setPos(-562, 0.001, 640, 26, 102) - end + xi.abyssea.exitMawOnEventFinish(player, csid, option, npc) end return entity diff --git a/scripts/zones/Abyssea-Misareaux/mobs/Cirein-croin.lua b/scripts/zones/Abyssea-Misareaux/mobs/Cirein-croin.lua new file mode 100644 index 00000000000..798b76c4b36 --- /dev/null +++ b/scripts/zones/Abyssea-Misareaux/mobs/Cirein-croin.lua @@ -0,0 +1,14 @@ +----------------------------------- +-- Area: Abyssea - Misareaux +-- NM: Cirein-croin +----------------------------------- +---@type TMobEntity +local entity = {} + +entity.onMobDeath = function(mob, player, optParams) + if player then + player:addTitle(xi.title.CIREIN_CROIN_HARPOONER) + end +end + +return entity diff --git a/scripts/zones/Abyssea-Misareaux/npcs/Cavernous_Maw.lua b/scripts/zones/Abyssea-Misareaux/npcs/Cavernous_Maw.lua index 5cdfaa96112..d70321cd353 100644 --- a/scripts/zones/Abyssea-Misareaux/npcs/Cavernous_Maw.lua +++ b/scripts/zones/Abyssea-Misareaux/npcs/Cavernous_Maw.lua @@ -1,20 +1,18 @@ ----------------------------------- -- Area: Abyssea - Misareaux -- NPC: Cavernous Maw --- !pos 676.070, -16.063, 318.999 216 +-- !pos 676.070 -16.063 318.999 216 -- Teleports Players to Valkrum Dunes ----------------------------------- ---@type TNpcEntity local entity = {} entity.onTrigger = function(player, npc) - player:startEvent(200) + xi.abyssea.exitMawOnTrigger(player, npc) end entity.onEventFinish = function(player, csid, option, npc) - if csid == 200 and option == 1 then - player:setPos(362, 0.001, -119, 4, 103) - end + xi.abyssea.exitMawOnEventFinish(player, csid, option, npc) end return entity diff --git a/scripts/zones/Abyssea-Tahrongi/mobs/Glavoid.lua b/scripts/zones/Abyssea-Tahrongi/mobs/Glavoid.lua new file mode 100644 index 00000000000..a543ff35173 --- /dev/null +++ b/scripts/zones/Abyssea-Tahrongi/mobs/Glavoid.lua @@ -0,0 +1,14 @@ +----------------------------------- +-- Area: Abyssea - Tahrongi +-- NM: Glavoid +----------------------------------- +---@type TMobEntity +local entity = {} + +entity.onMobDeath = function(mob, player, optParams) + if player then + player:addTitle(xi.title.GLAVOID_STAMPEDER) + end +end + +return entity diff --git a/scripts/zones/Abyssea-Tahrongi/npcs/Cavernous_Maw.lua b/scripts/zones/Abyssea-Tahrongi/npcs/Cavernous_Maw.lua index ae91b8913f3..7d29eaf0363 100644 --- a/scripts/zones/Abyssea-Tahrongi/npcs/Cavernous_Maw.lua +++ b/scripts/zones/Abyssea-Tahrongi/npcs/Cavernous_Maw.lua @@ -1,20 +1,18 @@ ----------------------------------- -- Area: Abyssea - Tahrongi -- NPC: Cavernous Maw --- !pos -31.000, 47.000, -681.000 45 +-- !pos -31.000 47.000 -681.000 45 -- Teleports Players to Tahrongi Canyon ----------------------------------- ---@type TNpcEntity local entity = {} entity.onTrigger = function(player, npc) - player:startEvent(200) + xi.abyssea.exitMawOnTrigger(player, npc) end entity.onEventFinish = function(player, csid, option, npc) - if csid == 200 and option == 1 then - player:setPos(-28, 46, -680, 76, 117) - end + xi.abyssea.exitMawOnEventFinish(player, csid, option, npc) end return entity diff --git a/scripts/zones/Abyssea-Uleguerand/mobs/Resheph.lua b/scripts/zones/Abyssea-Uleguerand/mobs/Resheph.lua new file mode 100644 index 00000000000..997a24d76ea --- /dev/null +++ b/scripts/zones/Abyssea-Uleguerand/mobs/Resheph.lua @@ -0,0 +1,14 @@ +----------------------------------- +-- Area: Abyssea - Uleguerand +-- NM: Resheph +----------------------------------- +---@type TMobEntity +local entity = {} + +entity.onMobDeath = function(mob, player, optParams) + if player then + player:addTitle(xi.title.RESHEPH_ERADICATOR) + end +end + +return entity diff --git a/scripts/zones/Abyssea-Uleguerand/npcs/Cavernous_Maw.lua b/scripts/zones/Abyssea-Uleguerand/npcs/Cavernous_Maw.lua index 226450874c9..0787f12b9dc 100644 --- a/scripts/zones/Abyssea-Uleguerand/npcs/Cavernous_Maw.lua +++ b/scripts/zones/Abyssea-Uleguerand/npcs/Cavernous_Maw.lua @@ -1,20 +1,18 @@ ----------------------------------- -- Area: Abyssea - Uleguerand -- NPC: Cavernous Maw --- !pos -246.000, -40.600, -520.000 253 +-- !pos -246.000 -40.600 -520.000 253 -- Notes: Teleports Players to Xarcabard ----------------------------------- ---@type TNpcEntity local entity = {} entity.onTrigger = function(player, npc) - player:startEvent(200) + xi.abyssea.exitMawOnTrigger(player, npc) end entity.onEventFinish = function(player, csid, option, npc) - if csid == 200 and option == 1 then - player:setPos(269, -7, -75, 192, 112) - end + xi.abyssea.exitMawOnEventFinish(player, csid, option, npc) end return entity diff --git a/scripts/zones/Abyssea-Vunkerl/mobs/Sedna.lua b/scripts/zones/Abyssea-Vunkerl/mobs/Sedna.lua new file mode 100644 index 00000000000..e7290ecbccf --- /dev/null +++ b/scripts/zones/Abyssea-Vunkerl/mobs/Sedna.lua @@ -0,0 +1,14 @@ +----------------------------------- +-- Area: Abyssea - Vunkerl +-- NM: Sedna +----------------------------------- +---@type TMobEntity +local entity = {} + +entity.onMobDeath = function(mob, player, optParams) + if player then + player:addTitle(xi.title.SEDNA_TUSKBREAKER) + end +end + +return entity diff --git a/scripts/zones/Abyssea-Vunkerl/npcs/Cavernous_Maw.lua b/scripts/zones/Abyssea-Vunkerl/npcs/Cavernous_Maw.lua index e452b44c402..87be1cb5eee 100644 --- a/scripts/zones/Abyssea-Vunkerl/npcs/Cavernous_Maw.lua +++ b/scripts/zones/Abyssea-Vunkerl/npcs/Cavernous_Maw.lua @@ -8,13 +8,11 @@ local entity = {} entity.onTrigger = function(player, npc) - player:startEvent(200) + xi.abyssea.exitMawOnTrigger(player, npc) end entity.onEventFinish = function(player, csid, option, npc) - if csid == 200 and option == 1 then - player:setPos(241, 0.001, 11, 42, 104) - end + xi.abyssea.exitMawOnEventFinish(player, csid, option, npc) end return entity diff --git a/scripts/zones/Buburimu_Peninsula/npcs/Cavernous_Maw.lua b/scripts/zones/Buburimu_Peninsula/npcs/Cavernous_Maw.lua index 3268dcd889c..4e8e35a1a78 100644 --- a/scripts/zones/Buburimu_Peninsula/npcs/Cavernous_Maw.lua +++ b/scripts/zones/Buburimu_Peninsula/npcs/Cavernous_Maw.lua @@ -1,39 +1,18 @@ ----------------------------------- -- Area: Buburimu Peninsula -- NPC: Cavernous Maw --- !pos -334 -24 52 +-- !pos -344.396 -24.941 52.581 118 -- Teleports Players to Abyssea - Attohwa ----------------------------------- -local ID = zones[xi.zone.BUBURIMU_PENINSULA] ------------------------------------ ---@type TNpcEntity local entity = {} entity.onTrigger = function(player, npc) - if xi.settings.main.ENABLE_ABYSSEA == 1 and player:getMainLvl() >= 30 then - local hasStone = xi.abyssea.getHeldTraverserStones(player) - if - hasStone >= 1 and - player:getQuestStatus(xi.questLog.ABYSSEA, xi.quest.id.abyssea.DAWN_OF_DEATH) == xi.questStatus.QUEST_ACCEPTED and - player:getQuestStatus(xi.questLog.ABYSSEA, xi.quest.id.abyssea.A_FLUTTERY_FIEND) == xi.questStatus.QUEST_AVAILABLE - then - player:startEvent(62) - else - player:startEvent(61, 0, 1) -- No param = no entry. - end - else - player:messageSpecial(ID.text.NOTHING_HAPPENS) - end + xi.abyssea.entranceMawOnTrigger(player, npc) end entity.onEventFinish = function(player, csid, option, npc) - if csid == 62 then - player:addQuest(xi.questLog.ABYSSEA, xi.quest.id.abyssea.A_FLUTTERY_FIEND) - elseif csid == 63 then - -- Killed Itzpapalotl - elseif csid == 61 and option == 1 then - player:setPos(-140, 20, -181, 131, 215) - end + xi.abyssea.entranceMawOnEventFinish(player, csid, option, npc) end return entity diff --git a/scripts/zones/Jugner_Forest/npcs/Cavernous_Maw_2.lua b/scripts/zones/Jugner_Forest/npcs/Cavernous_Maw_2.lua index 551dbc2c23c..1721ccd0af4 100644 --- a/scripts/zones/Jugner_Forest/npcs/Cavernous_Maw_2.lua +++ b/scripts/zones/Jugner_Forest/npcs/Cavernous_Maw_2.lua @@ -4,35 +4,15 @@ -- !pos 246.318 -0.709 5.706 104 -- Teleports Players to Abyssea - Vunkerl ----------------------------------- -local ID = zones[xi.zone.JUGNER_FOREST] ------------------------------------ ---@type TNpcEntity local entity = {} entity.onTrigger = function(player, npc) - if xi.settings.main.ENABLE_ABYSSEA == 1 and player:getMainLvl() >= 30 then - if - xi.abyssea.getHeldTraverserStones(player) >= 1 and - player:getQuestStatus(xi.questLog.ABYSSEA, xi.quest.id.abyssea.DAWN_OF_DEATH) == xi.questStatus.QUEST_ACCEPTED and - player:getQuestStatus(xi.questLog.ABYSSEA, xi.quest.id.abyssea.THE_BEAST_OF_BASTORE) == xi.questStatus.QUEST_AVAILABLE - then - player:startEvent(48) - else - player:startEvent(47, 0, 1) -- No param = no entry. - end - else - player:messageSpecial(ID.text.NOTHING_HAPPENS) - end + xi.abyssea.entranceMawOnTrigger(player, npc) end entity.onEventFinish = function(player, csid, option, npc) - if csid == 48 then - player:addQuest(xi.questLog.ABYSSEA, xi.quest.id.abyssea.THE_BEAST_OF_BASTORE) - elseif csid == 49 then - -- Killed Sedna - elseif csid == 47 and option == 1 then - player:setPos(-351, -46.750, 699.5, 10, 217) - end + xi.abyssea.entranceMawOnEventFinish(player, csid, option, npc) end return entity diff --git a/scripts/zones/Konschtat_Highlands/npcs/Cavernous_Maw.lua b/scripts/zones/Konschtat_Highlands/npcs/Cavernous_Maw.lua index 9c6df5162ff..acbd71abfd8 100644 --- a/scripts/zones/Konschtat_Highlands/npcs/Cavernous_Maw.lua +++ b/scripts/zones/Konschtat_Highlands/npcs/Cavernous_Maw.lua @@ -1,38 +1,18 @@ ----------------------------------- -- Area: Konschtat Highlands -- NPC: Cavernous Maw --- !pos 96.344, -69.080, -580.008 108 +-- !pos 95.344 -69.080 -580.008 108 -- Teleports Players to Abyssea - Konschtat ----------------------------------- -local ID = zones[xi.zone.KONSCHTAT_HIGHLANDS] ------------------------------------ ---@type TNpcEntity local entity = {} entity.onTrigger = function(player, npc) - if xi.settings.main.ENABLE_ABYSSEA == 1 and player:getMainLvl() >= 30 then - if - xi.abyssea.getHeldTraverserStones(player) >= 1 and - player:getQuestStatus(xi.questLog.ABYSSEA, xi.quest.id.abyssea.DAWN_OF_DEATH) == xi.questStatus.QUEST_ACCEPTED and - player:getQuestStatus(xi.questLog.ABYSSEA, xi.quest.id.abyssea.TO_PASTE_A_PEISTE) == xi.questStatus.QUEST_AVAILABLE - then - player:startEvent(0) - elseif xi.abyssea.canEnterAbyssea(player) then - player:startEvent(107, 0, 1) -- No param = no entry. - end - else - player:messageSpecial(ID.text.NOTHING_HAPPENS) - end + xi.abyssea.entranceMawOnTrigger(player, npc) end entity.onEventFinish = function(player, csid, option, npc) - if csid == 0 then - player:addQuest(xi.questLog.ABYSSEA, xi.quest.id.abyssea.TO_PASTE_A_PEISTE) - elseif csid == 1 then - -- Killed Kukulkan - elseif csid == 107 and option == 1 then - player:setPos(153, -72, -840, 140, 15) - end + xi.abyssea.entranceMawOnEventFinish(player, csid, option, npc) end return entity diff --git a/scripts/zones/La_Theine_Plateau/npcs/Cavernous_Maw.lua b/scripts/zones/La_Theine_Plateau/npcs/Cavernous_Maw.lua index 91aa1d88b4f..9d981d434d3 100644 --- a/scripts/zones/La_Theine_Plateau/npcs/Cavernous_Maw.lua +++ b/scripts/zones/La_Theine_Plateau/npcs/Cavernous_Maw.lua @@ -1,39 +1,18 @@ ----------------------------------- -- Area: La Theine Plateau -- NPC: Cavernous Maw --- !pos -557.9 0.001 637.846 102 +-- !pos -557.900 0.001 637.846 102 -- Teleports Players to Abyssea - La Theine ----------------------------------- -local ID = zones[xi.zone.LA_THEINE_PLATEAU] ------------------------------------ ---@type TNpcEntity local entity = {} entity.onTrigger = function(player, npc) - if xi.settings.main.ENABLE_ABYSSEA == 1 and player:getMainLvl() >= 30 then - local hasStone = xi.abyssea.getHeldTraverserStones(player) - if - hasStone >= 1 and - player:getQuestStatus(xi.questLog.ABYSSEA, xi.quest.id.abyssea.DAWN_OF_DEATH) == xi.questStatus.QUEST_ACCEPTED and - player:getQuestStatus(xi.questLog.ABYSSEA, xi.quest.id.abyssea.A_GOLDSTRUCK_GIGAS) == xi.questStatus.QUEST_AVAILABLE - then - player:startEvent(9) - else - player:startEvent(218, 0, 1) -- No param = no entry. - end - else - player:messageSpecial(ID.text.NOTHING_HAPPENS) - end + xi.abyssea.entranceMawOnTrigger(player, npc) end entity.onEventFinish = function(player, csid, option, npc) - if csid == 9 then - player:addQuest(xi.questLog.ABYSSEA, xi.quest.id.abyssea.A_GOLDSTRUCK_GIGAS) - elseif csid == 10 then - -- Killed Briareus - elseif csid == 218 and option == 1 then - player:setPos(-480, 0, 794, 62, 132) - end + xi.abyssea.entranceMawOnEventFinish(player, csid, option, npc) end return entity diff --git a/scripts/zones/North_Gustaberg/npcs/Cavernous_Maw_2.lua b/scripts/zones/North_Gustaberg/npcs/Cavernous_Maw_2.lua index d5497e97a10..403ceb5b8c6 100644 --- a/scripts/zones/North_Gustaberg/npcs/Cavernous_Maw_2.lua +++ b/scripts/zones/North_Gustaberg/npcs/Cavernous_Maw_2.lua @@ -1,38 +1,18 @@ ----------------------------------- -- Area: North Gustaberg -- NPC: Cavernous Maw --- !pos -78 -0.5 600 106 +-- !pos -78.000 -0.500 600.000 106 -- Teleports Players to Abyssea - Grauberg ----------------------------------- -local ID = zones[xi.zone.NORTH_GUSTABERG] ------------------------------------ ---@type TNpcEntity local entity = {} entity.onTrigger = function(player, npc) - if xi.settings.main.ENABLE_ABYSSEA == 1 and player:getMainLvl() >= 30 then - if - xi.abyssea.getHeldTraverserStones(player) >= 1 and - player:getQuestStatus(xi.questLog.ABYSSEA, xi.quest.id.abyssea.DAWN_OF_DEATH) == xi.questStatus.QUEST_ACCEPTED and - player:getQuestStatus(xi.questLog.ABYSSEA, xi.quest.id.abyssea.AN_ULCEROUS_URAGNITE) == xi.questStatus.QUEST_AVAILABLE - then - player:startEvent(0) - else - player:startEvent(908, 0, 1) -- No param = no entry. - end - else - player:messageSpecial(ID.text.NOTHING_HAPPENS) - end + xi.abyssea.entranceMawOnTrigger(player, npc) end entity.onEventFinish = function(player, csid, option, npc) - if csid == 0 then - player:addQuest(xi.questLog.ABYSSEA, xi.quest.id.abyssea.AN_ULCEROUS_URAGNITE) - elseif csid == 1 then - -- Killed Amphitrite - elseif csid == 908 and option == 1 then - player:setPos(-555, 31, -760, 0, 254) - end + xi.abyssea.entranceMawOnEventFinish(player, csid, option, npc) end return entity diff --git a/scripts/zones/South_Gustaberg/npcs/Cavernous_Maw.lua b/scripts/zones/South_Gustaberg/npcs/Cavernous_Maw.lua index 3c0061be700..60913ab40ae 100644 --- a/scripts/zones/South_Gustaberg/npcs/Cavernous_Maw.lua +++ b/scripts/zones/South_Gustaberg/npcs/Cavernous_Maw.lua @@ -1,38 +1,18 @@ ----------------------------------- -- Area: South Gustaberg -- NPC: Cavernous Maw --- !pos 340 -0.5 -680 +-- !pos 340.000 -0.500 -680.000 107 -- Teleports Players to Abyssea - Altepa ----------------------------------- -local ID = zones[xi.zone.SOUTH_GUSTABERG] ------------------------------------ ---@type TNpcEntity local entity = {} entity.onTrigger = function(player, npc) - if xi.settings.main.ENABLE_ABYSSEA == 1 and player:getMainLvl() >= 30 then - if - player:getQuestStatus(xi.questLog.ABYSSEA, xi.quest.id.abyssea.DAWN_OF_DEATH) == xi.questStatus.QUEST_ACCEPTED and - player:getQuestStatus(xi.questLog.ABYSSEA, xi.quest.id.abyssea.A_BEAKED_BLUSTERER) == xi.questStatus.QUEST_AVAILABLE and - xi.abyssea.getHeldTraverserStones(player) >= 1 - then - player:startEvent(0) - else - player:startEvent(914, 0, 1) -- No param = no entry. - end - else - player:messageSpecial(ID.text.NOTHING_HAPPENS) - end + xi.abyssea.entranceMawOnTrigger(player, npc) end entity.onEventFinish = function(player, csid, option, npc) - if csid == 0 then - player:addQuest(xi.questLog.ABYSSEA, xi.quest.id.abyssea.A_BEAKED_BLUSTERER) - elseif csid == 1 then - -- Killed Bennu - elseif csid == 914 and option == 1 then - player:setPos(432, 0, 321, 125, 218) - end + xi.abyssea.entranceMawOnEventFinish(player, csid, option, npc) end return entity diff --git a/scripts/zones/Tahrongi_Canyon/npcs/Cavernous_Maw.lua b/scripts/zones/Tahrongi_Canyon/npcs/Cavernous_Maw.lua index f06c9fe75a7..2f384422df2 100644 --- a/scripts/zones/Tahrongi_Canyon/npcs/Cavernous_Maw.lua +++ b/scripts/zones/Tahrongi_Canyon/npcs/Cavernous_Maw.lua @@ -1,38 +1,18 @@ ----------------------------------- -- Area: Tahrongi Canyon -- NPC: Cavernous Maw --- !pos -28.597, 46.056, -685.754 117 +-- !pos -28.000 46.000 -685.000 117 -- Teleports Players to Abyssea - Tahrongi ----------------------------------- -local ID = zones[xi.zone.TAHRONGI_CANYON] ------------------------------------ ---@type TNpcEntity local entity = {} entity.onTrigger = function(player, npc) - if xi.settings.main.ENABLE_ABYSSEA == 1 and player:getMainLvl() >= 30 then - if - player:getQuestStatus(xi.questLog.ABYSSEA, xi.quest.id.abyssea.DAWN_OF_DEATH) == xi.questStatus.QUEST_ACCEPTED and - player:getQuestStatus(xi.questLog.ABYSSEA, xi.quest.id.abyssea.MEGADRILE_MENACE) == xi.questStatus.QUEST_AVAILABLE and - xi.abyssea.getHeldTraverserStones(player) >= 1 - then - player:startEvent(38) - else - player:startEvent(100, 0, 1) -- No param = no entry. - end - else - player:messageSpecial(ID.text.NOTHING_HAPPENS) - end + xi.abyssea.entranceMawOnTrigger(player, npc) end entity.onEventFinish = function(player, csid, option, npc) - if csid == 38 then - player:addQuest(xi.questLog.ABYSSEA, xi.quest.id.abyssea.MEGADRILE_MENACE) - elseif csid == 39 then - -- Killed Glavoid - elseif csid == 100 and option == 1 then - player:setPos(-24, 44, -678, 240, 45) - end + xi.abyssea.entranceMawOnEventFinish(player, csid, option, npc) end return entity diff --git a/scripts/zones/Valkurm_Dunes/npcs/Cavernous_Maw.lua b/scripts/zones/Valkurm_Dunes/npcs/Cavernous_Maw.lua index c3e1cb705fe..032b9f9ac2f 100644 --- a/scripts/zones/Valkurm_Dunes/npcs/Cavernous_Maw.lua +++ b/scripts/zones/Valkurm_Dunes/npcs/Cavernous_Maw.lua @@ -1,40 +1,18 @@ ----------------------------------- -- Area: Valkurm Dunes -- NPC: Cavernous Maw --- !pos 368.980, -0.443, -119.874 103 +-- !pos 367.980 -0.443 -119.874 103 -- Teleports Players to Abyssea Misareaux ----------------------------------- -local ID = zones[xi.zone.VALKURM_DUNES] ------------------------------------ ---@type TNpcEntity local entity = {} entity.onTrigger = function(player, npc) - if xi.settings.main.ENABLE_ABYSSEA == 1 and player:getMainLvl() >= 30 then - local hasStone = xi.abyssea.getHeldTraverserStones(player) - - if - hasStone >= 1 and - player:getQuestStatus(xi.questLog.ABYSSEA, xi.quest.id.abyssea.DAWN_OF_DEATH) == xi.questStatus.QUEST_ACCEPTED and - player:getQuestStatus(xi.questLog.ABYSSEA, xi.quest.id.abyssea.A_DELECTABLE_DEMON) == xi.questStatus.QUEST_AVAILABLE - then - player:startEvent(56) - else - player:startEvent(55, 0, 1) -- No param = no entry. - end - else - player:messageSpecial(ID.text.NOTHING_HAPPENS) - end + xi.abyssea.entranceMawOnTrigger(player, npc) end entity.onEventFinish = function(player, csid, option, npc) - if csid == 56 then - player:addQuest(xi.questLog.ABYSSEA, xi.quest.id.abyssea.A_DELECTABLE_DEMON) - elseif csid == 57 then - -- Killed Cirein-croin - elseif csid == 55 and option == 1 then - player:setPos(670, -15, 318, 119, 216) - end + xi.abyssea.entranceMawOnEventFinish(player, csid, option, npc) end return entity diff --git a/scripts/zones/Xarcabard/npcs/Cavernous_Maw.lua b/scripts/zones/Xarcabard/npcs/Cavernous_Maw.lua index fdf87d1ad0d..0f55930208a 100644 --- a/scripts/zones/Xarcabard/npcs/Cavernous_Maw.lua +++ b/scripts/zones/Xarcabard/npcs/Cavernous_Maw.lua @@ -1,39 +1,18 @@ ----------------------------------- -- Area: Xarcabard -- NPC: Cavernous Maw --- !pos 270 -9 -70 +-- !pos 270.000 -9.000 -70.000 112 -- Teleports Players to Abyssea - Uleguerand ----------------------------------- -local ID = zones[xi.zone.XARCABARD] ------------------------------------ ---@type TNpcEntity local entity = {} entity.onTrigger = function(player, npc) - if xi.settings.main.ENABLE_ABYSSEA == 1 and player:getMainLvl() >= 30 then - local hasStone = xi.abyssea.getHeldTraverserStones(player) - if - hasStone >= 1 and - player:getQuestStatus(xi.questLog.ABYSSEA, xi.quest.id.abyssea.DAWN_OF_DEATH) == xi.questStatus.QUEST_ACCEPTED and - player:getQuestStatus(xi.questLog.ABYSSEA, xi.quest.id.abyssea.A_MAN_EATING_MITE) == xi.questStatus.QUEST_AVAILABLE - then - player:startEvent(58) - else - player:startEvent(204, 0, 1) -- No param = no entry. - end - else - player:messageSpecial(ID.text.NOTHING_HAPPENS) - end + xi.abyssea.entranceMawOnTrigger(player, npc) end entity.onEventFinish = function(player, csid, option, npc) - if csid == 58 then - player:addQuest(xi.questLog.ABYSSEA, xi.quest.id.abyssea.A_MAN_EATING_MITE) - elseif csid == 59 then - -- Killed Resheph - elseif csid == 204 and option == 1 then - player:setPos(-240, -40, -520, 251, 253) - end + xi.abyssea.entranceMawOnEventFinish(player, csid, option, npc) end return entity