### Install osrsreboxed Package Source: https://github.com/0xneffarion/osrsreboxed-db/blob/master/README.md Installs the osrsreboxed Python package using pip. This command fetches and installs the latest version of the package from the Python Package Index. ```bash pip install osrsreboxed ``` -------------------------------- ### Set up osrsreboxed-db Development Repository on Ubuntu Source: https://github.com/0xneffarion/osrsreboxed-db/blob/master/README.md This section outlines the steps to set up the osrsreboxed-db development repository on an Ubuntu system. It includes installing Python 3 pip, cloning the repository, creating and activating a virtual environment, and installing project dependencies from requirements.txt. ```bash sudo apt update sudo apt install python3-pip ``` ```bash git clone --recursive https://github.com/0xNeffarion/osrsreboxed-db.git cd osrsreboxed-db python -m venv venv source venv/bin/activate pip3 install -r requirements.txt ``` ```bash deactivate ``` -------------------------------- ### Python Prayer Object Example Source: https://github.com/0xneffarion/osrsreboxed-db/blob/master/README.md An example of a PrayerProperties object as loaded in the osrsbox Python package. It demonstrates the structure and data types for a specific prayer, Rigour. ```python PrayerProperties( id=28, name='Rigour', members=True, description='Increases your Ranged attack by 20% and damage by 23%, and your defence by 25%.', drain_per_minute=40.0, wiki_url='https://oldschool.runescape.wiki/w/Rigour', requirements={'prayer': 74, 'defence': 70}, bonuses={'ranged': 20, 'ranged_strength': 25, 'defence': 23}, icon='iVBORw0KGgoAAAANSUhEUgAAABwAAAAYCAYAAADpnJ2CAAABMklEQVR42rWW3Q0CIRCEjwJ8tgBrMPHZFmzAIny0gOvA+izAGjCYcMwNswucSrLJHT/7McvyM02bSojTfwo7Tv8h3h/PqKFfTSTEYqUuwTRQ9R8Erp0XdV79ANBWw7Y/7Mw2W7mhqDSGxTkC0vf5eqqg2I99CKAOVXZ0mY+Lw/SdgFjHk7DD3xE+hLZsINR2+BQMlXG7Gu8Cc2jyt4KketWWw22HWYTUWqcMsYzVcmIBMFQZqBSxmvl1+xj2Z7XdQByQHbKSDET1qNCB1uuHs1ZhY2NgQ2W9fpbCEaAT0jpLeZAKaQvmJI3OUs5QhHoZqoDuWcr7jDe4lURqL3bcIOsTxwJbxmvdcV0FeQPgPmydpZ3KJvcg904bVNi+GwegCPYgG2D1g6nXfvCu4cdRy9rlDXGzl98mKbMMAAAAAElFTkSuQmCC' ) ``` -------------------------------- ### Load and Iterate Through OSRS Prayers (Python) Source: https://github.com/0xneffarion/osrsreboxed-db/blob/master/README.md Loads all OSRS prayers from the database and iterates through them, printing each prayer's name. Requires the osrsreboxed package to be installed. ```python from osrsreboxed import prayers_api prayers = prayers_api.load() for prayer in prayers: print(prayer.name) ``` -------------------------------- ### Load and Iterate Through OSRS Items (Python) Source: https://github.com/0xneffarion/osrsreboxed-db/blob/master/README.md Loads all OSRS items from the database and iterates through them, printing each item's ID and name. Requires the osrsreboxed package to be installed. ```python from osrsreboxed import items_api items = items_api.load() for item in items: print(item.id, item.name) ``` -------------------------------- ### Load and Iterate Through OSRS Monsters (Python) Source: https://github.com/0xneffarion/osrsreboxed-db/blob/master/README.md Loads all OSRS monsters from the database and iterates through them, printing each monster's ID and name. Requires the osrsreboxed package to be installed. ```python #!/usr/bin/python3 from osrsreboxed import monsters_api monsters = monsters_api.load() for monster in monsters: print(monster.id, monster.name) ``` -------------------------------- ### Python Object Example: OSRS Monster Data Source: https://github.com/0xneffarion/osrsreboxed-db/blob/master/README.md Demonstrates the structure of a monster object in Python, including its properties like ID, name, combat stats, and item drops. This format is useful for programmatic access and manipulation of monster data. ```python MonsterProperties( id=415, name='Abyssal demon', last_updated='2020-12-25', incomplete=False, members=True, release_date='2005-01-26', combat_level=124, size=1, hitpoints=150, max_hit=8, attack_type=['stab'], attack_speed=4, aggressive=False, poisonous=False, venomous=False, immune_poison=False, immune_venom=False, attributes=['demon'], category=['abyssal demon'], slayer_monster=True, slayer_level=85, slayer_xp=150.0, slayer_masters=[ 'vannaka', 'chaeldar', 'konar', 'nieve', 'duradel' ], duplicate=False, examine='A denizen of the Abyss!', wiki_name='Abyssal demon (Standard)', wiki_url='https://oldschool.runescape.wiki/w/Abyssal_demon#Standard', attack_level=97, strength_level=67, defence_level=135, magic_level=1, ranged_level=1, attack_bonus=0, strength_bonus=0, attack_magic=0, magic_bonus=0, attack_ranged=0, ranged_bonus=0, defence_stab=20, defence_slash=20, defence_crush=20, defence_magic=0, defence_ranged=20, drops= [ MonsterDrop( id=592, name='Ashes', members=False, quantity='1', noted=False, rarity=1.0, rolls=1 ), ... MonsterDrop( id=4151, name='Abyssal whip', members=True, quantity='1', noted=False, rarity=0.001953125, rolls=1 ) ] ) ``` -------------------------------- ### JSON Prayer Object Example Source: https://github.com/0xneffarion/osrsreboxed-db/blob/master/README.md A JSON representation of a Prayer object, specifically the Rigour prayer. This format is useful for data exchange and storage. ```json { "id": 28, "name": "Rigour", "members": true, "description": "Increases your Ranged attack by 20% and damage by 23%, and your defence by 25.", "drain_per_minute": 40.0, "wiki_url": "https://oldschool.runescape.wiki/w/Rigour", "requirements": { "prayer": 74, "defence": 70 }, "bonuses": { "ranged": 20, "ranged_strength": 25, "defence": 23 }, "icon": "iVBORw0KGgoAAAANSUhEUgAAABwAAAAYCAYAAADpnJ2CAAABMklEQVR42rWW3Q0CIRCEjwJ8tgBrMPHZFmzAIny0gOvA+izAGjCYcMwNswucSrLJHT/7McvyM02bSojTfwo7Tv8h3h/PqKFfTSTEYqUuwTRQ9R8Erp0XdV79ANBWw7Y/7Mw2W7mhqDSGxTkC0vf5eqqg2I99CKAOVXZ0mY+Lw/SdgFjHk7DD3xE+hLZsINR2+BQMlXG7Gu8Cc2jyt4KketWWw22HWYTUWqcMsYzVcmIBMFQZqBSxmvl1+xj2Z7XdQByQHbKSDET1qNCB1uuHs1ZhY2NgQ2W9fpbCEaAT0jpLeZAKaQvmJI3OUs5QhHoZqoDuWcr7jDe4lURqL3bcIOsTxwJbxmvdcV0FeQPgPmydpZ3KJvcg904bVNi+GwegCPYgG2D1g6nXfvCu4cdRy9rlDXGzl98mKbMMAAAAAElFTkSuQmCC" } ``` -------------------------------- ### JSON Example: OSRS Monster Data Source: https://github.com/0xneffarion/osrsreboxed-db/blob/master/README.md Presents the same monster data in JSON format, suitable for data interchange and storage. This structure is commonly used for APIs and configuration files. ```json { "id": 415, "name": "Abyssal demon", "last_updated": "2020-12-25", "incomplete": false, "members": true, "release_date": "2005-01-26", "combat_level": 124, "size": 1, "hitpoints": 150, "max_hit": 8, "attack_type": [ "stab" ], "attack_speed": 4, "aggressive": false, "poisonous": false, "venomous": false, "immune_poison": false, "immune_venom": false, "attributes": [ "demon" ], "category": [ "abyssal demon" ], "slayer_monster": true, "slayer_level": 85, "slayer_xp": 150.0, "slayer_masters": [ "vannaka", "chaeldar", "konar", "nieve", "duradel" ], "duplicate": false, "examine": "A denizen of the Abyss!", "wiki_name": "Abyssal demon (Standard)", "wiki_url": "https://oldschool.runescape.wiki/w/Abyssal_demon#Standard", "attack_level": 97, "strength_level": 67, "defence_level": 135, "magic_level": 1, "ranged_level": 1, "attack_bonus": 0, "strength_bonus": 0, "attack_magic": 0, "magic_bonus": 0, "attack_ranged": 0, "ranged_bonus": 0, "defence_stab": 20, "defence_slash": 20, "defence_crush": 20, "defence_magic": 0, "defence_ranged": 20, "drops": [ { "id": 1623, "name": "Uncut sapphire", "members": true, "quantity": "1", "noted": false, "rarity": 0.009765625, "rolls": 1 }, ... { "id": 4151, "name": "Abyssal whip", "members": true, "quantity": "1", "noted": false, "rarity": 0.001953125, "rolls": 1 } ] } ``` -------------------------------- ### Fetch OSRS Data via Static JSON API using Bash Source: https://context7.com/0xneffarion/osrsreboxed-db/llms.txt This section provides Bash commands to fetch OSRS game data directly from the project's static JSON API hosted on GitHub. It demonstrates how to use `curl` to retrieve individual items or monsters by their IDs, fetch complete databases (items, monsters), get a summary of items (ID and name only), and download item icons. ```bash # Fetch a single item by ID (Abyssal whip) curl https://raw.githubusercontent.com/0xNeffarion/osrsreboxed-db/master/docs/items-json/4151.json # Fetch the complete items database curl https://raw.githubusercontent.com/0xNeffarion/osrsreboxed-db/master/docs/items-complete.json # Fetch a single monster by ID (Abyssal demon) curl https://raw.githubusercontent.com/0xNeffarion/osrsreboxed-db/master/docs/monsters-json/415.json # Fetch the complete monsters database curl https://raw.githubusercontent.com/0xNeffarion/osrsreboxed-db/master/docs/monsters-complete.json # Fetch items summary (ID and name only - smaller file) curl https://raw.githubusercontent.com/0xNeffarion/osrsreboxed-db/master/docs/items-summary.json # Fetch item icons by ID curl -O https://raw.githubusercontent.com/0xNeffarion/osrsreboxed-db/master/docs/items-icons/4151.png ``` -------------------------------- ### Python Item Object Example - Abyssal Whip Source: https://github.com/0xneffarion/osrsreboxed-db/blob/master/README.md This snippet demonstrates the structure of an item object in Python, specifically for the 'Abyssal whip'. It includes general item properties, nested 'EquipmentProperties' for combat bonuses, and 'WeaponProperties' for weapon-specific details. If an item lacks certain properties, corresponding nested objects or boolean flags would be set to None or False. ```python ItemProperties( id=4151, name='Abyssal whip', last_updated='2020-12-27', incomplete=False, members=True, tradeable=True, tradeable_on_ge=True, stackable=False, stacked=None, noted=False, noteable=True, linked_id_item=None, linked_id_noted=4152, linked_id_placeholder=14032, placeholder=False, equipable=True, equipable_by_player=True, equipable_weapon=True, cost=120001, lowalch=48000, highalch=72000, weight=0.453, buy_limit=70, quest_item=False, release_date='2005-01-26', duplicate=False, examine='A weapon from the abyss.', icon='iVBORw0KGgoAAAANSUhEUgAAACQAAAAgCAYAAAB6kdqOAAABvUlEQVR4Xu2Xv26DMBDG4QEyZECKIkVCKIoyVR26dOrQpUOHDn3/V3F7nL7689kGAo6z9JNuiH1wP+6PIU3zr2Jq3bRVkQ/Y7feBvfcn93o8upfDwT11XQKwOGQMwfYx9O7rcnaf52GEezuFgNdfn4JQ7RjAQojZLAAMcPJbAOH73PcloBTIQiEAG8MB7Pt6MQ+wSW1QAs6Kh1A/NgtnHyKMcZMUCP3AIBw0XcqmgU9qb4W0JwTIwuRAYHETF4FSIMkORjn1xCnjayy8lN/vLVY7TglfvBRGTJpZrpXM+my1f6DhPRdJs8M3nAPibGDseY9hVgHxzbh3chC22dkPQ8EnufddpBgI69Lk3B8hnPrwOsPEw7FYqUzoOsqBUtps8XUASh0bYbxZxUCcJZzCNnjOBGgDDBRD8d4tQAVgRAqEs2jusLOGEhaCgTQTgApLp/s5A0RBGMg3shx2YZb0fZUz9issD4VpsR4PkJ+uYbczJQr94rW7KT3yDJcegLtqeuRlAFa+0bdoeuTxPV2538Ixt1D86Vutr8IR16CSndzfoSpQLIDh09dmscL5lJICMUClw3JKD8tGXiVgfgACr1tEhnw7UAAAAABJRU5ErkJggg==', wiki_name='Abyssal whip', wiki_url='https://oldschool.runescape.wiki/w/Abyssal_whip', equipment=ItemEquipment( attack_stab=0, attack_slash=82, attack_crush=0, attack_magic=0, attack_ranged=0, defence_stab=0, defence_slash=0, defence_crush=0, defence_magic=0, defence_ranged=0, melee_strength=82, ranged_strength=0, magic_damage=0, prayer=0, slot='weapon', requirements={'attack': 70} ), weapon=ItemWeapon( attack_speed=4, weapon_type='whip', stances=[ { 'combat_style': 'flick', 'attack_type': 'slash', 'attack_style': 'accurate', 'experience': 'attack', 'boosts': None }, { 'combat_style': 'lash', 'attack_type': 'slash', 'attack_style': 'controlled', 'experience': 'shared', 'boosts': None }, { 'combat_style': 'deflect', 'attack_type': 'slash', 'attack_style': 'defensive', 'experience': 'defence', 'boosts': None } ] ) ) ``` -------------------------------- ### OSRS Item JSON Example - Abyssal Whip Source: https://github.com/0xneffarion/osrsreboxed-db/blob/master/README.md This JSON object represents an OSRS item, the Abyssal whip. It includes general item properties, tradeability, cost, and specific details for equipable items like combat bonuses within the 'equipment' key and weapon characteristics in the 'weapon' key. If an item is not equipable or not a weapon, corresponding keys would be null or have 'false' boolean values. ```json { "id": 4151, "name": "Abyssal whip", "last_updated": "2020-12-27", "incomplete": false, "members": true, "tradeable": true, "tradeable_on_ge": true, "stackable": false, "stacked": null, "noted": false, "noteable": true, "linked_id_item": null, "linked_id_noted": 4152, "linked_id_placeholder": 14032, "placeholder": false, "equipable": true, "equipable_by_player": true, "equipable_weapon": true, "cost": 120001, "lowalch": 48000, "highalch": 72000, "weight": 0.453, "buy_limit": 70, "quest_item": false, "release_date": "2005-01-26", "duplicate": false, "examine": "A weapon from the abyss.", "icon": "iVBORw0KGgoAAAANSUhEUgAAACQAAAAgCAYAAAB6kdqOAAABvUlEQVR4Xu2Xv26DMBDG4QEyZECKIkVCKIoyVR26dOrQpUOHDn3/V3F7nL7689kGAo6z9JNuiH1wP+6PIU3zr2Jq3bRVkQ/Y7feBvfcn93o8upfDwT11XQKwOGQMwfYx9O7rcnaf52GEezuFgNdfn4JQ7RjAQojZLAAMcPJbAOH73PcloBTIQiEAG8MB7Pt6MQ+wSW1QAs6Kh1A/NgtnHyKMcZMUCP3AIBw0XcqmgU9qb4W0JwTIwuRAYHETF4FSIMkORjn1xCnjayy8lN/vLVY7TglfvBRGTJpZrpXM+my1f6DhPRdJs8M3nAPibGDseY9hVgHxzbh3chC22dkPQ8EnufddpBgI69Lk3B8hnPrwOsPEw7FYqUzoOsqBUtps8XUASh0bYbxZxUCcJZzCNnjOBGgDDBRD8d4tQAVgRAqEs2jusLOGEhaCgTQTgApLp/s5A0RBGMg3shx2YZb0fZUz9issD4VpsR4PkJ+uYbczJQr94rW7KT3yDJcegLtqeuRlAFa+0bdoeuTxPV2538Ixt1D86Vutr8IR16CSndzfoSpQLIDh09dmscL5lJICMUClw3JKD8tGXiVgfgACr1tEhnw7UAAAAABJRU5ErkJggg==", "wiki_name": "Abyssal whip", "wiki_url": "https://oldschool.runescape.wiki/w/Abyssal_whip", "equipment": { "attack_stab": 0, "attack_slash": 82, "attack_crush": 0, "attack_magic": 0, "attack_ranged": 0, "defence_stab": 0, "defence_slash": 0, "defence_crush": 0, "defence_magic": 0, "defence_ranged": 0, "melee_strength": 82, "ranged_strength": 0, "magic_damage": 0, "prayer": 0, "slot": "weapon", "requirements": { "attack": 70 } }, "weapon": { "attack_speed": 4, "weapon_type": "whip", "stances": [ { "combat_style": "flick", "attack_type": "slash", "attack_style": "accurate", "experience": "attack", "boosts": null }, { "combat_style": "lash", "attack_type": "slash", "attack_style": "controlled", "experience": "shared", "boosts": null }, { "combat_style": "deflect", "attack_type": "slash", "attack_style": "defensive", "experience": "defence", "boosts": null } ] } } ``` -------------------------------- ### Fetch JSON Data with Python Source: https://context7.com/0xneffarion/osrsreboxed-db/llms.txt This Python script illustrates how to fetch and parse JSON data from the OSRS Reboxed DB static API using the `urllib` library. It shows how to make an HTTP request to a specific JSON endpoint (e.g., for an item), read the response, decode it, and parse it into a Python dictionary. The example then accesses and prints various properties of the fetched item. ```python import json from urllib.request import urlopen # Fetch a single item url = "https://raw.githubusercontent.com/0xNeffarion/osrsreboxed-db/master/docs/items-json/4151.json" response = urlopen(url) data = json.loads(response.read().decode("utf-8")) print(f"Item: {data['name']}") print(f"ID: {data['id']}") print(f"Members: {data['members']}") print(f"High Alch: {data['highalch']}") if data['equipable_by_player']: equip = data['equipment'] print(f"Attack Slash: {equip['attack_slash']}") print(f"Melee Strength: {equip['melee_strength']}") print(f"Requirements: {equip['requirements']}") ``` -------------------------------- ### Objects API Source: https://github.com/0xneffarion/osrsreboxed-db/blob/master/README.md Access summary information for in-game objects. ```APIDOC ## GET /objects-summary.json ### Description Fetches a JSON file containing only object names and their corresponding ID numbers. Useful for downloading a small file to quickly scan or process in-game object data when only names and IDs are needed. ### Method GET ### Endpoint /objects-summary.json ### Parameters None ### Request Example None ### Response #### Success Response (200) - **objects** (array) - An array of objects, each containing an 'id' and 'name' for an object. #### Response Example { "objects": [ { "id": 1000, "name": "Oak tree" }, { "id": 1001, "name": "Willow tree" } ] } ``` -------------------------------- ### Download Single JSON File using wget (Linux) Source: https://github.com/0xneffarion/osrsreboxed-db/blob/master/README.md This command-line snippet uses `wget` to download a single JSON file from the osrsreboxed-db repository. It's a straightforward method for fetching specific data files on Linux systems. ```bash wget https://raw.githubusercontent.com/0xNeffarion/osrsreboxed-db/master/docs/items-json/12453.json ``` -------------------------------- ### Fetch and Parse JSON File using Python Source: https://github.com/0xneffarion/osrsreboxed-db/blob/master/README.md This Python script demonstrates how to fetch a JSON file from the osrsreboxed-db repository using the `urllib` library. It handles compatibility for both Python 2 and 3, decodes the response, parses it into a JSON object, and prints the content. This is useful for programmatic access to OSRS item data. ```python import json try: from urllib.request import urlopen except ImportError: from urllib2 import urlopen url = ("https://raw.githubusercontent.com/0xNeffarion/osrsreboxed-db/master/docs/items-json/12453.json") response = urlopen(url) data = response.read().decode("utf-8") json_obj = json.loads(data) print(json_obj) ``` -------------------------------- ### Download Single JSON File using PowerShell (Windows) Source: https://github.com/0xneffarion/osrsreboxed-db/blob/master/README.md This command-line snippet uses PowerShell's `Invoke-WebRequest` cmdlet to download a single JSON file from the osrsreboxed-db repository and save it to the current directory. This is the Windows equivalent for fetching specific data files. ```powershell Invoke-WebRequest -Uri "https://raw.githubusercontent.com/0xNeffarion/osrsreboxed-db/master/docs/items-json/12453.json" -OutFile "12453.json" ``` -------------------------------- ### Accessing Complete Datasets Source: https://github.com/0xneffarion/osrsreboxed-db/blob/master/README.md Fetch complete JSON files containing all items, monsters, or other categorized data. These are useful for bulk operations or offline analysis. ```APIDOC ## GET /[items-complete.json|monsters-complete.json|items-summary.json|items-json-slot/items-[slot].json|prayer-json/[prayer].json] ### Description Retrieves comprehensive JSON files for various categories of OSRS data, such as all items, all monsters, item summaries, items by slot, or specific prayers. ### Method GET ### Endpoint - `https://raw.githubusercontent.com/0xNeffarion/osrsreboxed-db/master/docs/items-complete.json` - `https://raw.githubusercontent.com/0xNeffarion/osrsreboxed-db/master/docs/monsters-complete.json` - `https://raw.githubusercontent.com/0xNeffarion/osrsreboxed-db/master/docs/items-summary.json` - `https://raw.githubusercontent.com/0xNeffarion/osrsreboxed-db/master/docs/items-json-slot/items-[slot].json` (e.g., `items-cape.json`) - `https://raw.githubusercontent.com/0xNeffarion/osrsreboxed-db/master/docs/prayer-json/[prayer].json` (e.g., `protect-from-magic.json`) ### Parameters None for these endpoints, as they provide complete datasets. ### Request Example ```bash curl https://raw.githubusercontent.com/0xNeffarion/osrsreboxed-db/master/docs/items-complete.json ``` ### Response #### Success Response (200) - **[JSON Array/Object]** (object/array) - Contains a collection of item, monster, or other data objects based on the requested file. #### Response Example (items-complete.json) ```json [ { "id": 1, "name": "Cabbage", "description": "