UNPKG

osrs-tools

Version:

A JavaScript package to provide JSON data for all current Old School RuneScape quests. This package aims to help junior software developers create tools related to Old School RuneScape. It's a work in progress, and issues should be reported to jamescer@ha

37 lines (36 loc) 1.68 kB
import { OsrsAccount } from '../account/OsrsAccount'; import { Quest } from './Quest'; declare class QuestTool { private osrsAccount; constructor(account?: OsrsAccount); /** * Set the account to be used in this quest tool * @param {OsrsAccount} acc1 The osrs Account to be associated with this class object. */ setOsrsAccount(acc1: OsrsAccount): boolean; /** * Get the osrs account associated with this quest tool * @return {OsrsAccount | undefined} The osrs Account associated with this class object. */ getOsrsAccount(): OsrsAccount | undefined; /** * Determine if the account can complete a quest, including recursively checking quest requirements. * @param quest The quest to check (must be a Quest instance) * @param visited (internal) Set of quest names already checked to prevent infinite recursion */ canCompleteQuest(quest: Quest | undefined, visited?: Set<string>): boolean; /** * Static utility to get a Quest instance by its name. * This assumes all quests are exported as default from their respective files in quest/all/. * @param questName The name of the quest to retrieve * @returns Quest instance or undefined if not found */ static getQuestByName(questName: string): Quest | undefined; /** * Get the maximum boost for a given skill, based on OSRS Wiki data. * @param skillName The name of the skill (case-insensitive, e.g. 'Attack', 'Herblore') * @returns The maximum boost amount for the skill (positive integer, or 0 if unboostable) */ static getMaxSkillBoost(skillName: string): number; } export { QuestTool };