A comprehensive TypeScript library for Old School RuneScape (OSRS) data and utilities, including quest data, skill requirements, and game item information
npm install osrs-toolsbash
npm install osrs-tools
`
For account-related features (hiscores, stats):
`bash
npm install osrs-json-hiscores
`
Examples
$3
`typescript
import { QuestTool, Quest } from 'osrs-tools';
// Get quest information
const dragonSlayer = QuestTool.getQuestByName('Dragon Slayer');
console.log(dragonSlayer.requirements);
// Check quest completion requirements
const questTool = new QuestTool();
questTool.setOsrsAccount(playerAccount);
const canComplete = questTool.canCompleteQuest(dragonSlayer);
`
$3
`typescript
import { Duradel } from 'osrs-tools';
// Get master's task list
const tasks = Duradel.tasks;
// Get random assignment
const task = Duradel.getRandomTask();
console.log(task.name); // e.g., "Abyssal demons"
console.log(task.requirements); // Shows requirements
`
$3
`typescript
import { OsrsAccount } from 'osrs-tools';
// Create/load account
const account = OsrsAccount.fromJson({
name: 'Player123',
skills: {
attack: { level: 60 },
strength: { level: 55 },
defence: { level: 50 },
},
});
// Get skill levels
const attackLevel = account.getSkill('attack')?.level;
`
$3
- Full API Documentation
- Type Definitions
- Code Examples
Development
$3
`bash
Clone and setup
git clone https://github.com/jamescer/osrs-tools.git
cd osrs-tools
npm install
Build and test
npm run build
npm test
`
$3
| Command | Description |
| ------------ | ----------------------- |
| build | Build the project |
| test | Run tests |
| test:watch | Run tests in watch mode |
| lint | Lint the code |
| format | Format the code |
| docs | Generate documentation |
Contributing
We welcome contributions! We use Conventional Commits.
$3
1. Fork and clone the repository
2. Create a branch (feat/amazing-feature)
3. Make your changes
4. Run tests (npm test && npm run lint)
5. Commit with conventional format:
`bash
feat: add quest requirement validation
fix: correct slayer task weights
docs: update API documentation
``