Skip to content

Commit

Permalink
Update chests
Browse files Browse the repository at this point in the history
  • Loading branch information
nwjgit committed Feb 13, 2024
1 parent 2abdaff commit 61a4610
Showing 1 changed file with 32 additions and 2 deletions.
34 changes: 32 additions & 2 deletions src/lib/openables.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -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
},
{
Expand Down Expand Up @@ -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
},
{
Expand Down

0 comments on commit 61a4610

Please sign in to comment.