In-game functions are responsible for most things in the game. It is possible to interact directly with them through the console. This can be used to add items, levels, GP and more. These functions can be executed though the console. To access the console open Developer Tools (usually by pressing F12) in your browser and navigate to the console. Then, simply paste the code in the input field and press enter. Most functions will require you to fill out variables in the code before executing them. Note that all code is case sensitive.
Disclaimer: Blindly adding items and experience will most likely take away game enjoyment. It is highly encouraged only to use this to either test things or recoup lost items/progress due to lost saves.
You are playing around with the code of the game, as such if you make mistakes it is possible that could corrupt your game. It is highly recommended to BACKUP YOUR SAVE before running any in-game functions.
The above code will result in attempting to add 10 Oak Logs to the Bank. If they do not fit, 10 will be added to the # of Oak Logs lost on the item's stats. Additionally, Oak Logs will be marked as discovered in the Completion Log.
Remove Item from Bank
The removeItemQuantityByID function can be used to remove any item from the bank
The gp.remove function can be used to remove GP from a player. If the amount specified is greater than the amount the player currently has, then GP will go into the negatives.
The slayerCoins.add function can be used to add Slayer Coins to a player.
game.slayerCoins.add(amount)
Attributes
Attribute
Type
Optional?
Default Value
Description
amount
int
No
The quantity of slayer coins to add.
Examples
game.slayerCoins.add(1);
The above code will add 1 Slayer Coin to the player.
Remove Slayer Coins
The slayerCoins.remove function can be used to remove Slayer Coins from a player. If the amount specified is greater than the amount the player currently has, then slayer coins will go into the negatives.
game.slayerCoins.remove(amount)
Attributes
Attribute
Type
Optional?
Default Value
Description
amount
int
No
The quantity of slayer coins to remove
Examples
game.slayerCoins.remove(1);
The above code will remove 1 Slayer Coin from the player.
Add Raid Coins
The raidCoins.add function can be used to add Raid Coins to a player.
The raidCoins.remove function can be used to remove Raid Coins from a player.
game.raidCoins.remove(amount)
Attributes
Attribute
Type
Optional?
Default Value
Description
amount
int
Yes
0
The quantity of raid coins to be removed.
Examples
game.raidCoins.remvoe(1);
The above will remove 1 Raid Coin from the player.
Add Prayer Points
The combat.player.addPrayerPoints function can be used to add prayer points to a player.
game.combat.player.addPrayerPoints(amount)
Attributes
Attribute
Type
Optional?
Default Value
Description
amount
int
No
The quantity of prayer points to add.
Examples
game.combat.player.addPrayerPoints(1);
The above code will add 1 prayer point to the player, and update player stats.
Add XP
The addXP function can be used to add experience to any skill.
game.skill.addXP(xp)
where skill is the lowercase name of the skill you are adding experience to.
Attributes
Attribute
Type
Optional?
Default Value
Description
xp
int
No
Amount of experience to add.
Examples
game.thieving.addXP(1000);
The above code will result in 1000 experience being added to Thieving.
Add Mastery XP
The addMasteryXP function can be used to add experience to any specific Mastery in a skill.
game.skill.addMasteryXP(masteryAction,xp)
where skill is the lowercase name of the skill you are adding mastery experience to.
Attributes
Attribute
Type
Optional?
Default Value
Description
masteryAction
object
No
The action to add Mastery XP to. Obtained with game.skill.actions.getObjectByID(id) where skill is to be replaced with the name of the skill (all lowercase), and id is the ID of the action.
A list of action IDs can be obtained by entering the following into the console: console.log(game.skill.actions.allObjects.map((a)=>a.id+' - '+a.name).join('\n')).
The petManager.unlockPetByID function is used to unlock Pets. Note that unlocking a pet is permanent - there is no supported method to lock a pet once again.
game.petManager.unlockPetByID(petID)
Attributes
Attribute
Type
Optional?
Default Value
Description
petID
string
No
The ID of the pet, which can be found on the individual pet pages (such as Ty for example).
The above code will result in the unlocking of Cool Rock.
Discover Mark
The discoverMark function is used to discover Summoning Marks. Once discovered, there is no supported method to allow a mark to become undiscovered again.
game.summoning.discoverMark(mark)
Attributes
Attribute
Type
Optional?
Default Value
Description
mark
object
No
The mark to discover. Obtained with game.summoning.actions.getObjectByID(markID) where markID is the ID of the mark.
A list of mark IDs can be obtained by entering the following into the console: console.log(game.summoning.actions.allObjects.map((a)=>a.id+' - '+a.name).join('\n')).