In-game Functions: Difference between revisions

Line 181: Line 181:
  <syntaxhighlight lang="js">
  <syntaxhighlight lang="js">
game.thieving.addXP(1000);
game.thieving.addXP(1000);
game.astrology.setAbyssalXP(game.astrology._abyssalXP - 700);
game.astrology.setAbyssalXP(game.astrology._abyssalXP - 700); // For XP, use game.astrology.xp with the addXP command
game.attack.setXP(game.attack._xp - 2500);
game.attack.setXP(exp.levelToXP(120) + 1); // For Abyssal XP, use abyssalExp.levelToXP with the setAbyssalXP command
</syntaxhighlight>
</syntaxhighlight>
The first line will result in 1,000 experience being added to {{Skill|Thieving}}. The second line will remove 700 abyssal xp from Astrology. The third line will remove 2,500 experience from Attack.
The first line will result in 1,000 experience being added to {{Skill|Thieving}}. The second line will remove 700 abyssal xp from Astrology. The third line will set Attack's level to 120.


== Add or Remove Mastery XP ==
== Add or Remove Mastery XP ==