osrs-tools 0.1.1 → 0.2.0
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.
- package/README.md +106 -30
- package/package.json +90 -75
- package/src/index.ts +6 -433
- package/src/model/Requirement.ts +173 -0
- package/src/model/account/OsrsAccount.ts +82 -0
- package/src/model/quest/Quest.ts +44 -0
- package/src/model/quest/QuestTool.ts +96 -0
- package/src/model/slayer/Assignment.ts +40 -0
- package/src/model/slayer/SlayerMaster.ts +137 -0
- package/src/model/slayer/SlayerReward.ts +39 -0
- package/src/model/slayer/Task.ts +168 -0
- package/src/resources/QuestData.json +754 -0
- package/src/{data/Diaries → resources/quest}/diaries.json +3 -3
- package/src/{data/quest/questData.ts → resources/quest/questData.js} +169 -223
- package/src/{data/quest/questDataArray.json → resources/quest/questData.json} +950 -1833
- package/src/resources/quest/questDataArray.js +5489 -0
- package/src/{data/quest/questData.json → resources/quest/questDataArray.json} +642 -643
- package/src/{data/quest/miniquestQuestArray.json → resources/quest/subquestArray.js} +2 -2
- package/src/{data/quest/subQuestArray.json → resources/quest/subquestArray.json} +1 -1
- package/src/{data → resources}/quest/testObj.json +148 -148
- package/src/{data → resources}/quest/testarray.json +149 -149
- package/src/resources/quests/CooksAssistant.json +34 -0
- package/src/resources/slayer/Masters.ts +180 -0
- package/src/resources/slayer/SlayerData.ts +45 -0
- package/src/resources/slayer/SlayerExtends.ts +218 -0
- package/src/resources/slayer/SlayerUnlock.ts +194 -0
- package/src/resources/slayer/slayer.json +3581 -0
- package/src/resources/slayer/slayerBuys.ts +38 -0
- package/src/resources/slayer/slayerData.json +4431 -0
- package/src/resources/slayer/tasks/ChaelderTasks.ts +235 -0
- package/src/resources/slayer/tasks/DuradelTasks.ts +75 -0
- package/src/resources/slayer/tasks/KonarTasks.ts +6 -0
- package/src/resources/slayer/tasks/MazchnaTasks.ts +5 -0
- package/src/resources/slayer/tasks/NieveTasks.ts +235 -0
- package/src/resources/slayer/tasks/ReadTasks.ts +55 -0
- package/src/resources/slayer/tasks/SpriaTasks.ts +344 -0
- package/src/resources/slayer/tasks/Tureal.ts +436 -0
- package/src/resources/slayer/tasks/VannakaTasks.ts +236 -0
- package/src/resources/slayer/tasks/json/Chaeldar.json +348 -0
- package/src/resources/slayer/tasks/json/Duradel.json +541 -0
- package/src/resources/slayer/tasks/json/Krystilia.json +2 -0
- package/src/resources/slayer/tasks/json/Mazchna.json +379 -0
- package/src/resources/slayer/tasks/json/Neive.json +320 -0
- package/src/resources/slayer/tasks/json/Spria.json +345 -0
- package/src/resources/slayer/tasks/json/Tureal.json +341 -0
- package/src/resources/slayer/tasks/json/Vannaka.json +547 -0
- package/src/cli.js +0 -9
- package/src/data/farming/fruitTrees.json +0 -165
- package/src/data/farming/locations.json +0 -78
- package/src/data/farming/patches.json +0 -102
- package/src/data/farming/seeds.json +0 -170
- package/src/data/farming/teleports.json +0 -301
- package/src/data/farming/treePatches.json +0 -3
- package/src/data/farming/trees.json +0 -103
- package/src/data/quest/miniquestQuestArray.ts +0 -8
- package/src/data/quest/questDataArray.ts +0 -4134
- package/src/data/quest/subQuestArray.ts +0 -60
- package/src/tests/QuestTest.js +0 -71
- package/src/tests/getAllQuestSeries.ts +0 -6
- package/src/tests/test Quest Array.ts +0 -9
- package/src/tests/test Requirements.ts +0 -56
- package/src/tests/test.ts +0 -402
- package/src/tests/test3.js +0 -370
- package/src/tests/testQuestCompletion.js +0 -367
- package/src/tests/testSeed.js +0 -8
- package/src/utils/AchievementDiary.ts +0 -18
- package/src/utils/Farming/FarmingTool.ts +0 -110
- package/src/utils/Farming/Seed.js +0 -42
- package/src/utils/Farming/TreeSeed.js +0 -21
- package/src/utils/OsrsAccount.ts +0 -280
- package/src/utils/Quest.ts +0 -99
- package/src/utils/QuestTool.ts +0 -437
- package/src/utils/Requirement.ts +0 -63
- package/src/utils/Skill.ts +0 -11
- /package/src/{data/Diaries → resources/quest}/diariesArray.json +0 -0
- /package/src/{data → resources/quest}/exp.json +0 -0
package/README.md
CHANGED
|
@@ -1,42 +1,118 @@
|
|
|
1
|
-
|
|
1
|
+
# Old School RuneScape Quest Tool
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[![NPM Version][npm-image]][npm-url] [![Downloads][downloads-image]][downloads-url] [![GitHub Issues][issues-img]][new-issue]
|
|
4
|
+
[](https://github.com/jamescer/osrs-tools/blob/master/src/types.ts)
|
|
5
|
+
|
|
6
|
+
The **Old School RuneScape Quest Tool** is a Node.js package designed to provide comprehensive data for all current Old School RuneScape (OSRS) quests, slayer tasks, and related game mechanics. This tool is ideal for developers looking to integrate OSRS data into their projects, whether for personal use, game guides, or community tools.
|
|
7
|
+
|
|
8
|
+
## Features
|
|
9
|
+
|
|
10
|
+
- Access detailed quest data, including requirements, rewards, and steps.
|
|
11
|
+
- Retrieve slayer task information, including task weights, requirements, and locations.
|
|
12
|
+
- Explore slayer master data, including assigned tasks, combat level requirements, and rewards.
|
|
13
|
+
- Built-in support for tracking quest and slayer progress.
|
|
14
|
+
- Easy-to-use API for developers of all skill levels.
|
|
4
15
|
|
|
5
16
|
## Installation
|
|
6
17
|
|
|
7
|
-
|
|
8
|
-
|
|
18
|
+
Install the package via npm:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
npm install osrs-tools --save
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Usage
|
|
25
|
+
|
|
26
|
+
Here’s how to use the tool in your project:
|
|
27
|
+
|
|
28
|
+
### Importing the Module
|
|
29
|
+
|
|
30
|
+
```javascript
|
|
31
|
+
import { QuestTool, questArray, questObject } from 'osrs-tools';
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### Working with Quests
|
|
35
|
+
|
|
36
|
+
```javascript
|
|
37
|
+
// Instantiate the QuestTool class
|
|
38
|
+
const tool = new QuestTool();
|
|
39
|
+
|
|
40
|
+
// Get quest data as an array
|
|
41
|
+
const questArrayData = questArray();
|
|
42
|
+
|
|
43
|
+
// Get quest data as an object
|
|
44
|
+
const questObjectData = questObject();
|
|
45
|
+
|
|
46
|
+
// Output the quest data
|
|
47
|
+
console.log(questArrayData);
|
|
48
|
+
console.log(questObjectData);
|
|
9
49
|
```
|
|
10
50
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
51
|
+
### Working with Slayer Masters and Tasks
|
|
52
|
+
|
|
53
|
+
```javascript
|
|
54
|
+
import { Turael, Duradel } from 'osrs-tools';
|
|
55
|
+
|
|
56
|
+
// Access Turael's tasks
|
|
57
|
+
console.log(Turael.getTasks());
|
|
58
|
+
|
|
59
|
+
// Get a random task from Duradel
|
|
60
|
+
const randomTask = Duradel.getRandomTask();
|
|
61
|
+
console.log(randomTask);
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### Slayer Rewards and Unlocks
|
|
65
|
+
|
|
66
|
+
```javascript
|
|
67
|
+
import { SlayerUnlocks, SlayerBuys } from 'osrs-tools';
|
|
68
|
+
|
|
69
|
+
// List all available Slayer unlocks
|
|
70
|
+
console.log(SlayerUnlocks);
|
|
71
|
+
|
|
72
|
+
// List all items available for purchase with Slayer points
|
|
73
|
+
console.log(SlayerBuys);
|
|
30
74
|
```
|
|
31
75
|
|
|
32
|
-
|
|
76
|
+
## API Reference
|
|
77
|
+
|
|
78
|
+
### Quest API
|
|
79
|
+
|
|
80
|
+
| Method | Description | Type |
|
|
81
|
+
| ----------------- | ----------------------------------------------------------------------- | ----------------- |
|
|
82
|
+
| `new QuestTool()` | Constructor for the `QuestTool` class. | Class Constructor |
|
|
83
|
+
| `questObject()` | Function that returns an object with quest data (keys are quest names). | Function |
|
|
84
|
+
| `questArray()` | Function that returns an array of quests, ordered alphabetically. | Function |
|
|
85
|
+
|
|
86
|
+
### Slayer API
|
|
87
|
+
|
|
88
|
+
| Class/Method | Description |
|
|
89
|
+
| -------------------- | ------------------------------------------------------------------------- |
|
|
90
|
+
| `SlayerMaster` | Represents a Slayer Master, including tasks, location, and requirements. |
|
|
91
|
+
| `getTasks()` | Returns a list of tasks assigned by the Slayer Master. |
|
|
92
|
+
| `getRandomTask()` | Returns a random task based on task weights. |
|
|
93
|
+
| `SlayerUnlocks` | Predefined list of Slayer unlocks with costs and descriptions. |
|
|
94
|
+
| `SlayerBuys` | Predefined list of items available for purchase with Slayer points. |
|
|
95
|
+
|
|
96
|
+
## To-Do
|
|
97
|
+
|
|
98
|
+
- Implement a recursive function for determining quest completion.
|
|
99
|
+
- Develop a quest completion tracking array.
|
|
100
|
+
- Refactor `questArray()` and `questObject()` to return objects instead of functions.
|
|
101
|
+
- Continue work on the **Recipe for Disaster** quest.
|
|
102
|
+
- Fix and validate all Slayer data.
|
|
103
|
+
|
|
104
|
+
## Contributing
|
|
33
105
|
|
|
34
|
-
|
|
106
|
+
Contributions are welcome! If you encounter any issues or have suggestions for improvements, feel free to open an issue or submit a pull request on the [GitHub repository](https://github.com/jamescer/osrs-tools).
|
|
35
107
|
|
|
36
|
-
|
|
108
|
+
## Credits
|
|
37
109
|
|
|
38
|
-
|
|
110
|
+
- **Author**: [James Cerniglia](mailto:jamesmcerniglia@gmail.com)
|
|
111
|
+
- **Repository**: [GitHub - osrs-tools](https://github.com/jamescer/osrs-tools)
|
|
39
112
|
|
|
40
|
-
-
|
|
41
|
-
-
|
|
42
|
-
-
|
|
113
|
+
[npm-image]: https://img.shields.io/npm/v/osrs-tools.svg
|
|
114
|
+
[npm-url]: https://www.npmjs.com/package/osrs-tools
|
|
115
|
+
[downloads-image]: https://img.shields.io/npm/dm/osrs-tools.svg
|
|
116
|
+
[downloads-url]: https://npmcharts.com/compare/osrs-tools?minimal=true
|
|
117
|
+
[issues-img]: https://img.shields.io/github/issues/jamescer/osrs-tools.svg
|
|
118
|
+
[new-issue]: https://github.com/jamescer/osrs-tools/issues/new/choose
|
package/package.json
CHANGED
|
@@ -1,80 +1,95 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
"
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
2
|
+
"name": "osrs-tools",
|
|
3
|
+
"description": "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@hawkmail.newpaltz.edu or jamesmcerniglia@gmail.com.",
|
|
4
|
+
"version": "0.2.0",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"main": "index.js",
|
|
7
|
+
"engines": {
|
|
8
|
+
"node": ">=14.0.0"
|
|
9
|
+
},
|
|
10
|
+
"scripts": {
|
|
11
|
+
"test": "jest --coverage",
|
|
12
|
+
"scrapeQuestList": "ts-node tools/ScrapeQuestData.ts",
|
|
13
|
+
"scrapeSlayerData": "ts-node tools/ScrapeSlayerData.ts",
|
|
14
|
+
"getAccountData": "ts-node tools/GetAccountData.ts",
|
|
15
|
+
"getQuestDetails": "ts-node tools/GetQuestDetails.ts",
|
|
16
|
+
"build": "tsc -p .",
|
|
17
|
+
"dev": "tsc --watch -p .",
|
|
18
|
+
"test:mocha": "mocha ./src/lib/tests/unit/Quest.test.js --timeout 30000 --exit",
|
|
19
|
+
"prepublishOnly": "npm test",
|
|
20
|
+
"postpublish": "git push && git push --tags",
|
|
21
|
+
"preversion": "gulp version && npm test",
|
|
22
|
+
"version": "npm run build && git add dist && git add package.json"
|
|
23
|
+
},
|
|
24
|
+
"devDependencies": {
|
|
25
|
+
"@babel/core": "^7.25.7",
|
|
26
|
+
"@babel/preset-env": "^7.25.7",
|
|
27
|
+
"@babel/preset-typescript": "^7.25.7",
|
|
28
|
+
"@types/chai": "^5.0.1",
|
|
29
|
+
"@types/jest": "^26.0.24",
|
|
30
|
+
"jest": "^29.7.0",
|
|
31
|
+
"mocha": "^11.1.0",
|
|
32
|
+
"ts-jest": "^29.2.6",
|
|
33
|
+
"ts-node": "^10.9.2",
|
|
34
|
+
"typescript": "^4.9.5"
|
|
35
|
+
},
|
|
36
|
+
"dependencies": {
|
|
37
|
+
"axios": "^1.7.7",
|
|
38
|
+
"babel": "^6.23.0",
|
|
39
|
+
"cheerio": "^1.0.0",
|
|
40
|
+
"jest-circus": "^29.7.0",
|
|
41
|
+
"node-fetch": "^3.3.2",
|
|
42
|
+
"travis": "^0.1.1"
|
|
43
|
+
},
|
|
44
|
+
"publishConfig": {
|
|
45
|
+
"registryBackup": "https://npm.pkg.github.com/jamescer"
|
|
46
|
+
},
|
|
47
|
+
"files": [
|
|
48
|
+
"src/**"
|
|
49
|
+
],
|
|
50
|
+
"bin": {
|
|
51
|
+
"osrs-tools": "lib/cli.js"
|
|
52
|
+
},
|
|
53
|
+
"repository": {
|
|
54
|
+
"type": "git",
|
|
55
|
+
"url": "git+https://github.com/jamescer/osrs-tools.git"
|
|
56
|
+
},
|
|
57
|
+
"keywords": [
|
|
58
|
+
"RuneScape",
|
|
59
|
+
"OSRS",
|
|
60
|
+
"Old School RuneScape",
|
|
61
|
+
"OSRS tools",
|
|
62
|
+
"OSRS quest",
|
|
63
|
+
"OSRS quest API",
|
|
64
|
+
"Quest Tool",
|
|
65
|
+
"Old School RuneScape Tools",
|
|
66
|
+
"Old School RuneScape Data"
|
|
67
|
+
],
|
|
68
|
+
"contributors": [
|
|
69
|
+
"James Cerniglia (https://github.com/jamescer)"
|
|
70
|
+
],
|
|
71
|
+
"author": "James Cerniglia",
|
|
72
|
+
"bugs": {
|
|
73
|
+
"url": "https://github.com/jamescer/osrs-tools/issues",
|
|
74
|
+
"email": "jamesmcerniglia@gmail.com"
|
|
75
|
+
},
|
|
76
|
+
"homepage": "https://github.com/jamescer/osrs-tools#readme",
|
|
77
|
+
"funding": [
|
|
78
|
+
{
|
|
79
|
+
"type": "GitHub",
|
|
80
|
+
"url": "https://github.com/jamescer"
|
|
13
81
|
},
|
|
14
|
-
|
|
15
|
-
|
|
82
|
+
{
|
|
83
|
+
"type": "Patreon",
|
|
84
|
+
"url": "https://patreon.com/big_squeezer?utm_medium=unknown&utm_source=join_link&utm_campaign=creatorshare_creator&utm_content=copyLink"
|
|
16
85
|
},
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
"bin": {
|
|
21
|
-
"osrs-tools": "src/cli.js"
|
|
86
|
+
{
|
|
87
|
+
"type": "Ko-fi",
|
|
88
|
+
"url": "https://ko-fi.com/jamescer"
|
|
22
89
|
},
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
},
|
|
27
|
-
"keywords": [
|
|
28
|
-
"runescape",
|
|
29
|
-
"osrs",
|
|
30
|
-
"old school runescape",
|
|
31
|
-
"osrs tools",
|
|
32
|
-
"osrs quest",
|
|
33
|
-
"osrs quest api",
|
|
34
|
-
"osrs-quest-api",
|
|
35
|
-
"osrs quest tool",
|
|
36
|
-
"osrs-quest-tool",
|
|
37
|
-
"osrs-quest-api",
|
|
38
|
-
"OSRS QuestTool",
|
|
39
|
-
"Quest Tool osrs"
|
|
40
|
-
],
|
|
41
|
-
"author": "James Cerniglia <jamesmcerniglia@gmail.com>",
|
|
42
|
-
"license": "ISC",
|
|
43
|
-
"bugs": {
|
|
44
|
-
"url": "https://github.com/jamescer/osrs-quest-tool/issues",
|
|
45
|
-
"email": "jamesmcerniglia@gmail.com"
|
|
46
|
-
},
|
|
47
|
-
"homepage": "https://github.com/jamescer/osrs-quest-tool#readme",
|
|
48
|
-
"dependencies": {
|
|
49
|
-
"babel": "^6.23.0",
|
|
50
|
-
"chai": "^4.3.4",
|
|
51
|
-
"mocha": "^7.2.0",
|
|
52
|
-
"osrs-json-hiscores": "^2.6.0",
|
|
53
|
-
"travis": "^0.1.1"
|
|
54
|
-
},
|
|
55
|
-
"funding": [
|
|
56
|
-
{
|
|
57
|
-
"type": "GitHub",
|
|
58
|
-
"url": "https://github.com/jamescer"
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
"type": "Patreon",
|
|
62
|
-
"url": "https://www.patreon.com/"
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
"type": "PayPal",
|
|
66
|
-
"url": "https://paypal.me/"
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
"type": "Ko-fi",
|
|
70
|
-
"url": "https://ko-fi.com/"
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
"type": "Venmo",
|
|
74
|
-
"url": "https://venmo.com/"
|
|
75
|
-
}
|
|
76
|
-
],
|
|
77
|
-
"devDependencies": {
|
|
78
|
-
"coveralls": "^3.1.1"
|
|
90
|
+
{
|
|
91
|
+
"type": "Venmo",
|
|
92
|
+
"url": "https://venmo.com/jamescer"
|
|
79
93
|
}
|
|
80
|
-
|
|
94
|
+
]
|
|
95
|
+
}
|