SRL Archive - SRL Archives

Funny Radius Road Walk!


Claymore

2008-10-14 20:45:48


function RadiusRoadWalk(Color, Tolerance, StartRadial, EndRadial, Radius, ModX, ModY: Integer): Boolean;
var
TestColor, I, X, Y: Integer;
begin
for I := (StartRadial) to (EndRadial) do
begin
X := Round(Radius * Sin(I * Pi / 180)) + MMCX;
Y := Round(-Radius * Cos(I * Pi / 180)) + MMCY;
if (SimilarColors(GetColor(X, Y), Color, Tolerance)) then
begin
TestColor := GetColor(X, Y)
if (GetColor(X + 2, Y + 2) = TestColor) then
if (GetColor(X - 1, Y - 1) = TestColor) then
begin
Mouse(X, Y, ModX, ModY, True);
Result := True;
Break;
end;
end;
end;

:p It's an old function i kept a long time ago. So what do you guys think, if i released this before Radial Road Walk i would've been famous in SRL. :rolleyes: Anyways any suggestion.

What it does…

> Finds colors in the Start / End Radial. Starts matching the colors specified by the user WITH tolerance. Than it checks it's surrounding if they're the same. (Good for rock color finding!) Then clicks, results true and breaks from the loop. Then the procedure exits!

noidea

2008-10-14 21:01:48

Wow, thats really cool. I might use some thing like this in the Color Rimmington AnyThing Miner I'm going to make. Good job.

Naum

2008-10-19 06:03:45

LinearWalk anyone?

Rubix

2008-10-19 10:47:11

From: NaumanAkhlaQ
LinearWalk anyone?


agreed