SRL Archive - OSR Help

XP Earned


Sin

2012-01-22 19:46:55

For my Mining script, i'm currently relying on every time the procedure ends to add a set amount of XP. BUT. I'm using Varrock Armor which allows me to mine two ores at once.
How would I track how much XP i've earned for Mining so that I can get accurate XP/h?

Richard

2012-01-22 20:15:15

There are a couple of ways in which you could do it. Firstly, as you're only going to be gaining mining XP (I assume) you could check the change in the XP Bar (using GetXPBarTotal). But if you're gaining XP in one than one skill, and you want to find out how much you've earnt in total, then go for GetXP(skill: variant), which returns the XP of that skill. The only problem with the latter method is that it would require you to be constantly switching to your skill tab.

With this new feature where it gives you the skill symbol in a circle at the top, do people think it would wise to use this as a method to check the XP? I have a good idea how to work out a percentage from it by counting the number of orange pixels in that circle.

Sin

2012-01-22 21:10:09

From: Richard
There are a couple of ways in which you could do it. Firstly, as you're only going to be gaining mining XP (I assume) you could check the change in the XP Bar (using GetXPBarTotal). But if you're gaining XP in one than one skill, and you want to find out how much you've earnt in total, then go for GetXP(skill: variant), which returns the XP of that skill. The only problem with the latter method is that it would require you to be constantly switching to your skill tab.

With this new feature where it gives you the skill symbol in a circle at the top, do people think it would wise to use this as a method to check the XP? I have a good idea how to work out a percentage from it by counting the number of orange pixels in that circle.


Do it :)
I think I should just use the GetXPBarTotal function as GetXP would require clicking to the skill tab, and it'd slow the script down ALOT.
You really should work on that idea of yours :)

Edit*
I looked up GetXPBarTotal and found that you cannot store that number in a variable.
I thought I could store GetXPBarTotal in variable "XPStart" and at the end of dropping procedure, store the new GetXPBarTotal in "XP".
Then in the proggy procedure, make the XPEarned variable like this-

XPEarned := XP - XPStart;

So i can't do that?

NexPB

2012-01-24 15:48:22

From: S1N
Do it :)
I think I should just use the GetXPBarTotal function as GetXP would require clicking to the skill tab, and it'd slow the script down ALOT.
You really should work on that idea of yours :)

Edit*
I looked up GetXPBarTotal and found that you cannot store that number in a variable.
I thought I could store GetXPBarTotal in variable "XPStart" and at the end of dropping procedure, store the new GetXPBarTotal in "XP".
Then in the proggy procedure, make the XPEarned variable like this-

XPEarned := XP - XPStart;

So i can't do that?


U can store it in an integer because I do it.