Skip to content

Commit

Permalink
Merge branch 'oldschoolgg:master' into Farming-Button
Browse files Browse the repository at this point in the history
  • Loading branch information
I-am-TURBO authored Mar 12, 2024
2 parents 24a2324 + adb9d68 commit da746fc
Show file tree
Hide file tree
Showing 54 changed files with 2,385 additions and 2,197 deletions.
3 changes: 2 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"@typescript-eslint/no-base-to-string": "error",
"eqeqeq": "error",
"no-shadow": "warn",
"@typescript-eslint/no-floating-promises": "warn"
"@typescript-eslint/no-floating-promises": "warn",
"@typescript-eslint/ban-ts-comment": "off"
}
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"@sapphire/stopwatch": "^1.4.0",
"@sapphire/time-utilities": "^1.6.0",
"@sentry/node": "^7.102.0",
"ascii-table3": "^0.9.0",
"bufferutil": "^4.0.8",
"chart.js": "^3.7.0",
"chartjs-node-canvas": "github:gc/ChartjsNodeCanvas#a598b6dd27c44351f235bca07ca4ee660121f289",
Expand All @@ -52,7 +53,6 @@
"random-js": "^2.1.0",
"simple-statistics": "^7.8.3",
"sonic-boom": "^3.8.0",
"table": "^6.8.1",
"tsx": "^4.7.1",
"zlib-sync": "^0.1.9",
"zod": "^3.22.4"
Expand Down
11 changes: 11 additions & 0 deletions prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,7 @@ enum XpGainSource {
CamdozaalMining
CamdozaalSmithing
CamdozaalFishing
ForestryEvents
}

model XPGain {
Expand Down Expand Up @@ -758,6 +759,8 @@ model UserStats {
herbs_cleaned_while_farming_bank Json @default("{}") @db.Json
forestry_event_completions_bank Json @default("{}") @db.Json
@@map("user_stats")
}

Expand Down Expand Up @@ -1110,3 +1113,11 @@ model GiftBox {
@@map("gift_box")
}

model ItemMetadata {
id Int @id
name String?
@@map("item_metadata")
}
6 changes: 5 additions & 1 deletion src/lib/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ export const BOT_TYPE: 'BSO' | 'OSB' = 'OSB' as 'BSO' | 'OSB';

export const Channel = {
General: DISCORD_SETTINGS.Channels?.General ?? '342983479501389826',
Notifications: production ? '469523207691436042' : '1042760447830536212',
Notifications:
DISCORD_SETTINGS.Channels?.Notifications ?? (production ? '469523207691436042' : '1042760447830536212'),
GrandExchange: DISCORD_SETTINGS.Channels?.GrandExchange ?? '682996313209831435',
Developers: DISCORD_SETTINGS.Channels?.Developers ?? '648196527294251020',
BlacklistLogs: DISCORD_SETTINGS.Channels?.BlacklistLogs ?? '782459317218967602',
Expand Down Expand Up @@ -509,6 +510,9 @@ export type NMZStrategy = (typeof NMZ_STRATEGY)[number];
export const UNDERWATER_AGILITY_THIEVING_TRAINING_SKILL = ['agility', 'thieving', 'agility+thieving'] as const;
export type UnderwaterAgilityThievingTrainingSkill = (typeof UNDERWATER_AGILITY_THIEVING_TRAINING_SKILL)[number];

export const TWITCHERS_GLOVES = ['egg', 'ring', 'seed', 'clue'] as const;
export type TwitcherGloves = (typeof TWITCHERS_GLOVES)[number];

export const busyImmuneCommands = ['admin', 'rp'];
export const usernameCache = new Map<string, string>();
export const badgesCache = new Map<string, string>();
Expand Down
7 changes: 3 additions & 4 deletions src/lib/data/Collections.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { Bank, Clues, Monsters } from 'oldschooljs';
import { Item } from 'oldschooljs/dist/meta/types';
import { ChambersOfXeric } from 'oldschooljs/dist/simulation/misc/ChambersOfXeric';
import Monster from 'oldschooljs/dist/structures/Monster';
import { table } from 'table';

import { ClueTier, ClueTiers } from '../clues/clueTiers';
import { NEX_ID, PHOSANI_NIGHTMARE_ID, ZALCANO_ID } from '../constants';
Expand All @@ -24,7 +23,7 @@ import { MUserStats } from '../structures/MUserStats';
import type { ItemBank } from '../types';
import { fetchStatsForCL, stringMatches } from '../util';
import resolveItems from '../util/resolveItems';
import { shuffleRandom } from '../util/smallUtils';
import { makeTable, shuffleRandom } from '../util/smallUtils';
import {
abyssalSireCL,
aerialFishingCL,
Expand Down Expand Up @@ -895,7 +894,7 @@ export const allCollectionLogs: ICollection = {
items: cyclopsCL
},
Forestry: {
alias: ['forestry'],
alias: ['forestry', 'forest', 'for'],
fmtProg: skillProg(SkillsEnum.Woodcutting),
allItems: forestryCL,
items: forestryCL
Expand Down Expand Up @@ -1283,7 +1282,7 @@ export function getPossibleOptions() {
for (const monster of effectiveMonsters) {
categories.push(['Monsters', monster.name, monster.aliases ? monster.aliases.join(', ') : '']);
}
const normalTable = table([['Type', 'name: ', 'Alias'], ...[...categories, ...activities, ...roles]]);
const normalTable = makeTable(['Type', 'name: ', 'Alias'], [...categories, ...activities, ...roles]);
return new AttachmentBuilder(Buffer.from(normalTable), { name: 'possible_logs.txt' });
}

Expand Down
20 changes: 18 additions & 2 deletions src/lib/data/CollectionsExport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1630,6 +1630,8 @@ export const cyclopsCL = resolveItems([
'Dragon defender'
]);
export const forestryCL = resolveItems([
'Fox whistle',
'Golden pheasant egg',
'Lumberjack hat',
'Lumberjack top',
'Lumberjack legs',
Expand All @@ -1638,10 +1640,19 @@ export const forestryCL = resolveItems([
'Forestry top',
'Forestry legs',
'Forestry boots',
"Twitcher's gloves",
'Funky shaped log',
'Log basket',
'Log brace',
'Clothes pouch blueprint'
'Clothes pouch blueprint',
'Cape pouch',
'Felling axe handle',
'Pheasant hat',
'Pheasant legs',
'Pheasant boots',
'Pheasant cape',
'Petal garland',
'Sturdy beehive parts'
]);

export const fossilIslandNotesCL = resolveItems([
Expand Down Expand Up @@ -1837,7 +1848,12 @@ export const slayerCL = resolveItems([
// "Dagon'hai hat",
// "Dagon'hai robe top",
// "Dagon'hai robe bottom",
'Blood shard'
'Blood shard',
'Ancient ceremonial mask',
'Ancient ceremonial top',
'Ancient ceremonial legs',
'Ancient ceremonial gloves',
'Ancient ceremonial boots'
]);
export const tzHaarCL = resolveItems([
'Obsidian cape',
Expand Down
8 changes: 4 additions & 4 deletions src/lib/data/buyables/buyables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -994,8 +994,8 @@ const Buyables: Buyable[] = [
})),
{
name: 'Menaphite purple outfit',
gpCost: 5000,
ironmanPrice: 600,
gpCost: 25_000,
ironmanPrice: 10_000,
outputItems: new Bank({
'Menaphite purple hat': 1,
'Menaphite purple top': 1,
Expand All @@ -1005,8 +1005,8 @@ const Buyables: Buyable[] = [
},
{
name: 'Menaphite red outfit',
gpCost: 5000,
ironmanPrice: 600,
gpCost: 25_000,
ironmanPrice: 10_000,
outputItems: new Bank({
'Menaphite red hat': 1,
'Menaphite red top': 1,
Expand Down
25 changes: 17 additions & 8 deletions src/lib/data/buyables/forestryBuyables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,6 @@ export const forestryBuyables: Buyable[] = [
name: 'Ritual mulch',
itemCost: new Bank().add('Anima-infused bark', 150).add('Maple logs', 10)
},
{
name: 'Clover insignia',
itemCost: new Bank().add('Anima-infused bark', 200).add('Oak logs', 15)
},
{
name: 'Powdered pollen',
itemCost: new Bank().add('Anima-infused bark', 300).add('Willow logs', 15)
},
{
name: 'Log brace',
itemCost: new Bank().add('Anima-infused bark', 3000).add('Maple logs', 300).add('Yew logs', 300)
Expand All @@ -37,10 +29,22 @@ export const forestryBuyables: Buyable[] = [
name: 'Clothes pouch blueprint',
itemCost: new Bank().add('Anima-infused bark', 10_000).add('Willow logs', 300).add('Maple logs', 300)
},
{
name: 'Cape pouch',
itemCost: new Bank().add('Anima-infused bark', 2500)
},
{
name: 'Log basket',
itemCost: new Bank().add('Anima-infused bark', 5000).add('Oak logs', 300).add('Willow logs', 300)
},
{
name: 'Felling axe handle',
itemCost: new Bank().add('Anima-infused bark', 10_000).add('Oak logs', 500)
},
{
name: "Twitcher's gloves",
itemCost: new Bank().add('Anima-infused bark', 5000).add('Willow logs', 500)
},
{
name: 'Funky shaped log',
itemCost: new Bank()
Expand All @@ -55,6 +59,11 @@ export const forestryBuyables: Buyable[] = [
.add('Magic logs', 500)
.add('Redwood logs', 500)
},
{
name: 'Sawmill voucher',
itemCost: new Bank().add('Anima-infused bark', 150),
outputItems: new Bank({ 'Sawmill voucher': 10 })
},
{
name: 'Lumberjack boots',
itemCost: new Bank().add('Anima-infused bark', 1000).add('Maple logs', 100).add('Yew logs', 200)
Expand Down
131 changes: 113 additions & 18 deletions src/lib/data/creatables/forestryCreatables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,28 +14,18 @@ export const forestryCreatables: Createable[] = [
outputItems: new Bank().add('Nature offerings', 40)
},
{
name: 'Leprechaun charm',
inputItems: new Bank().add('Clover insignia').add('Emerald').add('Ball of wool'),
outputItems: new Bank().add('Leprechaun charm', 10),
requiredSkills: {
crafting: 70,
woodcutting: 70,
farming: 35
}
},
{
name: 'Bee on a stick',
inputItems: new Bank().add('Powdered pollen').add('Logs').add('Ball of wool'),
outputItems: new Bank().add('Bee on a stick', 10),
name: 'Sturdy harness',
inputItems: new Bank().add('Log brace').add('Steel nails', 45).add('Rope', 2).add('Adamantite bar', 3),
outputItems: new Bank().add('Sturdy harness'),
requiredSkills: {
hunter: 50,
woodcutting: 35
smithing: 75,
woodcutting: 75
}
},
{
name: 'Sturdy harness',
inputItems: new Bank().add('Log brace').add('Steel nails', 45).add('Rope', 2).add('Adamantite bar', 3),
outputItems: new Bank().add('Sturdy harness'),
name: 'Forestry basket',
inputItems: new Bank().add('Forestry kit').add('Log basket').add('Sturdy harness'),
outputItems: new Bank().add('Forestry basket'),
requiredSkills: {
smithing: 75,
woodcutting: 75
Expand All @@ -49,5 +39,110 @@ export const forestryCreatables: Createable[] = [
crafting: 50,
woodcutting: 50
}
},
{
name: 'Pheasant hat',
inputItems: new Bank().add('Pheasant tail feathers', 15).add('Thread'),
outputItems: new Bank().add('Pheasant hat'),
requiredSkills: {
crafting: 2
}
},
{
name: 'Pheasant legs',
inputItems: new Bank().add('Pheasant tail feathers', 15).add('Thread'),
outputItems: new Bank().add('Pheasant legs'),
requiredSkills: {
crafting: 2
}
},
{
name: 'Pheasant boots',
inputItems: new Bank().add('Pheasant tail feathers', 15).add('Thread'),
outputItems: new Bank().add('Pheasant boots'),
requiredSkills: {
crafting: 2
}
},
{
name: 'Pheasant cape',
inputItems: new Bank().add('Pheasant tail feathers', 15).add('Thread'),
outputItems: new Bank().add('Pheasant cape'),
requiredSkills: {
crafting: 2
}
},
{
name: 'Bronze felling axe',
inputItems: new Bank().add('Felling axe handle').add('Bronze axe'),
outputItems: new Bank().add('Bronze felling axe')
},
{
name: 'Iron felling axe',
inputItems: new Bank().add('Felling axe handle').add('Iron axe'),
outputItems: new Bank().add('Iron felling axe')
},
{
name: 'Steel felling axe',
inputItems: new Bank().add('Felling axe handle').add('Steel axe'),
outputItems: new Bank().add('Steel felling axe')
},
{
name: 'Black felling axe',
inputItems: new Bank().add('Felling axe handle').add('Black axe'),
outputItems: new Bank().add('Black felling axe')
},
{
name: 'Mithril felling axe',
inputItems: new Bank().add('Felling axe handle').add('Mithril axe'),
outputItems: new Bank().add('Mithril felling axe')
},
{
name: 'Adamant felling axe',
inputItems: new Bank().add('Felling axe handle').add('Adamant axe'),
outputItems: new Bank().add('Adamant felling axe')
},
{
name: 'Rune felling axe',
inputItems: new Bank().add('Felling axe handle').add('Rune axe'),
outputItems: new Bank().add('Rune felling axe')
},
{
name: 'Dragon felling axe',
inputItems: new Bank().add('Felling axe handle').add('Dragon axe'),
outputItems: new Bank().add('Dragon felling axe')
},
{
name: 'Crystal felling axe',
inputItems: new Bank().add('Felling axe handle').add('Crystal axe'),
outputItems: new Bank().add('Crystal felling axe')
},
{
name: '3rd age felling axe',
inputItems: new Bank().add('Felling axe handle').add('3rd age axe'),
outputItems: new Bank().add('3rd age felling axe')
},
{
name: 'Pheasant',
inputItems: new Bank().add('Beaver').add('Golden pheasant egg'),
outputItems: new Bank().add('Pheasant')
},
{
name: 'Revert Pheasant',
inputItems: new Bank().add('Pheasant'),
outputItems: new Bank().add('Beaver').add('Golden pheasant egg'),
noCl: true
},
{
// use id to not get mixed up with the "Fox" quest item
name: 'Fox',
inputItems: new Bank().add('Beaver').add('Fox whistle'),
outputItems: new Bank().add(28_670)
},
{
name: 'Revert Fox',
inputItems: new Bank().add(28_670),
outputItems: new Bank().add('Beaver').add('Fox whistle'),
noCl: true
}
];
Loading

0 comments on commit da746fc

Please sign in to comment.