From: dousty45
I'd like to be able to get the current XP of a certain skill.
I'm still learning the API but I'm fluent in Java and powerbot's API so it shouldn't be too hard.
How would I go about doing this?
EDIT: Using the 07 client
You should checkout the OSR include.
(*
GetXP
~~~~~
.. code-block:: pascal
function GetXP(Skill: Variant): Integer;
Returns current xp for a skill. Returns -1 if failed.
.. note::
by DannyRS, based off original by Nielsie95
Last Modified: Feb. 28th, 2013 by DannyRS
Example:
.. code-block:: pascal
*)
and there is also:
(*
XPTillNextLevel
~~~~~~~~~~~~~~~
.. code-block:: pascal
function XpTillNextLevel(Skill: Variant): Integer;
Returns current xp until you level up in a skill.
Returns -1 if failed.
.. note::
by DannyRS
Last Modified: Feb. 28th, 2013 by DannyRS
Example:
.. code-block:: pascal
*)
So in your script you would go something like:
XPTL := XPTillNextLevel('mining');
WriteLn('Xp until level: ' + IntToStr(XPTL));