
Originally Posted by
Zeta
how do i use tolerance with radial walk?
this might help ^^ but next time search first
SCAR Code:
function RadialToleranceWalk(TheColor: Integer; StartRadial, EndRadial: Integer;
Radius: Integer; Xmod, Ymod, Tol: Integer): Boolean; // By Wizzup? and WT-Fakawi.
var
i, X1, Y1, x, y: Integer;
begin
if (RoadColorChecker) then
if (DebugRadialRoad) then
WriteLn(' THROUGH RADIALROADWALK= ---> ' + IntToStr(RoadColor));
if (StartRadial = EndRadial) then
begin
WriteLn('Using LinearRoadWalk, equal values.')
if LinearRoadWalk(TheColor, StartRadial, Radius, Xmod, Ymod) then
Result := True;
end
else if (StartRadial < EndRadial) then
begin
repeat
for i := StartRadial to EndRadial do
begin
x1 := Round(Radius * Sine(i)) + 646;
y1 := Round(-Radius * Cose(i)) + 84;
if Not LoggedIn then Exit;
if (FindColorTolerance(x, y, TheColor, X1, Y1, X1 + 1, Y1 + 1, Tol)) then
begin
MouseFindNoFlag(X,Y,Xmod,Ymod);
Result := True;
CountFlag(10);
Exit;
end;
end;
Radius := Radius - 4;
until (Radius <= 1);
end else
if (StartRadial > EndRadial) then
begin
repeat
for i := StartRadial downto EndRadial do
begin
x1 := Round(Radius * Sine(i)) + 646;
y1 := Round(-Radius * Cose(i)) + 84;
if Not LoggedIn then Exit;
if (FindColorTolerance(x, y, TheColor, X1, Y1, X1 + 1, Y1 + 1, Tol)) then
begin
MouseFindNoFlag(X,Y,Xmod,Ymod);
Result := True;
CountFlag(10);
Exit;
end;
end;
Radius := Radius - 4;
until (Radius <= 1);
end
end;
Just put that in your script and use RadialToleranceWalk(TheColor, StartRadial, EndRadial, Radius, Xmod, Ymod, Tol)
XMod is the random, and Ymod is the y axis random,