
Originally Posted by
Ashaman88
Just a little something until the devs come up with something better.
Simba Code:
function TRSChatBox.getXP: Integer;
var
b: TBox;
s: String;
tpa : TPointArray;
atpa : T2DPointArray;
i,cts,p: Integer;
begin
b := self.getBounds();
b.edit(+(b.x2-b.x1)-140, +10, -5, -94);
smartimage.drawbox(b,false,clred);
cts := GetToleranceSpeed();
SetColorToleranceSpeed(2);
SetToleranceSpeed2Modifiers(0.00,0.00);
findColorsTolerance(tpa, 14013909, b, 4);
SetColorToleranceSpeed(CTS);
SetToleranceSpeed2Modifiers(0.2,0.2);
if length(tpa) < 2 then
begin
print('chatBox.getXP(): No XP found', TDebug.SUB);
Exit;
end;
atpa := tpa.cluster(5);
b:= atpa.getbounds;
b.edit(-2,-2,+2,+2);
smartimage.drawbox(b,false,clred);
s:=tesseractgettext(b.x1,b.y1,b.x2,b.y2, FILTER_SMALL_CHARS);
P := Pos('x', S);
if P > 0 then
Result := StrToIntDef(ExtractFromStr(Copy(s, P, Length(S)), Numbers), 0)
else
Result := StrToIntDef(ExtractFromStr(S, Numbers), 0);
print('chatBox.getXP(): XP found: ' + tostr(result), TDebug.SUB);
end;
put your xp bar round these parts:

(in the larger red box)
Then just call chatbox.getxp;
Only works for 1 xp bar at a time (any xp bar you set)
You can remove the drawboxes as you please!
Nice work Ashaman! 
With SRL-6 you can make it slightly shorter, easier and safer for you - by using TColorSetting methods from color utilities (big thanks to @masterBB who added+tweaked them back then)
Example:
Simba Code:
function TRSChatBox.getXP: Integer;
var
b: TBox;
s: String;
tpa : TPointArray;
atpa : T2DPointArray;
i,p: Integer;
begin
b := self.getBounds();
b.edit(+(b.x2-b.x1)-140, +10, -5, -94);
smartimage.drawbox(b,false,clred);
findColorsTolerance(tpa, 14013909, b, 4, colorSetting(2, 0.00, 0.00));
if length(tpa) < 2 then
begin
print('chatBox.getXP(): No XP found', TDebug.SUB);
Exit;
end;
atpa := tpa.cluster(5);
b:= atpa.getbounds;
b.edit(-2,-2,+2,+2);
smartimage.drawbox(b,false,clred);
s:=tesseractgettext(b.x1,b.y1,b.x2,b.y2, FILTER_SMALL_CHARS);
P := Pos('x', S);
if P > 0 then
Result := StrToIntDef(ExtractFromStr(Copy(s, P, Length(S)), Numbers), 0)
else
Result := StrToIntDef(ExtractFromStr(S, Numbers), 0);
print('chatBox.getXP(): XP found: ' + tostr(result), TDebug.SUB);
end;
So that way you don't have to worry about CTS stuff yourself at all.
I even explained the way it works over here, but that topic is based on the old style that I suggested, before masterBB came up with a lot sexier way to do it - the way SRL uses it now! 
Basically the magic of it in a nutshell (updated from the topic above, to the SRL way):
Code:
function findColorTolerance(var x, y: Integer; color: integer; searchBox: TBox; tol: Integer; settings: TColorSettings): Boolean; overload;
var
cs: TColorSettings;
begin
// Step 1. Captures original (current) color settings in the begin to 'cs' variable
cs.retrieve();
// Step 2. Sets custom color settings (by settings) to Simba
settings.apply();
// Step 3. Performs the function, just like it should - with custom settings!
Result := findColorTolerance(x, y, color, searchBox, tol);
// Step 4. Restores the original color settings from 'cs' variable to Simba
cs.apply();
end;
-Jani