From 0f7611817b54392d599e81690656c6ca30faf21d Mon Sep 17 00:00:00 2001 From: claywar Date: Sun, 12 May 2024 15:29:21 -0400 Subject: [PATCH 1/5] Interaction - Battlefield: Through the Quicksand Caves Change entry NPC name to SC_Entrance --- .../through_the_quicksand_caves.lua | 55 +++++++++++++++++++ scripts/globals/battlefield.lua | 2 +- scripts/globals/bcnm.lua | 8 --- .../rotz/06_Through_the_Quicksand_Caves.lua | 2 +- scripts/zones/Chamber_of_Oracles/IDs.lua | 1 + .../bcnms/through_the_quicksand_caves.lua | 39 ------------- sql/npc_list.sql | 2 +- 7 files changed, 59 insertions(+), 50 deletions(-) create mode 100644 scripts/battlefields/Chamber_of_Oracles/through_the_quicksand_caves.lua delete mode 100644 scripts/zones/Chamber_of_Oracles/bcnms/through_the_quicksand_caves.lua diff --git a/scripts/battlefields/Chamber_of_Oracles/through_the_quicksand_caves.lua b/scripts/battlefields/Chamber_of_Oracles/through_the_quicksand_caves.lua new file mode 100644 index 00000000000..cde7ff2d9d0 --- /dev/null +++ b/scripts/battlefields/Chamber_of_Oracles/through_the_quicksand_caves.lua @@ -0,0 +1,55 @@ +----------------------------------- +-- Area: Chamber of Oracles +-- Name: Zilart Mission 6 +-- !pos -221 -24 19 206 +----------------------------------- +local chamberOfOraclesID = zones[xi.zone.CHAMBER_OF_ORACLES] +----------------------------------- + +local content = BattlefieldMission:new({ + zoneId = xi.zone.CHAMBER_OF_ORACLES, + battlefieldId = xi.battlefield.id.THROUGH_THE_QUICKSAND_CAVES, + isMission = true, + maxPlayers = 6, + levelCap = 75, + timeLimit = utils.minutes(30), + index = 0, + entryNpc = 'SC_Entrance', + exitNpc = 'Shimmering_Circle' + missionArea = xi.mission.log_id.ZILART, + mission = xi.mission.id.zilart.THROUGH_THE_QUICKSAND_CAVES, + missionStatusArea = xi.mission.log_id.ZILART, + requiredMissionStatus = 0, +}) + +content.groups = +{ + { + mobIds = + { + { + chamberOfOraclesID.mob.CENTURIO_V_III, + chamberOfOraclesID.mob.CENTURIO_V_III + 1, + chamberOfOraclesID.mob.CENTURIO_V_III + 2, + }, + + { + chamberOfOraclesID.mob.CENTURIO_V_III + 3, + chamberOfOraclesID.mob.CENTURIO_V_III + 4, + chamberOfOraclesID.mob.CENTURIO_V_III + 5, + }, + + { + chamberOfOraclesID.mob.CENTURIO_V_III + 6, + chamberOfOraclesID.mob.CENTURIO_V_III + 7, + chamberOfOraclesID.mob.CENTURIO_V_III + 8, + }, + }, + + allDeath = function(battlefield, mob) + battlefield:setStatus(xi.battlefield.status.WON) + end, + }, +} + +return content:register() diff --git a/scripts/globals/battlefield.lua b/scripts/globals/battlefield.lua index 70433f5ffea..2503d12a57c 100644 --- a/scripts/globals/battlefield.lua +++ b/scripts/globals/battlefield.lua @@ -154,7 +154,7 @@ xi.battlefield.id = KINDRED_SPIRITS = 162, SURVIVAL_OF_THE_WISEST = 163, SMASH_A_MALEVOLENT_MENACE = 164, - THROUGH_THE_QUICKSAND_CAVES = 192, + THROUGH_THE_QUICKSAND_CAVES = 192, -- Converted LEGION_XI_COMITATENSIS = 193, SHATTERING_STARS_SAM = 194, SHATTERING_STARS_NIN = 195, diff --git a/scripts/globals/bcnm.lua b/scripts/globals/bcnm.lua index 7559bc7eaaa..9d21f0824e9 100644 --- a/scripts/globals/bcnm.lua +++ b/scripts/globals/bcnm.lua @@ -567,10 +567,6 @@ local function checkReqs(player, npc, bfid, registrant) return mainJob == xi.job.SCH and mainLevel >= 66 end, - [192] = function() -- ZM6: Through the Quicksand Caves - return zilartMission == xi.mission.id.zilart.THROUGH_THE_QUICKSAND_CAVES - end, - [194] = function() -- Quest: Shattering Stars (SAM LB5) return mainJob == xi.job.SAM and mainLevel >= 66 end, @@ -1160,10 +1156,6 @@ local function checkSkip(player, bfid) ) end, - [192] = function() -- ZM6: Through the Quicksand Caves - return player:hasCompletedMission(xi.mission.log_id.ZILART, xi.mission.id.zilart.THROUGH_THE_QUICKSAND_CAVES) - end, - [224] = function() -- Quest: The Moonlit Path return player:hasCompletedQuest(xi.questLog.WINDURST, xi.quest.id.windurst.THE_MOONLIT_PATH) or player:hasKeyItem(xi.ki.WHISPER_OF_THE_MOON) diff --git a/scripts/missions/rotz/06_Through_the_Quicksand_Caves.lua b/scripts/missions/rotz/06_Through_the_Quicksand_Caves.lua index 8e62ca6383d..186123a0fcf 100644 --- a/scripts/missions/rotz/06_Through_the_Quicksand_Caves.lua +++ b/scripts/missions/rotz/06_Through_the_Quicksand_Caves.lua @@ -30,7 +30,7 @@ mission.sections = onEventFinish = { [32001] = function(player, csid, option, npc) - if player:getLocalVar('battlefieldWin') == 192 then + if player:getLocalVar('battlefieldWin') == xi.battlefield.id.THROUGH_THE_QUICKSAND_CAVES then mission:complete(player) end end, diff --git a/scripts/zones/Chamber_of_Oracles/IDs.lua b/scripts/zones/Chamber_of_Oracles/IDs.lua index 4bde78e197d..7f16d1abb1a 100644 --- a/scripts/zones/Chamber_of_Oracles/IDs.lua +++ b/scripts/zones/Chamber_of_Oracles/IDs.lua @@ -45,6 +45,7 @@ zones[xi.zone.CHAMBER_OF_ORACLES] = }, mob = { + CENTURIO_V_III = GetFirstID('Centurio_V-III'), }, npc = { diff --git a/scripts/zones/Chamber_of_Oracles/bcnms/through_the_quicksand_caves.lua b/scripts/zones/Chamber_of_Oracles/bcnms/through_the_quicksand_caves.lua deleted file mode 100644 index 0b8d3019b89..00000000000 --- a/scripts/zones/Chamber_of_Oracles/bcnms/through_the_quicksand_caves.lua +++ /dev/null @@ -1,39 +0,0 @@ ------------------------------------ --- Area: Chamber of Oracles --- Name: Zilart Mission 6 --- !pos -221 -24 19 206 ------------------------------------ -local battlefieldObject = {} - -battlefieldObject.onBattlefieldTick = function(battlefield, tick) - xi.battlefield.onBattlefieldTick(battlefield, tick) -end - -battlefieldObject.onBattlefieldRegister = function(player, battlefield) -end - -battlefieldObject.onBattlefieldEnter = function(player, battlefield) -end - -battlefieldObject.onBattlefieldLeave = function(player, battlefield, leavecode) - if leavecode == xi.battlefield.leaveCode.WON then - local _, clearTime, partySize = battlefield:getRecord() - - if player:getCurrentMission(xi.mission.log_id.ZILART) == xi.mission.id.zilart.THROUGH_THE_QUICKSAND_CAVES then - player:setLocalVar('battlefieldWin', battlefield:getID()) - end - - local arg8 = (player:getCurrentMission(xi.mission.log_id.ZILART) ~= xi.mission.id.zilart.THROUGH_THE_QUICKSAND_CAVES) and 1 or 0 - player:startEvent(32001, battlefield:getArea(), clearTime, partySize, battlefield:getTimeInside(), 1, battlefield:getLocalVar('[cs]bit'), arg8) - elseif leavecode == xi.battlefield.leaveCode.LOST then - player:startEvent(32002) - end -end - -battlefieldObject.onEventUpdate = function(player, csid, option, npc) -end - -battlefieldObject.onEventFinish = function(player, csid, option, npc) -end - -return battlefieldObject diff --git a/sql/npc_list.sql b/sql/npc_list.sql index 58d346d10da..d9102fa271b 100644 --- a/sql/npc_list.sql +++ b/sql/npc_list.sql @@ -20567,7 +20567,7 @@ INSERT INTO `npc_list` VALUES (17465516,'Achieve_Master','Achieve Master',0,0.00 INSERT INTO `npc_list` VALUES (17465518,'Unity_Master','Unity Master',0,0.000,0.000,0.000,0,50,50,0,0,96,2,2051,0x0000340000000000000000000000000000000000,0,'SOA',0); INSERT INTO `npc_list` VALUES (17465523,'blank','',0,0.000,0.000,0.000,0,40,40,0,0,0,2,2051,0x0000320000000000000000000000000000000000,0,NULL,1); -INSERT INTO `npc_list` VALUES (17465524,'Shimmering_Circle','Shimmering Circle',63,-220.147,-1.882,22.995,1,40,40,0,0,0,0,3,0x0000340000000000000000000000000000000000,0,NULL,1); +INSERT INTO `npc_list` VALUES (17465524,'SC_Entrance','Shimmering Circle',63,-220.147,-1.882,22.995,1,40,40,0,0,0,0,3,0x0000340000000000000000000000000000000000,0,NULL,1); INSERT INTO `npc_list` VALUES (17465525,'Shimmering_Circle','Shimmering Circle',192,-0.039,97.124,-306.483,1,40,40,0,0,0,0,3,0x0000340000000000000000000000000000000000,0,NULL,1); INSERT INTO `npc_list` VALUES (17465526,'Shimmering_Circle','Shimmering Circle',193,-0.014,-2.874,-66.402,1,40,40,0,0,0,0,3,0x0000340000000000000000000000000000000000,0,NULL,1); INSERT INTO `npc_list` VALUES (17465527,'Shimmering_Circle','Shimmering Circle',191,0.016,-102.874,173.852,1,40,40,0,0,0,0,3,0x0000340000000000000000000000000000000000,0,NULL,1); From e1b22770cf1722e893ef74c465ab322d7d7b35b3 Mon Sep 17 00:00:00 2001 From: claywar Date: Sun, 12 May 2024 16:00:25 -0400 Subject: [PATCH 2/5] Interaction - Battlefield: Legion XI Comitatensis --- .../legion_xi_comitatensis.lua | 123 ++++++++++++++++++ scripts/globals/battlefield.lua | 2 +- scripts/zones/Chamber_of_Oracles/IDs.lua | 3 +- .../bcnms/legion_xi_comitatensis.lua | 37 ------ .../Chamber_of_Oracles/npcs/Armoury_Crate.lua | 66 ---------- 5 files changed, 126 insertions(+), 105 deletions(-) create mode 100644 scripts/battlefields/Chamber_of_Oracles/legion_xi_comitatensis.lua delete mode 100644 scripts/zones/Chamber_of_Oracles/bcnms/legion_xi_comitatensis.lua diff --git a/scripts/battlefields/Chamber_of_Oracles/legion_xi_comitatensis.lua b/scripts/battlefields/Chamber_of_Oracles/legion_xi_comitatensis.lua new file mode 100644 index 00000000000..454f74269d5 --- /dev/null +++ b/scripts/battlefields/Chamber_of_Oracles/legion_xi_comitatensis.lua @@ -0,0 +1,123 @@ +----------------------------------- +-- Legion XI Comitatensis +-- Chamber of Oracles BCNM60, Moon Orb +-- !additem 1130 +----------------------------------- +local chamberOfOraclesID = zones[xi.zone.CHAMBER_OF_ORACLES] +----------------------------------- + +local content = Battlefield:new({ + zoneId = xi.zone.CHAMBER_OF_ORACLES, + battlefieldId = xi.battlefield.id.LEGION_XI_COMITATENSIS, + maxPlayers = 6, + levelCap = 60, + timeLimit = utils.minutes(30), + index = 1, + entryNpc = 'SC_Entrance', + exitNpc = 'Shimmering_Circle' + requiredItems = { xi.item.MOON_ORB, wearMessage = chamberOfOraclesID.text.A_CRACK_HAS_FORMED, wornMessage = chamberOfOraclesID.text.ORB_IS_CRACKED }, + armouryCrates = + { + chamberOfOraclesID.mob.SECUTOR_XI_XXXII + 4, + chamberOfOraclesID.mob.SECUTOR_XI_XXXII + 9, + chamberOfOraclesID.mob.SECUTOR_XI_XXXII + 14, + }, +}) + +content.groups = +{ + { + mobIds = + { + { + chamberOfOraclesID.mob.SECUTOR_XI_XXXII, + chamberOfOraclesID.mob.SECUTOR_XI_XXXII + 1, + chamberOfOraclesID.mob.SECUTOR_XI_XXXII + 2, + chamberOfOraclesID.mob.SECUTOR_XI_XXXII + 3, + }, + + { + chamberOfOraclesID.mob.SECUTOR_XI_XXXII + 5, + chamberOfOraclesID.mob.SECUTOR_XI_XXXII + 6, + chamberOfOraclesID.mob.SECUTOR_XI_XXXII + 7, + chamberOfOraclesID.mob.SECUTOR_XI_XXXII + 8, + }, + + { + chamberOfOraclesID.mob.SECUTOR_XI_XXXII + 10, + chamberOfOraclesID.mob.SECUTOR_XI_XXXII + 11, + chamberOfOraclesID.mob.SECUTOR_XI_XXXII + 12, + chamberOfOraclesID.mob.SECUTOR_XI_XXXII + 13, + }, + }, + + allDeath = utils.bind(content.handleAllMonstersDefeated, content), + }, +} + +content.loot = +{ + { + { item = xi.item.NONE, weight = 100 }, -- nothing + { item = xi.item.EVASION_TORQUE, weight = 150 }, -- evasion_torque + { item = xi.item.PARRYING_TORQUE, weight = 150 }, -- parrying_torque + { item = xi.item.GUARDING_TORQUE, weight = 150 }, -- guarding_torque + { item = xi.item.NINJUTSU_TORQUE, weight = 150 }, -- ninjutsu_torque + { item = xi.item.WIND_TORQUE, weight = 150 }, -- wind_torque + { item = xi.item.SUMMONING_TORQUE, weight = 150 }, -- summoning_torque + }, + + { + { item = xi.item.NONE, weight = 100 }, -- nothing + { item = xi.item.DIVINE_TORQUE, weight = 150 }, -- divine_torque + { item = xi.item.DARK_TORQUE, weight = 150 }, -- dark_torque + { item = xi.item.ENHANCING_TORQUE, weight = 150 }, -- enhancing_torque + { item = xi.item.ENFEEBLING_TORQUE, weight = 150 }, -- enfeebling_torque + { item = xi.item.ELEMENTAL_TORQUE, weight = 150 }, -- elemental_torque + { item = xi.item.HEALING_TORQUE, weight = 150 }, -- healing_torque + }, + + { + { item = xi.item.SUNSTONE, weight = 100 }, -- sunstone + { item = xi.item.CHUNK_OF_GOLD_ORE, weight = 100 }, -- chunk_of_gold_ore + { item = xi.item.JADEITE, weight = 100 }, -- jadeite + { item = xi.item.FLUORITE, weight = 100 }, -- fluorite + { item = xi.item.DARKSTEEL_INGOT, weight = 100 }, -- darksteel_ingot + { item = xi.item.ZIRCON, weight = 100 }, -- zircon + { item = xi.item.CHRYSOBERYL, weight = 100 }, -- chrysoberyl + { item = xi.item.MOONSTONE, weight = 100 }, -- moonstone + { item = xi.item.PAINITE, weight = 100 }, -- painite + { item = xi.item.STEEL_INGOT, weight = 100 }, -- steel_ingot + }, + + { + { item = xi.item.NONE, weight = 500 }, -- nothing + { item = xi.item.SCROLL_OF_RAISE_II, weight = 500 }, -- scroll_of_raise_ii + }, + + { + { item = xi.item.NONE, weight = 950 }, -- nothing + { item = xi.item.VILE_ELIXIR_P1, weight = 50 }, -- vile_elixir_+1 + }, + + { + { item = xi.item.YELLOW_ROCK, weight = 50 }, -- yellow_rock + { item = xi.item.WHITE_ROCK, weight = 50 }, -- white_rock + { item = xi.item.EBONY_LOG, weight = 125 }, -- ebony_log + { item = xi.item.PLATINUM_BEASTCOIN, weight = 775 }, -- platinum_beastcoin + }, + + { + { item = xi.item.NONE, weight = 600 }, -- nothing + { item = xi.item.CHUNK_OF_WATER_ORE, weight = 50 }, -- chunk_of_water_ore + { item = xi.item.CHUNK_OF_ICE_ORE, weight = 50 }, -- chunk_of_ice_ore + { item = xi.item.CHUNK_OF_LIGHTNING_ORE, weight = 50 }, -- chunk_of_lightning_ore + { item = xi.item.CHUNK_OF_EARTH_ORE, weight = 50 }, -- chunk_of_earth_ore + { item = xi.item.CHUNK_OF_FIRE_ORE, weight = 50 }, -- chunk_of_fire_ore + { item = xi.item.CHUNK_OF_LIGHT_ORE, weight = 50 }, -- chunk_of_light_ore + { item = xi.item.CHUNK_OF_DARK_ORE, weight = 50 }, -- chunk_of_dark_ore + { item = xi.item.CHUNK_OF_WIND_ORE, weight = 50 }, -- chunk_of_wind_ore + }, +} + +return content:register() diff --git a/scripts/globals/battlefield.lua b/scripts/globals/battlefield.lua index 2503d12a57c..45e3695e2d6 100644 --- a/scripts/globals/battlefield.lua +++ b/scripts/globals/battlefield.lua @@ -155,7 +155,7 @@ xi.battlefield.id = SURVIVAL_OF_THE_WISEST = 163, SMASH_A_MALEVOLENT_MENACE = 164, THROUGH_THE_QUICKSAND_CAVES = 192, -- Converted - LEGION_XI_COMITATENSIS = 193, + LEGION_XI_COMITATENSIS = 193, -- Converted SHATTERING_STARS_SAM = 194, SHATTERING_STARS_NIN = 195, SHATTERING_STARS_DRG = 196, diff --git a/scripts/zones/Chamber_of_Oracles/IDs.lua b/scripts/zones/Chamber_of_Oracles/IDs.lua index 7f16d1abb1a..7abcd91a9bb 100644 --- a/scripts/zones/Chamber_of_Oracles/IDs.lua +++ b/scripts/zones/Chamber_of_Oracles/IDs.lua @@ -45,7 +45,8 @@ zones[xi.zone.CHAMBER_OF_ORACLES] = }, mob = { - CENTURIO_V_III = GetFirstID('Centurio_V-III'), + CENTURIO_V_III = GetFirstID('Centurio_V-III'), + SECUTOR_XI_XXXII = GetFirstID('Secutor_XI-XXXII'), }, npc = { diff --git a/scripts/zones/Chamber_of_Oracles/bcnms/legion_xi_comitatensis.lua b/scripts/zones/Chamber_of_Oracles/bcnms/legion_xi_comitatensis.lua deleted file mode 100644 index 132d9c32f6a..00000000000 --- a/scripts/zones/Chamber_of_Oracles/bcnms/legion_xi_comitatensis.lua +++ /dev/null @@ -1,37 +0,0 @@ ------------------------------------ --- Legion XI Comitatensis --- Chamber of Oracles BCNM60, Moon Orb --- !additem 1130 ------------------------------------ -local battlefieldObject = {} - -battlefieldObject.onBattlefieldInitialise = function(battlefield) - battlefield:setLocalVar('loot', 1) -end - -battlefieldObject.onBattlefieldTick = function(battlefield, tick) - xi.battlefield.onBattlefieldTick(battlefield, tick) -end - -battlefieldObject.onBattlefieldRegister = function(player, battlefield) -end - -battlefieldObject.onBattlefieldEnter = function(player, battlefield) -end - -battlefieldObject.onBattlefieldLeave = function(player, battlefield, leavecode) - if leavecode == xi.battlefield.leaveCode.WON then - local _, clearTime, partySize = battlefield:getRecord() - player:startEvent(32001, battlefield:getArea(), clearTime, partySize, battlefield:getTimeInside(), 1, battlefield:getLocalVar('[cs]bit'), 0) - elseif leavecode == xi.battlefield.leaveCode.LOST then - player:startEvent(32002) - end -end - -battlefieldObject.onEventUpdate = function(player, csid, option, npc) -end - -battlefieldObject.onEventFinish = function(player, csid, option, npc) -end - -return battlefieldObject diff --git a/scripts/zones/Chamber_of_Oracles/npcs/Armoury_Crate.lua b/scripts/zones/Chamber_of_Oracles/npcs/Armoury_Crate.lua index 6d5e5c60b3b..f73de846652 100644 --- a/scripts/zones/Chamber_of_Oracles/npcs/Armoury_Crate.lua +++ b/scripts/zones/Chamber_of_Oracles/npcs/Armoury_Crate.lua @@ -6,72 +6,6 @@ local entity = {} local loot = { - -- BCNM Legion XI Comitatensis - [193] = - { - { - { itemid = xi.item.NONE, droprate = 100 }, -- nothing - { itemid = xi.item.EVASION_TORQUE, droprate = 150 }, -- evasion_torque - { itemid = xi.item.PARRYING_TORQUE, droprate = 150 }, -- parrying_torque - { itemid = xi.item.GUARDING_TORQUE, droprate = 150 }, -- guarding_torque - { itemid = xi.item.NINJUTSU_TORQUE, droprate = 150 }, -- ninjutsu_torque - { itemid = xi.item.WIND_TORQUE, droprate = 150 }, -- wind_torque - { itemid = xi.item.SUMMONING_TORQUE, droprate = 150 }, -- summoning_torque - }, - - { - { itemid = xi.item.NONE, droprate = 100 }, -- nothing - { itemid = xi.item.DIVINE_TORQUE, droprate = 150 }, -- divine_torque - { itemid = xi.item.DARK_TORQUE, droprate = 150 }, -- dark_torque - { itemid = xi.item.ENHANCING_TORQUE, droprate = 150 }, -- enhancing_torque - { itemid = xi.item.ENFEEBLING_TORQUE, droprate = 150 }, -- enfeebling_torque - { itemid = xi.item.ELEMENTAL_TORQUE, droprate = 150 }, -- elemental_torque - { itemid = xi.item.HEALING_TORQUE, droprate = 150 }, -- healing_torque - }, - - { - { itemid = xi.item.SUNSTONE, droprate = 100 }, -- sunstone - { itemid = xi.item.CHUNK_OF_GOLD_ORE, droprate = 100 }, -- chunk_of_gold_ore - { itemid = xi.item.JADEITE, droprate = 100 }, -- jadeite - { itemid = xi.item.FLUORITE, droprate = 100 }, -- fluorite - { itemid = xi.item.DARKSTEEL_INGOT, droprate = 100 }, -- darksteel_ingot - { itemid = xi.item.ZIRCON, droprate = 100 }, -- zircon - { itemid = xi.item.CHRYSOBERYL, droprate = 100 }, -- chrysoberyl - { itemid = xi.item.MOONSTONE, droprate = 100 }, -- moonstone - { itemid = xi.item.PAINITE, droprate = 100 }, -- painite - { itemid = xi.item.STEEL_INGOT, droprate = 100 }, -- steel_ingot - }, - - { - { itemid = xi.item.NONE, droprate = 500 }, -- nothing - { itemid = xi.item.SCROLL_OF_RAISE_II, droprate = 500 }, -- scroll_of_raise_ii - }, - - { - { itemid = xi.item.NONE, droprate = 950 }, -- nothing - { itemid = xi.item.VILE_ELIXIR_P1, droprate = 50 }, -- vile_elixir_+1 - }, - - { - { itemid = xi.item.YELLOW_ROCK, droprate = 50 }, -- yellow_rock - { itemid = xi.item.WHITE_ROCK, droprate = 50 }, -- white_rock - { itemid = xi.item.EBONY_LOG, droprate = 125 }, -- ebony_log - { itemid = xi.item.PLATINUM_BEASTCOIN, droprate = 775 }, -- platinum_beastcoin - }, - - { - { itemid = xi.item.NONE, droprate = 600 }, -- nothing - { itemid = xi.item.CHUNK_OF_WATER_ORE, droprate = 50 }, -- chunk_of_water_ore - { itemid = xi.item.CHUNK_OF_ICE_ORE, droprate = 50 }, -- chunk_of_ice_ore - { itemid = xi.item.CHUNK_OF_LIGHTNING_ORE, droprate = 50 }, -- chunk_of_lightning_ore - { itemid = xi.item.CHUNK_OF_EARTH_ORE, droprate = 50 }, -- chunk_of_earth_ore - { itemid = xi.item.CHUNK_OF_FIRE_ORE, droprate = 50 }, -- chunk_of_fire_ore - { itemid = xi.item.CHUNK_OF_LIGHT_ORE, droprate = 50 }, -- chunk_of_light_ore - { itemid = xi.item.CHUNK_OF_DARK_ORE, droprate = 50 }, -- chunk_of_dark_ore - { itemid = xi.item.CHUNK_OF_WIND_ORE, droprate = 50 }, -- chunk_of_wind_ore - }, - }, - -- KSNM Eye of the Storm [198] = { From 6c913f65721771c9a4b116c3a9819da7615aef7a Mon Sep 17 00:00:00 2001 From: claywar Date: Sun, 12 May 2024 16:07:00 -0400 Subject: [PATCH 3/5] Interaction - Battlefield: Eye of the Storm --- .../Chamber_of_Oracles/eye_of_the_storm.lua | 97 +++++++++++++++++++ scripts/globals/battlefield.lua | 2 +- .../bcnms/eye_of_the_storm.lua | 37 ------- .../Chamber_of_Oracles/npcs/Armoury_Crate.lua | 84 ---------------- .../npcs/Shimmering_Circle.lua | 6 +- 5 files changed, 99 insertions(+), 127 deletions(-) create mode 100644 scripts/battlefields/Chamber_of_Oracles/eye_of_the_storm.lua delete mode 100644 scripts/zones/Chamber_of_Oracles/bcnms/eye_of_the_storm.lua diff --git a/scripts/battlefields/Chamber_of_Oracles/eye_of_the_storm.lua b/scripts/battlefields/Chamber_of_Oracles/eye_of_the_storm.lua new file mode 100644 index 00000000000..d193e438593 --- /dev/null +++ b/scripts/battlefields/Chamber_of_Oracles/eye_of_the_storm.lua @@ -0,0 +1,97 @@ +----------------------------------- +-- Eye of the Storm +-- Chamber of Oracles KSNM30, Lachesis Orb +-- !additem 1178 +----------------------------------- +local chamberOfOraclesID = zones[xi.zone.CHAMBER_OF_ORACLES] +----------------------------------- + +local content = Battlefield:new({ + zoneId = xi.zone.CHAMBER_OF_ORACLES, + battlefieldId = xi.battlefield.id.EYE_OF_THE_STORM, + maxPlayers = 6, + timeLimit = utils.minutes(30), + index = 6, + entryNpc = 'SC_Entrance', + exitNpc = 'Shimmering_Circle' + requiredItems = { xi.item.LACHESIS_ORB, wearMessage = chamberOfOraclesID.text.A_CRACK_HAS_FORMED, wornMessage = chamberOfOraclesID.text.ORB_IS_CRACKED }, +}) + +content:addEssentialMobs({ 'Radiant_Wyvern', 'Blizzard_Wyvern', 'Lightning_Wyvern', 'Chaos_Wyvern' }) + +content.loot = +{ + { + { item = xi.item.WYVERN_WING, weight = 1000 }, -- Wyvern Wing + }, + + { + { item = xi.item.WYVERN_SKIN, weight = 1000 }, -- Wyvern Skin + }, + + { + { item = xi.item.GIL, weight = 1000, amount = 24000 }, -- gil + + }, + + { + { item = xi.item.SQUARE_OF_DAMASCENE_CLOTH, weight = 216 }, -- Damascene Cloth + { item = xi.item.DAMASCUS_INGOT, weight = 295 }, -- Damascus Ingot + { item = xi.item.WOODVILLES_AXE, weight = 239 }, -- Woodville's Axe + { item = xi.item.THANATOS_BASELARD, weight = 231 }, -- Thanatos Baselard + { item = xi.item.WYVERN_PERCH, weight = 231 }, -- Wyvern Perch + { item = xi.item.BALINS_SWORD, weight = 231 }, -- Balin's Sword + { item = xi.item.VIAL_OF_BLACK_BEETLE_BLOOD, weight = 231 }, -- Beetle Blood + }, + + { + { item = xi.item.BOURDONASSE, weight = 104 }, -- Bourdonasse + { item = xi.item.VILE_ELIXIR_P1, weight = 86 }, -- Vile Elixir +1 + { item = xi.item.VILE_ELIXIR, weight = 22 }, -- Vile Elixir + { item = xi.item.POLE_GRIP, weight = 146 }, -- Pole Grip + { item = xi.item.SWORD_STRAP, weight = 240 }, -- Sword Strap + }, + + { + { item = xi.item.ZISKAS_CROSSBOW, weight = 287 }, -- Ziska's Crossbow + { item = xi.item.UNJI, weight = 216 }, -- Unji + { item = xi.item.TAILLEFERS_DAGGER, weight = 198 }, -- Taillifer's Dagger + { item = xi.item.SCHILTRON_SPEAR, weight = 287 }, -- Schiltron Spear + { item = xi.item.SCROLL_OF_THUNDER_III, weight = 287 }, -- Thunder III + }, + + { + { item = xi.item.CORAL_FRAGMENT, weight = 52 }, -- Coral Fragment + { item = xi.item.CHUNK_OF_DARKSTEEL_ORE, weight = 56 }, -- Chunk Of Darksteel Ore + { item = xi.item.DEMON_HORN, weight = 41 }, -- Demon Horn + { item = xi.item.EBONY_LOG, weight = 63 }, -- Ebony Log + { item = xi.item.CHUNK_OF_GOLD_ORE, weight = 52 }, -- Chunk Of Gold Ore + { item = xi.item.SPOOL_OF_GOLD_THREAD, weight = 26 }, -- Spool Of Gold Thread + { item = xi.item.SLAB_OF_GRANITE, weight = 11 }, -- Slab Of Granite + { item = xi.item.HI_RERAISER, weight = 37 }, -- Hi-reraiser + { item = xi.item.MAHOGANY_LOG, weight = 101 }, -- Mahogany Log + { item = xi.item.MYTHRIL_INGOT, weight = 30 }, -- Mythril Ingot + { item = xi.item.CHUNK_OF_MYTHRIL_ORE, weight = 52 }, -- Chunk Of Mythril Ore + { item = xi.item.PETRIFIED_LOG, weight = 116 }, -- Petrified Log + { item = xi.item.PHOENIX_FEATHER, weight = 15 }, -- Phoenix Feather + { item = xi.item.PHILOSOPHERS_STONE, weight = 56 }, -- Philosophers Stone + { item = xi.item.CHUNK_OF_PLATINUM_ORE, weight = 45 }, -- Chunk Of Platinum Ore + { item = xi.item.SQUARE_OF_RAINBOW_CLOTH, weight = 22 }, -- Square Of Rainbow Cloth + { item = xi.item.RAM_HORN, weight = 67 }, -- Ram Horn + { item = xi.item.SQUARE_OF_RAXA, weight = 119 }, -- Square Of Raxa + { item = xi.item.RERAISER, weight = 45 }, -- Reraiser + { item = xi.item.NONE, weight = 400 }, -- Nothing + }, + + { + { item = xi.item.SQUARE_OF_DAMASCENE_CLOTH, weight = 56 }, -- Square Of Damascene Cloth + { item = xi.item.DAMASCUS_INGOT, weight = 93 }, -- Damascus Ingot + { item = xi.item.SPOOL_OF_MALBORO_FIBER, weight = 56 }, -- Spool Of Malboro Fiber + { item = xi.item.PHILOSOPHERS_STONE, weight = 157 }, -- Philosophers Stone + { item = xi.item.PHOENIX_FEATHER, weight = 176 }, -- Phoenix Feather + { item = xi.item.SQUARE_OF_RAXA, weight = 109 }, -- Square Of Raxa + { item = xi.item.NONE, weight = 500 }, -- Nothing + } +} + +return content:register() diff --git a/scripts/globals/battlefield.lua b/scripts/globals/battlefield.lua index 45e3695e2d6..4303f63b58a 100644 --- a/scripts/globals/battlefield.lua +++ b/scripts/globals/battlefield.lua @@ -160,7 +160,7 @@ xi.battlefield.id = SHATTERING_STARS_NIN = 195, SHATTERING_STARS_DRG = 196, CACTUAR_SUAVE = 197, - EYE_OF_THE_STORM = 198, + EYE_OF_THE_STORM = 198, -- Converted SCARLET_KING = 199, CAT_BURGLAR_BARES_FANGS = 200, DRAGON_SCALES = 201, diff --git a/scripts/zones/Chamber_of_Oracles/bcnms/eye_of_the_storm.lua b/scripts/zones/Chamber_of_Oracles/bcnms/eye_of_the_storm.lua deleted file mode 100644 index 2483f6fd20c..00000000000 --- a/scripts/zones/Chamber_of_Oracles/bcnms/eye_of_the_storm.lua +++ /dev/null @@ -1,37 +0,0 @@ ------------------------------------ --- Eye of the Storm --- Chamber of Oracles KSNM30, Lachesis Orb --- !additem 1178 ------------------------------------ -local battlefieldObject = {} - -battlefieldObject.onBattlefieldInitialise = function(battlefield) - battlefield:setLocalVar('loot', 1) -end - -battlefieldObject.onBattlefieldTick = function(battlefield, tick) - xi.battlefield.onBattlefieldTick(battlefield, tick) -end - -battlefieldObject.onBattlefieldRegister = function(player, battlefield) -end - -battlefieldObject.onBattlefieldEnter = function(player, battlefield) -end - -battlefieldObject.onBattlefieldLeave = function(player, battlefield, leavecode) - if leavecode == xi.battlefield.leaveCode.WON then - local _, clearTime, partySize = battlefield:getRecord() - player:startEvent(32001, battlefield:getArea(), clearTime, partySize, battlefield:getTimeInside(), 1, battlefield:getLocalVar('[cs]bit'), 0) - elseif leavecode == xi.battlefield.leaveCode.LOST then - player:startEvent(32002) - end -end - -battlefieldObject.onEventUpdate = function(player, csid, option, npc) -end - -battlefieldObject.onEventFinish = function(player, csid, option, npc) -end - -return battlefieldObject diff --git a/scripts/zones/Chamber_of_Oracles/npcs/Armoury_Crate.lua b/scripts/zones/Chamber_of_Oracles/npcs/Armoury_Crate.lua index f73de846652..0a5c49c280a 100644 --- a/scripts/zones/Chamber_of_Oracles/npcs/Armoury_Crate.lua +++ b/scripts/zones/Chamber_of_Oracles/npcs/Armoury_Crate.lua @@ -4,94 +4,10 @@ ----------------------------------- local entity = {} -local loot = -{ - -- KSNM Eye of the Storm - [198] = - { - { - { itemid = xi.item.WYVERN_WING, droprate = 1000 }, -- Wyvern Wing - }, - - { - { itemid = xi.item.WYVERN_SKIN, droprate = 1000 }, -- Wyvern Skin - }, - - { - { itemid = xi.item.GIL, droprate = 1000, amount = 24000 }, -- gil - - }, - - { - { itemid = xi.item.SQUARE_OF_DAMASCENE_CLOTH, droprate = 216 }, -- Damascene Cloth - { itemid = xi.item.DAMASCUS_INGOT, droprate = 295 }, -- Damascus Ingot - { itemid = xi.item.WOODVILLES_AXE, droprate = 239 }, -- Woodville's Axe - { itemid = xi.item.THANATOS_BASELARD, droprate = 231 }, -- Thanatos Baselard - { itemid = xi.item.WYVERN_PERCH, droprate = 231 }, -- Wyvern Perch - { itemid = xi.item.BALINS_SWORD, droprate = 231 }, -- Balin's Sword - { itemid = xi.item.VIAL_OF_BLACK_BEETLE_BLOOD, droprate = 231 }, -- Beetle Blood - }, - - { - { itemid = xi.item.BOURDONASSE, droprate = 104 }, -- Bourdonasse - { itemid = xi.item.VILE_ELIXIR_P1, droprate = 86 }, -- Vile Elixir +1 - { itemid = xi.item.VILE_ELIXIR, droprate = 22 }, -- Vile Elixir - { itemid = xi.item.POLE_GRIP, droprate = 146 }, -- Pole Grip - { itemid = xi.item.SWORD_STRAP, droprate = 240 }, -- Sword Strap - }, - - { - { itemid = xi.item.ZISKAS_CROSSBOW, droprate = 287 }, -- Ziska's Crossbow - { itemid = xi.item.UNJI, droprate = 216 }, -- Unji - { itemid = xi.item.TAILLEFERS_DAGGER, droprate = 198 }, -- Taillifer's Dagger - { itemid = xi.item.SCHILTRON_SPEAR, droprate = 287 }, -- Schiltron Spear - { itemid = xi.item.SCROLL_OF_THUNDER_III, droprate = 287 }, -- Thunder III - }, - - { - { itemid = xi.item.CORAL_FRAGMENT, droprate = 52 }, -- Coral Fragment - { itemid = xi.item.CHUNK_OF_DARKSTEEL_ORE, droprate = 56 }, -- Chunk Of Darksteel Ore - { itemid = xi.item.DEMON_HORN, droprate = 41 }, -- Demon Horn - { itemid = xi.item.EBONY_LOG, droprate = 63 }, -- Ebony Log - { itemid = xi.item.CHUNK_OF_GOLD_ORE, droprate = 52 }, -- Chunk Of Gold Ore - { itemid = xi.item.SPOOL_OF_GOLD_THREAD, droprate = 26 }, -- Spool Of Gold Thread - { itemid = xi.item.SLAB_OF_GRANITE, droprate = 11 }, -- Slab Of Granite - { itemid = xi.item.HI_RERAISER, droprate = 37 }, -- Hi-reraiser - { itemid = xi.item.MAHOGANY_LOG, droprate = 101 }, -- Mahogany Log - { itemid = xi.item.MYTHRIL_INGOT, droprate = 30 }, -- Mythril Ingot - { itemid = xi.item.CHUNK_OF_MYTHRIL_ORE, droprate = 52 }, -- Chunk Of Mythril Ore - { itemid = xi.item.PETRIFIED_LOG, droprate = 116 }, -- Petrified Log - { itemid = xi.item.PHOENIX_FEATHER, droprate = 15 }, -- Phoenix Feather - { itemid = xi.item.PHILOSOPHERS_STONE, droprate = 56 }, -- Philosophers Stone - { itemid = xi.item.CHUNK_OF_PLATINUM_ORE, droprate = 45 }, -- Chunk Of Platinum Ore - { itemid = xi.item.SQUARE_OF_RAINBOW_CLOTH, droprate = 22 }, -- Square Of Rainbow Cloth - { itemid = xi.item.RAM_HORN, droprate = 67 }, -- Ram Horn - { itemid = xi.item.SQUARE_OF_RAXA, droprate = 119 }, -- Square Of Raxa - { itemid = xi.item.RERAISER, droprate = 45 }, -- Reraiser - { itemid = xi.item.NONE, droprate = 400 }, -- Nothing - }, - - { - { itemid = xi.item.SQUARE_OF_DAMASCENE_CLOTH, droprate = 56 }, -- Square Of Damascene Cloth - { itemid = xi.item.DAMASCUS_INGOT, droprate = 93 }, -- Damascus Ingot - { itemid = xi.item.SPOOL_OF_MALBORO_FIBER, droprate = 56 }, -- Spool Of Malboro Fiber - { itemid = xi.item.PHILOSOPHERS_STONE, droprate = 157 }, -- Philosophers Stone - { itemid = xi.item.PHOENIX_FEATHER, droprate = 176 }, -- Phoenix Feather - { itemid = xi.item.SQUARE_OF_RAXA, droprate = 109 }, -- Square Of Raxa - { itemid = xi.item.NONE, droprate = 500 }, -- Nothing - } - } - -} - entity.onTrade = function(player, npc, trade) end entity.onTrigger = function(player, npc) - local battlefield = player:getBattlefield() - if battlefield then - xi.battlefield.HandleLootRolls(battlefield, loot[battlefield:getID()], nil, npc) - end end entity.onEventUpdate = function(player, csid, option, npc) diff --git a/scripts/zones/Chamber_of_Oracles/npcs/Shimmering_Circle.lua b/scripts/zones/Chamber_of_Oracles/npcs/Shimmering_Circle.lua index 997502f9838..ccfec35b9b0 100644 --- a/scripts/zones/Chamber_of_Oracles/npcs/Shimmering_Circle.lua +++ b/scripts/zones/Chamber_of_Oracles/npcs/Shimmering_Circle.lua @@ -6,19 +6,15 @@ local entity = {} entity.onTrade = function(player, npc, trade) - xi.bcnm.onTrade(player, npc, trade) end entity.onTrigger = function(player, npc) - xi.bcnm.onTrigger(player, npc) end -entity.onEventUpdate = function(player, csid, option, extras) - xi.bcnm.onEventUpdate(player, csid, option, extras) +entity.onEventUpdate = function(player, csid, option, npc) end entity.onEventFinish = function(player, csid, option, npc) - xi.bcnm.onEventFinish(player, csid, option, npc) end return entity From 1c193894458cfbe87af0220d5f89938b6b50df6d Mon Sep 17 00:00:00 2001 From: claywar Date: Sun, 12 May 2024 17:55:57 -0400 Subject: [PATCH 4/5] Interaction - Battlefield: Shattering Stars (SAM, NIN, DRG) Add enmity update to maat's wyvern --- .../Chamber_of_Oracles/eye_of_the_storm.lua | 2 +- .../legion_xi_comitatensis.lua | 2 +- .../shattering_stars_drg.lua | 55 +++++++++++++++++++ .../shattering_stars_nin.lua | 43 +++++++++++++++ .../shattering_stars_sam.lua | 43 +++++++++++++++ .../through_the_quicksand_caves.lua | 2 +- scripts/globals/battlefield.lua | 6 +- scripts/zones/Chamber_of_Oracles/IDs.lua | 1 + .../bcnms/shattering_stars.lua | 36 ------------ .../zones/Chamber_of_Oracles/mobs/Maat.lua | 12 ++++ 10 files changed, 160 insertions(+), 42 deletions(-) create mode 100644 scripts/battlefields/Chamber_of_Oracles/shattering_stars_drg.lua create mode 100644 scripts/battlefields/Chamber_of_Oracles/shattering_stars_nin.lua create mode 100644 scripts/battlefields/Chamber_of_Oracles/shattering_stars_sam.lua delete mode 100644 scripts/zones/Chamber_of_Oracles/bcnms/shattering_stars.lua diff --git a/scripts/battlefields/Chamber_of_Oracles/eye_of_the_storm.lua b/scripts/battlefields/Chamber_of_Oracles/eye_of_the_storm.lua index d193e438593..3a6752d936a 100644 --- a/scripts/battlefields/Chamber_of_Oracles/eye_of_the_storm.lua +++ b/scripts/battlefields/Chamber_of_Oracles/eye_of_the_storm.lua @@ -13,7 +13,7 @@ local content = Battlefield:new({ timeLimit = utils.minutes(30), index = 6, entryNpc = 'SC_Entrance', - exitNpc = 'Shimmering_Circle' + exitNpc = 'Shimmering_Circle', requiredItems = { xi.item.LACHESIS_ORB, wearMessage = chamberOfOraclesID.text.A_CRACK_HAS_FORMED, wornMessage = chamberOfOraclesID.text.ORB_IS_CRACKED }, }) diff --git a/scripts/battlefields/Chamber_of_Oracles/legion_xi_comitatensis.lua b/scripts/battlefields/Chamber_of_Oracles/legion_xi_comitatensis.lua index 454f74269d5..87b63fe0ea8 100644 --- a/scripts/battlefields/Chamber_of_Oracles/legion_xi_comitatensis.lua +++ b/scripts/battlefields/Chamber_of_Oracles/legion_xi_comitatensis.lua @@ -14,7 +14,7 @@ local content = Battlefield:new({ timeLimit = utils.minutes(30), index = 1, entryNpc = 'SC_Entrance', - exitNpc = 'Shimmering_Circle' + exitNpc = 'Shimmering_Circle', requiredItems = { xi.item.MOON_ORB, wearMessage = chamberOfOraclesID.text.A_CRACK_HAS_FORMED, wornMessage = chamberOfOraclesID.text.ORB_IS_CRACKED }, armouryCrates = { diff --git a/scripts/battlefields/Chamber_of_Oracles/shattering_stars_drg.lua b/scripts/battlefields/Chamber_of_Oracles/shattering_stars_drg.lua new file mode 100644 index 00000000000..57f95a45d56 --- /dev/null +++ b/scripts/battlefields/Chamber_of_Oracles/shattering_stars_drg.lua @@ -0,0 +1,55 @@ +----------------------------------- +-- Area: Chamber of Oracles +-- Name: Shattering stars - Maat Fight (DRG) +----------------------------------- +local chamberOfOraclesID = zones[xi.zone.CHAMBER_OF_ORACLES] +----------------------------------- + +local content = Battlefield:new({ + zoneId = xi.zone.CHAMBER_OF_ORACLES, + battlefieldId = xi.battlefield.id.SHATTERING_STARS_DRG, + maxPlayers = 1, + levelCap = 99, + allowSubjob = false, + timeLimit = utils.minutes(10), + index = 4, + entryNpc = 'SC_Entrance', + exitNpc = 'Shimmering_Circle', + requiredItems = { xi.item.DRAGOONS_TESTIMONY, wearMessage = chamberOfOraclesID.text.TESTIMONY_WEARS, wornMessage = chamberOfOraclesID.text.TESTIMONY_IS_TORN }, +}) + +function content:entryRequirement(player, npc, isRegistrant, trade) + return player:getQuestStatus(xi.questLog.JEUNO, xi.quest.id.jeuno.SHATTERING_STARS) >= xi.questStatus.QUEST_ACCEPTED and + player:getMainJob() == xi.job.DRG and + player:getMainLvl() >= 66 +end + +content.groups = +{ + { + mobIds = + { + { chamberOfOraclesID.mob.MAAT + 6 }, + { chamberOfOraclesID.mob.MAAT + 8 }, + { chamberOfOraclesID.mob.MAAT + 10 }, + }, + + allDeath = function(battlefield, mob) + battlefield:setStatus(xi.battlefield.status.WON) + end, + }, + + -- Wyvern + { + mobIds = + { + { chamberOfOraclesID.mob.MAAT + 7 }, + { chamberOfOraclesID.mob.MAAT + 9 }, + { chamberOfOraclesID.mob.MAAT + 11 }, + }, + + spawned = false, + }, +} + +return content:register() diff --git a/scripts/battlefields/Chamber_of_Oracles/shattering_stars_nin.lua b/scripts/battlefields/Chamber_of_Oracles/shattering_stars_nin.lua new file mode 100644 index 00000000000..13f06726907 --- /dev/null +++ b/scripts/battlefields/Chamber_of_Oracles/shattering_stars_nin.lua @@ -0,0 +1,43 @@ +----------------------------------- +-- Area: Chamber of Oracles +-- Name: Shattering stars - Maat Fight (NIN) +----------------------------------- +local chamberOfOraclesID = zones[xi.zone.CHAMBER_OF_ORACLES] +----------------------------------- + +local content = Battlefield:new({ + zoneId = xi.zone.CHAMBER_OF_ORACLES, + battlefieldId = xi.battlefield.id.SHATTERING_STARS_NIN, + maxPlayers = 1, + levelCap = 99, + allowSubjob = false, + timeLimit = utils.minutes(10), + index = 3, + entryNpc = 'SC_Entrance', + exitNpc = 'Shimmering_Circle', + requiredItems = { xi.item.NINJAS_TESTIMONY, wearMessage = chamberOfOraclesID.text.TESTIMONY_WEARS, wornMessage = chamberOfOraclesID.text.TESTIMONY_IS_TORN }, +}) + +function content:entryRequirement(player, npc, isRegistrant, trade) + return player:getQuestStatus(xi.questLog.JEUNO, xi.quest.id.jeuno.SHATTERING_STARS) >= xi.questStatus.QUEST_ACCEPTED and + player:getMainJob() == xi.job.NIN and + player:getMainLvl() >= 66 +end + +content.groups = +{ + { + mobIds = + { + { chamberOfOraclesID.mob.MAAT + 3 }, + { chamberOfOraclesID.mob.MAAT + 4 }, + { chamberOfOraclesID.mob.MAAT + 5 }, + }, + + allDeath = function(battlefield, mob) + battlefield:setStatus(xi.battlefield.status.WON) + end, + }, +} + +return content:register() diff --git a/scripts/battlefields/Chamber_of_Oracles/shattering_stars_sam.lua b/scripts/battlefields/Chamber_of_Oracles/shattering_stars_sam.lua new file mode 100644 index 00000000000..7217edaf03f --- /dev/null +++ b/scripts/battlefields/Chamber_of_Oracles/shattering_stars_sam.lua @@ -0,0 +1,43 @@ +----------------------------------- +-- Area: Chamber of Oracles +-- Name: Shattering stars - Maat Fight (SAM) +----------------------------------- +local chamberOfOraclesID = zones[xi.zone.CHAMBER_OF_ORACLES] +----------------------------------- + +local content = Battlefield:new({ + zoneId = xi.zone.CHAMBER_OF_ORACLES, + battlefieldId = xi.battlefield.id.SHATTERING_STARS_SAM, + maxPlayers = 1, + levelCap = 99, + allowSubjob = false, + timeLimit = utils.minutes(10), + index = 2, + entryNpc = 'SC_Entrance', + exitNpc = 'Shimmering_Circle', + requiredItems = { xi.item.SAMURAIS_TESTIMONY, wearMessage = chamberOfOraclesID.text.TESTIMONY_WEARS, wornMessage = chamberOfOraclesID.text.TESTIMONY_IS_TORN }, +}) + +function content:entryRequirement(player, npc, isRegistrant, trade) + return player:getQuestStatus(xi.questLog.JEUNO, xi.quest.id.jeuno.SHATTERING_STARS) >= xi.questStatus.QUEST_ACCEPTED and + player:getMainJob() == xi.job.SAM and + player:getMainLvl() >= 66 +end + +content.groups = +{ + { + mobIds = + { + { chamberOfOraclesID.mob.MAAT }, + { chamberOfOraclesID.mob.MAAT + 1 }, + { chamberOfOraclesID.mob.MAAT + 2 }, + }, + + allDeath = function(battlefield, mob) + battlefield:setStatus(xi.battlefield.status.WON) + end, + }, +} + +return content:register() diff --git a/scripts/battlefields/Chamber_of_Oracles/through_the_quicksand_caves.lua b/scripts/battlefields/Chamber_of_Oracles/through_the_quicksand_caves.lua index cde7ff2d9d0..d6a77e95f88 100644 --- a/scripts/battlefields/Chamber_of_Oracles/through_the_quicksand_caves.lua +++ b/scripts/battlefields/Chamber_of_Oracles/through_the_quicksand_caves.lua @@ -15,7 +15,7 @@ local content = BattlefieldMission:new({ timeLimit = utils.minutes(30), index = 0, entryNpc = 'SC_Entrance', - exitNpc = 'Shimmering_Circle' + exitNpc = 'Shimmering_Circle', missionArea = xi.mission.log_id.ZILART, mission = xi.mission.id.zilart.THROUGH_THE_QUICKSAND_CAVES, missionStatusArea = xi.mission.log_id.ZILART, diff --git a/scripts/globals/battlefield.lua b/scripts/globals/battlefield.lua index 4303f63b58a..f96eb54e6e6 100644 --- a/scripts/globals/battlefield.lua +++ b/scripts/globals/battlefield.lua @@ -156,9 +156,9 @@ xi.battlefield.id = SMASH_A_MALEVOLENT_MENACE = 164, THROUGH_THE_QUICKSAND_CAVES = 192, -- Converted LEGION_XI_COMITATENSIS = 193, -- Converted - SHATTERING_STARS_SAM = 194, - SHATTERING_STARS_NIN = 195, - SHATTERING_STARS_DRG = 196, + SHATTERING_STARS_SAM = 194, -- Converted + SHATTERING_STARS_NIN = 195, -- Converted + SHATTERING_STARS_DRG = 196, -- Converted CACTUAR_SUAVE = 197, EYE_OF_THE_STORM = 198, -- Converted SCARLET_KING = 199, diff --git a/scripts/zones/Chamber_of_Oracles/IDs.lua b/scripts/zones/Chamber_of_Oracles/IDs.lua index 7abcd91a9bb..8c8dc6e60f5 100644 --- a/scripts/zones/Chamber_of_Oracles/IDs.lua +++ b/scripts/zones/Chamber_of_Oracles/IDs.lua @@ -46,6 +46,7 @@ zones[xi.zone.CHAMBER_OF_ORACLES] = mob = { CENTURIO_V_III = GetFirstID('Centurio_V-III'), + MAAT = GetFirstID('Maat'), SECUTOR_XI_XXXII = GetFirstID('Secutor_XI-XXXII'), }, npc = diff --git a/scripts/zones/Chamber_of_Oracles/bcnms/shattering_stars.lua b/scripts/zones/Chamber_of_Oracles/bcnms/shattering_stars.lua deleted file mode 100644 index f059233eee3..00000000000 --- a/scripts/zones/Chamber_of_Oracles/bcnms/shattering_stars.lua +++ /dev/null @@ -1,36 +0,0 @@ ------------------------------------ --- Area: Chamber of Oracles --- Name: Shattering stars - Maat Fight --- !pos -221 -24 19 206 ------------------------------------ -local battlefieldObject = {} - -battlefieldObject.onBattlefieldTick = function(battlefield, tick) - xi.battlefield.onBattlefieldTick(battlefield, tick) -end - -battlefieldObject.onBattlefieldRegister = function(player, battlefield) -end - -battlefieldObject.onBattlefieldEnter = function(player, battlefield) -end - -battlefieldObject.onBattlefieldLeave = function(player, battlefield, leavecode) - if leavecode == xi.battlefield.leaveCode.WON then - local _, clearTime, partySize = battlefield:getRecord() - - player:setLocalVar('battlefieldWin', battlefield:getID()) - - player:startEvent(32001, battlefield:getArea(), clearTime, partySize, battlefield:getTimeInside(), 1, battlefield:getLocalVar('[cs]bit'), 0) - elseif leavecode == xi.battlefield.leaveCode.LOST then - player:startEvent(32002) - end -end - -battlefieldObject.onEventUpdate = function(player, csid, option, npc) -end - -battlefieldObject.onEventFinish = function(player, csid, option, npc) -end - -return battlefieldObject diff --git a/scripts/zones/Chamber_of_Oracles/mobs/Maat.lua b/scripts/zones/Chamber_of_Oracles/mobs/Maat.lua index 973d340d5ea..c4f65d1d8d7 100644 --- a/scripts/zones/Chamber_of_Oracles/mobs/Maat.lua +++ b/scripts/zones/Chamber_of_Oracles/mobs/Maat.lua @@ -7,6 +7,18 @@ mixins = { require('scripts/mixins/families/maat') } ----------------------------------- local entity = {} +entity.onMobFight = function(mob, target) + local mobId = mob:getID() + local pet = GetMobByID(mobId + 1) + + if + pet:isSpawned() and + pet:getCurrentAction() == xi.act.ROAMING + then + pet:updateEnmity(target) + end +end + entity.onMobDeath = function(mob, player, optParams) end From b59f38f1a6155146d3e3524bccc8a29eec9159fe Mon Sep 17 00:00:00 2001 From: claywar Date: Sun, 12 May 2024 18:12:27 -0400 Subject: [PATCH 5/5] Fix hardcoded win event parameter to pass Zone ID --- scripts/globals/battlefield.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/globals/battlefield.lua b/scripts/globals/battlefield.lua index f96eb54e6e6..158bcc01888 100644 --- a/scripts/globals/battlefield.lua +++ b/scripts/globals/battlefield.lua @@ -1071,7 +1071,7 @@ function Battlefield:onBattlefieldWin(player, battlefield) local _, clearTime, partySize = battlefield:getRecord() player:setLocalVar('battlefieldWin', battlefield:getID()) - player:startEvent(32001, battlefield:getArea(), clearTime, partySize, battlefield:getTimeInside(), 1, self.index, 0) + player:startEvent(32001, battlefield:getArea(), clearTime, partySize, battlefield:getTimeInside(), player:getZoneID(), self.index, 0) end function Battlefield:onBattlefieldLoss(player, battlefield) @@ -1328,7 +1328,7 @@ function BattlefieldMission:onBattlefieldWin(player, battlefield) local _, clearTime, partySize = battlefield:getRecord() local canSkipCS = (current ~= self.mission) and 1 or 0 - player:startEvent(32001, battlefield:getArea(), clearTime, partySize, battlefield:getTimeInside(), 1, self.index, canSkipCS) + player:startEvent(32001, battlefield:getArea(), clearTime, partySize, battlefield:getTimeInside(), player:getZoneID(), self.index, canSkipCS) end function BattlefieldMission:onEventFinishWin(player, csid, option, npc) @@ -1389,7 +1389,7 @@ function BattlefieldQuest:onBattlefieldWin(player, battlefield) local _, clearTime, partySize = battlefield:getRecord() local canSkipCS = status ~= xi.questStatus.QUEST_ACCEPTED and 1 or 0 - player:startEvent(32001, battlefield:getArea(), clearTime, partySize, battlefield:getTimeInside(), 1, self.index, canSkipCS) + player:startEvent(32001, battlefield:getArea(), clearTime, partySize, battlefield:getTimeInside(), player:getZoneID(), self.index, canSkipCS) end function xi.battlefield.onBattlefieldTick(battlefield, timeinside)