I had a function that got all the stat levels
Simba Code:
procedure tStatInfo.getSkills;
var
i, k, basex, basey, c:integer;
begin
self.setSkillNames();
openTab(TAB_STATS);
basex := 586;
basey := 300;
for i := 0 to 2 do
for k := 0 to 6 do
begin
try
self.skillLevel[c] := StrToInt(getSimpleText([65535], basex + (i * 54), basey + (k * 32), basex + 14 + (i * 54), basey + 11 + (k * 32), 'statchars07'));
except
self.skillLevel[c] := -1;
end;
c := c + 1;
end;
end;
the main point of concentration here is the formula:
Simba Code:
self.skillLevel[c] := StrToInt(getSimpleText([65535], basex + (i * 54), basey + (k * 32), basex + 14 + (i * 54), basey + 11 + (k * 32), 'statchars07'));
x1 = basex + (i * 54)
x2 = basey + (k * 32)
y1 = basex + 14 + (i * 54)
y2 = basey + 11 + (k * 32)
base x and y are the top left coordinates of where the number starts, 54 is the x amount of pixels between each stat going left to right, 32 is the amount of pixels between each stat going up and down
So the formula would be:
Simba Code:
function getStatBox(column, row:integer):Tbox;
begin
result := intToBox(586 + (column * 54), 586 + 14 + (column * 54), 300 + (row * 32), 300 + 11 + (row * 32)));
end;
This function gets the box in which the text is inside. What you have to edit is the number 586 and 300 to the lower number of the attack skill.
The easiest way to do this would be:
Simba Code:
function getSimpleText(Color, tol:integer;x1, y1, x2, y2:integer;font:string):String;
var
textTPA:TPointArray;
textATPA:T2DPointArray;
begin
findColorsTolerance(textTPA, color, x1, y1, x2, y2, tol);
textATPA := SplitTPAEx(textTPA, 1, 10);
filtertpasbetween(textatpa, 0, 1);
SortATPAFromFirstPointX(textATPA, Point(0, 0));
result := getTextATPA(textATPA, 3, font);
end;
Use this function, and insert the x1, y1, x2, and y2 of the text
So it would look like
Simba Code:
getSimpleText(textColor, tolerance, x1, y1, x2, y2, 'statchars07');