Wanted
2011-01-19 20:42:19
function GetXP(Skill: Variant): Integer;
var
B: TBox;
p: TPoint;
tx, ty: Integer;
TPA: TPointArray;
begin
Result := -1;
if (not TabExists(tab_Stats)) then exit;
GameTab(tab_Stats);
if (GetCurrentTab <> tab_Stats) then exit;
P := SkillToCoords(Skill);
if (P.x < 1) then exit;
MMouse(P.x, P.y + 5, 12, 4);
if (not WaitFindColors(TPA, 10551295, MIX1, MIY1, MIX2, MIY2, 0, 4000)) then exit;
B := GetTPABounds(TPA);
Wait(200 + Random(150));
if IsTextInAreaEx(B.X1, B.Y1, B.X2, B.Y2, tx, ty, 'urrent', 0, SmallChars, False, False, 0, 1, 0) then
Result := StrToIntDef(GetNumbers(GetTextAtEx(tx, ty, 0, SmallChars, False, True, 0, 1, 0, 50, False, tr_AllChars)), -1);
end;program new;
{$I SRL/SRL.scar}
begin
ActivateClient;
SetUpSRL;
Wait(1000);
WriteLn(GetXp(Skill_Range));
end. Always coming up -1 (in simba), I've tried everything to get it to work.