diff --git a/src/lib/openables.ts b/src/lib/openables.ts index 4794ba333f..428556d2f6 100644 --- a/src/lib/openables.ts +++ b/src/lib/openables.ts @@ -1,9 +1,12 @@ import { formatOrdinal } from '@oldschoolgg/toolkit'; import { Bank, LootTable, Openables } from 'oldschooljs'; +import { SkillsEnum } from 'oldschooljs/dist/constants'; import { Item } from 'oldschooljs/dist/meta/types'; import { Mimic } from 'oldschooljs/dist/simulation/misc'; +import BrimstoneChest, { BrimstoneChestOpenable } from 'oldschooljs/dist/simulation/openables/BrimstoneChest'; import { HallowedSackTable } from 'oldschooljs/dist/simulation/openables/HallowedSack'; import { Implings } from 'oldschooljs/dist/simulation/openables/Implings'; +import LarransChest, { LarransChestOpenable } from 'oldschooljs/dist/simulation/openables/LarransChest'; import { ClueTiers } from './clues/clueTiers'; import { Emoji, Events, MIMIC_MONSTER_ID } from './constants'; @@ -162,7 +165,20 @@ const osjsOpenables: UnifiedOpenable[] = [ id: 23_083, openedItem: getOSItem(23_083), aliases: ['brimstone chest', 'brimstone'], - output: Openables.BrimstoneChest.table, + output: async ( + args: OpenArgs + ): Promise<{ + bank: Bank; + }> => { + const chest = new BrimstoneChestOpenable(BrimstoneChest); + const fishLvl = args.user.skillLevel(SkillsEnum.Fishing); + const brimstoneOptions: any = { + fishLvl + }; + const openLoot: Bank = chest.open(args.quantity, brimstoneOptions); + + return { bank: openLoot }; + }, allItems: Openables.BrimstoneChest.table.allItems }, { @@ -234,7 +250,21 @@ const osjsOpenables: UnifiedOpenable[] = [ 'larrans small chest', "larran's small chest" ], - output: Openables.LarransChest.table, + output: async ( + args: OpenArgs + ): Promise<{ + bank: Bank; + }> => { + const chest = new LarransChestOpenable(LarransChest); + const fishLvl = args.user.skillLevel(SkillsEnum.Fishing); + const larransOptions: any = { + fishLvl, + chestSize: 'big' + }; + const openLoot: Bank = chest.open(args.quantity, larransOptions); + + return { bank: openLoot }; + }, allItems: Openables.LarransChest.table.allItems }, {