SRL Archive - RS3 Help

Problems calculating earned XP


Mr. Roboto

2014-08-11 05:31:20

I have a script: https://villavu.com/forum/showthread.php?t=109817

It unlocks the safes at the Rogues Den.

When a safe is unlocked sucessfully two possibilities may occur:
  • You get a gem.
  • You get money.

How can I detect when the user gains XP? (for proggy).

What I tried:

// Checks for a new gem in inventory.
b := tabBackPack.waitForShift(5000);
// Checks for money gained.
b2 := findColorTolerance(x, y, 14868703, 924, 813, 933, 825, 1);

if b = true OR b2 = true
then xpGained := xpGained + 70;


Only the gem part works, the other check is not being detected.

The Mayor

2014-08-11 06:33:06

use chatBox.getXP(), the one asha wrote (look in his scripts, I think I use it in monkey pilferer too).



var
startXP:integer;
begin

startXP := chatBox.getXP();

stealStuff();

if chatBox.getXP() <> startXP then
writeLn('Must have stole something');


Mr. Roboto

2014-08-11 07:19:55

From: The Mayor
use chatBox.getXP(), the one asha wrote (look in his scripts, I think I use it in monkey pilferer too).



var
startXP:integer;
begin

startXP := chatBox.getXP();

stealStuff();

if chatBox.getXP() <> startXP then
writeLn('Must have stole something');



That's awesome! Thank you.