I was thinking itemcoordsbmp:
SCAR Code:
function ItemCoordsBmp(area: string; bmp, tol: Integer): TPointArray;
var
startx, starty, rowsize, colsize, colnumber, rownumber, col, row: Integer;
x1, y1, x2, y2: Integer;
itemx, itemy: Integer;
i: Integer;
begin
SetArrayLength(Result, 0);
if (CheckArea(area)) then
begin
AreaInfo(area, startx, starty, rowsize, colsize, colnumber, rownumber);
for row := 0 to rownumber - 1 do
for col := 0 to colnumber - 1 do
begin
x1 := startx + col * colsize;
y1 := starty + row * rowsize;
x2 := x1 + colsize;
y2 := y1 + rowsize;
if (FindBitmapToleranceIn(bmp, itemx, itemy, x1, y1, x2, y2, tol)) then
begin
i := GetArrayLength(Result);
SetArrayLength(Result, i + 1);
Result[i].x := x1;
Result[i].y := y1;
// writeln(inttostr(x1)+','+inttostr(y1));
end;
end;
end;
end;
Anyway basicly what that does is makes a box around each inv slot so searchs for it in that box and repeats until all the slots are searched