17,101
edits
(Update Steam advice) |
(Rewrite a couple sections to use namespaced IDs rather than array indexes) |
||
Line 175: | Line 175: | ||
! Attribute !! Type !! Optional? !! Default Value !! Description | ! Attribute !! Type !! Optional? !! Default Value !! Description | ||
|- | |- | ||
| masteryAction || object || No || || The action to add Mastery XP to. Obtained with <code>game.skill.actions. | | masteryAction || object || No || || The action to add Mastery XP to. Obtained with <code>game.skill.actions.getObjectByID(id)</code> where <code>skill</code> is to be replaced with the name of the skill (all lowercase), and <code>id</code> is the ID of the action. | ||
A list of action IDs can be obtained by entering the following into the console: <code>console.log(game.skill.actions.allObjects.map((a) => a.id + ' - ' + a.name).join('\n'))</code>. | |||
|- | |- | ||
| xp || int || Yes || 0 || Amount of experience to add. | | xp || int || Yes || 0 || Amount of experience to add. | ||
Line 181: | Line 183: | ||
=== Examples === | === Examples === | ||
<nowiki>game.farming.addMasteryXP(game.farming.actions. | <nowiki>game.farming.addMasteryXP(game.farming.actions.getObjectByID('melvorD:Carrot'), 300);</nowiki> | ||
The above code will result in 300 {{Icon|Mastery}} XP being added to {{Skill|Farming}} for | The above code will result in 300 {{Icon|Mastery}} XP being added to {{Skill|Farming}} for {{ItemIcon|Carrot Seeds}}. | ||
<nowiki>game.firemaking.addMasteryXP(game.firemaking.actions. | <nowiki>game.firemaking.addMasteryXP(game.firemaking.actions.getObjectByID('melvorD:Teak_Logs'), 3000);</nowiki> | ||
The above code will result in | The above code will result in 3,000 {{Icon|Mastery}} XP being added to {{Skill|Firemaking}} for {{ItemIcon|Teak Logs}}. | ||
== Add Mastery XP to Pool== | == Add Mastery XP to Pool== | ||
Line 224: | Line 226: | ||
! Attribute !! Type !! Optional? !! Default Value !! Description | ! Attribute !! Type !! Optional? !! Default Value !! Description | ||
|- | |- | ||
| mark || object || No || || The mark to discover. Obtained with <code>game.summoning.actions. | | mark || object || No || || The mark to discover. Obtained with <code>game.summoning.actions.getObjectByID(markID)</code> where <code>markID</code> is the ID of the mark. | ||
A list of mark IDs can be obtained by entering the following into the console: <code>console.log(game.summoning.actions.allObjects.map((a) => a.id + ' - ' + a.name).join('\n'))</code>. | |||
|} | |} | ||
=== Examples === | === Examples === | ||
<nowiki>game.summoning.discoverMark(game.summoning.actions. | <nowiki>game.summoning.discoverMark(game.summoning.actions.getObjectByID('melvorF:Dragon'));</nowiki> | ||
The above code discovers a single mark for the {{ItemIcon|Dragon}} familiar. | The above code discovers a single mark for the {{ItemIcon|Dragon}} familiar. |