osrs-tools 2.11.0 → 2.11.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -15,11 +15,12 @@ declare class SlayerMaster {
15
15
  minimumCombatLevel: number;
16
16
  tasks: Task[];
17
17
  wikiUrl: string;
18
+ imageUrl: string;
18
19
  taskPoints: Record<number, number>;
19
20
  eliteDiaryTaskPoints?: Record<number, number>;
20
21
  blockedTasks: Set<string>;
21
22
  constructor(options: SlayerMasterConfig);
22
- constructor(name: string, tasks: Task[], location: string, levelRequirement: number, url: string, taskPoints: Record<number, number>, eliteDiaryTaskPoints?: Record<number, number>);
23
+ constructor(name: string, tasks: Task[], location: string, levelRequirement: number, url: string, taskPoints: Record<number, number>, eliteDiaryTaskPoints?: Record<number, number>, imageUrl?: string);
23
24
  /**
24
25
  * Calculate the total weight of all tasks assigned to this Slayer Master.
25
26
  * @returns {number} The total weight of all tasks assigned to this Slayer Master.
@@ -43,6 +44,10 @@ declare class SlayerMaster {
43
44
  * Get the wiki URL of the Slayer Master
44
45
  */
45
46
  getWikiUrl(): string;
47
+ /**
48
+ * Get the URL of the Slayer Master's portrait image
49
+ */
50
+ getImageUrl(): string;
46
51
  /**
47
52
  * Get a random task based on the weighting system of the tasks.
48
53
  * Tasks with higher weights have a higher chance of being selected.
@@ -13,11 +13,12 @@ class SlayerMaster {
13
13
  minimumCombatLevel = 0; // Level requirement to access this Slayer Master (optional, can be set later if needed)
14
14
  tasks; // Array of tasks assigned to this Slayer Master. This holds the actual tasks that players can be assigned to kill.
15
15
  wikiUrl = ''; // URL for the Slayer Master (optional, can be set later if needed)
16
+ imageUrl = ''; // URL of the Slayer Master's portrait image, sourced from the OSRS Wiki (optional, can be set later if needed)
16
17
  taskPoints; // Mapping of task intervals to points
17
18
  eliteDiaryTaskPoints; // Mapping of task intervals to points
18
19
  blockedTasks = new Set(); // Names (lowercased) of tasks this master will not assign
19
20
  // Constructor implementation
20
- constructor(nameOrOptions, tasks, location, levelRequirement, url, taskPoints, eliteDiaryTaskPoints) {
21
+ constructor(nameOrOptions, tasks, location, levelRequirement, url, taskPoints, eliteDiaryTaskPoints, imageUrl) {
21
22
  // Handle options object pattern (modern API)
22
23
  if (typeof nameOrOptions === 'object' && !Array.isArray(nameOrOptions)) {
23
24
  const options = nameOrOptions;
@@ -26,6 +27,7 @@ class SlayerMaster {
26
27
  this.location = options.location || '';
27
28
  this.minimumCombatLevel = options.minimumCombatLevel || 0;
28
29
  this.wikiUrl = options.wikiUrl || '';
30
+ this.imageUrl = options.imageUrl || '';
29
31
  this.taskPoints = options.pointsTable || {};
30
32
  this.eliteDiaryTaskPoints = options.eliteDiaryTaskPoints;
31
33
  }
@@ -36,6 +38,7 @@ class SlayerMaster {
36
38
  this.location = location || '';
37
39
  this.minimumCombatLevel = levelRequirement || 0;
38
40
  this.wikiUrl = url || '';
41
+ this.imageUrl = imageUrl || '';
39
42
  this.taskPoints = taskPoints || {};
40
43
  this.eliteDiaryTaskPoints = eliteDiaryTaskPoints;
41
44
  }
@@ -83,6 +86,12 @@ class SlayerMaster {
83
86
  getWikiUrl() {
84
87
  return this.wikiUrl;
85
88
  }
89
+ /**
90
+ * Get the URL of the Slayer Master's portrait image
91
+ */
92
+ getImageUrl() {
93
+ return this.imageUrl;
94
+ }
86
95
  /**
87
96
  * Get a random task based on the weighting system of the tasks.
88
97
  * Tasks with higher weights have a higher chance of being selected.
@@ -101,6 +101,8 @@ export interface SlayerMasterConfig {
101
101
  name: string;
102
102
  location: string;
103
103
  wikiUrl: string;
104
+ /** URL of the master's portrait image, sourced from the OSRS Wiki. */
105
+ imageUrl?: string;
104
106
  minimumCombatLevel: number;
105
107
  tasks: any[];
106
108
  pointsTable: Record<number, number>;
@@ -21,6 +21,7 @@ export const Chaeldar = new SlayerMaster({
21
21
  250: 70,
22
22
  50: 15,
23
23
  },
24
+ imageUrl: 'https://oldschool.runescape.wiki/w/Special:FilePath/Chaeldar.png',
24
25
  location: 'Zanaris',
25
26
  minimumCombatLevel: 70,
26
27
  name: 'Chaeldar',
@@ -22,6 +22,7 @@ export const Duradel = new SlayerMaster({
22
22
  250: 75,
23
23
  50: 15, // +25 bonus
24
24
  },
25
+ imageUrl: 'https://oldschool.runescape.wiki/w/Special:FilePath/Duradel.png',
25
26
  location: 'Shilo Village',
26
27
  minimumCombatLevel: 50,
27
28
  name: 'Duradel',
@@ -21,6 +21,7 @@ export const KonarQuoMaten = new SlayerMaster({
21
21
  250: 70,
22
22
  50: 15,
23
23
  },
24
+ imageUrl: 'https://oldschool.runescape.wiki/w/Special:FilePath/Konar_quo_Maten.png',
24
25
  location: 'Mount Karuulm',
25
26
  minimumCombatLevel: 75,
26
27
  name: 'Konar Quo Maten',
@@ -22,6 +22,7 @@ export const Krystilia = new SlayerMaster({
22
22
  250: 525,
23
23
  50: 225,
24
24
  },
25
+ imageUrl: 'https://oldschool.runescape.wiki/w/Special:FilePath/Krystilia.png',
25
26
  location: 'Edgeville',
26
27
  minimumCombatLevel: 1,
27
28
  name: 'Krystilia',
@@ -21,6 +21,7 @@ export const Mazchna = new SlayerMaster({
21
21
  250: 70,
22
22
  50: 15,
23
23
  },
24
+ imageUrl: 'https://oldschool.runescape.wiki/w/Special:FilePath/Mazchna.png',
24
25
  location: 'Canifis',
25
26
  minimumCombatLevel: 20,
26
27
  name: 'Mazchna',
@@ -22,6 +22,8 @@ import { registerMaster } from './registry';
22
22
  export const Mortimer = new MortimerSlayerMaster({
23
23
  blockSlotCost: 120,
24
24
  blockSlots: 2,
25
+ // Mortimer had not been released at time of writing; this is concept art (by Mod Jerv), not an in-game portrait.
26
+ imageUrl: 'https://oldschool.runescape.wiki/w/Special:FilePath/Wyrmscraig%20-%20Activities%20%26%20Lock%20In%20Poll%20(5).png',
25
27
  location: 'Wyrmscraig',
26
28
  minimumCombatLevel: 0,
27
29
  name: 'Mortimer',
@@ -22,6 +22,7 @@ export const Nieve = new SlayerMaster({
22
22
  250: 525,
23
23
  50: 225,
24
24
  },
25
+ imageUrl: 'https://oldschool.runescape.wiki/w/Special:FilePath/Nieve.png',
25
26
  location: "Nieve's Cave",
26
27
  minimumCombatLevel: 85,
27
28
  name: 'Nieve',
@@ -21,6 +21,7 @@ export const Spria = new SlayerMaster({
21
21
  250: 70,
22
22
  50: 15,
23
23
  },
24
+ imageUrl: 'https://oldschool.runescape.wiki/w/Special:FilePath/Spria.png',
24
25
  location: 'Draynor Village',
25
26
  minimumCombatLevel: 1,
26
27
  name: 'Spria',
@@ -21,6 +21,7 @@ export const Turael = new SlayerMaster({
21
21
  250: 70,
22
22
  50: 15,
23
23
  },
24
+ imageUrl: 'https://oldschool.runescape.wiki/w/Special:FilePath/Turael.png',
24
25
  location: 'Burthope',
25
26
  minimumCombatLevel: 1,
26
27
  name: 'Turael',
@@ -21,6 +21,7 @@ export const Vannaka = new SlayerMaster({
21
21
  250: 70,
22
22
  50: 15,
23
23
  },
24
+ imageUrl: 'https://oldschool.runescape.wiki/w/Special:FilePath/Vannaka.png',
24
25
  location: 'Edgeville Dungeon',
25
26
  minimumCombatLevel: 40,
26
27
  name: 'Vannaka',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "osrs-tools",
3
- "version": "2.11.0",
3
+ "version": "2.11.1",
4
4
  "description": "A comprehensive TypeScript library for Old School RuneScape (OSRS) data and utilities, including quest data, skill requirements, and general game information",
5
5
  "license": "MIT",
6
6
  "sideEffects": false,