Log in

View Full Version : RadialWalkRonny!!!



ronny.m.p
06-09-2007, 11:56 AM
Well as we speak SRL members are enjoying a function called ClickTile. I won't get into detail but it is very advanced and we non-members will probably never get to use it. So I thought...why not make a function for us guys to use? So I researched my MapWalking functions and developed this. Basicly it's the same as RadialWalk only it was 1 very cool feature. If the function dosen't find the color then it will make the startradial and endradial distance larger until it does. If it travles in a full circle and still dosent find the color then it will increase the radius. Increases are controled by the IncreaseBy area of the function syntax. It might cause some minor lagg on old computers but it should be alright. Testers would be nice. I will make a gif to demontsrate ASAP. Remember all credits to RdailWalk go to Wizzup? and WT-Fakawi and i am not pladgerizeing!


function RadialWalkRonny(TheColor, tol: Integer;StartRadial,EndRadial: Integer;
Radius, IncreaseBy, Xmod, Ymod: Integer): Boolean;
var
mx, my, ix, iy, ir: Integer;
begin
if (StartRadial = EndRadial) then
begin
WriteLn('WARNING: Using LinearRalk, StarRadial, and EndRadial are the same');
if LinearRoadWalk(TheColor, StartRadial, Radius, XMod, YMod) then
Result := True;
end else
if (not(radialwalkex(mx, my, 648, 83, thecolor, 0, startradial, endradial, radius)))
then
begin
Ix:= startradial;
Iy:= endradial;
Ir:= radius;
repeat
startradial:= startradial - IncreaseBy;
endradial:= endradial + IncreaseBy;
if(radialwalkex(mx, my, 648, 83, thecolor, 0, startradial, endradial, radius))
then result:= true; exit;
if(Ix = startradial)and(Iy = endradial)then
if(Ir > 70)then break;
radius:= radius + IncreaseBy;
until(radialwalkex(mx, my, 648, 83, thecolor, 0, startradial, endradial, radius));
MouseFindFlag(MX, MY, Xmod, Ymod);
FFlag(10);
end else
result:= false;
end;

EDIT: Use the Radial Walking Aid by Yakman to help with this function!

Santa_Clause
06-09-2007, 12:02 PM
This is nice, but what's it useful for?

Yakman
06-09-2007, 12:07 PM
@SantaClause, this is like that FindBitmapProgressiveTol, where if it doesnt find, it will lower the boundry that it needs, so it will eventually find it more accuratly,

ronny.m.p, make sure you have a StartRadialEnd and EndRadialEnd, so it will exit if it increaces it too far, because otherwise you might end up walking in the wrong direction

ronny.m.p
06-09-2007, 12:57 PM
Lol never thought about that. Thanks Yakman.