Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ruins of Camdozaal #5431

Merged
merged 36 commits into from
Dec 10, 2023
Merged
Show file tree
Hide file tree
Changes from 22 commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
7c5a427
Camdozzal application option
nwjgit Oct 13, 2023
fa15a70
Camdozaal WIP
nwjgit Oct 14, 2023
e07cf20
Camdozaal WIP
nwjgit Oct 14, 2023
c79b1ad
camdozaal fishing works WIP
nwjgit Oct 14, 2023
9540e15
add camdozaal creatables and golems
nwjgit Oct 14, 2023
0c782d6
Camdozaal smithing
nwjgit Oct 14, 2023
5018c2a
fix fishing giving wrong xp
nwjgit Oct 14, 2023
f9bc9b6
fix notes
nwjgit Oct 14, 2023
6296e70
typo fix
nwjgit Oct 14, 2023
6a1e5b1
test
nwjgit Oct 14, 2023
902adaf
update snapshot tests
nwjgit Oct 14, 2023
d224096
adjust xp rates and fix repeat trip issue
nwjgit Oct 15, 2023
1e7cd3a
removed empty file & addressed feedback
nwjgit Oct 16, 2023
23dc0d3
fix error and remove guppy lvl check
nwjgit Oct 16, 2023
0871e10
camdozaalFishing fix
nwjgit Oct 16, 2023
39a7938
Rework camdozaal mining to use mining.ts
nwjgit Oct 17, 2023
0f57890
add clues to camdozaal mining
nwjgit Oct 17, 2023
7653bce
Merge branch 'master' into Ruins-of-Camdozaal
nwjgit Oct 17, 2023
dc5396c
redo how smithing checks for items
nwjgit Oct 17, 2023
d6a50c3
grammar fix
nwjgit Oct 17, 2023
c40aefc
wording fix
nwjgit Oct 17, 2023
a2850bf
more spelling fixes
nwjgit Oct 17, 2023
f5bce67
slayer fix
nwjgit Oct 17, 2023
b423858
mining xp fix
nwjgit Oct 17, 2023
01dad31
rework camdozaal fishing
nwjgit Oct 17, 2023
aa08f1c
fix heron pet
nwjgit Oct 17, 2023
f35d2ce
reformat clue chance
nwjgit Oct 17, 2023
1b67676
few grammar fixes
nwjgit Oct 17, 2023
194967c
simplify loot code, add amulet of glory to mining
nwjgit Oct 18, 2023
59425e7
Music cape requirement
nwjgit Oct 27, 2023
120dceb
Merge branch 'master' into Ruins-of-Camdozaal
nwjgit Oct 27, 2023
8f2f04b
Merge branch 'master' into Ruins-of-Camdozaal
nwjgit Nov 9, 2023
5d9d949
update osjs
nwjgit Nov 9, 2023
b6e31b0
update clsnapshot
nwjgit Nov 9, 2023
50b5627
Merge branch 'master' into Ruins-of-Camdozaal
gc Dec 10, 2023
6f23db2
Update Task.ts
gc Dec 10, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,9 @@ enum XpGainSource {
MahoganyHomes
AerialFishing
CleaningHerbsWhileFarming
CamdozaalMining
CamdozaalSmithing
CamdozaalFishing
}

model XPGain {
Expand Down Expand Up @@ -920,6 +923,9 @@ enum activity_type_enum {
UnderwaterAgilityThieving
StrongholdOfSecurity
SpecificQuest
CamdozaalFishing
CamdozaalMining
CamdozaalSmithing
}

enum xp_gains_skill_enum {
Expand Down
8 changes: 7 additions & 1 deletion src/lib/Task.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
import { agilityTask } from '../tasks/minions/agilityActivity';
import { alchingTask } from '../tasks/minions/alchingActivity';
import { butlerTask } from '../tasks/minions/butlerActivity';
import { camdozaalFishingTask } from '../tasks/minions/camdozaalActivity/camdozaalFishingActivity';
import { camdozaalMiningTask } from '../tasks/minions/camdozaalActivity/camdozaalMiningActivity';
import { camdozaalSmithingTask } from '../tasks/minions/camdozaalActivity/camdozaalSmithingActivity';
import { castingTask } from '../tasks/minions/castingActivity';
import { clueTask } from '../tasks/minions/clueActivity';
import { collectingTask } from '../tasks/minions/collectingActivity';
Expand Down Expand Up @@ -179,11 +182,14 @@
underwaterAgilityThievingTask,
strongholdTask,
specificQuestTask,
halloweenTask
halloweenTask,
camdozaalMiningTask,
camdozaalSmithingTask,
camdozaalFishingTask
];

export async function syncActivityCache() {
const tasks = await prisma.activity.findMany({ where: { completed: false } });

Check warning on line 192 in src/lib/Task.ts

View workflow job for this annotation

GitHub Actions / ESLint

[eslint] reported by reviewdog 🐶 'tasks' is already declared in the upper scope on line 98 column 14. Raw Output: {"ruleId":"no-shadow","severity":1,"message":"'tasks' is already declared in the upper scope on line 98 column 14.","line":192,"column":8,"nodeType":"Identifier","messageId":"noShadow","endLine":192,"endColumn":13}

minionActivityCache.clear();
for (const task of tasks) {
Expand All @@ -200,7 +206,7 @@
}

const task = tasks.find(i => i.type === activity.type)!;
if (!task) {

Check warning on line 209 in src/lib/Task.ts

View workflow job for this annotation

GitHub Actions / ESLint

[eslint] reported by reviewdog 🐶 Unexpected object value in conditional. The condition is always true. Raw Output: {"ruleId":"@typescript-eslint/strict-boolean-expressions","severity":1,"message":"Unexpected object value in conditional. The condition is always true.","line":209,"column":7,"nodeType":"Identifier","messageId":"conditionErrorObject","endLine":209,"endColumn":11}
throw new Error('Missing task');
}

Expand Down
4 changes: 4 additions & 0 deletions src/lib/data/creatablesTable.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1848,4 +1848,8 @@
║ Sturdy harness │ 45x Steel nails, 3x Adamantite bar, 2x Rope, 1x Log brace │ 1x Sturdy harness │ 0 ║
╟─────────────────────────────────────────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────╢
║ Clothes pouch │ 1x Thread, 1x Leather, 1x Clothes pouch blueprint │ 1x Clothes pouch │ 0 ║
╟─────────────────────────────────────────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────╢
║ Barronite mace │ 1,500x Barronite shards, 1x Barronite head, 1x Barronite handle, 1x Barronite guard │ 1x Barronite mace │ 0 ║
╟─────────────────────────────────────────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────╢
║ Imcando hammer │ 1,500x Barronite shards, 1x Imcando hammer (broken) │ 1x Imcando hammer │ 0 ║
╚═════════════════════════════════════════════════╧══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╧══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╧═════════╝
23 changes: 22 additions & 1 deletion src/lib/data/createables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,26 @@ const hunterClothing: Createable[] = [
}
];

const camdozaalItems: Createable[] = [
{
name: 'Barronite mace',
inputItems: new Bank({
'Barronite handle': 1,
'Barronite guard': 1,
'Barronite head': 1,
'Barronite shards': 1500
}),
outputItems: new Bank({ 'Barronite mace ': 1 }),
noCl: false
},
{
name: 'Imcando hammer',
inputItems: new Bank({ 'Imcando hammer (broken)': 1, 'Barronite shards': 1500 }),
outputItems: new Bank({ 'Imcando hammer': 1 }),
noCl: false
}
];

const metamorphPets: Createable[] = [
{
name: 'Midnight',
Expand Down Expand Up @@ -2347,7 +2367,8 @@ const Createables: Createable[] = [
...swampBarkCreatables,
...dtCreatables,
...caCreatables,
...forestryCreatables
...forestryCreatables,
...camdozaalItems
];

export default Createables;
49 changes: 49 additions & 0 deletions src/lib/minions/data/killableMonsters/camdozaalMonsters.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
import { Time } from 'e';
import { Monsters } from 'oldschooljs';

import { KillableMonster } from '../../types';

export const camdozaalMonsters: KillableMonster[] = [
{
id: Monsters.FlawedGolem.id,
name: Monsters.FlawedGolem.name,
aliases: Monsters.FlawedGolem.aliases,
timeToFinish: Time.Second * 15,
table: Monsters.FlawedGolem,
wildy: false,
difficultyRating: 0,
qpRequired: 17
},
{
id: Monsters.MindGolem.id,
name: Monsters.MindGolem.name,
aliases: Monsters.MindGolem.aliases,
timeToFinish: Time.Second * 18,
table: Monsters.MindGolem,
wildy: false,
difficultyRating: 1,
qpRequired: 17
},
{
id: Monsters.BodyGolem.id,
name: Monsters.BodyGolem.name,
aliases: Monsters.BodyGolem.aliases,
timeToFinish: Time.Second * 22,
table: Monsters.BodyGolem,
wildy: false,
difficultyRating: 1,
qpRequired: 17
},
{
id: Monsters.ChaosGolem.id,
name: Monsters.ChaosGolem.name,
aliases: Monsters.ChaosGolem.aliases,
timeToFinish: Time.Second * 30,
table: Monsters.ChaosGolem,
wildy: false,
difficultyRating: 2,
qpRequired: 17
}
];

export default camdozaalMonsters;
2 changes: 2 additions & 0 deletions src/lib/minions/data/killableMonsters/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import resolveItems, { deepResolveItems } from '../../../util/resolveItems';
import { KillableMonster } from '../../types';
import { NIGHTMARES_HP } from './../../../constants';
import bosses from './bosses';
import { camdozaalMonsters } from './camdozaalMonsters';
import { chaeldarMonsters } from './chaeldarMonsters';
import { creatureCreationCreatures } from './creatureCreation';
import { konarMonsters } from './konarMonsters';
Expand All @@ -26,6 +27,7 @@ const killableMonsters: KillableMonster[] = [
...chaeldarMonsters,
...konarMonsters,
...krystiliaMonsters,
...camdozaalMonsters,
...mazchnaMonsters,
...nieveMonsters,
...turaelMonsters,
Expand Down
15 changes: 15 additions & 0 deletions src/lib/skilling/skills/mining.ts
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,20 @@ const MotherlodeMine: Ore = {
petChance: 247_200
};

// Uses determineMiningTime function, therefore Ore object and id -1
const CamdozaalMine: Ore = {
level: 14,
xp: -1,
nwjgit marked this conversation as resolved.
Show resolved Hide resolved
id: -1,
name: 'Barronite rocks',
respawnTime: 3,
bankingTime: 20,
slope: 0.082_71,
intercept: 30.872,
petChance: 741_600,
clueScrollChance: 741_600
};

const prospectorItems: { [key: number]: number } = {
[itemID('Prospector helmet')]: 0.4,
[itemID('Prospector jacket')]: 0.8,
Expand All @@ -270,6 +284,7 @@ const Mining = {
aliases: ['mining'],
Ores: ores,
MotherlodeMine,
CamdozaalMine,
GemRockTable,
GraniteRockTable,
SandstoneRockTable,
Expand Down
5 changes: 4 additions & 1 deletion src/lib/types/minions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,10 @@ export interface ActivityTaskOptionsWithQuantity extends ActivityTaskOptions {
| 'WealthCharging'
| 'GloryCharging'
| 'AerialFishing'
| 'FishingTrawler';
| 'FishingTrawler'
| 'CamdozaalFishing'
| 'CamdozaalMining'
| 'CamdozaalSmithing';
quantity: number;
}

Expand Down
12 changes: 12 additions & 0 deletions src/lib/util/minionStatus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
case 'Agility': {
const data = currentTask as AgilityActivityTaskOptions;

const course = Agility.Courses.find(course => course.name === data.courseID);

Check warning on line 132 in src/lib/util/minionStatus.ts

View workflow job for this annotation

GitHub Actions / ESLint

[eslint] reported by reviewdog 🐶 'course' is already declared in the upper scope on line 132 column 10. Raw Output: {"ruleId":"no-shadow","severity":1,"message":"'course' is already declared in the upper scope on line 132 column 10.","line":132,"column":40,"nodeType":"Identifier","messageId":"noShadow","endLine":132,"endColumn":46}

return `${name} is currently running ${data.quantity}x ${course!.name} laps. ${formattedDuration} Your ${
Emoji.Agility
Expand All @@ -139,7 +139,7 @@
case 'Cooking': {
const data = currentTask as CookingActivityTaskOptions;

const cookable = Cooking.Cookables.find(cookable => cookable.id === data.cookableID);

Check warning on line 142 in src/lib/util/minionStatus.ts

View workflow job for this annotation

GitHub Actions / ESLint

[eslint] reported by reviewdog 🐶 'cookable' is already declared in the upper scope on line 142 column 10. Raw Output: {"ruleId":"no-shadow","severity":1,"message":"'cookable' is already declared in the upper scope on line 142 column 10.","line":142,"column":44,"nodeType":"Identifier","messageId":"noShadow","endLine":142,"endColumn":52}

return `${name} is currently cooking ${data.quantity}x ${cookable!.name}. ${formattedDuration} Your ${
Emoji.Cooking
Expand All @@ -149,7 +149,7 @@
case 'Fishing': {
const data = currentTask as FishingActivityTaskOptions;

const fish = Fishing.Fishes.find(fish => fish.id === data.fishID);

Check warning on line 152 in src/lib/util/minionStatus.ts

View workflow job for this annotation

GitHub Actions / ESLint

[eslint] reported by reviewdog 🐶 'fish' is already declared in the upper scope on line 152 column 10. Raw Output: {"ruleId":"no-shadow","severity":1,"message":"'fish' is already declared in the upper scope on line 152 column 10.","line":152,"column":37,"nodeType":"Identifier","messageId":"noShadow","endLine":152,"endColumn":41}

return `${name} is currently fishing ${data.quantity}x ${fish!.name}. ${formattedDuration} Your ${
Emoji.Fishing
Expand All @@ -159,7 +159,7 @@
case 'Mining': {
const data = currentTask as MiningActivityTaskOptions;

const ore = Mining.Ores.find(ore => ore.id === data.oreID);

Check warning on line 162 in src/lib/util/minionStatus.ts

View workflow job for this annotation

GitHub Actions / ESLint

[eslint] reported by reviewdog 🐶 'ore' is already declared in the upper scope on line 162 column 10. Raw Output: {"ruleId":"no-shadow","severity":1,"message":"'ore' is already declared in the upper scope on line 162 column 10.","line":162,"column":33,"nodeType":"Identifier","messageId":"noShadow","endLine":162,"endColumn":36}

return `${name} is currently mining ${ore!.name}. ${
data.fakeDurationMax === data.fakeDurationMin
Expand Down Expand Up @@ -189,7 +189,7 @@
case 'Smelting': {
const data = currentTask as SmeltingActivityTaskOptions;

const bar = Smithing.Bars.find(bar => bar.id === data.barID);

Check warning on line 192 in src/lib/util/minionStatus.ts

View workflow job for this annotation

GitHub Actions / ESLint

[eslint] reported by reviewdog 🐶 'bar' is already declared in the upper scope on line 192 column 10. Raw Output: {"ruleId":"no-shadow","severity":1,"message":"'bar' is already declared in the upper scope on line 192 column 10.","line":192,"column":35,"nodeType":"Identifier","messageId":"noShadow","endLine":192,"endColumn":38}

return `${name} is currently smelting ${data.quantity}x ${bar!.name}. ${formattedDuration} Your ${
Emoji.Smithing
Expand All @@ -209,7 +209,7 @@
case 'Offering': {
const data = currentTask as OfferingActivityTaskOptions;

const bones = Prayer.Bones.find(bones => bones.inputId === data.boneID);

Check warning on line 212 in src/lib/util/minionStatus.ts

View workflow job for this annotation

GitHub Actions / ESLint

[eslint] reported by reviewdog 🐶 'bones' is already declared in the upper scope on line 212 column 10. Raw Output: {"ruleId":"no-shadow","severity":1,"message":"'bones' is already declared in the upper scope on line 212 column 10.","line":212,"column":36,"nodeType":"Identifier","messageId":"noShadow","endLine":212,"endColumn":41}

return `${name} is currently offering ${data.quantity}x ${bones!.name}. ${formattedDuration} Your ${
Emoji.Prayer
Expand All @@ -219,7 +219,7 @@
case 'Burying': {
const data = currentTask as BuryingActivityTaskOptions;

const bones = Prayer.Bones.find(bones => bones.inputId === data.boneID);

Check warning on line 222 in src/lib/util/minionStatus.ts

View workflow job for this annotation

GitHub Actions / ESLint

[eslint] reported by reviewdog 🐶 'bones' is already declared in the upper scope on line 222 column 10. Raw Output: {"ruleId":"no-shadow","severity":1,"message":"'bones' is already declared in the upper scope on line 222 column 10.","line":222,"column":36,"nodeType":"Identifier","messageId":"noShadow","endLine":222,"endColumn":41}

return `${name} is currently burying ${data.quantity}x ${bones!.name}. ${formattedDuration} Your ${
Emoji.Prayer
Expand All @@ -229,7 +229,7 @@
case 'Scattering': {
const data = currentTask as ScatteringActivityTaskOptions;

const ashes = Prayer.Ashes.find(ashes => ashes.inputId === data.ashID);

Check warning on line 232 in src/lib/util/minionStatus.ts

View workflow job for this annotation

GitHub Actions / ESLint

[eslint] reported by reviewdog 🐶 'ashes' is already declared in the upper scope on line 232 column 10. Raw Output: {"ruleId":"no-shadow","severity":1,"message":"'ashes' is already declared in the upper scope on line 232 column 10.","line":232,"column":36,"nodeType":"Identifier","messageId":"noShadow","endLine":232,"endColumn":41}

return `${name} is currently scattering ${data.quantity}x ${ashes!.name}. ${formattedDuration} Your ${
Emoji.Prayer
Expand Down Expand Up @@ -370,6 +370,18 @@
return `${name} is currently fighting cyclopes in the Warriors' Guild. ${formattedDuration}`;
}

case 'CamdozaalFishing': {
return `${name} is currently Fishing in the Ruins of Camdozaal. ${formattedDuration}`;
}

case 'CamdozaalMining': {
return `${name} is currently Mining in the Ruins of Camdozaal. ${formattedDuration}`;
}

case 'CamdozaalSmithing': {
return `${name} is currently Smithing in the Ruins of Camdozaal. ${formattedDuration}`;
}

case 'Sepulchre': {
const data = currentTask as SepulchreActivityTaskOptions;

Expand Down
18 changes: 18 additions & 0 deletions src/lib/util/repeatStoredTrip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,24 @@ export const tripHandlers = {
warriors_guild: { action: 'tokens', quantity: data.quantity }
})
},
[activity_type_enum.CamdozaalMining]: {
commandName: 'activities',
args: (data: ActivityTaskOptionsWithQuantity) => ({
camdozaal: { action: 'mining', quantity: data.quantity }
})
},
[activity_type_enum.CamdozaalSmithing]: {
commandName: 'activities',
args: (data: ActivityTaskOptionsWithQuantity) => ({
camdozaal: { action: 'smithing', quantity: data.quantity }
})
},
[activity_type_enum.CamdozaalFishing]: {
commandName: 'activities',
args: (data: ActivityTaskOptionsWithQuantity) => ({
camdozaal: { action: 'fishing', quantity: data.quantity }
})
},
[activity_type_enum.BarbarianAssault]: {
commandName: 'minigames',
args: () => ({ barb_assault: { start: {} } })
Expand Down
26 changes: 26 additions & 0 deletions src/mahoji/commands/activities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import { alchCommand } from '../lib/abstracted_commands/alchCommand';
import { birdhouseCheckCommand, birdhouseHarvestCommand } from '../lib/abstracted_commands/birdhousesCommand';
import { buryCommand } from '../lib/abstracted_commands/buryCommand';
import { butlerCommand } from '../lib/abstracted_commands/butlerCommand';
import { camdozaalCommand } from '../lib/abstracted_commands/camdozaalCommand';
import { castCommand } from '../lib/abstracted_commands/castCommand';
import { championsChallengeCommand } from '../lib/abstracted_commands/championsChallenge';
import { chargeGloriesCommand } from '../lib/abstracted_commands/chargeGloriesCommand';
Expand Down Expand Up @@ -113,6 +114,27 @@ export const activitiesCommand: OSBMahojiCommand = {
}
]
},
{
type: ApplicationCommandOptionType.Subcommand,
name: 'camdozaal',
description: 'Send your minion to do activities inside the Ruins of Camdozaal',
options: [
{
type: ApplicationCommandOptionType.String,
name: 'action',
description: 'Start mining, smithing, or fishing inside the Ruins of Camdozaal',
choices: ['mining', 'smithing', 'fishing'].map(i => ({ name: i, value: i })),
required: true
},
{
type: ApplicationCommandOptionType.Integer,
name: 'quantity',
description: 'The quantity you want to do (optional).',
required: false,
min_value: 1
}
]
},
{
type: ApplicationCommandOptionType.Subcommand,
name: 'collect',
Expand Down Expand Up @@ -501,6 +523,7 @@ export const activitiesCommand: OSBMahojiCommand = {
chompy_hunt?: { action: 'start' | 'claim' };
champions_challenge?: {};
warriors_guild?: { action: string; quantity?: number };
camdozaal?: { action: string; quantity?: number };
collect?: { item: string; quantity?: number; no_stams?: boolean };
quest?: {
name?: string;
Expand Down Expand Up @@ -573,6 +596,9 @@ export const activitiesCommand: OSBMahojiCommand = {
options.warriors_guild.quantity
);
}
if (options.camdozaal) {
return camdozaalCommand(user, channelID, options.camdozaal.action, options.camdozaal.quantity);
}
if (options.collect) {
return collectCommand(
user,
Expand Down
Loading
Loading