From 15b9af578278d5cfecd3da24942769e38a63619b Mon Sep 17 00:00:00 2001 From: claywar Date: Sat, 31 Aug 2024 10:48:25 -0400 Subject: [PATCH 1/2] [lls] Annotate npcUtil global, additional tables --- scripts/events/login_campaign_data.lua | 1 + .../crafting/crafting_guild_points.lua | 1 + scripts/globals/deeds.lua | 8 ++ scripts/globals/npc_util.lua | 84 ++++++++++++++++--- scripts/specs/core/CBaseEntity.lua | 8 +- 5 files changed, 86 insertions(+), 16 deletions(-) diff --git a/scripts/events/login_campaign_data.lua b/scripts/events/login_campaign_data.lua index 0c8d0be2bb8..98f0d926ea3 100644 --- a/scripts/events/login_campaign_data.lua +++ b/scripts/events/login_campaign_data.lua @@ -6,6 +6,7 @@ -- TODO: Fill in with _commented out entries_ for all the things seen in each category -- https://www.bg-wiki.com/ffxi/Repeat_Login_Campaign/Past_Login_Campaign_Rewards +---@class prizes : { [integer] : { ['price']: integer, ['items']: { [integer]: xi.item } } } local prizes = { [1] = diff --git a/scripts/globals/crafting/crafting_guild_points.lua b/scripts/globals/crafting/crafting_guild_points.lua index 3afe783ccab..16359b2b378 100644 --- a/scripts/globals/crafting/crafting_guild_points.lua +++ b/scripts/globals/crafting/crafting_guild_points.lua @@ -11,6 +11,7 @@ xi.crafting = xi.crafting or {} ----------------------------------- -- Data ----------------------------------- +---@class hqCrystals : { id: xi.item, cost: integer } local hqCrystals = { [0] = { id = xi.item.ROBBER_RIG, cost = 1500 }, -- Robber Rig is located in category 3. Not a typo. diff --git a/scripts/globals/deeds.lua b/scripts/globals/deeds.lua index cf1cd15a8c7..d0613ee5545 100644 --- a/scripts/globals/deeds.lua +++ b/scripts/globals/deeds.lua @@ -21,6 +21,14 @@ local validatorNpcEvents = -- Raw Rewards from AMAN Validator -- NOTE: These tables are not configurable, and the client will not change -- based on the data provided below. +---@class itemRewardEntry +---@field itemId xi.item +---@field qty integer + +---@class keyItemRewardEntry +---@field keyItemId xi.keyItem + +---@type itemRewardEntry[]|keyItemRewardEntry[] local validatorRewards = { [ 1] = { itemId = xi.item.COPPER_AMAN_VOUCHER, qty = 7 }, diff --git a/scripts/globals/npc_util.lua b/scripts/globals/npc_util.lua index d45aa647005..604df638466 100644 --- a/scripts/globals/npc_util.lua +++ b/scripts/globals/npc_util.lua @@ -16,6 +16,7 @@ npcUtil.fishingAnimation(npc, phaseDuration, func) --]] +---@class npcUtil npcUtil = {} --[[ @@ -33,6 +34,11 @@ npcUtil = {} if set a message will play if a entity spawns --]] +---@param player CBaseEntity +---@param qm CBaseEntity +---@param mobId integer|integer[] +---@param params table? +---@return boolean function npcUtil.popFromQM(player, qm, mobId, params) local qmId = qm:getID() @@ -137,16 +143,27 @@ end { x = x, y = y, z = z } { x = x, y = y, z = z, rot = r } --]] +---@param x number +---@param y number +---@param z number +---@param r integer? +---@return function +---@overload fun(posTable: { ['x']: number, ['y']: number, ['z']: number, ['rot']: integer? }): nil local function doMove(x, y, z, r) if not r then r = 0 end + ---@param entity CBaseEntity return function(entity) entity:setPos(x, y, z, r) end end +---@param npc CBaseEntity +---@param point { ['x']: number, ['y']: number, ['z']: number, ['rot']: integer? } +---@param delay integer? +---@return nil function npcUtil.queueMove(npc, point, delay) if not delay then delay = 3000 @@ -158,12 +175,17 @@ function npcUtil.queueMove(npc, point, delay) point = { point.x, point.y, point.z } end - npc:queue(delay, doMove(unpack(point))) + local x, y, z, rot = unpack(point) + npc:queue(delay, doMove(x, y, z, rot)) end -- Picks a new position for an NPC and excluding the current position. -- INPUT: npc = npcID, position = 2D table with coords: index, { x, y, z } -- RETURN: table index +---@param npcID integer +---@param positionTable table +---@param allowCurrentPosition boolean? +---@return table function npcUtil.pickNewPosition(npcID, positionTable, allowCurrentPosition) local npc = GetNPCByID(npcID) local positionIndex = 1 -- Default to position one in the table if it can't be found. @@ -221,6 +243,14 @@ end instead of "Come back again after sorting your inventory" --]] + +---@class multipleItemList +---@field [integer] { [integer]: xi.item, [integer]: integer }|xi.item + +---@param player CBaseEntity +---@param items xi.item|multipleItemList +---@param params { silent: boolean?, fromTrade: boolean? }? +---@return boolean function npcUtil.giveItem(player, items, params) params = params or {} local ID = zones[player:getZoneID()] @@ -303,6 +333,10 @@ end instead of "Come back again after sorting your inventory" --]] +---@param player CBaseEntity +---@param items xi.item|xi.item[]|multipleItemList +---@param params { silent: boolean? }? +---@return boolean function npcUtil.giveTempItem(player, items, params) params = params or {} local ID = zones[player:getZoneID()] @@ -362,6 +396,10 @@ end gil, 500 bayld, 1000 --]] +---@param player CBaseEntity +---@param currency string +---@param amount integer +---@return boolean function npcUtil.giveCurrency(player, currency, amount) local ID = zones[player:getZoneID()] @@ -413,20 +451,17 @@ end { xi.ki.PALBOROUGH_MINES_LOGS } { xi.ki.BLUE_ACIDITY_TESTER, xi.ki.RED_ACIDITY_TESTER } --]] +---@param player CBaseEntity +---@param keyitems xi.keyItem|{ [integer]: xi.keyItem } +---@param msgId integer? function npcUtil.giveKeyItem(player, keyitems, msgId) - local ID = zones[player:getZoneID()] - - -- create table of keyitems - local givenKeyItems = { keyitems } - if type(keyitems) == 'table' then - givenKeyItems = keyitems - elseif type(keyitems) ~= 'number' then - print(string.format('ERROR: invalid keyitems parameter given to npcUtil.giveKeyItem in zone %s.', player:getZoneName())) - return false - end + local ID = zones[player:getZoneID()] + local givenKeyItems = type(keyitems) == "table" and keyitems or { keyitems } -- give key items to player, with message + for _, keyItemId in ipairs(givenKeyItems) do + ---@cast keyItemId xi.keyItem if not player:hasKeyItem(keyItemId) then player:addKeyItem(keyItemId) @@ -462,6 +497,23 @@ end var = { 'foo1', 'foo2' } -- variable(s) to set to 0. string or table }) --]] + +---@class rewardParam +---@field item xi.item|xi.item[]|multipleItemList? +---@field itemParams { silent: boolean?, fromTrade: boolean? }? +---@field keyItem xi.keyItem|{ [integer]: xi.keyItem }? +---@field ki xi.keyItem|{ [integer]: xi.keyItem }? +---@field fame integer? +---@field fameArea xi.fameArea? +---@field bayld integer? +---@field gil integer? +---@field title xi.title? +---@field var string|string[]? +---@field xp integer? + +---@param player CBaseEntity +---@param params rewardParam +---@return boolean function npcUtil.giveReward(player, params) params = params or {} @@ -515,6 +567,7 @@ function npcUtil.giveReward(player, params) if params['var'] ~= nil then local playerVarsToZero = {} if type(params['var']) == 'table' then + ---@cast params['var'] string[] playerVarsToZero = params['var'] elseif type(params['var']) == 'string' then table.insert(playerVarsToZero, params['var']) @@ -549,6 +602,12 @@ end var = { 'foo1', 'foo2' } -- variable(s) to set to 0. string or table }) --]] + +---@param player CBaseEntity +---@param area xi.questLog +---@param quest integer +---@param params rewardParam +---@return boolean function npcUtil.completeQuest(player, area, quest, params) params = params or {} @@ -604,12 +663,13 @@ function npcUtil.completeQuest(player, area, quest, params) if params['var'] ~= nil then local playerVarsToZero = {} if type(params['var']) == 'table' then + ---@cast params['var'] string[] playerVarsToZero = params['var'] elseif type(params['var']) == 'string' then table.insert(playerVarsToZero, params['var']) end - for _, v in pairs(playerVarsToZero) do + for _, v in ipairs(playerVarsToZero) do player:setCharVar(v, 0) end end diff --git a/scripts/specs/core/CBaseEntity.lua b/scripts/specs/core/CBaseEntity.lua index 27ab1031d0b..794a0530338 100644 --- a/scripts/specs/core/CBaseEntity.lua +++ b/scripts/specs/core/CBaseEntity.lua @@ -1698,13 +1698,13 @@ end function CBaseEntity:completeAssault(missionID) end ----@param keyItemID integer +---@param keyItemID xi.keyItem ---@return nil function CBaseEntity:addKeyItem(keyItemID) end ---@nodiscard ----@param keyItemID integer +---@param keyItemID xi.keyItem ---@return boolean function CBaseEntity:hasKeyItem(keyItemID) end @@ -1715,12 +1715,12 @@ function CBaseEntity:delKeyItem(keyItemID) end ---@nodiscard ----@param keyItemID integer +---@param keyItemID xi.keyItem ---@return boolean function CBaseEntity:seenKeyItem(keyItemID) end ----@param keyItemID integer +---@param keyItemID xi.keyItem ---@return nil function CBaseEntity:unseenKeyItem(keyItemID) end From 2655f99e092309f2d9eacbd47db9a75db7de4faa Mon Sep 17 00:00:00 2001 From: claywar Date: Sun, 1 Sep 2024 04:53:55 -0400 Subject: [PATCH 2/2] [lls] Correct npcUtil type issues identified from annotations Add optional params to overseer table definitions --- modules/custom/lua/custom_HNM_system.lua | 4 +- scripts/enum/item.lua | 256 +++++++++++- scripts/events/login_campaign_data.lua | 71 ++-- scripts/globals/abyssea.lua | 6 +- scripts/globals/besieged.lua | 105 ++--- scripts/globals/conquest.lua | 368 +++++++++--------- scripts/globals/dealer_moogle.lua | 2 + scripts/globals/deeds.lua | 5 +- scripts/globals/interaction/quest.lua | 8 +- scripts/globals/npc_util.lua | 10 +- .../otherAreas/Confessions_of_a_Bellmaker.lua | 10 +- scripts/quests/windurst/The_Fanged_One.lua | 2 +- scripts/specs/types/Abyssea.lua | 12 + .../Abyssea-Altepa/npcs/Cruor_Prospector.lua | 23 +- .../Abyssea-Attohwa/npcs/Cruor_Prospector.lua | 23 +- .../npcs/Cruor_Prospector.lua | 23 +- .../npcs/Cruor_Prospector.lua | 23 +- .../npcs/Cruor_Prospector.lua | 23 +- .../Abyssea-Vunkerl/npcs/Cruor_Prospector.lua | 29 +- .../Crawlers_Nest_[S]/npcs/Rodeupansat.lua | 2 +- scripts/zones/Dragons_Aery/npcs/qm0.lua | 2 +- .../Garlaige_Citadel_[S]/npcs/Fondactiont.lua | 2 +- scripts/zones/Norg/npcs/Stray_Cloud.lua | 2 +- scripts/zones/Port_Jeuno/npcs/Shami.lua | 24 +- .../zones/Rolanberry_Fields/npcs/Saarlan.lua | 72 ++-- scripts/zones/Selbina/npcs/Oswald.lua | 6 +- scripts/zones/Selbina/npcs/Romeo.lua | 2 +- .../npcs/Heptachiond.lua | 2 +- scripts/zones/Valley_of_Sorrows/npcs/qm1.lua | 2 +- .../zones/West_Ronfaure/npcs/Vilatroire.lua | 6 +- .../Windurst_Waters/npcs/Leepe-Hoppe.lua | 14 +- .../Windurst_Woods/npcs/Kopuro-Popuro.lua | 2 +- 32 files changed, 713 insertions(+), 428 deletions(-) create mode 100644 scripts/specs/types/Abyssea.lua diff --git a/modules/custom/lua/custom_HNM_system.lua b/modules/custom/lua/custom_HNM_system.lua index 31d5457405b..0bc3dfe7426 100644 --- a/modules/custom/lua/custom_HNM_system.lua +++ b/modules/custom/lua/custom_HNM_system.lua @@ -67,7 +67,7 @@ hnmSystem:addOverride('xi.zones.Dragons_Aery.npcs.qm0.onTrade', function(player, if not GetMobByID(dragonsAeryID.mob.FAFNIR):isSpawned() and not GetMobByID(dragonsAeryID.mob.NIDHOGG):isSpawned() and - npcUtil.tradeHasExactly(trade, xi.item.SWEET_TEA) and + npcUtil.tradeHasExactly(trade, xi.item.CUP_OF_SWEET_TEA) and npcUtil.popFromQM(player, npc, dragonsAeryID.mob.NIDHOGG) then player:confirmTrade() @@ -117,7 +117,7 @@ hnmSystem:addOverride('xi.zones.Valley_of_Sorrows.npcs.qm1.onTrade', function(pl if not GetMobByID(valleySorrowsID.mob.ADAMANTOISE):isSpawned() and not GetMobByID(valleySorrowsID.mob.ASPIDOCHELONE):isSpawned() and - npcUtil.tradeHasExactly(trade, xi.item.RED_PONDWEED) and + npcUtil.tradeHasExactly(trade, xi.item.CLUMP_OF_RED_PONDWEED) and npcUtil.popFromQM(player, npc, valleySorrowsID.mob.ASPIDOCHELONE) then player:confirmTrade() diff --git a/scripts/enum/item.lua b/scripts/enum/item.lua index 70e3bece2eb..af01cf288b9 100644 --- a/scripts/enum/item.lua +++ b/scripts/enum/item.lua @@ -22,6 +22,7 @@ xi.item = CUPBOARD = 57, CHIFFONIER = 59, KADOMATSU = 87, + WASTEBASKET = 89, RUSTY_BUCKET = 90, WATER_CASK = 93, OKADOMATSU = 100, @@ -1180,10 +1181,14 @@ xi.item = HALVUNG_SHAKUDO_KEY = 2221, HALVUNG_BRONZE_KEY = 2222, HALVUNG_BRASS_KEY = 2223, - BAG_OF_SIMSIM = 2236, MAMOOL_JA_COLLAR = 2227, CHUNK_OF_LUMINIUM_ORE = 2228, + LAMBENT_FIRE_CELL = 2230, + LAMBENT_WATER_CELL = 2231, + LAMBENT_EARTH_CELL = 2232, + LAMBENT_WIND_CELL = 2233, BAG_OF_WILDGRASS_SEEDS = 2235, + BAG_OF_SIMSIM = 2236, BAG_OF_COFFEE_CHERRIES = 2270, UNAPPRAISED_HEADPIECE = 2276, UNAPPRAISED_EARRING = 2277, @@ -1788,6 +1793,10 @@ xi.item = AQUA_GEODE = 3302, LIGHT_GEODE = 3303, SHADOW_GEODE = 3304, + HEAT_CAPACITOR = 3307, + POWER_COOLER = 3308, + BARRAGE_TURBINE = 3309, + GALVANIZER = 3311, SOIL_GEM = 3319, BLACKSMITHS_EMBLEM = 3324, GOLDSMITHS_EMBLEM = 3325, @@ -1799,11 +1808,11 @@ xi.item = CARPENTERS_EMBLEM = 3331, ALCHEMISTS_EMBLEM = 3332, JUG_OF_HONEY_WINE = 3339, - SWEET_TEA = 3340, + CUP_OF_SWEET_TEA = 3340, BEASTLY_SHANK = 3341, SAVORY_SHANK = 3342, CLUMP_OF_BLUE_PONDWEED = 3343, - RED_PONDWEED = 3344, + CLUMP_OF_RED_PONDWEED = 3344, PHOBOS_ORB = 3351, DEIMOS_ORB = 3352, MOG_KUPON_W_R90 = 3438, @@ -1950,6 +1959,9 @@ xi.item = VALKYRIES_TEAR = 3856, VALKYRIES_WING = 3867, VALKYRIES_SOUL = 3868, + COPY_OF_MELODIOUS_PLANS = 3885, + TIMBRE_CASE_KIT = 3886, + MUSICHINERY_KIT = 3887, RALA_VISAGE_I = 3895, RALA_VISAGE_II = 3896, RALA_VISAGE_III = 3897, @@ -2310,6 +2322,9 @@ xi.item = SCROLL_OF_STONESKIN = 4662, SCROLL_OF_AQUAVEIL = 4663, SCROLL_OF_SLOW = 4664, + SCROLL_OF_RECALL_JUGNER = 4687, + SCROLL_OF_RECALL_PASHH = 4688, + SCROLL_OF_RECALL_MERIPH = 4689, SCROLL_OF_BARAMNESRA = 4691, SCROLL_OF_ENLIGHT = 4706, SCROLL_OF_ENDARK = 4707, @@ -2405,6 +2420,7 @@ xi.item = SCROLL_OF_ARMYS_PAEON_IV = 4989, SCROLL_OF_ARMYS_PAEON_V = 4990, SCROLL_OF_ARMYS_PAEON_VI = 4991, + SCROLL_OF_MAGES_BALLAD = 4994, SCROLL_OF_MAGES_BALLAD_III = 4996, SCROLL_OF_KNIGHTS_MINNE = 4997, SCROLL_OF_KNIGHTS_MINNE_II = 4998, @@ -2788,10 +2804,15 @@ xi.item = SHEET_OF_ADOULINIAN_TUNES = 6348, STINGER_BULLET_POUCH = 6355, FRAYED_SACK_OF_SPLENDOR = 6370, + IMPERIAL_CHAIR_SET = 6377, + DECORATIVE_CHAIR_SET = 6378, + ORNATE_STOOL_SET = 6379, REFINED_CHAIR_SET = 6380, SILT_POUCH = 6391, BEAD_POUCH = 6392, + EPHRAMADIAN_THRONE = 6409, SHADOW_THRONE = 6410, + ASTRAL_CUBE = 6413, PORXIE_QUIVER = 6414, SEKI_SHURIKEN_POUCH = 6415, DIVINE_QUIVER = 6417, @@ -3028,7 +3049,10 @@ xi.item = MOUNT_BOMB = 10053, MOUNT_CRAWLER = 10056, MOUNT_FENRIR = 10057, + MOUNT_BEETLE = 10058, MOUNT_OMEGA = 10067, + MOUNT_GOOBBUE = 10069, + MOUNT_DHALMEL = 10073, RED_RAPTOR_NOTEBOOK = 10075, GOLDEN_BOMB_NOTEBOOK = 10076, BUFFALO_NOTEBOOK = 10077, @@ -3417,6 +3441,18 @@ xi.item = PETROV_RING = 10772, FORTIFIED_RING = 10773, VERTIGO_RING = 10774, + GAIARDAS_RING = 10775, + GAUBIOUS_RING = 10776, + CALOUSSU_RING = 10777, + NANGER_RING = 10778, + SOPHIA_RING = 10779, + QUIES_RING = 10780, + CYNOSURE_RING = 10781, + AMBUSCADE_RING = 10782, + VENEFICIUM_RING = 10783, + DHANURVEDA_RING = 10784, + PROVOCARE_RING = 10785, + MEDIATORS_RING = 10786, ADAMAS = 10806, MANDRAGUARD = 10807, JANUS_GUARD = 10808, @@ -3455,6 +3491,13 @@ xi.item = VIGILANCE_MANTLE = 10968, DRAGON_TANK = 11002, SHAPERS_SHAWL = 11009, + CORYBANT_PEARL = 11044, + SAVIESA_PEARL = 11045, + OUESK_PEARL = 11046, + BELATZ_PEARL = 11047, + CYTHEREA_PEARL = 11048, + MYRDDIN_PEARL = 11049, + PUISSANT_PEARL = 11050, RAVAGERS_MASK_P2 = 11064, TANTRA_CROWN_P2 = 11065, ORISON_CAP_P2 = 11066, @@ -3982,22 +4025,30 @@ xi.item = TARGE = 12300, BUCKLER = 12301, DARKSTEEL_BUCKLER = 12302, + MUSKETEER_COMMANDERS_SHIELD = 12304, KITE_SHIELD = 12306, DARKSTEEL_SHIELD = 12308, RITTER_SHIELD = 12309, HOPLON = 12311, + ROYAL_KNIGHT_ARMY_SHIELD = 12312, + TEMPLE_KNIGHT_ARMY_SHIELD = 12313, FISH_SCALE_SHIELD = 12316, FLAME_SHIELD = 12317, + ROYAL_GUARDS_SHIELD = 12321, TOWER_SHIELD = 12324, + ROYAL_SQUIRES_SHIELD = 12336, + DECURIONS_SHIELD = 12337, MASTER_SHIELD = 12344, BALANCE_BUCKLER = 12349, STRIKE_SHIELD = 12350, ASTRAL_SHIELD = 12351, VIKING_SHIELD = 12356, HICKORY_SHIELD = 12359, + PATRIARCH_PROTECTORS_SHIELD = 12363, NYMPH_SHIELD = 12364, PICAROONS_SHIELD = 12370, CLIPEUS = 12371, + LIGHT_BUCKLER = 12375, ASTRAL_ASPIS = 12382, ACHERON_SHIELD = 12385, MERCENARYS_TARGE = 12389, @@ -4023,12 +4074,16 @@ xi.item = MYTHRIL_SALLET = 12417, ADAMAN_BARBUTA = 12420, KOENIG_SCHALLER = 12421, + IRON_MUSKETEERS_ARMET = 12422, IRON_MASK = 12424, BASCINET = 12427, ADAMAN_CELATA = 12429, + ROYAL_KNIGHTS_BASCINET = 12430, + ROYAL_SQUIRES_HELM = 12431, FACEGUARD = 12432, BRASS_MASK = 12433, GENBUS_KABUTO = 12434, + CENTURIONS_VISOR = 12438, LEATHER_BANDANA = 12440, STUDDED_BANDANA = 12442, BRONZE_CAP = 12448, @@ -4039,11 +4094,14 @@ xi.item = BRONZE_CAP_P1 = 12463, HEADGEAR = 12464, COTTON_HEADGEAR = 12465, + MERCENARY_CAPTAINS_HEADGEAR = 12470, HEADGEAR_P1 = 12471, CIRCLET = 12472, POETS_CIRCLET = 12473, WOOL_HAT = 12474, SILK_HAT = 12476, + TACTICIAN_MAGICIANS_HAT = 12478, + MERCENARYS_HACHIMAKI = 12484, FUNGUS_HAT = 12485, EMPEROR_HAIRPIN = 12486, GOLD_HAIRPIN = 12494, @@ -4055,6 +4113,8 @@ xi.item = COMPOUND_EYE_CIRCLET = 12502, BONE_HAIRPIN = 12505, HORN_HAIRPIN = 12507, + LEGIONNAIRES_CAP = 12509, + ROYAL_FOOTMANS_BANDANA = 12510, FIGHTERS_MASK = 12511, TEMPLE_CROWN = 12512, WARLOCKS_CHAPEAU = 12513, @@ -4069,12 +4129,16 @@ xi.item = LEATHER_BANDANA_P1 = 12542, BREASTPLATE = 12544, KOENIG_CUIRASS = 12549, + IRON_MUSKETEERS_CUIRASS = 12550, CHAINMAIL = 12552, SILVER_MAIL = 12553, BANDED_MAIL = 12554, ADAMAN_HAUBERK = 12557, + ROYAL_KNIGHTS_CHAINMAIL = 12558, + ROYAL_SQUIRES_CHAINMAIL = 12559, SCALE_MAIL = 12560, BRASS_SCALE_MAIL = 12561, + CENTURIONS_SCALE_MAIL = 12566, LEATHER_VEST = 12568, STUDDED_VEST = 12570, CUIR_BOUILLI = 12571, @@ -4088,14 +4152,19 @@ xi.item = DOUBLET = 12592, GAMBISON = 12594, WOOL_GAMBISON = 12595, + MERCENARY_CAPTAINS_DOUBLET = 12598, ROBE = 12600, LINEN_ROBE = 12601, WOOL_ROBE = 12602, VELVET_ROBE = 12603, SILK_COAT = 12604, + TACTICIAN_MAGICIANS_COAT = 12606, TUNIC = 12608, CLOAK = 12610, WHITE_CLOAK = 12611, + COMBAT_CASTERS_CLOAK = 12614, + LEGIONNAIRES_HARNESS = 12629, + ROYAL_FOOTMANS_VEST = 12630, HUME_TUNIC = 12631, HUME_VEST = 12632, ELVAAN_JERKIN = 12633, @@ -4116,13 +4185,18 @@ xi.item = HUNTERS_JERKIN = 12648, DRACHEN_MAIL = 12649, EVOKERS_DOUBLET = 12650, + MERCENARYS_GI = 12653, GAUNTLETS = 12672, KOENIG_HANDSCHUHS = 12677, + IRON_MUSKETEERS_GAUNTLETS = 12678, CHAIN_MITTENS = 12680, ADAMAN_MUFFLERS = 12685, + ROYAL_KNIGHTS_MUFFLERS = 12686, + ROYAL_SQUIRES_MUFFLERS = 12687, SCALE_FINGER_GAUNTLETS = 12688, BRASS_FINGER_GAUNTLETS = 12689, SEIRYUS_KOTE = 12690, + CENTURIONS_FINGER_GAUNTLETS = 12694, BRONZE_MITTENS_P1 = 12695, LEATHER_GLOVES = 12696, LIZARD_GLOVES = 12697, @@ -4134,17 +4208,24 @@ xi.item = SCORPION_MITTENS = 12707, TEKKO = 12712, COTTON_TEKKO = 12713, + MERCENARYS_TEKKO = 12719, GLOVES = 12720, COTTON_GLOVES = 12721, + MERCENARY_CAPTAINS_GLOVES = 12726, ENGINEERS_GLOVES = 12727, CUFFS = 12728, LINEN_CUFFS = 12729, VELVET_CUFFS = 12731, + TACTICIAN_MAGICIANS_CUFFS = 12734, MITTS = 12736, + COMBAT_CASTERS_MITTS = 12743, PERLE_MOUFLES = 12745, AURORE_GLOVES = 12746, TEAL_CUFFS = 12747, + SCENTLESS_ARMLETS = 12749, NEW_MOON_ARMLETS = 12750, + LEGIONNAIRES_MITTENS = 12752, + ROYAL_FOOTMANS_GLOVES = 12753, HUME_M_GLOVES = 12754, ELVAAN_GLOVES = 12755, TARUTARU_MITTS = 12756, @@ -4155,14 +4236,18 @@ xi.item = CUISSES = 12800, MYTHRIL_CUISSES = 12801, KOENIG_DIECHLINGS = 12805, + IRON_MUSKETEERS_CUISSES = 12806, CHAIN_HOSE = 12808, SILVER_HOSE = 12809, BREECHES = 12810, DARKSTEEL_BREECHES = 12811, ADAMAN_BREECHES = 12813, + ROYAL_KNIGHTS_BREECHES = 12814, + ROYAL_SQUIRES_BREECHES = 12815, SCALE_CUISSES = 12816, BRASS_CUISSES = 12817, BYAKKOS_HAIDATE = 12818, + CENTURIONS_CUISSES = 12822, LEATHER_TROUSERS = 12824, LIZARD_TROUSERS = 12825, STUDDED_TROUSERS = 12826, @@ -4179,13 +4264,19 @@ xi.item = BRAIS = 12848, HOSE = 12850, WOOL_HOSE = 12851, + MERCENARY_CAPTAINS_HOSE = 12854, + MERCENARYS_SITABAKI = 12855, SLOPS = 12856, LINEN_SLOPS = 12857, VELVET_SLOPS = 12859, SILK_SLOPS = 12860, + TACTICIAN_MAGICIANS_SLOPS = 12862, SLACKS = 12864, LINEN_SLACKS = 12866, WHITE_SLACKS = 12867, + COMBAT_CASTERS_SLACKS = 12870, + LEGIONNAIRES_SUBLIGAR = 12881, + ROYAL_FOOTMANS_TROUSERS = 12882, HUME_SLACKS = 12883, HUME_PANTS = 12884, ELVAAN_M_CHAUSSES = 12885, @@ -4193,14 +4284,19 @@ xi.item = MITHRAN_LOINCLOTH = 12887, GALKAN_BRAGUETTE = 12888, ELVAAN_F_CHAUSSES = 12889, + FREESWORDS_SLOPS = 12915, PLATE_LEGGINGS = 12928, MYTHRIL_LEGGINGS = 12929, KOENIG_SCHUHS = 12933, + IRON_MUSKETEERS_SABATONS = 12934, GREAVES = 12936, ADAMAN_SOLLERETS = 12941, + ROYAL_KNIGHTS_SOLLERETS = 12942, + ROYAL_SQUIRES_SOLLERETS = 12943, SCALE_GREAVES = 12944, BRASS_GREAVES = 12945, SUZAKUS_SUNE_ATE = 12946, + CENTURIONS_GREAVES = 12950, BRONZE_LEGGINGS_P1 = 12951, LEATHER_HIGHBOOTS = 12952, LIZARD_LEDELSENS = 12953, @@ -4212,15 +4308,21 @@ xi.item = LEGGINGS = 12962, KYAHAN = 12968, COTTON_KYAHAN = 12969, + MERCENARYS_KYAHAN = 12975, GAITERS = 12976, BATTLE_BOOTS = 12980, + MERCENARY_CAPTAINS_GAITERS = 12982, ASH_CLOGS = 12984, HOLLY_CLOGS = 12985, CHESTNUT_SABOTS = 12986, EBONY_SABOTS = 12987, PIGACHES = 12988, + TACTICIAN_MAGICIANS_PIGACHES = 12990, SOLEA = 12992, MOCCASINS = 12995, + COMBAT_CASTERS_SHOES = 12998, + LEGIONNAIRES_LEGGINGS = 13003, + ROYAL_FOOTMANS_BOOTS = 13004, HUME_M_BOOTS = 13005, ELVAAN_M_LEDELSENS = 13006, TARUTARU_CLOMPS = 13007, @@ -4231,10 +4333,12 @@ xi.item = POWER_SANDALS = 13012, STUMBLING_SANDALS = 13013, LEAPING_BOOTS = 13014, + ROYAL_FOOTMANS_CLOGS = 13045, FUMA_KYAHAN = 13054, PEACOCK_CHARM = 13056, BUBURIMU_GORGET = 13057, BLOODBEAD_AMULET = 13058, + IRON_MUSKETEERS_GORGET = 13064, GORGET_P1 = 13065, FEATHER_COLLAR = 13075, DARKSTEEL_GORGET = 13079, @@ -4253,6 +4357,16 @@ xi.item = FLOWER_NECKLACE = 13094, SAND_CHARM = 13095, DOG_COLLAR = 13096, + REPUBLICAN_BRONZE_MEDAL = 13098, + REPUBLICAN_IRON_MEDAL = 13099, + REPUBLICAN_MYTHRIL_MEDAL = 13100, + GREEN_SCARF = 13101, + PAISLEY_SCARF = 13102, + CHECKERED_SCARF = 13103, + ROYAL_SQUIRES_COLLAR = 13104, + TEMPLE_KNIGHT_ARMY_COLLAR = 13105, + ROYAL_GUARDS_COLLAR = 13106, + ROYAL_KNIGHT_ARMY_COLLAR = 13107, CORAL_GORGET = 13108, HARMONIAS_TORQUE = 13109, BEAST_WHISTLE = 13110, @@ -4274,7 +4388,11 @@ xi.item = PROMISE_BADGE = 13135, STAR_NECKLACE = 13136, SPIDER_TORQUE = 13137, + FENRIRS_TORQUE = 13138, YINYANG_LORGNETTE = 13139, + GRAND_TEMPLE_KNIGHTS_COLLAR = 13140, + REPUBLICAN_GOLD_MEDAL = 13141, + WINDURSTIAN_SCARF = 13142, OPO_OPO_NECKLACE = 13143, UGGALEPIH_PENDANT = 13145, EVASION_TORQUE = 13148, @@ -4325,6 +4443,8 @@ xi.item = GOLD_MOOGLE_BELT = 13216, SILVER_MOOGLE_BELT = 13217, BRONZE_MOOGLE_BELT = 13218, + ROYAL_KNIGHTS_BELT = 13220, + MERCENARY_CAPTAINS_BELT = 13221, MASTER_BELT = 13236, SURVIVAL_BELT = 13237, DRUIDS_ROPE = 13238, @@ -4406,6 +4526,7 @@ xi.item = BLOODBEAD_EARRING = 13359, TWINSTONE_EARRING = 13360, DRONE_EARRING = 13361, + FENRIRS_EARRING = 13399, CASSIE_EARRING = 13402, ASSAULT_EARRING = 13403, NEMESIS_EARRING = 13404, @@ -4417,6 +4538,7 @@ xi.item = HEALERS_EARRING = 13437, WIZARDS_EARRING = 13438, WARLOCKS_EARRING = 13439, + SHELL_RING = 13442, OPAL_RING = 13443, SARDONYX_RING = 13444, GOLD_RING = 13445, @@ -4431,6 +4553,7 @@ xi.item = COPPER_RING = 13454, SILVER_RING = 13456, BEETLE_RING = 13457, + HORN_RING = 13459, CARAPACE_RING = 13461, DEATH_RING = 13462, ANGELS_RING = 13463, @@ -4474,6 +4597,9 @@ xi.item = BLITZ_RING = 13553, AEGIS_RING = 13554, PEACE_RING = 13555, + GRAND_KNIGHTS_RING = 13557, + GOLD_MUSKETEERS_RING = 13558, + PATRIARCH_PROTECTORS_RING = 13559, FIRE_RING = 13560, ICE_RING = 13561, WIND_RING = 13562, @@ -4483,9 +4609,13 @@ xi.item = PURPLE_RIBBON = 13569, RAM_MANTLE = 13570, WOLF_MANTLE = 13571, + FENRIRS_CAPE = 13572, NIGHT_CAPE = 13576, BLACK_CAPE = 13577, JESTERS_CAPE = 13579, + ROYAL_ARMY_MANTLE = 13580, + FEDERAL_ARMY_MANTLE = 13581, + REPUBLICAN_ARMY_MANTLE = 13582, COTTON_CAPE = 13584, WHITE_CAPE = 13585, RED_CAPE = 13586, @@ -4547,6 +4677,11 @@ xi.item = BRIGANDINE_ARMOR = 13703, CARAPACE_MASK = 13711, CARAPACE_HARNESS = 13712, + ROYAL_FOOTMANS_TUNIC = 13718, + ROYAL_SQUIRES_ROBE = 13719, + ROYAL_KNIGHTS_CLOAK = 13720, + IRON_MUSKETEERS_GAMBISON = 13721, + ROYAL_KNIGHTS_AKETON = 13722, PYRO_ROBE = 13723, FROST_ROBE = 13730, STOLID_BREASTPLATE = 13736, @@ -4564,6 +4699,7 @@ xi.item = GARRISON_TUNICA = 13818, LORDS_YUKATA = 13821, LADYS_YUKATA = 13822, + LEGIONNAIRES_CIRCLET = 13830, DODGE_HEADBAND = 13838, TAVNAZIAN_MASK = 13842, HEALERS_CAP = 13855, @@ -4574,6 +4710,7 @@ xi.item = OPO_OPO_CROWN = 13870, ZENITH_CROWN = 13876, ZENITH_CROWN_P1 = 13877, + PRESIDENTIAL_HAIRPIN = 13880, CRIMSON_MASK = 13908, BLOOD_MASK = 13909, KAISER_SCHALLER = 13911, @@ -4610,6 +4747,11 @@ xi.item = STEEL_FINGER_GAUNTLETS = 14003, ZENITH_MITTS = 14006, ZENITH_MITTS_P1 = 14007, + GRAND_TEMPLE_KNIGHTS_GAUNTLETS = 14013, + GRAND_TEMPLE_KNIGHTS_BANGLES = 14014, + PRAEFECTUSS_GLOVES = 14015, + MASTER_CASTERS_MITTS = 14016, + MASTER_CASTERS_BRACELETS = 14017, CRIMSON_FINGER_GAUNTLETS = 14058, BLOOD_FINGER_GAUNTLETS = 14059, KAISER_HANDSCHUHS = 14061, @@ -4720,6 +4862,9 @@ xi.item = AIKIDO_GI = 14411, PARADE_CUIRASS = 14412, GAUDY_HARNESS = 14413, + KINGDOM_AKETON = 14428, + REPUBLIC_AKETON = 14429, + FEDERATION_AKETON = 14430, FIGHTERS_LORICA_P1 = 14473, TEMPLE_CYCLAS_P1 = 14474, HEALERS_BRIAULT_P1 = 14475, @@ -5077,6 +5222,7 @@ xi.item = HORROR_HEAD_II = 15177, DREAM_HAT = 15178, DREAM_HAT_P1 = 15179, + CACHE_NEZ = 15180, PINEAL_HAT = 15181, WALKURE_MASK = 15185, MAATS_CAP = 15194, @@ -5249,6 +5395,8 @@ xi.item = REGEN_COLLAR = 15526, CHOCOBO_WHISTLE = 15533, OROCHI_NODOWA = 15539, + HOMING_RING = 15541, + RETURN_RING = 15542, RAJAS_RING = 15543, SAATVA_RING = 15544, TAMAS_RING = 15545, @@ -5256,6 +5404,7 @@ xi.item = BELLONAS_RING = 15549, MINERVAS_RING = 15550, DIABOLOSS_RING = 15557, + TROOPERS_RING = 15560, FIGHTERS_CUISSES_P1 = 15561, TEMPLE_HOSE_P1 = 15562, HEALERS_PANTALOONS_P1 = 15563, @@ -5295,6 +5444,8 @@ xi.item = YIGIT_SERAWEELS = 15606, PAHLUWAN_SERAWEELS = 15609, JET_SERAWEELS = 15613, + MERCENARYS_TROUSERS = 15622, + VOLUNTEERS_BRAIS = 15623, ARES_FLANCHARD = 15625, ENYOS_CUISSES = 15626, PHOBOSS_CUISSES = 15627, @@ -5349,6 +5500,7 @@ xi.item = STORM_GAMBIERAS = 15691, STORM_CRACKOWS = 15692, PAHLUWAN_CRACKOWS = 15695, + SNEAKING_BOOTS = 15698, ARES_SOLLERETS = 15711, ENYOS_LEGGINGS = 15712, PHOBOSS_SABATONS = 15713, @@ -5404,6 +5556,7 @@ xi.item = UNYIELDING_RING = 15778, GARRULOUS_RING = 15779, CERBERUS_RING = 15780, + MULTIPLE_RING = 15790, IOTA_RING = 15799, OMEGA_RING = 15800, FERAL_RING = 15802, @@ -5412,6 +5565,7 @@ xi.item = BALRAHNS_RING = 15807, ULTHALAMS_RING = 15808, JALZAHNS_RING = 15809, + LUZAFS_RING = 15810, TRUMPET_RING = 15813, MOLIONESS_RING = 15818, CARPENTERS_RING = 15819, @@ -5452,6 +5606,7 @@ xi.item = AL_ZAHBI_SASH = 15891, QIQIRN_SASH = 15907, BUCCANEERS_BELT = 15911, + LIEUTENANTS_SASH = 15912, PEISTE_BELT = 15913, DROVERS_BELT = 15919, COMMODORE_BELT = 15920, @@ -5463,6 +5618,9 @@ xi.item = EARTHY_BELT = 15936, FETTLE_BELT = 15937, ESPRIT_BELT = 15938, + TEMPLE_KNIGHTS_QUIVER = 15956, + IRON_MUSKETEERS_QUIVER = 15957, + COMBAT_CASTERS_QUIVER = 15958, TWILIGHT_BELT = 15959, MUSICAL_EARRING = 15961, STATIC_EARRING = 15962, @@ -5479,9 +5637,13 @@ xi.item = VISION_EARRING = 15973, VELOCITY_EARRING = 15974, PIRATES_EARRING = 15976, + HATEN_EARRING = 15981, + PRIESTS_EARRING = 15982, + CHAOTIC_EARRING = 15983, DELTA_EARRING = 15990, STAR_EARRING = 15991, CRIMSON_EARRING = 15993, + KOCCOS_EARRING = 15998, RAISING_EARRING = 16003, SUPREMACY_EARRING = 16004, PARAMOUNT_EARRING = 16005, @@ -5547,6 +5709,7 @@ xi.item = GNADBHODS_HELM = 16158, ZHAGOS_BARBUT = 16159, REE_HABALOS_HEADGEAR = 16160, + SENTINEL_SHIELD = 16168, WIVRE_SHIELD = 16170, IRON_RAM_SHIELD = 16172, TOWN_MOOGLE_SHIELD = 16182, @@ -5569,6 +5732,7 @@ xi.item = IMMORTALS_CAPE = 16217, ASLAN_CAPE = 16228, GLEEMANS_CAPE = 16229, + LIEUTENANTS_CAPE = 16230, SMILODON_MANTLE = 16231, PEISTE_MANTLE = 16233, LYNX_MANTLE = 16235, @@ -5590,6 +5754,7 @@ xi.item = KUBIRA_BEAD_NECKLACE = 16268, MORGANAS_CHOKER = 16269, CHANOIXS_GORGET = 16270, + LIEUTENANTS_GORGET = 16271, CHOCOBO_PULLUS_TORQUE = 16273, PENDANT_COMPASS = 16285, NITID_CHOKER = 16286, @@ -5646,13 +5811,16 @@ xi.item = BRASS_BAGHNAKHS = 16407, LYNX_BAGHNAKHS = 16409, PATAS = 16419, + LEGIONNAIRES_KNUCKLES = 16433, SONIC_KNUCKLES = 16434, + FREESWORDS_BAGHNAKHS = 16442, FRUIT_PUNCHES = 16443, RUSTY_DAGGER = 16447, BRONZE_DAGGER = 16448, BRASS_DAGGER = 16449, DAGGER = 16450, BASELARD = 16455, + COMBAT_CASTERS_DAGGER = 16463, BRONZE_KNIFE = 16465, KNIFE = 16466, KUKRI = 16473, @@ -5662,13 +5830,16 @@ xi.item = BEESTINGER = 16486, MINSTRELS_DAGGER = 16487, BRONZE_KNIFE_P1 = 16491, + SLEEP_DAGGER = 16497, ASPIR_KNIFE = 16509, BURNITE_SHELL_STONE = 16511, BILBO = 16512, TUCK = 16513, + JUNIOR_MUSKETEERS_TUCK = 16516, DEGEN = 16517, FLAME_DEGEN = 16522, FLEURET = 16524, + MUSKETEERS_SWORD = 16529, XIPHOS = 16530, BRASS_XIPHOS = 16531, GLADIUS = 16532, @@ -5677,19 +5848,24 @@ xi.item = BRONZE_SWORD = 16535, IRON_SWORD = 16536, MYTHRIL_SWORD = 16537, + ROYAL_ARCHERS_SWORD = 16544, BROADSWORD = 16545, SAPARA = 16551, SCIMITAR = 16552, TULWAR = 16553, RIDILL = 16555, + MUSKETEER_COMMANDERS_FALCHION = 16557, FALCHION = 16558, PLATINUM_CUTLASS = 16562, SPATHA = 16565, LONGSWORD = 16566, + TEMPLE_KNIGHT_ARMY_SWORD = 16571, CURTANA = 16575, HUNTING_SWORD = 16576, CLAYMORE = 16583, MYTHRIL_CLAYMORE = 16584, + ROYAL_GUARDS_SWORD = 16599, + ROYAL_SWORDSMANS_BLADE = 16601, PERDU_SWORD = 16602, RUSTY_GREATSWORD = 16606, CHAOSBRINGER = 16607, @@ -5700,12 +5876,14 @@ xi.item = BRASS_AXE = 16641, BONE_AXE = 16642, BATTLEAXE = 16643, + LEGIONNAIRES_AXE = 16648, MYTHRIL_PICK = 16651, RUSTY_PICK = 16655, ORCISH_AXE = 16656, TABAR = 16657, DOOM_TABAR = 16660, LIGHT_AXE = 16667, + COMBAT_CASTERS_AXE = 16669, MYTHRIL_PICK_HQ = 16670, STORM_AXE = 16675, RAZOR_AXE = 16678, @@ -5713,39 +5891,62 @@ xi.item = GERWITZS_AXE = 16681, KABRAKANS_AXE = 16684, PLATOON_AXE = 16687, + ROYAL_ARCHERS_CESTI = 16691, + TACTICIAN_MAGICIANS_HOOKS = 16694, BUTTERFLY_AXE = 16704, GREATAXE = 16705, HEAVY_AXE = 16706, + CENTURIONS_AXE = 16712, NECKCHOPPER = 16714, EXECUTIONER = 16723, FORSETIS_AXE = 16726, SCHWARZ_AXT = 16728, AXE_OF_TRIALS = 16735, + ROYAL_SQUIRES_DAGGER = 16744, + DECURIONS_DAGGER = 16745, + MERCENARYS_KNIFE = 16746, + MERCENARY_CAPTAINS_KUKRI = 16747, MARAUDERS_KNIFE = 16764, PAPER_KNIFE = 16766, BRONZE_ZAGHNAL = 16768, BRASS_ZAGHNAL = 16769, ZAGHNAL = 16770, + MERCENARY_CAPTAINS_SCYTHE = 16776, + LEGIONNAIRES_SCYTHE = 16780, VASSAGOS_SCYTHE = 16788, SCYTHE_OF_TRIALS = 16793, RAVEN_SCYTHE = 16798, + SENIOR_GOLD_MUSKETEERS_SCYTHE = 16799, + ROYAL_GUARDS_FLEURET = 16805, + CENTURIONS_SWORD = 16806, + COMBAT_CASTERS_SCIMITAR = 16807, + WISE_WIZARDS_BILBO = 16808, + WISE_WIZARDS_ANELACE = 16809, + TACTICIAN_MAGICIANS_ESPADON = 16810, FENCING_DEGEN = 16829, BRONZE_SPEAR = 16833, BRASS_SPEAR = 16834, SPEAR = 16835, TRIDENT = 16837, + ROYAL_SQUIRES_HALBERD = 16844, LANCE = 16845, MERCURIAL_SPEAR = 16850, + ROYAL_KNIGHT_ARMY_LANCE = 16851, + ROYAL_SPEARMANS_SPEAR = 16852, HEAVY_HALBERD = 16868, GAE_BOLG = 16885, + GRAND_KNIGHTS_LANCE = 16886, PEREGRINE = 16887, SPEAR_OF_TRIALS = 16892, + RESERVE_CAPTAINS_LANCE = 16893, KUNAI = 16896, KAGEBOSHI = 16897, SHINOGI = 16913, + MERCENARYS_GREATSWORD = 16930, GERWITZS_SWORD = 16940, LOCKHEART = 16944, SWORD_OF_TRIALS = 16952, + RESERVE_CAPTAINS_GREATSWORD = 16953, PLATOON_SWORD = 16959, KAMEWARI = 16968, YUKITSUGU = 16971, @@ -5772,6 +5973,7 @@ xi.item = PET_FOOD_ETA_BISCUIT = 17022, PET_FOOD_THETA_BISCUIT = 17023, ASH_CLUB = 17024, + FREESWORDS_CLUB = 17028, BOUNCER_CLUB = 17029, GREAT_CLUB = 17030, SHELL_SCEPTER = 17031, @@ -5783,6 +5985,7 @@ xi.item = BRASS_HAMMER = 17043, WARHAMMER = 17044, MAUL = 17045, + DECURIONS_HAMMER = 17048, MAPLE_WAND = 17049, WILLOW_WAND = 17050, YEW_WAND = 17051, @@ -5791,30 +5994,41 @@ xi.item = BRONZE_ROD = 17059, ROD = 17060, MYTHRIL_ROD = 17061, + ROYAL_GUARDS_ROD = 17067, ONION_ROD = 17068, CHOCOBO_WAND = 17074, EARTH_WAND = 17076, BRASS_ROD = 17081, + TACTICIAN_MAGICIANS_WAND = 17082, TIME_HAMMER = 17083, ASH_STAFF = 17088, HOLLY_STAFF = 17089, ELM_STAFF = 17090, OAK_STAFF = 17091, + WISE_WIZARDS_STAFF = 17094, ASH_POLE = 17095, HOLLY_POLE = 17096, ELM_POLE = 17097, OAK_POLE = 17098, + MERCENARYS_POLE = 17103, ONION_STAFF = 17104, HEALING_STAFF = 17108, MISERY_STAFF = 17116, HOLLY_STAFF_P1 = 17125, + LEGIONNAIRES_STAFF = 17128, + MUSKETEERS_POLE = 17129, + FREESWORDS_STAFF = 17130, WILLOW_WAND_P1 = 17138, + ROYAL_SQUIRES_MACE = 17150, + MUSKETEER_COMMANDERS_ROD = 17151, SHORTBOW = 17152, SELF_BOW = 17153, WRAPPED_BOW = 17154, + FREESWORDS_BOW = 17159, LONGBOW = 17160, POWER_BOW = 17161, GREAT_BOW = 17162, + ROYAL_ARCHERS_LONGBOW = 17167, SPEED_BOW = 17170, LONGBOW_P1 = 17177, EURYTOS_BOW = 17187, @@ -5832,12 +6046,14 @@ xi.item = CROSSBOW = 17217, ZAMBURAK = 17218, HEAVY_CROSSBOW = 17220, + LEGIONNAIRES_CROSSBOW = 17223, CROSSBOW_P1 = 17225, GROSVENEURS_BOW = 17245, ZISKAS_CROSSBOW = 17246, RIKONODO = 17247, ARQUEBUS = 17248, CULVERIN = 17252, + MUSKETEER_GUN = 17253, PLATOON_GUN = 17271, MILITARY_GUN = 17272, COFFINMAKER = 17275, @@ -5845,6 +6061,8 @@ xi.item = HEDGEHOG_BOMB = 17277, BOOMERANG = 17280, WINGEDGE = 17281, + COMBAT_CASTERS_BOOMERANG = 17282, + JUNIOR_MUSKETEERS_CHAKRAM = 17283, CHAKRAM = 17284, MOONRING_BLADE = 17285, PEBBLE = 17296, @@ -5887,9 +6105,11 @@ xi.item = LAMIA_HARP = 17356, FRENZY_FIFE = 17365, MARYS_HORN = 17366, + ROYAL_SPEARMANS_HORN = 17367, HAMELIN_FLUTE = 17379, MITHRAN_FISHING_ROD = 17380, CARBON_FISHING_ROD = 17384, + GLASS_FIBER_FISHING_ROD = 17385, LU_SHANGS_FISHING_ROD = 17386, BAMBOO_FISHING_ROD = 17389, YEW_FISHING_ROD = 17390, @@ -5909,6 +6129,8 @@ xi.item = KRAKEN_CLUB = 17440, MORGENSTERN = 17451, CLUB_OF_TRIALS = 17456, + SENIOR_GOLD_MUSKETEERS_ROD = 17457, + RESERVE_CAPTAINS_MACE = 17458, PLATOON_MACE = 17462, SEALED_MACE = 17463, PURGATORY_MACE = 17464, @@ -5922,9 +6144,11 @@ xi.item = SPARTAN_CESTI = 17491, SHIVAS_CLAWS = 17492, KNUCKLES_OF_TRIALS = 17507, + MASTER_CASTERS_BAGHNAKHS = 17508, DESTROYERS = 17509, PLATOON_CESTI = 17519, POLE_OF_TRIALS = 17527, + MASTER_CASTERS_POLE = 17530, RAMUHS_STAFF = 17531, KUKULCANS_STAFF = 17532, TREAT_STAFF = 17566, @@ -5938,6 +6162,9 @@ xi.item = MILITARY_POLE = 17580, MIGHTY_POLE = 17581, PRELATIC_POLE = 17582, + KINGDOM_SIGNET_STAFF = 17583, + REPUBLIC_SIGNET_STAFF = 17584, + FEDERATION_SIGNET_STAFF = 17585, TREAT_STAFF_II = 17588, THYRSUSSTAB = 17589, MARTIAL_STAFF = 17593, @@ -5947,6 +6174,7 @@ xi.item = BONE_KNIFE = 17610, CHICKEN_KNIFE = 17615, DAGGER_OF_TRIALS = 17616, + MASTER_CASTERS_KNIFE = 17617, KIDNEY_DAGGER = 17618, BUCCANEERS_KNIFE = 17622, BARTHOLOMEWS_KNIFE = 17623, @@ -5958,6 +6186,7 @@ xi.item = NADRS = 17650, JOYEUSE = 17652, SAPARA_OF_TRIALS = 17654, + SENIOR_GOLD_MUSKETEERS_SCIMITAR = 17655, SEIRYUS_SWORD = 17659, KILIJ = 17660, STORM_SCIMITAR = 17661, @@ -5984,6 +6213,7 @@ xi.item = IMMORTALS_SCIMITAR = 17717, LEECH_SCIMITAR = 17718, SANGUINE_SWORD = 17721, + SINGH_KILIJ = 17723, HAUTECLAIRE = 17738, PERDU_HANGER = 17741, VORPAL_SWORD = 17742, @@ -6006,6 +6236,7 @@ xi.item = NIKKARIAOE = 17792, SENJUINRIKIO = 17793, SHAMO = 17798, + GOLD_MUSKETEERS_UCHIGATANA = 17807, MUMEITO = 17809, FUTSUNO_MITAMA = 17810, KATAYAMA_ICHIMONJI = 17811, @@ -6042,6 +6273,7 @@ xi.item = LOHAR = 17927, JUGGERNAUT = 17928, PICK_OF_TRIALS = 17933, + RESERVE_CAPTAINS_PICK = 17934, DE_SAINTRES_AXE = 17936, LEOPARD_AXE = 17937, WOODVILLES_AXE = 17938, @@ -6107,6 +6339,7 @@ xi.item = BOMB_CORE = 18139, UNGUR_BOOMERANG = 18141, BOW_OF_TRIALS = 18144, + MASTER_CASTERS_BOW = 18145, GUN_OF_TRIALS = 18146, CULVERIN_P1 = 18147, ACID_BOLT = 18148, @@ -6121,6 +6354,7 @@ xi.item = SLEEP_ARROW = 18158, DEMON_ARROW = 18159, SPARTAN_BULLET = 18160, + FENRIRS_STONE = 18165, HAPPY_EGG = 18166, FORTUNE_EGG = 18167, IMPERIAL_EGG = 18168, @@ -6146,6 +6380,7 @@ xi.item = DOGBOLT_P4 = 18193, DOGBOLT_P5 = 18194, ANTIQUE_BULLET = 18195, + SENIOR_GOLD_MUSKETEERS_AXE = 18196, BYAKKOS_AXE = 18198, PLATOON_CUTTER = 18209, RAIFU = 18210, @@ -6327,7 +6562,14 @@ xi.item = STORM_ZAMBURAK = 18684, IMPERIAL_KAMAN = 18685, IMPERIAL_GUN = 18686, + VOLUNTEERS_DART = 18689, + MERCENARYS_DART = 18690, + IMPERIAL_DART = 18691, + MAMOOLBANE = 18692, + LAMIABANE = 18693, + TROLLBANE = 18694, TRUMP_GUN = 18702, + SHARK_GUN = 18703, KOGA_SHURIKEN = 18712, VALIS_BOW = 18714, PERDU_BOW = 18717, @@ -6349,6 +6591,7 @@ xi.item = TEMPLE_KNIGHTS_ARROW = 18738, IRON_MUSKETEERS_BOLT = 18739, COMBAT_CASTERS_ARROW = 18740, + PUPPET_CLAWS = 18742, RETALIATORS = 18752, BURNING_FISTS = 18753, INFERNO_CLAWS = 18754, @@ -6396,6 +6639,9 @@ xi.item = DIRE_SCYTHE = 18964, TERPSICHORE_75 = 18989, MURGLEIS_75 = 18995, + KATANA_STRAP = 19021, + AXE_GRIP = 19022, + STAFF_STRAP = 19023, SWORD_STRAP = 19024, POLE_GRIP = 19025, SPEAR_STRAP = 19026, @@ -6619,6 +6865,7 @@ xi.item = HVERGELMIR_95 = 19643, GANDIVA_95 = 19644, ARMAGEDDON_95 = 19645, + SHAREERAVADI_P3 = 19692, ANARCHY_P3 = 19709, MURGLIES_95 = 19714, TERPSICHORE_95 = 19728, @@ -8207,6 +8454,8 @@ xi.item = EVANESCENCE_RING = 26160, SHUKUYU_RING = 26161, RAHAB_RING = 26162, + CALIBER_RING = 26164, + FACILITY_RING = 26165, BEGRUDGING_RING = 26172, APATE_RING = 26173, PERSIS_RING = 26174, @@ -9745,6 +9994,7 @@ xi.item = UNDECENNIAL_RING = 28528, SUPERSHEAR_RING = 28535, LEBECHE_RING = 28538, + WARP_RING = 28540, BARATARIA_RING = 28548, DUODECENNIAL_RING = 28562, VOCATION_RING = 28563, diff --git a/scripts/events/login_campaign_data.lua b/scripts/events/login_campaign_data.lua index 98f0d926ea3..a3f75e28361 100644 --- a/scripts/events/login_campaign_data.lua +++ b/scripts/events/login_campaign_data.lua @@ -14,11 +14,11 @@ local prizes = ['price'] = 10, ['items'] = { - 1126, -- Beastmen's Seal - 1127, -- Kindred's Seal - 2955, -- Kindred's Crest - 2956, -- High Kindred's Crest - 2957, -- Sacred Kindred's Crest + xi.item.BEASTMENS_SEAL, + xi.item.KINDREDS_SEAL, + xi.item.KINDREDS_CREST, + xi.item.HIGH_KINDREDS_CREST, + xi.item.SACRED_KINDREDS_CREST, -- 1857, -- Cordial Invite -- 2306, -- Martial Ball Invite -- 5364, -- Training Grounds Key @@ -40,20 +40,20 @@ local prizes = ['price'] = 100, ['items'] = { - 8734, -- Mog Kupon I-S1 - 8966, -- Eudaemon Blade - 8967, -- Eudaemon Cape - 8968, -- Eudaemon Ring - 8969, -- Eudaemon Sash - 8970, -- Eudaemon Shield - 17006, -- Drill Calamary - 17007, -- Dwarf Pugil - 6413, -- Astral Cube + xi.item.MOG_KUPON_I_S1, -- Mog Kupon I-S1 + xi.item.EUDAEMON_BLADE, -- Eudaemon Blade + xi.item.EUDAEMON_CAPE, -- Eudaemon Cape + xi.item.EUDAEMON_RING, -- Eudaemon Ring + xi.item.EUDAEMON_SASH, -- Eudaemon Sash + xi.item.EUDAEMON_SHIELD, -- Eudaemon Shield + xi.item.DRILL_CALAMARY, -- Drill Calamary + xi.item.DWARF_PUGIL, -- Dwarf Pugil + xi.item.ASTRAL_CUBE, -- Astral Cube -- 9891, -- Zinnia Orb -- 10112, -- Cipher: Zeid -- 10113, -- Cipher: Lion - 10118, -- Cipher: Naja - 10120, -- Cipher: Lehko + xi.item.CIPHER_OF_NAJAS_ALTER_EGO, -- Cipher: Naja + xi.item.CIPHER_OF_LEHKOS_ALTER_EGO, -- Cipher: Lehko -- 10124, -- Cipher: Luzaf -- 10125, -- Cipher: Najelith -- 10129, -- Cipher: Domina @@ -81,8 +81,8 @@ local prizes = -- 10178, -- Cipher: Ullegore -- 10179, -- Cipher: Teodor -- 10183, -- Cipher: Darrcuiln - 20713, -- Excalipoor - 6008, -- Copse Candy + xi.item.EXCALIPOOR, -- Excalipoor + xi.item.PIECE_OF_COPSE_CANDY, -- Copse Candy }, }, @@ -92,12 +92,12 @@ local prizes = ['items'] = { -- 10187, -- Cipher: Shantotto II - 10069, -- ♪Goobbue - 10051, -- ♪Crab - 10058, -- ♪Beetle + xi.item.MOUNT_GOOBBUE, -- ♪Goobbue + xi.item.MOUNT_CRAB, -- ♪Crab + xi.item.MOUNT_BEETLE, -- ♪Beetle -- TODO: The other mounts - 10384, -- Cumulus Masque - 20666, -- Blizzard Brand + xi.item.CUMULUS_MASQUE, -- Cumulus Masque + xi.item.BLIZZARD_BRAND, -- Blizzard Brand -- 25658, -- Wyrm. Masque +1 -- 25757, -- Wyrmking Suit +1 -- 5854, -- Frayed Pouch (B) @@ -121,7 +121,7 @@ local prizes = ['items'] = { -- TODO: Special month-to-month things - 10073, -- ♪Dhalmel + xi.item.MOUNT_DHALMEL, -- ♪Dhalmel }, }, @@ -131,15 +131,15 @@ local prizes = ['price'] = 750, ['items'] = { - 3885, -- Melodious Plans - 3886, -- Timbre Case Kit - 3887, -- Musichinery Kit + xi.item.COPY_OF_MELODIOUS_PLANS, -- Melodious Plans + xi.item.TIMBRE_CASE_KIT, -- Timbre Case Kit + xi.item.MUSICHINERY_KIT, -- Musichinery Kit -- 9079, -- Kitchen Brick -- 9080, -- Kitchen Stove -- 9081, -- Kitchen Plate - 3339, -- Honey Wine - 3341, -- Beastly Shank - 3343, -- Blue Pondweed + xi.item.JUG_OF_HONEY_WINE, -- Honey Wine + xi.item.BEASTLY_SHANK, -- Beastly Shank + xi.item.CLUMP_OF_BLUE_PONDWEED, -- Blue Pondweed -- 1873, -- Brigand's Chart -- 1874, -- Pirate's Chart -- 6381, -- Fisherman's Feast @@ -157,8 +157,8 @@ local prizes = ['items'] = { -- 6499, -- Patio Design Plans - 26165, -- Facility Ring - 26164, -- Caliber Ring + xi.item.FACILITY_RING, -- Facility Ring + xi.item.CALIBER_RING, -- Caliber Ring -- 6486, -- Frayed Sack (Pel) -- 6487, -- Frayed Sack (Fer) -- 6488, -- Frayed Sack (Tau) @@ -170,9 +170,9 @@ local prizes = ['price'] = 1500, ['items'] = { - 3340, -- Sweet Tea - 3342, -- Savory Shank - 3344, -- Red Pondweed + xi.item.CUP_OF_SWEET_TEA, -- Sweet Tea + xi.item.SAVORY_SHANK, -- Savory Shank + xi.item.CLUMP_OF_RED_PONDWEED, -- Red Pondweed -- 8720, -- Maliya. Coral Orb -- 8722, -- Hepatizon Ingot -- 8724, -- Beryllium Ingot @@ -181,4 +181,5 @@ local prizes = }, }, } + return prizes diff --git a/scripts/globals/abyssea.lua b/scripts/globals/abyssea.lua index 6cfbe6e4d58..50214bfa5f4 100644 --- a/scripts/globals/abyssea.lua +++ b/scripts/globals/abyssea.lua @@ -69,6 +69,7 @@ xi.abyssea.abyssiteType = DEMILUNE = 20, } +---@enum xi.abyssea.itemType xi.abyssea.itemType = { ITEM = 1, @@ -777,7 +778,10 @@ xi.abyssea.giveNMDrops = function(mob, player, ID) local playerClaimed = GetPlayerByID(mob:getLocalVar('[ClaimedBy]')) for _, keyItemId in pairs(normalDrops) do - if xi.abyssea.canGiveNMKI(mob, 20) then + if + playerClaimed and + xi.abyssea.canGiveNMKI(mob, 20) + then npcUtil.giveKeyItem(playerClaimed, keyItemId, ID.text.PLAYER_KEYITEM_OBTAINED) end end diff --git a/scripts/globals/besieged.lua b/scripts/globals/besieged.lua index 6ec8d7f90a9..28d86f99bf5 100644 --- a/scripts/globals/besieged.lua +++ b/scripts/globals/besieged.lua @@ -49,70 +49,81 @@ end ----------------------------------- -- function getISPItem(i) returns the item ID and cost of the imperial standing -- points item indexed by i (the same value as that used by the vendor event.) --- TODO: Format table, use xi.items enum, and descriptive parameter name +-- TODO: Separate packed data into something more logical ----------------------------------- local function getISPItem(i) + ---@class imperialStandingItems : { [integer]: { id: xi.item, price: integer } } local imperialStandingItems = { -- Common Items - [1] = { id = 4182, price = 7 }, -- scroll of Instant Reraise - [4097] = { id = 4181, price = 10 }, -- scroll of Instant Warp - [8193] = { id = 2230, price = 100 }, -- lambent fire cell - [12289] = { id = 2231, price = 100 }, -- lambent water cell - [16385] = { id = 2232, price = 100 }, -- lambent earth cell - [20481] = { id = 2233, price = 100 }, -- lambent wind cell - [24577] = { id = 19021, price = 20000 }, -- katana strap - [28673] = { id = 19022, price = 20000 }, -- axe grip - [32769] = { id = 19023, price = 20000 }, -- staff strap - [36865] = { id = 3307, price = 5000 }, -- heat capacitor - [40961] = { id = 3308, price = 5000 }, -- power cooler - [45057] = { id = 3309, price = 5000 }, -- barrage turbine - [53249] = { id = 3311, price = 5000 }, -- galvanizer - [57345] = { id = 6409, price = 50000 }, - [69633] = { id = xi.item.CIPHER_OF_MIHLIS_ALTER_EGO, price = 5000 }, -- mihli + [ 1] = { id = xi.item.SCROLL_OF_INSTANT_RERAISE, price = 7 }, + [ 4097] = { id = xi.item.SCROLL_OF_INSTANT_WARP, price = 10 }, + [ 8193] = { id = xi.item.LAMBENT_FIRE_CELL, price = 100 }, + [12289] = { id = xi.item.LAMBENT_WATER_CELL, price = 100 }, + [16385] = { id = xi.item.LAMBENT_EARTH_CELL, price = 100 }, + [20481] = { id = xi.item.LAMBENT_WIND_CELL, price = 100 }, + [24577] = { id = xi.item.KATANA_STRAP, price = 20000 }, + [28673] = { id = xi.item.AXE_GRIP, price = 20000 }, + [32769] = { id = xi.item.STAFF_STRAP, price = 20000 }, + [36865] = { id = xi.item.HEAT_CAPACITOR, price = 5000 }, + [40961] = { id = xi.item.POWER_COOLER, price = 5000 }, + [45057] = { id = xi.item.BARRAGE_TURBINE, price = 5000 }, + [53249] = { id = xi.item.GALVANIZER, price = 5000 }, + [57345] = { id = xi.item.EPHRAMADIAN_THRONE, price = 50000 }, + [69633] = { id = xi.item.CIPHER_OF_MIHLIS_ALTER_EGO, price = 5000 }, + -- Private Second Class -- Map Key Items (handled separately) -- Private First Class - [33] = { id = 18689, price = 2000 }, -- volunteer's dart - [289] = { id = 18690, price = 2000 }, -- mercenary's dart - [545] = { id = 18691, price = 2000 }, -- Imperial dart + [ 33] = { id = xi.item.VOLUNTEERS_DART, price = 2000 }, + [289] = { id = xi.item.MERCENARYS_DART, price = 2000 }, + [545] = { id = xi.item.IMPERIAL_DART, price = 2000 }, + -- Superior Private - [49] = { id = 18692, price = 4000 }, -- Mamoolbane - [305] = { id = 18693, price = 4000 }, -- Lamiabane - [561] = { id = 18694, price = 4000 }, -- Trollbane - [817] = { id = 15810, price = 4000 }, -- Luzaf's ring + [ 49] = { id = xi.item.MAMOOLBANE, price = 4000 }, + [305] = { id = xi.item.LAMIABANE, price = 4000 }, + [561] = { id = xi.item.TROLLBANE, price = 4000 }, + [817] = { id = xi.item.LUZAFS_RING, price = 4000 }, + -- Lance Corporal - [65] = { id = 15698, price = 8000 }, -- sneaking boots - [321] = { id = 15560, price = 8000 }, -- trooper's ring - [577] = { id = 16168, price = 8000 }, -- sentinel shield + [ 65] = { id = xi.item.SNEAKING_BOOTS, price = 8000 }, + [321] = { id = xi.item.TROOPERS_RING, price = 8000 }, + [577] = { id = xi.item.SENTINEL_SHIELD, price = 8000 }, + -- Corporal - [81] = { id = 18703, price = 16000 }, -- shark gun - [337] = { id = 18742, price = 16000 }, -- puppet claws - [593] = { id = 17723, price = 16000 }, -- singh kilij + [ 81] = { id = xi.item.SHARK_GUN, price = 16000 }, + [337] = { id = xi.item.PUPPET_CLAWS, price = 16000 }, + [593] = { id = xi.item.SINGH_KILIJ, price = 16000 }, + -- Sergeant - [97] = { id = 15622, price = 24000 }, -- mercenary's trousers - [353] = { id = 15790, price = 24000 }, -- multiple ring - [609] = { id = 15981, price = 24000 }, -- haten earring + [ 97] = { id = xi.item.MERCENARYS_TROUSERS, price = 24000 }, + [353] = { id = xi.item.MULTIPLE_RING, price = 24000 }, + [609] = { id = xi.item.HATEN_EARRING, price = 24000 }, + -- Sergeant Major - [113] = { id = 15623, price = 32000 }, -- volunteer's brais - [369] = { id = 15982, price = 32000 }, -- priest's earring - [625] = { id = 15983, price = 32000 }, -- chaotic earring + [113] = { id = xi.item.VOLUNTEERS_BRAIS, price = 32000 }, + [369] = { id = xi.item.PRIESTS_EARRING, price = 32000 }, + [625] = { id = xi.item.CHAOTIC_EARRING, price = 32000 }, + -- Chief Sergeant - [129] = { id = 17741, price = 40000 }, -- perdu hanger - [385] = { id = 18943, price = 40000 }, -- perdu sickle - [641] = { id = 18850, price = 40000 }, -- perdu wand - [897] = { id = 18717, price = 40000 }, -- perdu bow + [129] = { id = xi.item.PERDU_HANGER, price = 40000 }, + [385] = { id = xi.item.PERDU_SICKLE, price = 40000 }, + [641] = { id = xi.item.PERDU_WAND, price = 40000 }, + [897] = { id = xi.item.PERDU_BOW, price = 40000 }, + -- Second Lieutenant - [145] = { id = 16602, price = 48000 }, -- perdu sword - [401] = { id = 18425, price = 48000 }, -- perdu blade - [657] = { id = 18491, price = 48000 }, -- perdu voulge - [913] = { id = 18588, price = 48000 }, -- perdu staff - [1169] = { id = 18718, price = 48000 }, -- perdu crossbow + [ 145] = { id = xi.item.PERDU_SWORD, price = 48000 }, + [ 401] = { id = xi.item.PERDU_BLADE, price = 48000 }, + [ 657] = { id = xi.item.PERDU_VOULGE, price = 48000 }, + [ 913] = { id = xi.item.PERDU_STAFF, price = 48000 }, + [1169] = { id = xi.item.PERDU_CROSSBOW, price = 48000 }, + -- First Lieutenant - [161] = { id = 16271, price = 56000 }, -- lieutenant's gorget - [417] = { id = 15912, price = 56000 }, -- lieutenant's sash - [673] = { id = 16230, price = 56000 } -- lieutenant's cape + [161] = { id = xi.item.LIEUTENANTS_GORGET, price = 56000 }, + [417] = { id = xi.item.LIEUTENANTS_SASH, price = 56000 }, + [673] = { id = xi.item.LIEUTENANTS_CAPE, price = 56000 }, } + local item = imperialStandingItems[i] if item then return item.id, item.price diff --git a/scripts/globals/conquest.lua b/scripts/globals/conquest.lua index 318b26d2c18..ebeda13fbff 100644 --- a/scripts/globals/conquest.lua +++ b/scripts/globals/conquest.lua @@ -705,205 +705,207 @@ end -- (LOCAL) overseer stock ----------------------------------- +---@class overseerInvComming : { [integer] : { cp: integer, lvl: integer, item: xi.item, rank: integer? } } local overseerInvCommon = { - [32928] = { cp = 7, lvl = 1, item = 4182 }, -- scroll_of_instant_reraise - [32929] = { cp = 10, lvl = 1, item = 4181 }, -- scroll_of_instant_warp - [32930] = { cp = 2500, lvl = 1, item = 15542 }, -- return_ring - [32931] = { cp = 9000, lvl = 1, item = 15541 }, -- homing_ring - [32933] = { cp = 500, lvl = 1, item = 15761 }, -- chariot_band - [32934] = { cp = 1000, lvl = 1, item = 15762 }, -- empress_band - [32935] = { cp = 2000, lvl = 1, item = 15763 }, -- emperor_band - [32936] = { cp = 5000, lvl = 1, item = 28540 }, -- warp_ring - [32937] = { cp = 1000, lvl = 1, item = xi.item.CIPHER_OF_TENZENS_ALTER_EGO }, - [32938] = { cp = 1000, lvl = 1, item = xi.item.CIPHER_OF_RAHALS_ALTER_EGO }, - [32939] = { cp = 1000, lvl = 1, item = xi.item.CIPHER_OF_KUKKIS_ALTER_EGO }, - [32941] = { cp = 20000, lvl = 1, item = xi.item.REFINED_CHAIR_SET, rank = 10 }, - [32942] = { cp = 1000, lvl = 1, item = xi.item.CIPHER_OF_MAKKIS_ALTER_EGO }, + [32928] = { cp = 7, lvl = 1, item = xi.item.SCROLL_OF_INSTANT_RERAISE }, + [32929] = { cp = 10, lvl = 1, item = xi.item.SCROLL_OF_INSTANT_WARP }, + [32930] = { cp = 2500, lvl = 1, item = xi.item.RETURN_RING }, + [32931] = { cp = 9000, lvl = 1, item = xi.item.HOMING_RING }, + [32933] = { cp = 500, lvl = 1, item = xi.item.CHARIOT_BAND }, + [32934] = { cp = 1000, lvl = 1, item = xi.item.EMPRESS_BAND }, + [32935] = { cp = 2000, lvl = 1, item = xi.item.EMPEROR_BAND }, + [32936] = { cp = 5000, lvl = 1, item = xi.item.WARP_RING }, + [32937] = { cp = 1000, lvl = 1, item = xi.item.CIPHER_OF_TENZENS_ALTER_EGO }, + [32938] = { cp = 1000, lvl = 1, item = xi.item.CIPHER_OF_RAHALS_ALTER_EGO }, + [32939] = { cp = 1000, lvl = 1, item = xi.item.CIPHER_OF_KUKKIS_ALTER_EGO }, + [32941] = { cp = 20000, lvl = 1, item = xi.item.REFINED_CHAIR_SET, rank = 10 }, + [32942] = { cp = 1000, lvl = 1, item = xi.item.CIPHER_OF_MAKKIS_ALTER_EGO }, } +---@class overseerInvNation : { [xi.nation] : { [integer]: { rank: integer, cp: integer, lvl: integer, item: xi.item, place: integer? } } } local overseerInvNation = { [xi.nation.SANDORIA] = { - [32768] = { rank = 1, cp = 1000, lvl = 10, item = 17167 }, -- royal_archers_longbow - [32769] = { rank = 1, cp = 1000, lvl = 10, item = 16544 }, -- royal_archers_sword - [32770] = { rank = 1, cp = 1000, lvl = 10, item = 12510 }, -- royal_footmans_bandana - [32771] = { rank = 1, cp = 1000, lvl = 10, item = 12753 }, -- royal_footmans_gloves - [32772] = { rank = 1, cp = 1000, lvl = 10, item = 13004 }, -- royal_footmans_boots - [32773] = { rank = 1, cp = 1000, lvl = 10, item = 16691, place = 2 }, -- royal_archers_cesti - [32774] = { rank = 1, cp = 1000, lvl = 10, item = 13718, place = 1 }, -- royal_footmans_tunic - [32784] = { rank = 2, cp = 2000, lvl = 18, item = 16852 }, -- royal_spearmans_spear - [32785] = { rank = 2, cp = 2000, lvl = 10, item = 12630 }, -- royal_footmans_vest - [32786] = { rank = 2, cp = 2000, lvl = 20, item = 12882 }, -- royal_footmans_trousers - [32787] = { rank = 2, cp = 2000, lvl = 20, item = 17367, place = 2 }, -- royal_spearmans_horn - [32788] = { rank = 2, cp = 2000, lvl = 20, item = 13045, place = 1 }, -- royal_footmans_clogs - [32800] = { rank = 3, cp = 4000, lvl = 30, item = 16844 }, -- royal_squires_halberd - [32801] = { rank = 3, cp = 4000, lvl = 30, item = 13104 }, -- royal_squires_collar - [32802] = { rank = 3, cp = 4000, lvl = 30, item = 12431 }, -- royal_squires_helm - [32803] = { rank = 3, cp = 4000, lvl = 30, item = 12687 }, -- royal_squires_mufflers - [32804] = { rank = 3, cp = 4000, lvl = 30, item = 12943 }, -- royal_squires_sollerets - [32805] = { rank = 3, cp = 4000, lvl = 30, item = 16744, place = 2 }, -- royal_squires_dagger - [32806] = { rank = 3, cp = 4000, lvl = 30, item = 17150, place = 1 }, -- royal_squires_mace - [32807] = { rank = 3, cp = 4000, lvl = 1, item = 13495, place = 1 }, -- san_dorian_ring - [32816] = { rank = 4, cp = 8000, lvl = 40, item = 16601 }, -- royal_swordsmans_blade - [32817] = { rank = 4, cp = 8000, lvl = 40, item = 12559 }, -- royal_squires_chainmail - [32818] = { rank = 4, cp = 8000, lvl = 40, item = 12815 }, -- royal_squires_breeches - [32819] = { rank = 4, cp = 8000, lvl = 40, item = 13719, place = 2 }, -- royal_squires_robe - [32820] = { rank = 4, cp = 8000, lvl = 40, item = 12336, place = 1 }, -- royal_squires_shield - [32832] = { rank = 5, cp = 16000, lvl = 50, item = 16851 }, -- royal_knight_army_lance - [32833] = { rank = 5, cp = 16000, lvl = 50, item = 16571 }, -- temple_knight_army_sword - [32834] = { rank = 5, cp = 16000, lvl = 50, item = 12312 }, -- royal_knight_army_shield - [32835] = { rank = 5, cp = 16000, lvl = 50, item = 12313 }, -- temple_knight_army_shield - [32836] = { rank = 5, cp = 16000, lvl = 50, item = 13107 }, -- royal_knight_army_collar - [32837] = { rank = 5, cp = 16000, lvl = 50, item = 13105 }, -- temple_knight_army_collar - [32838] = { rank = 5, cp = 16000, lvl = 50, item = 12686 }, -- royal_knights_mufflers - [32839] = { rank = 5, cp = 16000, lvl = 50, item = 12942 }, -- royal_knights_sollerets - [32840] = { rank = 5, cp = 16000, lvl = 50, item = 13220, place = 2 }, -- royal_knights_belt - [32841] = { rank = 5, cp = 16000, lvl = 50, item = 13720, place = 1 }, -- royal_knights_cloak - [32848] = { rank = 6, cp = 24000, lvl = 55, item = 13580 }, -- royal_army_mantle - [32849] = { rank = 6, cp = 24000, lvl = 55, item = 13106 }, -- royal_guards_collar - [32850] = { rank = 6, cp = 24000, lvl = 55, item = 12430 }, -- royal_knights_bascinet - [32851] = { rank = 6, cp = 24000, lvl = 55, item = 13722 }, -- royal_knights_aketon - [32852] = { rank = 6, cp = 24000, lvl = 55, item = 12558, place = 1 }, -- royal_knights_chainmail - [32853] = { rank = 6, cp = 24000, lvl = 55, item = 12814, place = 1 }, -- royal_knights_breeches - [32854] = { rank = 6, cp = 24000, lvl = 55, item = 12321, place = 2 }, -- royal_guards_shield - [32855] = { rank = 6, cp = 24000, lvl = 55, item = 17067, place = 1 }, -- royal_guards_rod - [32856] = { rank = 6, cp = 24000, lvl = 55, item = 16599, place = 1 }, -- royal_guards_sword - [32857] = { rank = 6, cp = 24000, lvl = 55, item = 16805, place = 1 }, -- royal_guards_fleuret - [32864] = { rank = 7, cp = 32000, lvl = 60, item = 15956 }, -- temple_knights_quiver - [32865] = { rank = 7, cp = 32000, lvl = 60, item = 16886, place = 2 }, -- grand_knights_lance - [32866] = { rank = 7, cp = 32000, lvl = 60, item = 13557, place = 1 }, -- grand_knights_ring - [32880] = { rank = 8, cp = 40000, lvl = 65, item = 14013 }, -- grand_temple_knights_gauntlets - [32881] = { rank = 8, cp = 40000, lvl = 65, item = 14014, place = 2 }, -- grand_temple_knights_bangles - [32882] = { rank = 8, cp = 40000, lvl = 65, item = 13140, place = 1 }, -- grand_temple_knights_collar - [32896] = { rank = 9, cp = 48000, lvl = 71, item = 16953 }, -- reserve_captains_greatsword - [32897] = { rank = 9, cp = 48000, lvl = 71, item = 17934 }, -- reserve_captains_pick - [32898] = { rank = 9, cp = 48000, lvl = 71, item = 17458, place = 2 }, -- reserve_captains_mace - [32899] = { rank = 9, cp = 48000, lvl = 71, item = 16893, place = 1 }, -- reserve_captains_lance - [32912] = { rank = 10, cp = 56000, lvl = 1, item = 14428, place = 1 }, -- kingdom_aketon - [32932] = { cp = 5000, lvl = 1, item = 17583 }, -- kingdom_signet_staff - [32940] = { rank = 10, cp = 10000, lvl = 1, item = 6377 }, -- imperial_chair_set + [32768] = { rank = 1, cp = 1000, lvl = 10, item = xi.item.ROYAL_ARCHERS_LONGBOW }, + [32769] = { rank = 1, cp = 1000, lvl = 10, item = xi.item.ROYAL_ARCHERS_SWORD }, + [32770] = { rank = 1, cp = 1000, lvl = 10, item = xi.item.ROYAL_FOOTMANS_BANDANA }, + [32771] = { rank = 1, cp = 1000, lvl = 10, item = xi.item.ROYAL_FOOTMANS_GLOVES }, + [32772] = { rank = 1, cp = 1000, lvl = 10, item = xi.item.ROYAL_FOOTMANS_BOOTS }, + [32773] = { rank = 1, cp = 1000, lvl = 10, item = xi.item.ROYAL_ARCHERS_CESTI, place = 2 }, + [32774] = { rank = 1, cp = 1000, lvl = 10, item = xi.item.ROYAL_FOOTMANS_TUNIC, place = 1 }, + [32784] = { rank = 2, cp = 2000, lvl = 18, item = xi.item.ROYAL_SPEARMANS_SPEAR }, + [32785] = { rank = 2, cp = 2000, lvl = 10, item = xi.item.ROYAL_FOOTMANS_VEST }, + [32786] = { rank = 2, cp = 2000, lvl = 20, item = xi.item.ROYAL_FOOTMANS_TROUSERS }, + [32787] = { rank = 2, cp = 2000, lvl = 20, item = xi.item.ROYAL_SPEARMANS_HORN, place = 2 }, + [32788] = { rank = 2, cp = 2000, lvl = 20, item = xi.item.ROYAL_FOOTMANS_CLOGS, place = 1 }, + [32800] = { rank = 3, cp = 4000, lvl = 30, item = xi.item.ROYAL_SQUIRES_HALBERD }, + [32801] = { rank = 3, cp = 4000, lvl = 30, item = xi.item.ROYAL_SQUIRES_COLLAR }, + [32802] = { rank = 3, cp = 4000, lvl = 30, item = xi.item.ROYAL_SQUIRES_HELM }, + [32803] = { rank = 3, cp = 4000, lvl = 30, item = xi.item.ROYAL_SQUIRES_MUFFLERS }, + [32804] = { rank = 3, cp = 4000, lvl = 30, item = xi.item.ROYAL_SQUIRES_SOLLERETS }, + [32805] = { rank = 3, cp = 4000, lvl = 30, item = xi.item.ROYAL_SQUIRES_DAGGER, place = 2 }, + [32806] = { rank = 3, cp = 4000, lvl = 30, item = xi.item.ROYAL_SQUIRES_MACE, place = 1 }, + [32807] = { rank = 3, cp = 4000, lvl = 1, item = xi.item.SAN_DORIAN_RING, place = 1 }, + [32816] = { rank = 4, cp = 8000, lvl = 40, item = xi.item.ROYAL_SWORDSMANS_BLADE }, + [32817] = { rank = 4, cp = 8000, lvl = 40, item = xi.item.ROYAL_SQUIRES_CHAINMAIL }, + [32818] = { rank = 4, cp = 8000, lvl = 40, item = xi.item.ROYAL_SQUIRES_BREECHES }, + [32819] = { rank = 4, cp = 8000, lvl = 40, item = xi.item.ROYAL_SQUIRES_ROBE, place = 2 }, + [32820] = { rank = 4, cp = 8000, lvl = 40, item = xi.item.ROYAL_SQUIRES_SHIELD, place = 1 }, + [32832] = { rank = 5, cp = 16000, lvl = 50, item = xi.item.ROYAL_KNIGHT_ARMY_LANCE }, + [32833] = { rank = 5, cp = 16000, lvl = 50, item = xi.item.TEMPLE_KNIGHT_ARMY_SWORD }, + [32834] = { rank = 5, cp = 16000, lvl = 50, item = xi.item.ROYAL_KNIGHT_ARMY_SHIELD }, + [32835] = { rank = 5, cp = 16000, lvl = 50, item = xi.item.TEMPLE_KNIGHT_ARMY_SHIELD }, + [32836] = { rank = 5, cp = 16000, lvl = 50, item = xi.item.ROYAL_KNIGHT_ARMY_COLLAR }, + [32837] = { rank = 5, cp = 16000, lvl = 50, item = xi.item.TEMPLE_KNIGHT_ARMY_COLLAR }, + [32838] = { rank = 5, cp = 16000, lvl = 50, item = xi.item.ROYAL_KNIGHTS_MUFFLERS }, + [32839] = { rank = 5, cp = 16000, lvl = 50, item = xi.item.ROYAL_KNIGHTS_SOLLERETS }, + [32840] = { rank = 5, cp = 16000, lvl = 50, item = xi.item.ROYAL_KNIGHTS_BELT, place = 2 }, + [32841] = { rank = 5, cp = 16000, lvl = 50, item = xi.item.ROYAL_KNIGHTS_CLOAK, place = 1 }, + [32848] = { rank = 6, cp = 24000, lvl = 55, item = xi.item.ROYAL_ARMY_MANTLE }, + [32849] = { rank = 6, cp = 24000, lvl = 55, item = xi.item.ROYAL_GUARDS_COLLAR }, + [32850] = { rank = 6, cp = 24000, lvl = 55, item = xi.item.ROYAL_KNIGHTS_BASCINET }, + [32851] = { rank = 6, cp = 24000, lvl = 55, item = xi.item.ROYAL_KNIGHTS_AKETON }, + [32852] = { rank = 6, cp = 24000, lvl = 55, item = xi.item.ROYAL_KNIGHTS_CHAINMAIL, place = 1 }, + [32853] = { rank = 6, cp = 24000, lvl = 55, item = xi.item.ROYAL_KNIGHTS_BREECHES, place = 1 }, + [32854] = { rank = 6, cp = 24000, lvl = 55, item = xi.item.ROYAL_GUARDS_SHIELD, place = 2 }, + [32855] = { rank = 6, cp = 24000, lvl = 55, item = xi.item.ROYAL_GUARDS_ROD, place = 1 }, + [32856] = { rank = 6, cp = 24000, lvl = 55, item = xi.item.ROYAL_GUARDS_SWORD, place = 1 }, + [32857] = { rank = 6, cp = 24000, lvl = 55, item = xi.item.ROYAL_GUARDS_FLEURET, place = 1 }, + [32864] = { rank = 7, cp = 32000, lvl = 60, item = xi.item.TEMPLE_KNIGHTS_QUIVER }, + [32865] = { rank = 7, cp = 32000, lvl = 60, item = xi.item.GRAND_KNIGHTS_LANCE, place = 2 }, + [32866] = { rank = 7, cp = 32000, lvl = 60, item = xi.item.GRAND_KNIGHTS_RING, place = 1 }, + [32880] = { rank = 8, cp = 40000, lvl = 65, item = xi.item.GRAND_TEMPLE_KNIGHTS_GAUNTLETS }, + [32881] = { rank = 8, cp = 40000, lvl = 65, item = xi.item.GRAND_TEMPLE_KNIGHTS_BANGLES, place = 2 }, + [32882] = { rank = 8, cp = 40000, lvl = 65, item = xi.item.GRAND_TEMPLE_KNIGHTS_COLLAR, place = 1 }, + [32896] = { rank = 9, cp = 48000, lvl = 71, item = xi.item.RESERVE_CAPTAINS_GREATSWORD }, + [32897] = { rank = 9, cp = 48000, lvl = 71, item = xi.item.RESERVE_CAPTAINS_PICK }, + [32898] = { rank = 9, cp = 48000, lvl = 71, item = xi.item.RESERVE_CAPTAINS_MACE, place = 2 }, + [32899] = { rank = 9, cp = 48000, lvl = 71, item = xi.item.RESERVE_CAPTAINS_LANCE, place = 1 }, + [32912] = { rank = 10, cp = 56000, lvl = 1, item = xi.item.KINGDOM_AKETON, place = 1 }, + [32932] = { cp = 5000, lvl = 1, item = xi.item.KINGDOM_SIGNET_STAFF }, + [32940] = { rank = 10, cp = 10000, lvl = 1, item = xi.item.IMPERIAL_CHAIR_SET }, }, [xi.nation.BASTOK] = { - [32768] = { rank = 1, cp = 1000, lvl = 10, item = 16433 }, -- legionnaires_knuckles - [32769] = { rank = 1, cp = 1000, lvl = 10, item = 17223 }, -- legionnaires_crossbow - [32770] = { rank = 1, cp = 1000, lvl = 10, item = 16648 }, -- legionnaires_axe - [32771] = { rank = 1, cp = 1000, lvl = 10, item = 12509 }, -- legionnaires_cap - [32772] = { rank = 1, cp = 1000, lvl = 10, item = 12752 }, -- legionnaires_mittens - [32773] = { rank = 1, cp = 1000, lvl = 10, item = 13003 }, -- legionnaires_leggings - [32774] = { rank = 1, cp = 1000, lvl = 10, item = 17128, place = 2 }, -- legionnaires_staff - [32775] = { rank = 1, cp = 1000, lvl = 10, item = 16780, place = 1 }, -- legionnaires_scythe - [32784] = { rank = 2, cp = 2000, lvl = 18, item = 17048 }, -- decurions_hammer - [32785] = { rank = 2, cp = 2000, lvl = 10, item = 12629 }, -- legionnaires_harness - [32786] = { rank = 2, cp = 2000, lvl = 20, item = 12881 }, -- legionnaires_subligar - [32787] = { rank = 2, cp = 2000, lvl = 20, item = 16745, place = 2 }, -- decurions_dagger - [32788] = { rank = 2, cp = 2000, lvl = 20, item = 12337, place = 1 }, -- decurions_shield - [32800] = { rank = 3, cp = 4000, lvl = 30, item = 16712 }, -- centurions_axe - [32801] = { rank = 3, cp = 4000, lvl = 10, item = 13098 }, -- republican_bronze_medal - [32802] = { rank = 3, cp = 4000, lvl = 30, item = 12438 }, -- centurions_visor - [32803] = { rank = 3, cp = 4000, lvl = 30, item = 12566 }, -- centurions_scale_mail - [32804] = { rank = 3, cp = 4000, lvl = 30, item = 12694 }, -- centurions_finger_gauntlets - [32805] = { rank = 3, cp = 4000, lvl = 30, item = 12822 }, -- centurions_cuisses - [32806] = { rank = 3, cp = 4000, lvl = 30, item = 12950 }, -- centurions_greaves - [32807] = { rank = 3, cp = 4000, lvl = 30, item = 16806, place = 2 }, -- centurions_sword - [32808] = { rank = 3, cp = 4000, lvl = 30, item = 13830, place = 1 }, -- legionnaires_circlet - [32809] = { rank = 3, cp = 4000, lvl = 1, item = 13497, place = 1 }, -- bastokan_ring - [32816] = { rank = 4, cp = 8000, lvl = 40, item = 16516 }, -- junior_musketeers_tuck - [32817] = { rank = 4, cp = 8000, lvl = 40, item = 12422 }, -- iron_musketeers_armet - [32818] = { rank = 4, cp = 8000, lvl = 40, item = 12678 }, -- iron_musketeers_gauntlets - [32819] = { rank = 4, cp = 8000, lvl = 40, item = 12934 }, -- iron_musketeers_sabatons - [32820] = { rank = 4, cp = 8000, lvl = 40, item = 13721, place = 2 }, -- iron_musketeers_gambison - [32821] = { rank = 4, cp = 8000, lvl = 40, item = 17283, place = 1 }, -- junior_musketeers_chakram - [32832] = { rank = 5, cp = 16000, lvl = 50, item = 16529 }, -- musketeers_sword - [32833] = { rank = 5, cp = 16000, lvl = 30, item = 13099 }, -- republican_iron_medal - [32834] = { rank = 5, cp = 16000, lvl = 50, item = 12550 }, -- iron_musketeers_cuirass - [32835] = { rank = 5, cp = 16000, lvl = 50, item = 12806 }, -- iron_musketeers_cuisses - [32836] = { rank = 5, cp = 16000, lvl = 50, item = 17129, place = 2 }, -- musketeers_pole - [32837] = { rank = 5, cp = 16000, lvl = 50, item = 17253, place = 1 }, -- musketeer_gun - [32848] = { rank = 6, cp = 24000, lvl = 55, item = 13100 }, -- republican_mythril_medal - [32849] = { rank = 6, cp = 24000, lvl = 55, item = 13582 }, -- republican_army_mantle - [32850] = { rank = 6, cp = 24000, lvl = 55, item = 16557, place = 2 }, -- musketeer_commanders_falchion - [32851] = { rank = 6, cp = 24000, lvl = 55, item = 12304, place = 2 }, -- musketeer_commanders_shield - [32852] = { rank = 6, cp = 24000, lvl = 55, item = 17151, place = 1 }, -- musketeer_commanders_rod - [32853] = { rank = 6, cp = 24000, lvl = 55, item = 13064, place = 1 }, -- iron_musketeers_gorget - [32864] = { rank = 7, cp = 32000, lvl = 60, item = 15957 }, -- iron_musketeers_quiver - [32865] = { rank = 7, cp = 32000, lvl = 60, item = 17807, place = 2 }, -- gold_musketeers_uchigatana - [32866] = { rank = 7, cp = 32000, lvl = 60, item = 13558, place = 1 }, -- gold_musketeers_ring - [32880] = { rank = 8, cp = 40000, lvl = 65, item = 14015 }, -- praefectuss_gloves - [32881] = { rank = 8, cp = 40000, lvl = 65, item = 13880, place = 2 }, -- presidential_hairpin - [32882] = { rank = 8, cp = 40000, lvl = 65, item = 13141, place = 1 }, -- republican_gold_medal - [32896] = { rank = 9, cp = 48000, lvl = 71, item = 16799 }, -- senior_gold_musketeers_scythe - [32897] = { rank = 9, cp = 48000, lvl = 71, item = 17457 }, -- senior_gold_musketeers_rod - [32898] = { rank = 9, cp = 48000, lvl = 71, item = 18196, place = 2 }, -- senior_gold_musketeers_axe - [32899] = { rank = 9, cp = 48000, lvl = 71, item = 17655, place = 1 }, -- senior_gold_musketeers_scimitar - [32912] = { rank = 10, cp = 56000, lvl = 1, item = 14429, place = 1 }, -- republic_aketon - [32932] = { cp = 5000, lvl = 1, item = 17584 }, -- republic_signet_staff - [32940] = { rank = 10, cp = 10000, lvl = 1, item = 6378 }, -- decorative_chair_set + [32768] = { rank = 1, cp = 1000, lvl = 10, item = xi.item.LEGIONNAIRES_KNUCKLES }, + [32769] = { rank = 1, cp = 1000, lvl = 10, item = xi.item.LEGIONNAIRES_CROSSBOW }, + [32770] = { rank = 1, cp = 1000, lvl = 10, item = xi.item.LEGIONNAIRES_AXE }, + [32771] = { rank = 1, cp = 1000, lvl = 10, item = xi.item.LEGIONNAIRES_CAP }, + [32772] = { rank = 1, cp = 1000, lvl = 10, item = xi.item.LEGIONNAIRES_MITTENS }, + [32773] = { rank = 1, cp = 1000, lvl = 10, item = xi.item.LEGIONNAIRES_LEGGINGS }, + [32774] = { rank = 1, cp = 1000, lvl = 10, item = xi.item.LEGIONNAIRES_STAFF, place = 2 }, + [32775] = { rank = 1, cp = 1000, lvl = 10, item = xi.item.LEGIONNAIRES_SCYTHE, place = 1 }, + [32784] = { rank = 2, cp = 2000, lvl = 18, item = xi.item.DECURIONS_HAMMER }, + [32785] = { rank = 2, cp = 2000, lvl = 10, item = xi.item.LEGIONNAIRES_HARNESS }, + [32786] = { rank = 2, cp = 2000, lvl = 20, item = xi.item.LEGIONNAIRES_SUBLIGAR }, + [32787] = { rank = 2, cp = 2000, lvl = 20, item = xi.item.DECURIONS_DAGGER, place = 2 }, + [32788] = { rank = 2, cp = 2000, lvl = 20, item = xi.item.DECURIONS_SHIELD, place = 1 }, + [32800] = { rank = 3, cp = 4000, lvl = 30, item = xi.item.CENTURIONS_AXE }, + [32801] = { rank = 3, cp = 4000, lvl = 10, item = xi.item.REPUBLICAN_BRONZE_MEDAL }, + [32802] = { rank = 3, cp = 4000, lvl = 30, item = xi.item.CENTURIONS_VISOR }, + [32803] = { rank = 3, cp = 4000, lvl = 30, item = xi.item.CENTURIONS_SCALE_MAIL }, + [32804] = { rank = 3, cp = 4000, lvl = 30, item = xi.item.CENTURIONS_FINGER_GAUNTLETS }, + [32805] = { rank = 3, cp = 4000, lvl = 30, item = xi.item.CENTURIONS_CUISSES }, + [32806] = { rank = 3, cp = 4000, lvl = 30, item = xi.item.CENTURIONS_GREAVES }, + [32807] = { rank = 3, cp = 4000, lvl = 30, item = xi.item.CENTURIONS_SWORD, place = 2 }, + [32808] = { rank = 3, cp = 4000, lvl = 30, item = xi.item.LEGIONNAIRES_CIRCLET, place = 1 }, + [32809] = { rank = 3, cp = 4000, lvl = 1, item = xi.item.BASTOKAN_RING, place = 1 }, + [32816] = { rank = 4, cp = 8000, lvl = 40, item = xi.item.JUNIOR_MUSKETEERS_TUCK }, + [32817] = { rank = 4, cp = 8000, lvl = 40, item = xi.item.IRON_MUSKETEERS_ARMET }, + [32818] = { rank = 4, cp = 8000, lvl = 40, item = xi.item.IRON_MUSKETEERS_GAUNTLETS }, + [32819] = { rank = 4, cp = 8000, lvl = 40, item = xi.item.IRON_MUSKETEERS_SABATONS }, + [32820] = { rank = 4, cp = 8000, lvl = 40, item = xi.item.IRON_MUSKETEERS_GAMBISON, place = 2 }, + [32821] = { rank = 4, cp = 8000, lvl = 40, item = xi.item.JUNIOR_MUSKETEERS_CHAKRAM, place = 1 }, + [32832] = { rank = 5, cp = 16000, lvl = 50, item = xi.item.MUSKETEERS_SWORD }, + [32833] = { rank = 5, cp = 16000, lvl = 30, item = xi.item.REPUBLICAN_IRON_MEDAL }, + [32834] = { rank = 5, cp = 16000, lvl = 50, item = xi.item.IRON_MUSKETEERS_CUIRASS }, + [32835] = { rank = 5, cp = 16000, lvl = 50, item = xi.item.IRON_MUSKETEERS_CUISSES }, + [32836] = { rank = 5, cp = 16000, lvl = 50, item = xi.item.MUSKETEERS_POLE, place = 2 }, + [32837] = { rank = 5, cp = 16000, lvl = 50, item = xi.item.MUSKETEER_GUN, place = 1 }, + [32848] = { rank = 6, cp = 24000, lvl = 55, item = xi.item.REPUBLICAN_MYTHRIL_MEDAL }, + [32849] = { rank = 6, cp = 24000, lvl = 55, item = xi.item.REPUBLICAN_ARMY_MANTLE }, + [32850] = { rank = 6, cp = 24000, lvl = 55, item = xi.item.MUSKETEER_COMMANDERS_FALCHION, place = 2 }, + [32851] = { rank = 6, cp = 24000, lvl = 55, item = xi.item.MUSKETEER_COMMANDERS_SHIELD, place = 2 }, + [32852] = { rank = 6, cp = 24000, lvl = 55, item = xi.item.MUSKETEER_COMMANDERS_ROD, place = 1 }, + [32853] = { rank = 6, cp = 24000, lvl = 55, item = xi.item.IRON_MUSKETEERS_GORGET, place = 1 }, + [32864] = { rank = 7, cp = 32000, lvl = 60, item = xi.item.IRON_MUSKETEERS_QUIVER }, + [32865] = { rank = 7, cp = 32000, lvl = 60, item = xi.item.GOLD_MUSKETEERS_UCHIGATANA, place = 2 }, + [32866] = { rank = 7, cp = 32000, lvl = 60, item = xi.item.GOLD_MUSKETEERS_RING, place = 1 }, + [32880] = { rank = 8, cp = 40000, lvl = 65, item = xi.item.PRAEFECTUSS_GLOVES }, + [32881] = { rank = 8, cp = 40000, lvl = 65, item = xi.item.PRESIDENTIAL_HAIRPIN, place = 2 }, + [32882] = { rank = 8, cp = 40000, lvl = 65, item = xi.item.REPUBLICAN_GOLD_MEDAL, place = 1 }, + [32896] = { rank = 9, cp = 48000, lvl = 71, item = xi.item.SENIOR_GOLD_MUSKETEERS_SCYTHE }, + [32897] = { rank = 9, cp = 48000, lvl = 71, item = xi.item.SENIOR_GOLD_MUSKETEERS_ROD }, + [32898] = { rank = 9, cp = 48000, lvl = 71, item = xi.item.SENIOR_GOLD_MUSKETEERS_AXE, place = 2 }, + [32899] = { rank = 9, cp = 48000, lvl = 71, item = xi.item.SENIOR_GOLD_MUSKETEERS_SCIMITAR, place = 1 }, + [32912] = { rank = 10, cp = 56000, lvl = 1, item = xi.item.REPUBLIC_AKETON, place = 1 }, + [32932] = { cp = 5000, lvl = 1, item = xi.item.REPUBLIC_SIGNET_STAFF }, + [32940] = { rank = 10, cp = 10000, lvl = 1, item = xi.item.DECORATIVE_CHAIR_SET }, }, [xi.nation.WINDURST] = { - [32768] = { rank = 1, cp = 1000, lvl = 10, item = 17159 }, -- freeswords_bow - [32769] = { rank = 1, cp = 1000, lvl = 10, item = 17028 }, -- freeswords_club - [32770] = { rank = 1, cp = 1000, lvl = 10, item = 16442 }, -- freeswords_baghnakhs - [32771] = { rank = 1, cp = 1000, lvl = 10, item = 12915, place = 2 }, -- freeswords_slops - [32772] = { rank = 1, cp = 1000, lvl = 10, item = 17130, place = 1 }, -- freeswords_staff - [32784] = { rank = 2, cp = 2000, lvl = 18, item = 17103 }, -- mercenarys_pole - [32785] = { rank = 2, cp = 2000, lvl = 20, item = 12484 }, -- mercenarys_hachimaki - [32786] = { rank = 2, cp = 2000, lvl = 20, item = 12653 }, -- mercenarys_gi - [32787] = { rank = 2, cp = 2000, lvl = 20, item = 12719 }, -- mercenarys_tekko - [32788] = { rank = 2, cp = 2000, lvl = 20, item = 12855 }, -- mercenarys_sitabaki - [32789] = { rank = 2, cp = 2000, lvl = 20, item = 12975 }, -- mercenarys_kyahan - [32790] = { rank = 2, cp = 2000, lvl = 20, item = 16746, place = 2 }, -- mercenarys_knife - [32791] = { rank = 2, cp = 2000, lvl = 20, item = 16930, place = 1 }, -- mercenarys_greatsword - [32800] = { rank = 3, cp = 4000, lvl = 30, item = 16776 }, -- mercenary_captains_scythe - [32801] = { rank = 3, cp = 4000, lvl = 30, item = 12470 }, -- mercenary_captains_headgear - [32802] = { rank = 3, cp = 4000, lvl = 30, item = 12598 }, -- mercenary_captains_doublet - [32803] = { rank = 3, cp = 4000, lvl = 30, item = 12726 }, -- mercenary_captains_gloves - [32804] = { rank = 3, cp = 4000, lvl = 30, item = 12854 }, -- mercenary_captains_hose - [32805] = { rank = 3, cp = 4000, lvl = 30, item = 12982 }, -- mercenary_captains_gaiters - [32806] = { rank = 3, cp = 4000, lvl = 30, item = 16747, place = 2 }, -- mercenary_captains_kukri - [32807] = { rank = 3, cp = 4000, lvl = 30, item = 13221, place = 1 }, -- mercenary_captains_belt - [32808] = { rank = 3, cp = 4000, lvl = 1, item = 13496, place = 1 }, -- windurstian_ring - [32816] = { rank = 4, cp = 8000, lvl = 40, item = 16463 }, -- combat_casters_dagger - [32817] = { rank = 4, cp = 8000, lvl = 40, item = 17282 }, -- combat_casters_boomerang - [32818] = { rank = 4, cp = 8000, lvl = 10, item = 13101 }, -- green_scarf - [32819] = { rank = 4, cp = 8000, lvl = 40, item = 12614 }, -- combat_casters_cloak - [32820] = { rank = 4, cp = 8000, lvl = 40, item = 12743 }, -- combat_casters_mitts - [32821] = { rank = 4, cp = 8000, lvl = 40, item = 12870 }, -- combat_casters_slacks - [32822] = { rank = 4, cp = 8000, lvl = 40, item = 12998 }, -- combat_casters_shoes - [32823] = { rank = 4, cp = 8000, lvl = 40, item = 16807, place = 2 }, -- combat_casters_scimitar - [32824] = { rank = 4, cp = 8000, lvl = 40, item = 16669, place = 1 }, -- combat_casters_axe - [32832] = { rank = 5, cp = 16000, lvl = 50, item = 17082, place = 2 }, -- tactician_magicians_wand - [32833] = { rank = 5, cp = 16000, lvl = 30, item = 13102 }, -- paisley_scarf - [32834] = { rank = 5, cp = 16000, lvl = 50, item = 12478, place = 2 }, -- tactician_magicians_hat - [32835] = { rank = 5, cp = 16000, lvl = 50, item = 12606 }, -- tactician_magicians_coat - [32836] = { rank = 5, cp = 16000, lvl = 50, item = 12734 }, -- tactician_magicians_cuffs - [32837] = { rank = 5, cp = 16000, lvl = 50, item = 12862 }, -- tactician_magicians_slops - [32838] = { rank = 5, cp = 16000, lvl = 50, item = 12990 }, -- tactician_magicians_pigaches - [32839] = { rank = 5, cp = 16000, lvl = 50, item = 16810 }, -- tactician_magicians_espadon - [32840] = { rank = 5, cp = 16000, lvl = 50, item = 16694, place = 1 }, -- tactician_magicians_hooks - [32848] = { rank = 6, cp = 24000, lvl = 55, item = 13103 }, -- checkered_scarf - [32849] = { rank = 6, cp = 24000, lvl = 55, item = 13581 }, -- federal_army_mantle - [32850] = { rank = 6, cp = 24000, lvl = 55, item = 17094, place = 2 }, -- wise_wizards_staff - [32851] = { rank = 6, cp = 24000, lvl = 55, item = 16808, place = 2 }, -- wise_wizards_bilbo - [32852] = { rank = 6, cp = 24000, lvl = 55, item = 16809, place = 1 }, -- wise_wizards_anelace - [32864] = { rank = 7, cp = 32000, lvl = 60, item = 15958 }, -- combat_casters_quiver - [32865] = { rank = 7, cp = 32000, lvl = 60, item = 12363, place = 2 }, -- patriarch_protectors_shield - [32866] = { rank = 7, cp = 32000, lvl = 60, item = 13559, place = 1 }, -- patriarch_protectors_ring - [32880] = { rank = 8, cp = 40000, lvl = 65, item = 14016 }, -- master_casters_mitts - [32881] = { rank = 8, cp = 40000, lvl = 65, item = 14017, place = 2 }, -- master_casters_bracelets - [32882] = { rank = 8, cp = 40000, lvl = 65, item = 13142, place = 1 }, -- windurstian_scarf - [32896] = { rank = 9, cp = 48000, lvl = 71, item = 18145 }, -- master_casters_bow - [32897] = { rank = 9, cp = 48000, lvl = 71, item = 17530 }, -- master_casters_pole - [32898] = { rank = 9, cp = 48000, lvl = 71, item = 17508, place = 2 }, -- master_casters_baghnakhs - [32899] = { rank = 9, cp = 48000, lvl = 71, item = 17617, place = 1 }, -- master_casters_knife - [32912] = { rank = 10, cp = 56000, lvl = 1, item = 14430, place = 1 }, -- federation_aketon - [32932] = { cp = 5000, lvl = 1, item = 17585 }, -- federation_signet_staff - [32940] = { rank = 10, cp = 10000, lvl = 1, item = 6379 }, -- ornate_stool_set + [32768] = { rank = 1, cp = 1000, lvl = 10, item = xi.item.FREESWORDS_BOW }, + [32769] = { rank = 1, cp = 1000, lvl = 10, item = xi.item.FREESWORDS_CLUB }, + [32770] = { rank = 1, cp = 1000, lvl = 10, item = xi.item.FREESWORDS_BAGHNAKHS }, + [32771] = { rank = 1, cp = 1000, lvl = 10, item = xi.item.FREESWORDS_SLOPS, place = 2 }, + [32772] = { rank = 1, cp = 1000, lvl = 10, item = xi.item.FREESWORDS_STAFF, place = 1 }, + [32784] = { rank = 2, cp = 2000, lvl = 18, item = xi.item.MERCENARYS_POLE }, + [32785] = { rank = 2, cp = 2000, lvl = 20, item = xi.item.MERCENARYS_HACHIMAKI }, + [32786] = { rank = 2, cp = 2000, lvl = 20, item = xi.item.MERCENARYS_GI }, + [32787] = { rank = 2, cp = 2000, lvl = 20, item = xi.item.MERCENARYS_TEKKO }, + [32788] = { rank = 2, cp = 2000, lvl = 20, item = xi.item.MERCENARYS_SITABAKI }, + [32789] = { rank = 2, cp = 2000, lvl = 20, item = xi.item.MERCENARYS_KYAHAN }, + [32790] = { rank = 2, cp = 2000, lvl = 20, item = xi.item.MERCENARYS_KNIFE, place = 2 }, + [32791] = { rank = 2, cp = 2000, lvl = 20, item = xi.item.MERCENARYS_GREATSWORD, place = 1 }, + [32800] = { rank = 3, cp = 4000, lvl = 30, item = xi.item.MERCENARY_CAPTAINS_SCYTHE }, + [32801] = { rank = 3, cp = 4000, lvl = 30, item = xi.item.MERCENARY_CAPTAINS_HEADGEAR }, + [32802] = { rank = 3, cp = 4000, lvl = 30, item = xi.item.MERCENARY_CAPTAINS_DOUBLET }, + [32803] = { rank = 3, cp = 4000, lvl = 30, item = xi.item.MERCENARY_CAPTAINS_GLOVES }, + [32804] = { rank = 3, cp = 4000, lvl = 30, item = xi.item.MERCENARY_CAPTAINS_HOSE }, + [32805] = { rank = 3, cp = 4000, lvl = 30, item = xi.item.MERCENARY_CAPTAINS_GAITERS }, + [32806] = { rank = 3, cp = 4000, lvl = 30, item = xi.item.MERCENARY_CAPTAINS_KUKRI, place = 2 }, + [32807] = { rank = 3, cp = 4000, lvl = 30, item = xi.item.MERCENARY_CAPTAINS_BELT, place = 1 }, + [32808] = { rank = 3, cp = 4000, lvl = 1, item = xi.item.WINDURSTIAN_RING, place = 1 }, + [32816] = { rank = 4, cp = 8000, lvl = 40, item = xi.item.COMBAT_CASTERS_DAGGER }, + [32817] = { rank = 4, cp = 8000, lvl = 40, item = xi.item.COMBAT_CASTERS_BOOMERANG }, + [32818] = { rank = 4, cp = 8000, lvl = 10, item = xi.item.GREEN_SCARF }, + [32819] = { rank = 4, cp = 8000, lvl = 40, item = xi.item.COMBAT_CASTERS_CLOAK }, + [32820] = { rank = 4, cp = 8000, lvl = 40, item = xi.item.COMBAT_CASTERS_MITTS }, + [32821] = { rank = 4, cp = 8000, lvl = 40, item = xi.item.COMBAT_CASTERS_SLACKS }, + [32822] = { rank = 4, cp = 8000, lvl = 40, item = xi.item.COMBAT_CASTERS_SHOES }, + [32823] = { rank = 4, cp = 8000, lvl = 40, item = xi.item.COMBAT_CASTERS_SCIMITAR, place = 2 }, + [32824] = { rank = 4, cp = 8000, lvl = 40, item = xi.item.COMBAT_CASTERS_AXE, place = 1 }, + [32832] = { rank = 5, cp = 16000, lvl = 50, item = xi.item.TACTICIAN_MAGICIANS_WAND, place = 2 }, + [32833] = { rank = 5, cp = 16000, lvl = 30, item = xi.item.PAISLEY_SCARF }, + [32834] = { rank = 5, cp = 16000, lvl = 50, item = xi.item.TACTICIAN_MAGICIANS_HAT, place = 2 }, + [32835] = { rank = 5, cp = 16000, lvl = 50, item = xi.item.TACTICIAN_MAGICIANS_COAT }, + [32836] = { rank = 5, cp = 16000, lvl = 50, item = xi.item.TACTICIAN_MAGICIANS_CUFFS }, + [32837] = { rank = 5, cp = 16000, lvl = 50, item = xi.item.TACTICIAN_MAGICIANS_SLOPS }, + [32838] = { rank = 5, cp = 16000, lvl = 50, item = xi.item.TACTICIAN_MAGICIANS_PIGACHES }, + [32839] = { rank = 5, cp = 16000, lvl = 50, item = xi.item.TACTICIAN_MAGICIANS_ESPADON }, + [32840] = { rank = 5, cp = 16000, lvl = 50, item = xi.item.TACTICIAN_MAGICIANS_HOOKS, place = 1 }, + [32848] = { rank = 6, cp = 24000, lvl = 55, item = xi.item.CHECKERED_SCARF }, + [32849] = { rank = 6, cp = 24000, lvl = 55, item = xi.item.FEDERAL_ARMY_MANTLE }, + [32850] = { rank = 6, cp = 24000, lvl = 55, item = xi.item.WISE_WIZARDS_STAFF, place = 2 }, + [32851] = { rank = 6, cp = 24000, lvl = 55, item = xi.item.WISE_WIZARDS_BILBO, place = 2 }, + [32852] = { rank = 6, cp = 24000, lvl = 55, item = xi.item.WISE_WIZARDS_ANELACE, place = 1 }, + [32864] = { rank = 7, cp = 32000, lvl = 60, item = xi.item.COMBAT_CASTERS_QUIVER }, + [32865] = { rank = 7, cp = 32000, lvl = 60, item = xi.item.PATRIARCH_PROTECTORS_SHIELD, place = 2 }, + [32866] = { rank = 7, cp = 32000, lvl = 60, item = xi.item.PATRIARCH_PROTECTORS_RING, place = 1 }, + [32880] = { rank = 8, cp = 40000, lvl = 65, item = xi.item.MASTER_CASTERS_MITTS }, + [32881] = { rank = 8, cp = 40000, lvl = 65, item = xi.item.MASTER_CASTERS_BRACELETS, place = 2 }, + [32882] = { rank = 8, cp = 40000, lvl = 65, item = xi.item.WINDURSTIAN_SCARF, place = 1 }, + [32896] = { rank = 9, cp = 48000, lvl = 71, item = xi.item.MASTER_CASTERS_BOW }, + [32897] = { rank = 9, cp = 48000, lvl = 71, item = xi.item.MASTER_CASTERS_POLE }, + [32898] = { rank = 9, cp = 48000, lvl = 71, item = xi.item.MASTER_CASTERS_BAGHNAKHS, place = 2 }, + [32899] = { rank = 9, cp = 48000, lvl = 71, item = xi.item.MASTER_CASTERS_KNIFE, place = 1 }, + [32912] = { rank = 10, cp = 56000, lvl = 1, item = xi.item.FEDERATION_AKETON, place = 1 }, + [32932] = { cp = 5000, lvl = 1, item = xi.item.FEDERATION_SIGNET_STAFF }, + [32940] = { rank = 10, cp = 10000, lvl = 1, item = xi.item.ORNATE_STOOL_SET }, }, } diff --git a/scripts/globals/dealer_moogle.lua b/scripts/globals/dealer_moogle.lua index 0e5989682d0..d354833b748 100644 --- a/scripts/globals/dealer_moogle.lua +++ b/scripts/globals/dealer_moogle.lua @@ -3493,6 +3493,8 @@ xi.dealerMoogle.onEventFinish = function(player, csid, option, npc) end else if not player:hasKeyItem(item) then + -- TODO: Refactor this so that we can more clearly define KI vs Item + ---@diagnostic disable-next-line: param-type-mismatch npcUtil.giveKeyItem(player, item) player:delKeyItem(listToKeyItem(list)) else diff --git a/scripts/globals/deeds.lua b/scripts/globals/deeds.lua index d0613ee5545..9711e8dcd99 100644 --- a/scripts/globals/deeds.lua +++ b/scripts/globals/deeds.lua @@ -1318,7 +1318,6 @@ xi.deeds.validatorOnEventUpdate = function(player, csid, option, npc) -- be obtained. local updateAction = bit.rshift(option, 16) local updateOption = bit.band(option, 0xFFFF) - print(option) if (updateAction == 1 or updateAction == 3) and @@ -1371,7 +1370,9 @@ xi.deeds.validatorOnEventUpdate = function(player, csid, option, npc) player:delKeyItem(voucherKeyItems[keyItemIndex + 1]) for _, itemId in ipairs(rewardTable) do - npcUtil.giveItem(player, itemId) + if type(itemId) ~= 'boolean' then + npcUtil.giveItem(player, itemId) + end end else local ID = zones[player:getZoneID()] diff --git a/scripts/globals/interaction/quest.lua b/scripts/globals/interaction/quest.lua index 89b59ba7081..f40e2c4308d 100644 --- a/scripts/globals/interaction/quest.lua +++ b/scripts/globals/interaction/quest.lua @@ -4,7 +4,7 @@ require('scripts/globals/interaction/container') ----------------------------------- -Quest = setmetatable({ areaId = -1 }, { __index = Container }) +Quest = setmetatable({ areaId = 0 }, { __index = Container }) Quest.__index = Quest ---@diagnostic disable-next-line: duplicate-set-field @@ -14,6 +14,8 @@ end Quest.reward = {} +---@param areaId xi.questLog +---@param questId integer ---@diagnostic disable-next-line: duplicate-set-field function Quest:new(areaId, questId) local obj = Container:new(Quest.getVarPrefix(areaId, questId)) @@ -23,10 +25,14 @@ function Quest:new(areaId, questId) return obj end +---@param areaId xi.questLog +---@param questId integer +---@return string function Quest.getVarPrefix(areaId, questId) return string.format('Quest[%d][%d]', areaId, questId) end +---@param player CBaseEntity function Quest:getCheckArgs(player) return { player:getQuestStatus(self.areaId, self.questId) } end diff --git a/scripts/globals/npc_util.lua b/scripts/globals/npc_util.lua index 604df638466..6c70d260c1f 100644 --- a/scripts/globals/npc_util.lua +++ b/scripts/globals/npc_util.lua @@ -244,11 +244,13 @@ end "Come back again after sorting your inventory" --]] +---@class itemQuantityEntry : { [xi.item]: xi.item, [integer]: integer } + ---@class multipleItemList ---@field [integer] { [integer]: xi.item, [integer]: integer }|xi.item ---@param player CBaseEntity ----@param items xi.item|multipleItemList +---@param items xi.item|itemQuantityEntry|multipleItemList ---@param params { silent: boolean?, fromTrade: boolean? }? ---@return boolean function npcUtil.giveItem(player, items, params) @@ -334,7 +336,7 @@ end "Come back again after sorting your inventory" --]] ---@param player CBaseEntity ----@param items xi.item|xi.item[]|multipleItemList +---@param items xi.item|itemQuantityEntry|multipleItemList ---@param params { silent: boolean? }? ---@return boolean function npcUtil.giveTempItem(player, items, params) @@ -456,7 +458,7 @@ end ---@param msgId integer? function npcUtil.giveKeyItem(player, keyitems, msgId) local ID = zones[player:getZoneID()] - local givenKeyItems = type(keyitems) == "table" and keyitems or { keyitems } + local givenKeyItems = type(keyitems) == 'table' and keyitems or { keyitems } -- give key items to player, with message @@ -499,7 +501,7 @@ end --]] ---@class rewardParam ----@field item xi.item|xi.item[]|multipleItemList? +---@field item xi.item|itemQuantityEntry|multipleItemList? ---@field itemParams { silent: boolean?, fromTrade: boolean? }? ---@field keyItem xi.keyItem|{ [integer]: xi.keyItem }? ---@field ki xi.keyItem|{ [integer]: xi.keyItem }? diff --git a/scripts/quests/otherAreas/Confessions_of_a_Bellmaker.lua b/scripts/quests/otherAreas/Confessions_of_a_Bellmaker.lua index 7f554606aee..df946cf5de2 100644 --- a/scripts/quests/otherAreas/Confessions_of_a_Bellmaker.lua +++ b/scripts/quests/otherAreas/Confessions_of_a_Bellmaker.lua @@ -51,7 +51,15 @@ quest.sections = if quest:getVar(player, 'Prog') == 2 then return quest:progressCutscene(102) elseif quest:getVar(player, 'Prog') == 3 then - return npcUtil.popFromQM(player, GetNPCByID(zones[player:getZoneID()].npc.STONE_MONUMENT), zones[player:getZoneID()].mob.ARCANE_PHANTASM, { hide = 0 }) + local monumentObj = GetNPCByID(zones[player:getZoneID()].npc.STONE_MONUMENT) + + if monumentObj then + -- TODO: Determine if message is displayed on NM pop, return message if this is successful, else + -- noAction() + npcUtil.popFromQM(player, monumentObj, zones[player:getZoneID()].mob.ARCANE_PHANTASM, { hide = 0 }) + end + + return quest:noAction() elseif quest:getVar(player, 'Prog') == 4 then return quest:progressCutscene(103) end diff --git a/scripts/quests/windurst/The_Fanged_One.lua b/scripts/quests/windurst/The_Fanged_One.lua index 53190f7f992..5d290e14f9f 100644 --- a/scripts/quests/windurst/The_Fanged_One.lua +++ b/scripts/quests/windurst/The_Fanged_One.lua @@ -93,7 +93,7 @@ quest.sections = if quest:complete(player) then player:delKeyItem(xi.ki.OLD_TIGERS_FANG) player:unlockJob(xi.job.RNG) - npcUtil.giveKeyItem(xi.ki.JOB_GESTURE_RANGER) + npcUtil.giveKeyItem(player, xi.ki.JOB_GESTURE_RANGER) return quest:messageSpecial(windurstWoodsID.text.PERIH_VASHAI_DIALOG) end end, diff --git a/scripts/specs/types/Abyssea.lua b/scripts/specs/types/Abyssea.lua new file mode 100644 index 00000000000..57b99b16f6e --- /dev/null +++ b/scripts/specs/types/Abyssea.lua @@ -0,0 +1,12 @@ +---@meta +-- Cruor Prospector Types + +---@class TProspectorItemEntry +---@field [xi.item] xi.item +---@field [integer] integer + +---@class TProspectorItemTypeTable +---@field [integer] TProspectorItemEntry + +---@class TProspectorItems +---@field [xi.abyssea.itemType] TProspectorItemTypeTable diff --git a/scripts/zones/Abyssea-Altepa/npcs/Cruor_Prospector.lua b/scripts/zones/Abyssea-Altepa/npcs/Cruor_Prospector.lua index 22263cadf51..e218863294b 100644 --- a/scripts/zones/Abyssea-Altepa/npcs/Cruor_Prospector.lua +++ b/scripts/zones/Abyssea-Altepa/npcs/Cruor_Prospector.lua @@ -5,17 +5,10 @@ ----------------------------------- local entity = {} -local itemType = -{ - ITEM = 1, - TEMP = 2, - KEYITEM = 3, - ENHANCEMENT = 4, -} - +---@type TProspectorItems local prospectorItems = { - [itemType.ITEM] = + [xi.abyssea.itemType.ITEM] = { -- Sel Item Cost [ 1] = { xi.item.RAVAGERS_MUFFLERS, 5000 }, @@ -30,7 +23,7 @@ local prospectorItems = [10] = { xi.item.SHADOW_THRONE, 2000000 }, }, - [itemType.TEMP] = + [xi.abyssea.itemType.TEMP] = { -- Sel Item Cost [ 1] = { xi.item.LUCID_POTION_I, 80 }, @@ -52,7 +45,7 @@ local prospectorItems = [17] = { xi.item.PRIMEVAL_BREW, 2000000 }, }, - [itemType.KEYITEM] = + [xi.abyssea.itemType.KEYITEM] = { -- Sel Item Cost [1] = { xi.ki.MAP_OF_ABYSSEA_ALTEPA, 4500 }, @@ -152,7 +145,7 @@ entity.onEventFinish = function(player, csid, option, npc) local itemSelected = bit.band(bit.rshift(option, 16), 0x1F) local cruorTotal = player:getCurrency('cruor') - if itemCategory == itemType.ITEM then + if itemCategory == xi.abyssea.itemType.ITEM then local itemData = prospectorItems[itemCategory][itemSelected] local itemQty = itemData[1] ~= xi.item.FORBIDDEN_KEY and 1 or bit.rshift(option, 24) local itemCost = itemData[2] * itemQty @@ -163,7 +156,7 @@ entity.onEventFinish = function(player, csid, option, npc) then player:delCurrency('cruor', itemCost) end - elseif itemCategory == itemType.TEMP then + elseif itemCategory == xi.abyssea.itemType.TEMP then local itemData = prospectorItems[itemCategory][itemSelected] local itemCost = itemData[2] @@ -173,7 +166,7 @@ entity.onEventFinish = function(player, csid, option, npc) then player:delCurrency('cruor', itemCost) end - elseif itemCategory == itemType.KEYITEM then + elseif itemCategory == xi.abyssea.itemType.KEYITEM then local itemData = prospectorItems[itemCategory][itemSelected] if @@ -182,7 +175,7 @@ entity.onEventFinish = function(player, csid, option, npc) then player:delCurrency('cruor', itemData[2]) end - elseif itemCategory == itemType.ENHANCEMENT then + elseif itemCategory == xi.abyssea.itemType.ENHANCEMENT then local enhanceData = prospectorEnhancement[itemSelected] if enhanceData[2] <= cruorTotal then diff --git a/scripts/zones/Abyssea-Attohwa/npcs/Cruor_Prospector.lua b/scripts/zones/Abyssea-Attohwa/npcs/Cruor_Prospector.lua index 4f4f736e778..c0acfb37645 100644 --- a/scripts/zones/Abyssea-Attohwa/npcs/Cruor_Prospector.lua +++ b/scripts/zones/Abyssea-Attohwa/npcs/Cruor_Prospector.lua @@ -5,17 +5,10 @@ ----------------------------------- local entity = {} -local itemType = -{ - ITEM = 1, - TEMP = 2, - KEYITEM = 3, - ENHANCEMENT = 4, -} - +---@type TProspectorItems local prospectorItems = { - [itemType.ITEM] = + [xi.abyssea.itemType.ITEM] = { -- Sel Item Cost [ 1] = { xi.item.RAVAGERS_MASK, 5000 }, @@ -28,7 +21,7 @@ local prospectorItems = [ 8] = { xi.item.SHADOW_THRONE, 2000000 }, }, - [itemType.TEMP] = + [xi.abyssea.itemType.TEMP] = { -- Sel Item Cost [ 1] = { xi.item.LUCID_POTION_I, 80 }, @@ -50,7 +43,7 @@ local prospectorItems = [17] = { xi.item.PRIMEVAL_BREW, 2000000 }, }, - [itemType.KEYITEM] = + [xi.abyssea.itemType.KEYITEM] = { -- Sel Item Cost [1] = { xi.ki.MAP_OF_ABYSSEA_ATTOHWA, 4500 }, @@ -150,7 +143,7 @@ entity.onEventFinish = function(player, csid, option, npc) local itemSelected = bit.band(bit.rshift(option, 16), 0x1F) local cruorTotal = player:getCurrency('cruor') - if itemCategory == itemType.ITEM then + if itemCategory == xi.abyssea.itemType.ITEM then local itemData = prospectorItems[itemCategory][itemSelected] local itemQty = itemData[1] ~= xi.item.FORBIDDEN_KEY and 1 or bit.rshift(option, 24) local itemCost = itemData[2] * itemQty @@ -161,7 +154,7 @@ entity.onEventFinish = function(player, csid, option, npc) then player:delCurrency('cruor', itemCost) end - elseif itemCategory == itemType.TEMP then + elseif itemCategory == xi.abyssea.itemType.TEMP then local itemData = prospectorItems[itemCategory][itemSelected] local itemCost = itemData[2] @@ -171,7 +164,7 @@ entity.onEventFinish = function(player, csid, option, npc) then player:delCurrency('cruor', itemCost) end - elseif itemCategory == itemType.KEYITEM then + elseif itemCategory == xi.abyssea.itemType.KEYITEM then local itemData = prospectorItems[itemCategory][itemSelected] if @@ -180,7 +173,7 @@ entity.onEventFinish = function(player, csid, option, npc) then player:delCurrency('cruor', itemData[2]) end - elseif itemCategory == itemType.ENHANCEMENT then + elseif itemCategory == xi.abyssea.itemType.ENHANCEMENT then local enhanceData = prospectorEnhancement[itemSelected] if enhanceData[2] <= cruorTotal then diff --git a/scripts/zones/Abyssea-Grauberg/npcs/Cruor_Prospector.lua b/scripts/zones/Abyssea-Grauberg/npcs/Cruor_Prospector.lua index b480f80593b..a4d5e97de35 100644 --- a/scripts/zones/Abyssea-Grauberg/npcs/Cruor_Prospector.lua +++ b/scripts/zones/Abyssea-Grauberg/npcs/Cruor_Prospector.lua @@ -5,17 +5,10 @@ ----------------------------------- local entity = {} -local itemType = -{ - ITEM = 1, - TEMP = 2, - KEYITEM = 3, - ENHANCEMENT = 4, -} - +---@type TProspectorItems local prospectorItems = { - [itemType.ITEM] = + [xi.abyssea.itemType.ITEM] = { -- Sel Item Cost [ 1] = { xi.item.UNKAI_KOTE, 5000 }, @@ -33,7 +26,7 @@ local prospectorItems = [13] = { xi.item.SHADOW_THRONE, 2000000 }, }, - [itemType.TEMP] = + [xi.abyssea.itemType.TEMP] = { -- Sel Item Cost [ 1] = { xi.item.LUCID_POTION_I, 80 }, @@ -55,7 +48,7 @@ local prospectorItems = [17] = { xi.item.PRIMEVAL_BREW, 2000000 }, }, - [itemType.KEYITEM] = + [xi.abyssea.itemType.KEYITEM] = { -- Sel Item Cost [1] = { xi.ki.MAP_OF_ABYSSEA_GRAUBERG, 4500 }, @@ -155,7 +148,7 @@ entity.onEventFinish = function(player, csid, option, npc) local itemSelected = bit.band(bit.rshift(option, 16), 0x1F) local cruorTotal = player:getCurrency('cruor') - if itemCategory == itemType.ITEM then + if itemCategory == xi.abyssea.itemType.ITEM then local itemData = prospectorItems[itemCategory][itemSelected] local itemQty = itemData[1] ~= xi.item.FORBIDDEN_KEY and 1 or bit.rshift(option, 24) local itemCost = itemData[2] * itemQty @@ -166,7 +159,7 @@ entity.onEventFinish = function(player, csid, option, npc) then player:delCurrency('cruor', itemCost) end - elseif itemCategory == itemType.TEMP then + elseif itemCategory == xi.abyssea.itemType.TEMP then local itemData = prospectorItems[itemCategory][itemSelected] local itemCost = itemData[2] @@ -176,7 +169,7 @@ entity.onEventFinish = function(player, csid, option, npc) then player:delCurrency('cruor', itemCost) end - elseif itemCategory == itemType.KEYITEM then + elseif itemCategory == xi.abyssea.itemType.KEYITEM then local itemData = prospectorItems[itemCategory][itemSelected] if @@ -185,7 +178,7 @@ entity.onEventFinish = function(player, csid, option, npc) then player:delCurrency('cruor', itemData[2]) end - elseif itemCategory == itemType.ENHANCEMENT then + elseif itemCategory == xi.abyssea.itemType.ENHANCEMENT then local enhanceData = prospectorEnhancement[itemSelected] if enhanceData[2] <= cruorTotal then diff --git a/scripts/zones/Abyssea-Misareaux/npcs/Cruor_Prospector.lua b/scripts/zones/Abyssea-Misareaux/npcs/Cruor_Prospector.lua index 7b133ca79da..5b6e593edd1 100644 --- a/scripts/zones/Abyssea-Misareaux/npcs/Cruor_Prospector.lua +++ b/scripts/zones/Abyssea-Misareaux/npcs/Cruor_Prospector.lua @@ -5,17 +5,10 @@ ----------------------------------- local entity = {} -local itemType = -{ - ITEM = 1, - TEMP = 2, - KEYITEM = 3, - ENHANCEMENT = 4, -} - +---@type TProspectorItems local prospectorItems = { - [itemType.ITEM] = + [xi.abyssea.itemType.ITEM] = { -- Sel Item Cost [1] = { xi.item.CREED_ARMET, 5000 }, @@ -27,7 +20,7 @@ local prospectorItems = [7] = { xi.item.SHADOW_THRONE, 2000000 }, }, - [itemType.TEMP] = + [xi.abyssea.itemType.TEMP] = { -- Sel Item Cost [ 1] = { xi.item.LUCID_POTION_I, 80 }, @@ -49,7 +42,7 @@ local prospectorItems = [17] = { xi.item.PRIMEVAL_BREW, 2000000 }, }, - [itemType.KEYITEM] = + [xi.abyssea.itemType.KEYITEM] = { -- Sel Item Cost [1] = { xi.ki.MAP_OF_ABYSSEA_MISAREAUX, 4500 }, @@ -149,7 +142,7 @@ entity.onEventFinish = function(player, csid, option, npc) local itemSelected = bit.band(bit.rshift(option, 16), 0x1F) local cruorTotal = player:getCurrency('cruor') - if itemCategory == itemType.ITEM then + if itemCategory == xi.abyssea.itemType.ITEM then local itemData = prospectorItems[itemCategory][itemSelected] local itemQty = itemData[1] ~= xi.item.FORBIDDEN_KEY and 1 or bit.rshift(option, 24) local itemCost = itemData[2] * itemQty @@ -160,7 +153,7 @@ entity.onEventFinish = function(player, csid, option, npc) then player:delCurrency('cruor', itemCost) end - elseif itemCategory == itemType.TEMP then + elseif itemCategory == xi.abyssea.itemType.TEMP then local itemData = prospectorItems[itemCategory][itemSelected] local itemCost = itemData[2] @@ -170,7 +163,7 @@ entity.onEventFinish = function(player, csid, option, npc) then player:delCurrency('cruor', itemCost) end - elseif itemCategory == itemType.KEYITEM then + elseif itemCategory == xi.abyssea.itemType.KEYITEM then local itemData = prospectorItems[itemCategory][itemSelected] if @@ -179,7 +172,7 @@ entity.onEventFinish = function(player, csid, option, npc) then player:delCurrency('cruor', itemData[2]) end - elseif itemCategory == itemType.ENHANCEMENT then + elseif itemCategory == xi.abyssea.itemType.ENHANCEMENT then local enhanceData = prospectorEnhancement[itemSelected] if enhanceData[2] <= cruorTotal then diff --git a/scripts/zones/Abyssea-Uleguerand/npcs/Cruor_Prospector.lua b/scripts/zones/Abyssea-Uleguerand/npcs/Cruor_Prospector.lua index 676c58dcfef..2fd053f4668 100644 --- a/scripts/zones/Abyssea-Uleguerand/npcs/Cruor_Prospector.lua +++ b/scripts/zones/Abyssea-Uleguerand/npcs/Cruor_Prospector.lua @@ -5,17 +5,10 @@ ----------------------------------- local entity = {} -local itemType = -{ - ITEM = 1, - TEMP = 2, - KEYITEM = 3, - ENHANCEMENT = 4, -} - +---@type TProspectorItems local prospectorItems = { - [itemType.ITEM] = + [xi.abyssea.itemType.ITEM] = { -- Sel Item Cost [ 1] = { xi.item.CREED_GAUNTLETS, 5000 }, @@ -29,7 +22,7 @@ local prospectorItems = [ 9] = { xi.item.SHADOW_THRONE, 2000000 }, }, - [itemType.TEMP] = + [xi.abyssea.itemType.TEMP] = { -- Sel Item Cost [ 1] = { xi.item.LUCID_POTION_I, 80 }, @@ -51,7 +44,7 @@ local prospectorItems = [17] = { xi.item.PRIMEVAL_BREW, 2000000 }, }, - [itemType.KEYITEM] = + [xi.abyssea.itemType.KEYITEM] = { -- Sel Item Cost [1] = { xi.ki.MAP_OF_ABYSSEA_ULEGUERAND, 4500 }, @@ -151,7 +144,7 @@ entity.onEventFinish = function(player, csid, option, npc) local itemSelected = bit.band(bit.rshift(option, 16), 0x1F) local cruorTotal = player:getCurrency('cruor') - if itemCategory == itemType.ITEM then + if itemCategory == xi.abyssea.itemType.ITEM then local itemData = prospectorItems[itemCategory][itemSelected] local itemQty = itemData[1] ~= xi.item.FORBIDDEN_KEY and 1 or bit.rshift(option, 24) local itemCost = itemData[2] * itemQty @@ -162,7 +155,7 @@ entity.onEventFinish = function(player, csid, option, npc) then player:delCurrency('cruor', itemCost) end - elseif itemCategory == itemType.TEMP then + elseif itemCategory == xi.abyssea.itemType.TEMP then local itemData = prospectorItems[itemCategory][itemSelected] local itemCost = itemData[2] @@ -172,7 +165,7 @@ entity.onEventFinish = function(player, csid, option, npc) then player:delCurrency('cruor', itemCost) end - elseif itemCategory == itemType.KEYITEM then + elseif itemCategory == xi.abyssea.itemType.KEYITEM then local itemData = prospectorItems[itemCategory][itemSelected] if @@ -181,7 +174,7 @@ entity.onEventFinish = function(player, csid, option, npc) then player:delCurrency('cruor', itemData[2]) end - elseif itemCategory == itemType.ENHANCEMENT then + elseif itemCategory == xi.abyssea.itemType.ENHANCEMENT then local enhanceData = prospectorEnhancement[itemSelected] if enhanceData[2] <= cruorTotal then diff --git a/scripts/zones/Abyssea-Vunkerl/npcs/Cruor_Prospector.lua b/scripts/zones/Abyssea-Vunkerl/npcs/Cruor_Prospector.lua index 25e311b4dd3..214a3e4b26f 100644 --- a/scripts/zones/Abyssea-Vunkerl/npcs/Cruor_Prospector.lua +++ b/scripts/zones/Abyssea-Vunkerl/npcs/Cruor_Prospector.lua @@ -5,17 +5,18 @@ ----------------------------------- local entity = {} -local itemType = -{ - ITEM = 1, - TEMP = 2, - KEYITEM = 3, - ENHANCEMENT = 4, -} +---@class itemEntry +---@field [xi.item] xi.item +---@field [integer] integer + +---@class itemTypeTable +---@field [integer] itemEntry +---@class prospectorItems +---@field [xi.abyssea.itemType] itemTypeTable local prospectorItems = { - [itemType.ITEM] = + [xi.abyssea.itemType.ITEM] = { -- Sel Item Cost [ 1] = { xi.item.UNKAI_KABUTO, 5000 }, @@ -31,7 +32,7 @@ local prospectorItems = [11] = { xi.item.SHADOW_THRONE, 2000000 }, }, - [itemType.TEMP] = + [xi.abyssea.itemType.TEMP] = { -- Sel Item Cost [ 1] = { xi.item.LUCID_POTION_I, 80 }, @@ -53,7 +54,7 @@ local prospectorItems = [17] = { xi.item.PRIMEVAL_BREW, 2000000 }, }, - [itemType.KEYITEM] = + [xi.abyssea.itemType.KEYITEM] = { -- Sel Item Cost [1] = { xi.ki.MAP_OF_ABYSSEA_VUNKERL, 4500 }, @@ -153,7 +154,7 @@ entity.onEventFinish = function(player, csid, option, npc) local itemSelected = bit.band(bit.rshift(option, 16), 0x1F) local cruorTotal = player:getCurrency('cruor') - if itemCategory == itemType.ITEM then + if itemCategory == xi.abyssea.itemType.ITEM then local itemData = prospectorItems[itemCategory][itemSelected] local itemQty = itemData[1] ~= xi.item.FORBIDDEN_KEY and 1 or bit.rshift(option, 24) local itemCost = itemData[2] * itemQty @@ -164,7 +165,7 @@ entity.onEventFinish = function(player, csid, option, npc) then player:delCurrency('cruor', itemCost) end - elseif itemCategory == itemType.TEMP then + elseif itemCategory == xi.abyssea.itemType.TEMP then local itemData = prospectorItems[itemCategory][itemSelected] local itemCost = itemData[2] @@ -174,7 +175,7 @@ entity.onEventFinish = function(player, csid, option, npc) then player:delCurrency('cruor', itemCost) end - elseif itemCategory == itemType.KEYITEM then + elseif itemCategory == xi.abyssea.itemType.KEYITEM then local itemData = prospectorItems[itemCategory][itemSelected] if @@ -183,7 +184,7 @@ entity.onEventFinish = function(player, csid, option, npc) then player:delCurrency('cruor', itemData[2]) end - elseif itemCategory == itemType.ENHANCEMENT then + elseif itemCategory == xi.abyssea.itemType.ENHANCEMENT then local enhanceData = prospectorEnhancement[itemSelected] if enhanceData[2] <= cruorTotal then diff --git a/scripts/zones/Crawlers_Nest_[S]/npcs/Rodeupansat.lua b/scripts/zones/Crawlers_Nest_[S]/npcs/Rodeupansat.lua index c716944434b..bd064374151 100644 --- a/scripts/zones/Crawlers_Nest_[S]/npcs/Rodeupansat.lua +++ b/scripts/zones/Crawlers_Nest_[S]/npcs/Rodeupansat.lua @@ -40,7 +40,7 @@ entity.onEventFinish = function(player, csid, option, npc) player:addQuest(xi.questLog.CRYSTAL_WAR, xi.quest.id.crystalWar.EVIL_AT_THE_INLET) npcUtil.giveKeyItem(player, xi.ki.EVIL_WARDING_SEAL) elseif csid == 109 then - npcUtil.completeQuest(player, xi.questLog.CRYSTAL_WAR, xi.quest.id.crystalWar.EVIL_AT_THE_INLET, { item = 4687 }) + npcUtil.completeQuest(player, xi.questLog.CRYSTAL_WAR, xi.quest.id.crystalWar.EVIL_AT_THE_INLET, { item = xi.item.SCROLL_OF_RECALL_JUGNER }) end end diff --git a/scripts/zones/Dragons_Aery/npcs/qm0.lua b/scripts/zones/Dragons_Aery/npcs/qm0.lua index 3117ea28db9..26d0aea55cb 100644 --- a/scripts/zones/Dragons_Aery/npcs/qm0.lua +++ b/scripts/zones/Dragons_Aery/npcs/qm0.lua @@ -22,7 +22,7 @@ entity.onTrade = function(player, npc, trade) then player:confirmTrade() elseif - npcUtil.tradeHasExactly(trade, xi.item.SWEET_TEA) and + npcUtil.tradeHasExactly(trade, xi.item.CUP_OF_SWEET_TEA) and npcUtil.popFromQM(player, npc, ID.mob.NIDHOGG) then player:confirmTrade() diff --git a/scripts/zones/Garlaige_Citadel_[S]/npcs/Fondactiont.lua b/scripts/zones/Garlaige_Citadel_[S]/npcs/Fondactiont.lua index c776d45f322..7561f46c5b5 100644 --- a/scripts/zones/Garlaige_Citadel_[S]/npcs/Fondactiont.lua +++ b/scripts/zones/Garlaige_Citadel_[S]/npcs/Fondactiont.lua @@ -40,7 +40,7 @@ entity.onEventFinish = function(player, csid, option, npc) player:addQuest(xi.questLog.CRYSTAL_WAR, xi.quest.id.crystalWar.THE_FUMBLING_FRIAR) elseif csid == 28 and - npcUtil.completeQuest(player, xi.questLog.CRYSTAL_WAR, xi.quest.id.crystalWar.THE_FUMBLING_FRIAR, { item = 4688 }) + npcUtil.completeQuest(player, xi.questLog.CRYSTAL_WAR, xi.quest.id.crystalWar.THE_FUMBLING_FRIAR, { item = xi.item.SCROLL_OF_RECALL_PASHH }) then player:delKeyItem(xi.ki.ORNATE_PACKAGE) end diff --git a/scripts/zones/Norg/npcs/Stray_Cloud.lua b/scripts/zones/Norg/npcs/Stray_Cloud.lua index 39169fc1444..fd4783b1d6c 100644 --- a/scripts/zones/Norg/npcs/Stray_Cloud.lua +++ b/scripts/zones/Norg/npcs/Stray_Cloud.lua @@ -49,7 +49,7 @@ entity.onEventFinish = function(player, csid, option, npc) elseif csid == 227 and npcUtil.completeQuest(player, xi.questLog.OUTLANDS, xi.quest.id.outlands.AN_UNDYING_PLEDGE, { - item = 12375, + item = xi.item.LIGHT_BUCKLER, fameArea = xi.fameArea.NORG, fame = 50, var = 'anUndyingPledgeCS', diff --git a/scripts/zones/Port_Jeuno/npcs/Shami.lua b/scripts/zones/Port_Jeuno/npcs/Shami.lua index f8d2b200a69..0795726a43c 100644 --- a/scripts/zones/Port_Jeuno/npcs/Shami.lua +++ b/scripts/zones/Port_Jeuno/npcs/Shami.lua @@ -6,6 +6,8 @@ ----------------------------------- local entity = {} +---@class shamiSealItems +---@field [xi.item] { [integer]: integer, [integer]: integer } local shamiSealItems = { -- Trade Item ID Seal ID, Retrieve Option @@ -16,6 +18,8 @@ local shamiSealItems = [xi.item.SACRED_KINDREDS_CREST] = { 4, 5 }, } +---@class shamiOrbItems +---@field [xi.item] { [integer]: integer, [integer]: integer, [integer]: integer, [integer]: integer } } local shamiOrbItems = { -- Item ID CS, PO, SealID, Cost @@ -36,6 +40,9 @@ local shamiOrbItems = [xi.item.MACROCOSMIC_ORB] = { 11, 15, 4, 20 }, } +---@nodiscard +---@param trade CTradeContainer +---@return integer? local function getSealTradeOption(trade) for itemID, sealData in pairs(shamiSealItems) do if npcUtil.tradeHasOnly(trade, itemID) then @@ -46,6 +53,9 @@ local function getSealTradeOption(trade) return nil end +---@nodiscard +---@param option integer +---@return xi.item?, integer?, integer? local function convertSealRetrieveOption(option) for itemID, sealData in pairs(shamiSealItems) do if (option + sealData[2]) % 256 == 0 then @@ -60,6 +70,10 @@ end -- Returns the event ID associated for displaying where the player can -- use the orbs (BCNMs). Event 22 is the generic cracked orb CS +---@nodiscard +---@param player CBaseEntity +---@param trade CTradeContainer +---@return integer? local function getOrbEvent(player, trade) for itemID, orbData in pairs(shamiOrbItems) do if npcUtil.tradeHasExactly(trade, itemID) then @@ -74,6 +88,9 @@ local function getOrbEvent(player, trade) return nil end +---@nodiscard +---@param option integer +---@return xi.item?, integer?, integer? local function getOrbDataFromOption(option) for itemID, orbData in pairs(shamiOrbItems) do if orbData[2] == option then @@ -81,7 +98,7 @@ local function getOrbDataFromOption(option) end end - return nil + return nil, nil, nil end entity.onTrade = function(player, npc, trade) @@ -163,7 +180,10 @@ entity.onEventFinish = function(player, csid, option, npc) sealType ~= nil and player:getSeals(sealType) >= sealCost then - if npcUtil.giveItem(player, itemID) then + if + itemID and + npcUtil.giveItem(player, itemID) + then player:delSeals(sealCost, sealType) end end diff --git a/scripts/zones/Rolanberry_Fields/npcs/Saarlan.lua b/scripts/zones/Rolanberry_Fields/npcs/Saarlan.lua index dd85b998164..75dc24e3551 100644 --- a/scripts/zones/Rolanberry_Fields/npcs/Saarlan.lua +++ b/scripts/zones/Rolanberry_Fields/npcs/Saarlan.lua @@ -10,44 +10,44 @@ local entity = {} local wares = { - [0x0001000A] = { ki = xi.ki.LEGION_TOME_PAGE_MAXIMUS, gil = 360000 }, -- Legion Tome Page Maximus - [0x0001000B] = { ki = xi.ki.LEGION_TOME_PAGE_MINIMUS, gil = 180000 }, -- Legion Tome Page Minimus + [0x0001000A] = { ki = xi.ki.LEGION_TOME_PAGE_MAXIMUS, gil = 360000 }, + [0x0001000B] = { ki = xi.ki.LEGION_TOME_PAGE_MINIMUS, gil = 180000 }, - [0x00000002] = { item = 10775, lp = 1000 }, -- Gaiardas Ring - [0x00010002] = { item = 10776, lp = 1000 }, -- Gaubious Ring - [0x00020002] = { item = 10777, lp = 1000 }, -- Caloussu Ring - [0x00030002] = { item = 10778, lp = 1000 }, -- Nanger Ring - [0x00040002] = { item = 10779, lp = 1000 }, -- Sophia Ring - [0x00050002] = { item = 10780, lp = 1000 }, -- Quies Ring - [0x00060002] = { item = 10781, lp = 1000 }, -- Cynosure Ring - [0x00070002] = { item = 10782, lp = 1000 }, -- Ambuscade Ring - [0x00080002] = { item = 10783, lp = 1000 }, -- Veneficium Ring + [0x00000002] = { item = xi.item.GAIARDAS_RING, lp = 1000 }, + [0x00010002] = { item = xi.item.GAUBIOUS_RING, lp = 1000 }, + [0x00020002] = { item = xi.item.CALOUSSU_RING, lp = 1000 }, + [0x00030002] = { item = xi.item.NANGER_RING, lp = 1000 }, + [0x00040002] = { item = xi.item.SOPHIA_RING, lp = 1000 }, + [0x00050002] = { item = xi.item.QUIES_RING, lp = 1000 }, + [0x00060002] = { item = xi.item.CYNOSURE_RING, lp = 1000 }, + [0x00070002] = { item = xi.item.AMBUSCADE_RING, lp = 1000 }, + [0x00080002] = { item = xi.item.VENEFICIUM_RING, lp = 1000 }, - [0x00090002] = { item = 10890, lp = 4500, title = xi.title.SUBJUGATOR_OF_THE_LOFTY }, -- Calma Armet - [0x000A0002] = { item = 10891, lp = 4500, title = xi.title.SUBJUGATOR_OF_THE_LOFTY }, -- Mustela Mask - [0x000B0002] = { item = 10892, lp = 4500, title = xi.title.SUBJUGATOR_OF_THE_LOFTY }, -- Magavan Beret - [0x000C0002] = { item = 10512, lp = 3000, title = xi.title.SUBJUGATOR_OF_THE_MIRED }, -- Calma Gauntlets - [0x000D0002] = { item = 10513, lp = 3000, title = xi.title.SUBJUGATOR_OF_THE_MIRED }, -- Mustela Gloves - [0x000E0002] = { item = 10514, lp = 3000, title = xi.title.SUBJUGATOR_OF_THE_MIRED }, -- Magavan Mitts - [0x000F0002] = { item = 11980, lp = 4500, title = xi.title.SUBJUGATOR_OF_THE_SOARING }, -- Calma Hose - [0x00100002] = { item = 11981, lp = 4500, title = xi.title.SUBJUGATOR_OF_THE_SOARING }, -- Mustela Brais - [0x00110002] = { item = 11982, lp = 4500, title = xi.title.SUBJUGATOR_OF_THE_SOARING }, -- Magavan Slops - [0x00120002] = { item = 10610, lp = 3000, title = xi.title.SUBJUGATOR_OF_THE_VEILED }, -- Calma Leggings - [0x00130002] = { item = 10611, lp = 3000, title = xi.title.SUBJUGATOR_OF_THE_VEILED }, -- Mustela Boots - [0x00140002] = { item = 10612, lp = 3000, title = xi.title.SUBJUGATOR_OF_THE_VEILED }, -- Magavan Clogs - [0x00150002] = { item = 10462, lp = 10000, title = xi.title.LEGENDARY_LEGIONNAIRE }, -- Calma Breastplate - [0x00160002] = { item = 10463, lp = 10000, title = xi.title.LEGENDARY_LEGIONNAIRE }, -- Mustela Harness - [0x00170002] = { item = 10464, lp = 10000, title = xi.title.LEGENDARY_LEGIONNAIRE }, -- Magavan Frock - [0x00180002] = { item = 11044, lp = 3000, title = xi.title.SUBJUGATOR_OF_THE_LOFTY }, -- Corybant Pearl - [0x00190002] = { item = 11045, lp = 3000, title = xi.title.SUBJUGATOR_OF_THE_MIRED }, -- Saviesa Pearl - [0x001A0002] = { item = 11046, lp = 3000, title = xi.title.SUBJUGATOR_OF_THE_SOARING }, -- Ouesk Pearl - [0x001B0002] = { item = 11047, lp = 3000, title = xi.title.SUBJUGATOR_OF_THE_SOARING }, -- Belatz Pearl - [0x001C0002] = { item = 11048, lp = 3000, title = xi.title.SUBJUGATOR_OF_THE_VEILED }, -- Cytherea Pearl - [0x001D0002] = { item = 11049, lp = 3000, title = xi.title.SUBJUGATOR_OF_THE_VEILED }, -- Myrddin Pearl - [0x001E0002] = { item = 11050, lp = 3000, title = xi.title.SUBJUGATOR_OF_THE_VEILED }, -- Puissant Pearl - [0x001F0002] = { item = 10784, lp = 6000, title = xi.title.LEGENDARY_LEGIONNAIRE }, -- Dhanurveda Ring - [0x00200002] = { item = 10785, lp = 6000, title = xi.title.LEGENDARY_LEGIONNAIRE }, -- Provocare Ring - [0x00210002] = { item = 10786, lp = 6000, title = xi.title.LEGENDARY_LEGIONNAIRE }, -- Mediator's Ring + [0x00090002] = { item = xi.item.CALMA_ARMET, lp = 4500, title = xi.title.SUBJUGATOR_OF_THE_LOFTY }, + [0x000A0002] = { item = xi.item.MUSTELA_MASK, lp = 4500, title = xi.title.SUBJUGATOR_OF_THE_LOFTY }, + [0x000B0002] = { item = xi.item.MAGAVAN_BERET, lp = 4500, title = xi.title.SUBJUGATOR_OF_THE_LOFTY }, + [0x000C0002] = { item = xi.item.CALMA_GAUNTLETS, lp = 3000, title = xi.title.SUBJUGATOR_OF_THE_MIRED }, + [0x000D0002] = { item = xi.item.MUSTELA_GLOVES, lp = 3000, title = xi.title.SUBJUGATOR_OF_THE_MIRED }, + [0x000E0002] = { item = xi.item.MAGAVAN_MITTS, lp = 3000, title = xi.title.SUBJUGATOR_OF_THE_MIRED }, + [0x000F0002] = { item = xi.item.CALMA_HOSE, lp = 4500, title = xi.title.SUBJUGATOR_OF_THE_SOARING }, + [0x00100002] = { item = xi.item.MUSTELA_BRAIS, lp = 4500, title = xi.title.SUBJUGATOR_OF_THE_SOARING }, + [0x00110002] = { item = xi.item.MAGAVAN_SLOPS, lp = 4500, title = xi.title.SUBJUGATOR_OF_THE_SOARING }, + [0x00120002] = { item = xi.item.CALMA_LEGGINGS, lp = 3000, title = xi.title.SUBJUGATOR_OF_THE_VEILED }, + [0x00130002] = { item = xi.item.MUSTELA_BOOTS, lp = 3000, title = xi.title.SUBJUGATOR_OF_THE_VEILED }, + [0x00140002] = { item = xi.item.MAGAVAN_CLOGS, lp = 3000, title = xi.title.SUBJUGATOR_OF_THE_VEILED }, + [0x00150002] = { item = xi.item.CALMA_BREASTPLATE, lp = 10000, title = xi.title.LEGENDARY_LEGIONNAIRE }, + [0x00160002] = { item = xi.item.MUSTELA_HARNESS, lp = 10000, title = xi.title.LEGENDARY_LEGIONNAIRE }, + [0x00170002] = { item = xi.item.MAGAVAN_FROCK, lp = 10000, title = xi.title.LEGENDARY_LEGIONNAIRE }, + [0x00180002] = { item = xi.item.CORYBANT_PEARL, lp = 3000, title = xi.title.SUBJUGATOR_OF_THE_LOFTY }, + [0x00190002] = { item = xi.item.SAVIESA_PEARL, lp = 3000, title = xi.title.SUBJUGATOR_OF_THE_MIRED }, + [0x001A0002] = { item = xi.item.OUESK_PEARL, lp = 3000, title = xi.title.SUBJUGATOR_OF_THE_SOARING }, + [0x001B0002] = { item = xi.item.BELATZ_PEARL, lp = 3000, title = xi.title.SUBJUGATOR_OF_THE_SOARING }, + [0x001C0002] = { item = xi.item.CYTHEREA_PEARL, lp = 3000, title = xi.title.SUBJUGATOR_OF_THE_VEILED }, + [0x001D0002] = { item = xi.item.MYRDDIN_PEARL, lp = 3000, title = xi.title.SUBJUGATOR_OF_THE_VEILED }, + [0x001E0002] = { item = xi.item.PUISSANT_PEARL, lp = 3000, title = xi.title.SUBJUGATOR_OF_THE_VEILED }, + [0x001F0002] = { item = xi.item.DHANURVEDA_RING, lp = 6000, title = xi.title.LEGENDARY_LEGIONNAIRE }, + [0x00200002] = { item = xi.item.PROVOCARE_RING, lp = 6000, title = xi.title.LEGENDARY_LEGIONNAIRE }, + [0x00210002] = { item = xi.item.MEDIATORS_RING, lp = 6000, title = xi.title.LEGENDARY_LEGIONNAIRE }, } entity.onTrade = function(player, npc, trade) diff --git a/scripts/zones/Selbina/npcs/Oswald.lua b/scripts/zones/Selbina/npcs/Oswald.lua index bd36ea9e0f8..1c538a38f73 100644 --- a/scripts/zones/Selbina/npcs/Oswald.lua +++ b/scripts/zones/Selbina/npcs/Oswald.lua @@ -71,21 +71,21 @@ entity.onEventFinish = function(player, csid, option, npc) player:setCharVar('underTheSeaVar', 2) elseif csid == 37 and - npcUtil.completeQuest(player, xi.questLog.OTHER_AREAS, xi.quest.id.otherAreas.UNDER_THE_SEA, { item = 13335, fame_area = xi.fameArea.SELBINA_RABAO, title = xi.title.LIL_CUPID, var = 'underTheSeaVar' }) + npcUtil.completeQuest(player, xi.questLog.OTHER_AREAS, xi.quest.id.otherAreas.UNDER_THE_SEA, { item = xi.item.AMBER_EARRING, fame_area = xi.fameArea.SELBINA_RABAO, title = xi.title.LIL_CUPID, var = 'underTheSeaVar' }) then player:delKeyItem(xi.ki.ETCHED_RING) elseif csid == 70 and option == 50 then player:addQuest(xi.questLog.OTHER_AREAS, xi.quest.id.otherAreas.THE_GIFT) elseif csid == 72 and - npcUtil.completeQuest(player, xi.questLog.OTHER_AREAS, xi.quest.id.otherAreas.THE_GIFT, { item = 16497, fame_area = xi.fameArea.SELBINA_RABAO, title = xi.title.SAVIOR_OF_LOVE }) + npcUtil.completeQuest(player, xi.questLog.OTHER_AREAS, xi.quest.id.otherAreas.THE_GIFT, { item = xi.item.SLEEP_DAGGER, fame_area = xi.fameArea.SELBINA_RABAO, title = xi.title.SAVIOR_OF_LOVE }) then player:confirmTrade() elseif csid == 73 and option == 50 then player:addQuest(xi.questLog.OTHER_AREAS, xi.quest.id.otherAreas.THE_REAL_GIFT) elseif csid == 75 and - npcUtil.completeQuest(player, xi.questLog.OTHER_AREAS, xi.quest.id.otherAreas.THE_REAL_GIFT, { item = 17385, fame_area = xi.fameArea.SELBINA_RABAO, title = xi.title.THE_LOVE_DOCTOR }) + npcUtil.completeQuest(player, xi.questLog.OTHER_AREAS, xi.quest.id.otherAreas.THE_REAL_GIFT, { item = xi.item.GLASS_FIBER_FISHING_ROD, fame_area = xi.fameArea.SELBINA_RABAO, title = xi.title.THE_LOVE_DOCTOR }) then player:confirmTrade() end diff --git a/scripts/zones/Selbina/npcs/Romeo.lua b/scripts/zones/Selbina/npcs/Romeo.lua index 5ebf58e497b..e978315b624 100644 --- a/scripts/zones/Selbina/npcs/Romeo.lua +++ b/scripts/zones/Selbina/npcs/Romeo.lua @@ -41,7 +41,7 @@ entity.onEventFinish = function(player, csid, option, npc) player:addQuest(xi.questLog.OTHER_AREAS, xi.quest.id.otherAreas.DONATE_TO_RECYCLING) elseif csid == 21 and - npcUtil.completeQuest(player, xi.questLog.OTHER_AREAS, xi.quest.id.otherAreas.DONATE_TO_RECYCLING, { item = 89, fame_area = xi.fameArea.SELBINA_RABAO, title = xi.title.ECOLOGIST }) + npcUtil.completeQuest(player, xi.questLog.OTHER_AREAS, xi.quest.id.otherAreas.DONATE_TO_RECYCLING, { item = xi.item.WASTEBASKET, fame_area = xi.fameArea.SELBINA_RABAO, title = xi.title.ECOLOGIST }) then player:confirmTrade() end diff --git a/scripts/zones/The_Eldieme_Necropolis_[S]/npcs/Heptachiond.lua b/scripts/zones/The_Eldieme_Necropolis_[S]/npcs/Heptachiond.lua index 4f1e4636ef2..17e41c69d82 100644 --- a/scripts/zones/The_Eldieme_Necropolis_[S]/npcs/Heptachiond.lua +++ b/scripts/zones/The_Eldieme_Necropolis_[S]/npcs/Heptachiond.lua @@ -40,7 +40,7 @@ entity.onEventFinish = function(player, csid, option, npc) player:addQuest(xi.questLog.CRYSTAL_WAR, xi.quest.id.crystalWar.REQUIEM_FOR_THE_DEPARTED) elseif csid == 107 and - npcUtil.completeQuest(player, xi.questLog.CRYSTAL_WAR, xi.quest.id.crystalWar.REQUIEM_FOR_THE_DEPARTED, { item = 4689 }) + npcUtil.completeQuest(player, xi.questLog.CRYSTAL_WAR, xi.quest.id.crystalWar.REQUIEM_FOR_THE_DEPARTED, { item = xi.item.SCROLL_OF_RECALL_MERIPH }) then player:delKeyItem(xi.ki.SHEAF_OF_HANDMADE_INCENSE) end diff --git a/scripts/zones/Valley_of_Sorrows/npcs/qm1.lua b/scripts/zones/Valley_of_Sorrows/npcs/qm1.lua index f7e53bd26df..17d34d84f86 100644 --- a/scripts/zones/Valley_of_Sorrows/npcs/qm1.lua +++ b/scripts/zones/Valley_of_Sorrows/npcs/qm1.lua @@ -22,7 +22,7 @@ entity.onTrade = function(player, npc, trade) then player:confirmTrade() elseif - npcUtil.tradeHasExactly(trade, xi.item.RED_PONDWEED) and + npcUtil.tradeHasExactly(trade, xi.item.CLUMP_OF_RED_PONDWEED) and npcUtil.popFromQM(player, npc, ID.mob.ASPIDOCHELONE) then player:confirmTrade() diff --git a/scripts/zones/West_Ronfaure/npcs/Vilatroire.lua b/scripts/zones/West_Ronfaure/npcs/Vilatroire.lua index 7888aa28776..688c268c833 100644 --- a/scripts/zones/West_Ronfaure/npcs/Vilatroire.lua +++ b/scripts/zones/West_Ronfaure/npcs/Vilatroire.lua @@ -167,7 +167,7 @@ entity.onEventFinish = function(player, csid, option, npc) player:getLocalVar('introToTmwrk_pass') == 1 then npcUtil.completeQuest(player, xi.questLog.SANDORIA, xi.quest.id.sandoria.INTRODUCTION_TO_TEAMWORK, { - item = 13442, + item = xi.item.SHELL_RING, fame = 80, -- fame defaults to 30 if not set title = xi.title.THIRD_RATE_ORGANIZER, }) @@ -176,7 +176,7 @@ entity.onEventFinish = function(player, csid, option, npc) player:getLocalVar('intermedTmwrk_pass') == 1 then npcUtil.completeQuest(player, xi.questLog.SANDORIA, xi.quest.id.sandoria.INTERMEDIATE_TEAMWORK, { - item = 4994, + item = xi.item.SCROLL_OF_MAGES_BALLAD, fame = 80, -- fame defaults to 30 if not set title = xi.title.SECOND_RATE_ORGANIZER, }) @@ -185,7 +185,7 @@ entity.onEventFinish = function(player, csid, option, npc) player:getLocalVar('advTmwrk_pass') == 1 then npcUtil.completeQuest(player, xi.questLog.SANDORIA, xi.quest.id.sandoria.ADVANCED_TEAMWORK, { - item = 13459, + item = xi.item.HORN_RING, fame = 80, -- fame defaults to 30 if not set title = xi.title.FIRST_RATE_ORGANIZER, }) diff --git a/scripts/zones/Windurst_Waters/npcs/Leepe-Hoppe.lua b/scripts/zones/Windurst_Waters/npcs/Leepe-Hoppe.lua index 8fb92e8f07c..40e1e2a067f 100644 --- a/scripts/zones/Windurst_Waters/npcs/Leepe-Hoppe.lua +++ b/scripts/zones/Windurst_Waters/npcs/Leepe-Hoppe.lua @@ -171,17 +171,17 @@ entity.onEventFinish = function(player, csid, option, npc) player:delQuest(xi.questLog.SANDORIA, xi.quest.id.sandoria.TRIAL_BY_ICE) player:delQuest(xi.questLog.OTHER_AREAS, xi.quest.id.otherAreas.TRIAL_BY_LIGHTNING) elseif csid == 846 or csid == 850 then -- Turn-in event - local reward = 0 + local reward = xi.item.NONE if option == 1 then - reward = 18165 -- Fenrir's Stone + reward = xi.item.FENRIRS_STONE -- Fenrir's Stone elseif option == 2 then - reward = 13572 -- Fenrir's Cape + reward = xi.item.FENRIRS_CAPE -- Fenrir's Cape elseif option == 3 then - reward = 13138 -- Fenrir's Torque + reward = xi.item.FENRIRS_TORQUE -- Fenrir's Torque elseif option == 4 then - reward = 13399 -- Fenrir's Earring + reward = xi.item.FENRIRS_EARRING -- Fenrir's Earring elseif option == 5 then - reward = 1208 -- Ancient's Key + reward = xi.item.ANCIENTS_KEY -- Ancient's Key elseif option == 6 then npcUtil.giveCurrency(player, 'gil', 15000) elseif option == 7 then @@ -238,7 +238,7 @@ entity.onEventFinish = function(player, csid, option, npc) elseif csid == 897 and npcUtil.completeQuest(player, xi.questLog.WINDURST, xi.quest.id.windurst.TUNING_OUT, { - item = 15180, -- Cache-Nez + item = xi.item.CACHE_NEZ, -- Cache-Nez title = xi.title.FRIEND_OF_THE_HELMED, }) then diff --git a/scripts/zones/Windurst_Woods/npcs/Kopuro-Popuro.lua b/scripts/zones/Windurst_Woods/npcs/Kopuro-Popuro.lua index 40816873a7c..97bb6a8fa8a 100644 --- a/scripts/zones/Windurst_Woods/npcs/Kopuro-Popuro.lua +++ b/scripts/zones/Windurst_Woods/npcs/Kopuro-Popuro.lua @@ -118,7 +118,7 @@ entity.onEventFinish = function(player, csid, option, npc) player:addQuest(xi.questLog.WINDURST, xi.quest.id.windurst.LEGENDARY_PLAN_B) elseif csid == 314 and - npcUtil.completeQuest(player, xi.questLog.WINDURST, xi.quest.id.windurst.LEGENDARY_PLAN_B, { item = 12749, gil = 700 }) + npcUtil.completeQuest(player, xi.questLog.WINDURST, xi.quest.id.windurst.LEGENDARY_PLAN_B, { item = xi.item.SCENTLESS_ARMLETS, gil = 700 }) then player:confirmTrade() player:needToZone(true)