Code:
{*******************************************************************************
function GetBoxSide: Integer;
by: pups
Description: Gets Box side and returns Bitmap
*******************************************************************************}
function GetBoxSide: Integer;
var
Side, x, y: integer;
begin
Side := BitmapFromString(181, 181, '');
repeat
wait(1000) // this is what fixes the lag.
if findcolortolerance(x, y, 16579837, 182, 45, 182, 225, 5) then continue;
if findcolortolerance(x, y, 16579837, 342, 45, 342, 225, 5) then continue;
if findcolortolerance(x, y, 16579837, 172, 55, 352, 55, 5) then continue;
if findcolortolerance(x, y, 16579837, 172, 215, 352, 215, 5) then continue;
if findcolortolerance(x, y, 12764106, 182, 45, 182, 225, 5) then continue;
if findcolortolerance(x, y, 12764106, 342, 45, 342, 225, 5) then continue;
if findcolortolerance(x, y, 12764106, 172, 55, 352, 55, 5) then continue;
if findcolortolerance(x, y, 12764106, 172, 215, 352, 215, 5) then continue;
break;
until false;
CopyClientToBitmap(Side, 172, 45, 352, 225);
Result := Side;
end;
Theres the SRL boxsolver, to make it not to lag, add that wait(1000) there, I lagged like hell before, now, not even a bit of lag.