In-game Functions: Difference between revisions

→‎Add XP: Added abyssal xp
(Added functions to clear equipment quick equip items)
(→‎Add XP: Added abyssal xp)
Line 147: Line 147:


== Add XP ==
== Add XP ==
The addXP function can be used to add experience to any skill.
The addXP and addAbyssalXP functions can be used to add experience and abyssal experience to any skill.
  <syntaxhighlight lang="js">game.skill.addXP(xp)</syntaxhighlight>
  <syntaxhighlight lang="js">
where <code>skill</code> is the lowercase name of the skill you are adding experience to.
game.<skill>.addXP(xp);
game.<skill>.addAbyssalXP(xp);
</syntaxhighlight>
where <code><skill></code> is the lowercase name of the skill you are adding experience to.
=== Attributes ===
=== Attributes ===
{| class="wikitable"
{| class="wikitable"
Line 158: Line 161:
|}
|}
=== Examples ===
=== Examples ===
  <syntaxhighlight lang="js">game.thieving.addXP(1000);</syntaxhighlight>
  <syntaxhighlight lang="js">
The above code will result in 1000 experience being added to {{Skill|Thieving}}.
game.thieving.addXP(1000);
game.thieving.addAbyssalXP(1000);
</syntaxhighlight>
The above lines will result in 1000 experience and abyssal experience being added to {{Skill|Thieving}}.


== Add Mastery XP ==
== Add Mastery XP ==