osrs-tools
Version:
A comprehensive TypeScript library for Old School RuneScape (OSRS) data and utilities, including quest data, skill requirements, and game item information
61 lines • 3.19 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Npc = void 0;
/**
* Represents a non-player character (NPC) in the game.
* @property {number} id - Unique identifier for the NPC.
* @property {string} name - Name of the NPC.
* @property {string} examine - Description of the NPC.
* @property {boolean} members - Indicates if the NPC is a members-only NPC.
* @property {number} combatLevel - Combat level of the NPC.
* @property {string} officialWikiUrl - URL to the official wiki page for the NPC.
* @property {string} [iconUrl] - Optional URL for the NPC's icon.
* @property {number} hitpoints - Hitpoints of the NPC.
* @property {boolean} aggressive - Indicates if the NPC is aggressive.
* @property {string} attackType - The type of attack the NPC uses (e.g., "melee", "ranged", "magic").
* @property {string[]} attackStyles - The primary attack style of the NPC (e.g., "melee", "ranged", "magic").
* @property {number} maxHit - The maximum hit the NPC can deal.
* @property {number} attackSpeed - The attack speed of the NPC in ticks.
* @property {number} respawnTime - The time in seconds before the NPC respawns after being killed.
* @property {string[]} location - Locations where the NPC can be found.
* @property {NpcDrop[]} drops - List of items that the NPC can drop upon death.
* @property {string[]} weaknesses - List of weaknesses of the NPC (e.g., "slash", "stab", "crush").
* @property {string[]} [products] - List of products/services the NPC offers (e.g., runes, house teleport, etc.).
* @property {string[]} [dialogue] - List of notable dialogue lines or dialogue options.
* @property {string[]} [changes] - List of notable changes/updates to the NPC.
*/
class Npc {
constructor(id, name, examine, members, combatLevel, officialWikiUrl, hitpoints, aggressive, attackable, canPoison, poisonous, canCannon, canThrall, canVenom, attackStyles, maxHit, attackSpeed, respawnTime, locations, drops, weaknesses, iconUrl, products, dialogue, changes, trivia) {
this.id = id;
this.name = name;
this.examine = examine;
this.members = members;
this.combatLevel = combatLevel;
this.officialWikiUrl = officialWikiUrl;
this.iconUrl = iconUrl;
this.hitpoints = hitpoints;
this.aggressive = aggressive;
this.attackable = attackable;
this.canPoison = canPoison;
this.poisonous = poisonous;
this.canCannon = canCannon;
this.canThrall = canThrall;
this.canVenom = canVenom;
this.attackStyles = attackStyles;
this.maxHit = maxHit;
this.attackSpeed = attackSpeed;
this.respawnTime = respawnTime;
this.locations = locations;
this.drops = drops;
this.weaknesses = weaknesses;
this.products = products;
this.dialogue = dialogue;
this.changes = changes;
this.trivia = trivia;
}
static createBasicNpc(name) {
return new Npc(0, name, '', false, 0, '', 0, false, false, false, false, false, false, false, [''], 0, 0, 0, [], [], [], undefined, [], [], []);
}
}
exports.Npc = Npc;
//# sourceMappingURL=Npc.js.map