Here is how do i find a willow without sorting it with ColorToleranceSpeed(3) and SetColorSpeed3Modifiers(Sensivity):
Function FindWillow(Var X,Y : Integer): Boolean;
Var
TPA : TPointArray;
I : Integer;
Begin
ColorToleranceSpeed(3);
SetColorSpeed3Modifiers(4);
FindColorsSpiralTolerance(MSCX, MSCY, TPA, 10344398, MSX1, MSY1, MSX2, MSY2, 13);
ColorToleranceSpeed(1);
For I := 0 To High(TPA) Do
Begin
MiddleTPAex(TPA, X, Y);
MMouse(X, Y, 5, 5);
If IsUpText('illow') Then
Begin
Result := True;
GetMousePos(X, Y);
//DebugTPA(TPA, '');
Exit;
End;
End;
End;
If you want to test it:
program New;
{.include srl/srl.scar}
Var
X, Y : Integer;
Function DebugTPA(Points: TPointArray; BmpName: String): Boolean;
Var
Width, Height, ClientBMP, I, L: Integer;
xs, ys, xe, ye: Integer;
Begin
Try
Begin
xe := xs xor xs;
ye := ys xor ys;
xs := 1 shl 20;
ys := 1 shl 20;
For I := 0 To High(Points) Do
Begin
xs := Min(xs, Points[i].X);
ys := Min(ys, Points[i].Y);
xe := Max(xe, Points[i].X);
ye := Max(ye, Points[i].Y);
End;
Width := xe - xs;
Height := ye - ys;
DisplayDebugImgWindow(0, 0);
DisplayDebugImgWindow(Width, Height);
ClientBMP := BitmapFromString(Width, Height, '');
CopyClientToBitmap(ClientBMP, xs, ys, xe, ye);
For I := 0 To High(Points) Do
FastSetPixel(ClientBMP, Points[i].X - xs, Points[i].Y - ys, 255);
If BmpName <> '' Then
SaveBitmap(ClientBMP, ScriptPath + BmpName + '.bmp');
SafeDrawBitmap(ClientBMP, GetDebugCanvas, 0, 0);
DisplayDebugImgWindow(Width, Height);
FreeBitmap(ClientBMP);
End
Except
FreeBitmap(ClientBMP);
End;
Result := True;
End;
Function FindWillow(Var X,Y : Integer): Boolean;
Var
TPA : TPointArray;
I : Integer;
Begin
ColorToleranceSpeed(3);
SetColorSpeed3Modifiers(4);
FindColorsSpiralTolerance(MSCX, MSCY, TPA, 10344398, MSX1, MSY1, MSX2, MSY2, 13);
ColorToleranceSpeed(1);
For I := 0 To High(TPA) Do
Begin
MiddleTPAex(TPA, X, Y);
MMouse(X, Y, 5, 5);
If IsUpText('illow') Then
Begin
Result := True;
GetMousePos(X, Y);
DebugTPA(TPA, '');
Exit;
End;
End;
End;
begin
ActivateClient;
SetupSRL;
Wait(500);
Writeln(BoolToStr(FindWillow(X, Y)));
end.
Pic:

;)