Skip to content

Commit

Permalink
Add frozen crate
Browse files Browse the repository at this point in the history
  • Loading branch information
gc committed Dec 18, 2024
1 parent e04ad29 commit 837e89e
Show file tree
Hide file tree
Showing 5 changed files with 300 additions and 15 deletions.
252 changes: 252 additions & 0 deletions src/lib/customItems/customItems.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13269,3 +13269,255 @@ setCustomItem(
},
500_000
);

setCustomItem(
73_281,
'Skippers',
'Bronze boots',
{
customItemData: {
cantDropFromMysteryBoxes: true
}
},
500_000
);

setCustomItem(
73_282,
'Shrimpy',
'Herbi',
{
customItemData: {
cantDropFromMysteryBoxes: true
}
},
500_000
);

setCustomItem(
73_283,
'Cinnamon doughnut-ball',
'Coal',
{
customItemData: {
cantDropFromMysteryBoxes: true
}
},
500_000
);

setCustomItem(
73_284,
'Christmas choc-stocking',
'Coal',
{
customItemData: {
cantDropFromMysteryBoxes: true
}
},
500_000
);

setCustomItem(
73_285,
'Atlantis jumper',
'Bronze platebody',
{
customItemData: {
cantDropFromMysteryBoxes: true
}
},
500_000
);

setCustomItem(
73_286,
'BSO Santa hat',
'Bronze full helm',
{
customItemData: {
cantDropFromMysteryBoxes: true
}
},
500_000
);

setCustomItem(
73_287,
'OSB earmuffs',
'Bronze full helm',
{
customItemData: {
cantDropFromMysteryBoxes: true
}
},
500_000
);

setCustomItem(
73_288,
'BSO earmuffs',
'Bronze full helm',
{
customItemData: {
cantDropFromMysteryBoxes: true
}
},
500_000
);

setCustomItem(
73_289,
'BSO socks',
'Bronze boots',
{
customItemData: {
cantDropFromMysteryBoxes: true
}
},
500_000
);

setCustomItem(
73_290,
'White beanie',
'Bronze full helm',
{
customItemData: {
cantDropFromMysteryBoxes: true
}
},
500_000
);

setCustomItem(
73_291,
'OSB beanie',
'Bronze full helm',
{
customItemData: {
cantDropFromMysteryBoxes: true
}
},
500_000
);

setCustomItem(
73_292,
'BSO beanie',
'Bronze full helm',
{
customItemData: {
cantDropFromMysteryBoxes: true
}
},
500_000
);

setCustomItem(
73_293,
'Green beanie',
'Bronze full helm',
{
customItemData: {
cantDropFromMysteryBoxes: true
}
},
500_000
);

setCustomItem(
73_294,
'Orange beanie',
'Bronze full helm',
{
customItemData: {
cantDropFromMysteryBoxes: true
}
},
500_000
);

setCustomItem(
73_295,
'Jolly beanie',
'Bronze full helm',
{
customItemData: {
cantDropFromMysteryBoxes: true
}
},
500_000
);

setCustomItem(
73_296,
'Aquatic beanie',
'Bronze full helm',
{
customItemData: {
cantDropFromMysteryBoxes: true
}
},
500_000
);

setCustomItem(
73_297,
'Dark beanie',
'Bronze full helm',
{
customItemData: {
cantDropFromMysteryBoxes: true
}
},
500_000
);

setCustomItem(
73_298,
'Frosticle top',
'Bronze platebody',
{
customItemData: {
cantDropFromMysteryBoxes: true
}
},
500_000
);

setCustomItem(
73_299,
'Frozen crate (s8)',
'Coal',
{
customItemData: {
cantDropFromMysteryBoxes: true
}
},
500_000
);

setCustomItem(
73_300,
'Frozen crate key (s8)',
'Coal',
{
customItemData: {
cantDropFromMysteryBoxes: true
}
},
500_000
);

setCustomItem(
73_303,
'Snow leopard plushie',
'Coal',
{
customItemData: {
cantDropFromMysteryBoxes: true
}
},
500_000
);
36 changes: 36 additions & 0 deletions src/lib/keyCrates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -235,5 +235,41 @@ export const keyCrates: Crate[] = [
1,
100
)
},
{
item: getOSItem('Frozen crate (s8)'),
key: getOSItem('Frozen crate key (s8)'),
keyCostGP: 20_666_666,
table: new LootTable()
.tertiary(3111, 'BSO Santa hat')
.tertiary(110, 'Paint box')
.add(
new LootTable()
.add('Atlantis jumper')
.add('OSB earmuffs')
.add('BSO earmuffs')
.add('Skippers')
.add('BSO socks')
.add('White beanie')
.add('OSB beanie')
.add('BSO beanie')
.add('Green beanie')
.add('Orange beanie')
.add('Jolly beanie')
.add('Aquatic beanie')
.add('Dark beanie')
.add('Frosticle top'),
1,
1
)
.add(
new LootTable()
.add('Cinnamon doughnut-ball')
.add('Christmas choc-stocking')
.add('Cake')
.add('Purple sweets', [1, 3]),
1,
100
)
}
];
19 changes: 4 additions & 15 deletions src/lib/util/handleCrateSpawns.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ import { Bank, resolveItems } from 'oldschooljs';
import getOSItem from './getOSItem';
import { itemNameFromID } from './smallUtils';

const crateItem = getOSItem('Sinister crate (s7)');
const crateItem = getOSItem('Frozen crate (s8)');

const xmasPets = resolveItems(['Smokey', 'Rudolph', 'Frosty']);

export function handleCrateSpawns(user: MUser, duration: number, messages?: string[]) {
const accountAge = user.accountAgeInDays();
Expand All @@ -18,20 +20,7 @@ export function handleCrateSpawns(user: MUser, duration: number, messages?: stri
dropratePerMinute = Math.ceil(dropratePerMinute / 3);
dropratePerMinute = Math.ceil(dropratePerMinute / 2);

const hweenPets = resolveItems([
'Kuro',
'Gregoyle',
'Mumpkin',
'Mumpkin (demonic)',
'Mumpkin (pumpkin)',
'Mumpkin (dead)',
'Polterpup',
'Mini pumpkinhead',
'Mini mortimer',
'Casper',
'Cob'
]);
if (hweenPets.some(pet => user.usingPet(pet))) {
if (xmasPets.some(pet => user.usingPet(pet))) {
dropratePerMinute = Math.ceil(dropratePerMinute / 10);
if (messages) {
messages.push(`10x higher droprates for ${itemNameFromID(user.user.minion_equippedPet!)}`);
Expand Down
7 changes: 7 additions & 0 deletions tests/unit/snapshots/banksnapshots.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2920,6 +2920,13 @@ exports[`BSO Buyables 1`] = `
"name": "Sinister crate key (s7)",
"outputItems": undefined,
},
{
"gpCost": 20666666,
"ironmanPrice": 2066666,
"itemCost": {},
"name": "Frozen crate key (s8)",
"outputItems": undefined,
},
{
"customReq": [Function],
"gpCost": 1000000,
Expand Down
1 change: 1 addition & 0 deletions tests/unit/snapshots/clsnapshots.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ Fletching (145)
Forestry (23)
Fortis Colosseum (9)
Fossil Island Notes (10)
Frozen crate (s8) (22)
General Graardor (8)
Giant Mole (3)
Giants' Foundry (9)
Expand Down

0 comments on commit 837e89e

Please sign in to comment.