noidea
2008-10-06 01:15:20
I had a thread about this in another section for a week, and no feed back. That thread is deleted now ;)
Ive spent the last day on this. I had to think about it for a while. It's kind of simple but it could acctually help/save a script (?). I thought I would just present it and see what you guys thought.
So what do you think? (Yes, B2C I saw today after I made mine that you had a similar one. I didn't read yours but… The're the same idea (I can imagine))
Ive spent the last day on this. I had to think about it for a while. It's kind of simple but it could acctually help/save a script (?). I thought I would just present it and see what you guys thought.
{*******************************************************************************
function n_RadialRoadWalk(Counter: Integer; TheColor: Integer; StartRadial, EndRadial: Integer; Radius: Integer; Xmod, Ymod: Integer) : Boolean;
By: noidea
Description: If not radialRoadWalk in your radials it, will increases them,
then shorten the radius by 2. This has to be done in the Amount-
that you enter for Counter. If it fails, it will repeat until
"(Counter < 0)"
Usage/Example: n_RadialRoadWalk(50, FindFallyRoadColor, 185, 175, 50, 1,1);
*******************************************************************************}
Function n_RadialRoadWalk(Counter: Integer; TheColor: Integer; StartRadial, EndRadial: Integer; Radius: Integer; Xmod, Ymod: Integer) : Boolean;
var
Counter, s, e, r, xm, ym : Integer;
//Counter, s = StartRadial, e = EndRadial, r = Radius, xm = Xmod, ym = Ymod
t : Boolean;
begin
if not RadialRoadWalk(TheColor, StartRadial, EndRadial, Radius, Xmod, Ymod)then
begin
Writeln('[~n_RadialRoadWalk~] Begining Fail safes.')
repeat
Counter := Counter - 1;
IncEx(s, 8)
e := e - 8;
r := r - 2;
IncEx(xm, random(3))
ym := ym - random(2)
writeln('Counter = '+inttostr(Counter))
if RadialRoadwalk(TheColor, StartRadial + s, EndRadial + e, Radius + r, Xmod + xm, Ymod + ym)then //Result := True;
begin
Flag;
t := True;
end;
until(t)or(Counter < 1)
if (Counter < 1)then
begin
Writeln('[~Error~] Unable to walk, try making counter higher or radial[s] wider.')
Result := False;
exit;
end;
end;
wait(500+random(200))
end;So what do you think? (Yes, B2C I saw today after I made mine that you had a similar one. I didn't read yours but… The're the same idea (I can imagine))