diff --git a/src/lib/skilling/skills/construction/constructables.ts b/src/lib/skilling/skills/construction/constructables.ts index 66980848cc..2ddf71d221 100644 --- a/src/lib/skilling/skills/construction/constructables.ts +++ b/src/lib/skilling/skills/construction/constructables.ts @@ -24,7 +24,7 @@ const Constructables: Constructable[] = [ input: [Plank.Plank, 2], xp: 58, level: 1, - ticks: 5, + ticks: 6.5, nails: 2 }, { @@ -33,7 +33,7 @@ const Constructables: Constructable[] = [ input: [Plank.Plank, 4], xp: 115, level: 4, - ticks: 5, + ticks: 6.5, nails: 4 }, { @@ -42,7 +42,7 @@ const Constructables: Constructable[] = [ input: [Plank.Plank, 3], xp: 87, level: 8, - ticks: 5, + ticks: 6.5, nails: 3 }, { @@ -51,7 +51,7 @@ const Constructables: Constructable[] = [ input: [Plank.Plank, 8], xp: 228, level: 9, - ticks: 5, + ticks: 6.5, nails: 8 }, { @@ -60,7 +60,7 @@ const Constructables: Constructable[] = [ input: [Plank.Plank, 4], xp: 115, level: 10, - ticks: 5, + ticks: 6.5, nails: 4 }, { @@ -69,7 +69,7 @@ const Constructables: Constructable[] = [ input: [Plank.Plank, 3], xp: 87, level: 14, - ticks: 5, + ticks: 6.5, nails: 3 }, { @@ -78,7 +78,7 @@ const Constructables: Constructable[] = [ input: [Plank.OakPlank, 2], xp: 120, level: 15, - ticks: 5 + ticks: 6.5 }, { id: itemID('Crafting table 1'), @@ -86,7 +86,7 @@ const Constructables: Constructable[] = [ input: [Plank.OakPlank, 4], xp: 240, level: 16, - ticks: 5 + ticks: 6.5 }, { id: itemID('Oak chair'), @@ -94,7 +94,7 @@ const Constructables: Constructable[] = [ input: [Plank.OakPlank, 2], xp: 120, level: 19, - ticks: 5 + ticks: 6.5 }, { id: itemID('Oak dining table'), @@ -102,7 +102,7 @@ const Constructables: Constructable[] = [ input: [Plank.OakPlank, 4], xp: 240, level: 22, - ticks: 5 + ticks: 6.5 }, { id: itemID('Oak armchair'), @@ -110,7 +110,7 @@ const Constructables: Constructable[] = [ input: [Plank.OakPlank, 3], xp: 180, level: 26, - ticks: 5 + ticks: 6.5 }, { id: itemID('Carved oak table'), @@ -118,7 +118,7 @@ const Constructables: Constructable[] = [ input: [Plank.OakPlank, 6], xp: 360, level: 31, - ticks: 5 + ticks: 6.5 }, { id: itemID('Oak larder'), @@ -126,7 +126,7 @@ const Constructables: Constructable[] = [ input: [Plank.OakPlank, 8], xp: 480, level: 33, - ticks: 5 + ticks: 6 }, { id: itemID('Teak armchair'), @@ -134,7 +134,7 @@ const Constructables: Constructable[] = [ input: [Plank.TeakPlank, 2], xp: 180, level: 35, - ticks: 5 + ticks: 6.5 }, { id: itemID('Teak table'), @@ -142,7 +142,7 @@ const Constructables: Constructable[] = [ input: [Plank.TeakPlank, 4], xp: 360, level: 38, - ticks: 5 + ticks: 5.6 }, { id: 21_913, @@ -150,7 +150,7 @@ const Constructables: Constructable[] = [ input: [Plank.TeakPlank, 3], xp: 370, level: 47, - ticks: 5 + ticks: 5.2 }, { id: itemID('Mahogany armchair'), @@ -158,7 +158,7 @@ const Constructables: Constructable[] = [ input: [Plank.MahoganyPlank, 2], xp: 280, level: 50, - ticks: 5 + ticks: 6.5 }, { id: itemID('Mahogany table'), @@ -166,7 +166,7 @@ const Constructables: Constructable[] = [ input: [Plank.MahoganyPlank, 6], xp: 840, level: 52, - ticks: 5 + ticks: 5.6 }, { id: itemID('Teak garden bench'), @@ -174,7 +174,7 @@ const Constructables: Constructable[] = [ input: [Plank.TeakPlank, 6], xp: 540, level: 66, - ticks: 5 + ticks: 4.6 }, { id: itemID('Oak door'), @@ -182,7 +182,7 @@ const Constructables: Constructable[] = [ input: [Plank.OakPlank, 10], xp: 600, level: 74, - ticks: 5 + ticks: 6.5 }, { id: itemID('Gnome bench'), @@ -190,12 +190,8 @@ const Constructables: Constructable[] = [ input: [Plank.MahoganyPlank, 6], xp: 840, level: 77, - ticks: 5 + ticks: 4.6 } ]; -for (const obj of Constructables) { - obj.ticks *= 2.6; -} - export default Constructables; diff --git a/src/mahoji/commands/build.ts b/src/mahoji/commands/build.ts index 6947cae124..efb3791e29 100644 --- a/src/mahoji/commands/build.ts +++ b/src/mahoji/commands/build.ts @@ -97,7 +97,7 @@ export const buildCommand: OSBMahojiCommand = { } } - const timeToBuildSingleObject = object.ticks * 300; + const timeToBuildSingleObject = object.ticks * Time.Second * 0.6; const [plank, planksQtyCost] = object.input; diff --git a/src/mahoji/commands/clue.ts b/src/mahoji/commands/clue.ts index 511e301d24..e421e6d0fb 100644 --- a/src/mahoji/commands/clue.ts +++ b/src/mahoji/commands/clue.ts @@ -1,4 +1,4 @@ -import type { CommandRunOptions } from '@oldschoolgg/toolkit/util'; +import type { CommandResponse, CommandRunOptions } from '@oldschoolgg/toolkit/util'; import { ApplicationCommandOptionType } from 'discord.js'; import { Time, notEmpty, randInt } from 'e'; import { Bank } from 'oldschooljs'; @@ -6,6 +6,7 @@ import type { Item, ItemBank } from 'oldschooljs/dist/meta/types'; import type { ClueTier } from '../../lib/clues/clueTiers'; import { ClueTiers } from '../../lib/clues/clueTiers'; +import { BitField } from '../../lib/constants'; import { allOpenables, getOpenableLoot } from '../../lib/openables'; import { getPOHObject } from '../../lib/poh'; import type { ClueActivityTaskOptions } from '../../lib/types/minions'; @@ -13,6 +14,7 @@ import { formatDuration, isWeekend, stringMatches } from '../../lib/util'; import addSubTaskToActivityTask from '../../lib/util/addSubTaskToActivityTask'; import { calcMaxTripLength } from '../../lib/util/calcMaxTripLength'; import getOSItem, { getItem } from '../../lib/util/getOSItem'; +import { makeBankImage } from '../../lib/util/makeBankImage'; import { getPOH } from '../lib/abstracted_commands/pohCommand'; import type { OSBMahojiCommand } from '../lib/util'; import { addToOpenablesScores, getMahojiBank, mahojiUsersSettingsFetch } from '../mahojiSettings'; @@ -323,6 +325,8 @@ export const clueCommand: OSBMahojiCommand = { timeToFinish = result.duration; + const response: Awaited = {}; + let implingLootString = ''; let implingClues = 0; if (!clueImpling) { @@ -350,18 +354,31 @@ export const clueCommand: OSBMahojiCommand = { } await addToOpenablesScores(user, new Bank().add(implingJarOpenable.id, openedImplings)); - await user.transactItems({ + + const { previousCL } = await user.transactItems({ itemsToAdd: implingLoot, itemsToRemove: new Bank().add(clueImpling, openedImplings).add(clueTier.scrollID, bankedClues), collectionLog: true }); + + const image = await makeBankImage({ + bank: implingLoot, + title: `Loot from ${openedImplings}x ${implingJarOpenable.name}`, + user, + previousCL, + mahojiFlags: user.bitfield.includes(BitField.DisableOpenableNames) ? undefined : ['show_names'] + }); + + response.files = [image.file]; + if (bankedClues + implingClues === 0) { - return `You don't have any clues, and didn't find any in ${openedImplings}x ${clueImpling.name}s. At least you received the following loot: ${implingLoot}.`; + response.content = `You don't have any clues, and didn't find any in ${openedImplings}x ${clueImpling.name}s.`; + return response; } quantity = bankedClues + implingClues; implingLootString = `\n\nYou will find ${implingClues} clue${ implingClues === 0 || implingClues > 1 ? 's' : '' - } from ${openedImplings}x ${clueImpling.name}s, and receive the following loot: ${implingLoot}.`; + } from ${openedImplings}x ${clueImpling.name}s.`; } duration = timeToFinish * quantity; @@ -376,10 +393,12 @@ export const clueCommand: OSBMahojiCommand = { duration, type: 'ClueCompletion' }); - return `${user.minionName} is now completing ${quantity}x ${ + + response.content = `${user.minionName} is now completing ${quantity}x ${ clueTier.name } clues, it'll take around ${formatDuration(duration)} to finish.${ boosts.length > 0 ? `\n\n**Boosts:** ${boosts.join(', ')}.` : '' }${implingLootString}`; + return response; } };