SRL Archive - Research & Development Lounge

new road walk(edited a little bit) not tested!


Killerdou

2007-08-16 09:40:23


var
RoadPoints : TPointArray;
RoadCount : Integer;

function RadialRoadWalk(TheColor: Integer; StartRadial, EndRadial: Integer;
Radius: Integer; Xmod, Ymod: Integer): Boolean; // By Wizzup? and WT-Fakawi.
var
i, X1, Y1: 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 (FindColor(x, y, TheColor, X1, Y1, X1 + 1, Y1 + 1)) 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 (FindColor(x, y, TheColor, X1, Y1, X1 + 1, Y1 + 1)) then
begin
FindColorsSpiralTolerance(X, Y, RoadPoints, TheColor, X - 10, Y - 10, X + 10, Y + 10, 0);
X := 0;
Y := 0;
For RoadCount := 0 to Length(RoadPoints) - 1 do
begin
X := X + RoadPoints[RoadCount].x;
Y := Y + RoadPoints[RoadCount].y;
end;
X := Round(X div Length(RoadPoints));
Y := Round(X div Length(RoadPoints));
MouseFindNoFlag(X,Y,Xmod,Ymod);
Result := True;
CountFlag(10);
Exit;
end;
end;
Radius := Radius - 4;
until (Radius <= 1);
end
end;

it 'draws a box' around the point it finds, then it finds all roadcolor then and finds the middle but i havent tested it(not sure if it compiles or anything) just an idea that came to my mind:)

Wizzup?

2007-08-16 11:13:03

roadpoints[roadcount].x ;)

Killerdou

2007-08-16 11:15:07

what do you mean?

Wizzup?

2007-08-16 11:18:35

From: iloveit8
what do you mean?


lol.

Martingon

2007-08-16 12:25:15

From: Wizzup?
lol.


Aren't you supposed to get noob points for that?

Wizzup?

2007-08-16 12:51:27

From: Martingon
Aren't you supposed to get noob points for that?


Well, basically, he edited his post.
I helped him out, he made a mistake, and he won't admit it.

But if you want to give me a noob point, go ahead..

R0b0t1

2007-08-16 14:27:07

Wizzup?, next time I think you should try more to explain to him. Like, where he could put that.

Try not to post a message that only has one word, you should put more in it, and even better try to help them.

[BANANA]NOOBNOOBNOOBNOOBNOOBNOOBNOOBNOOBNOOBNOOBNOOBNOOB
[LEFT]You, Wizzup?, have been reported for being a NOOB.
Your
Current violations include
  1. Useless Post for
This brings you to a new total of (1) Noob Points!

For more information on Wizzup? please go Here.

For more information from This database please go Here.

For more information on The Noob Points System please go Here.

For more information on Noobs please go Here.

[/LEFT]
NOOBNOOBNOOBNOOBNOOBNOOBNOOBNOOBNOOBNOOBNOOBNOOB[/BANANA]

Remember… :p you asked.

(No hard feelings? :D)

n3ss3s

2007-08-16 14:32:11

lmao

Wizzup?

2007-08-16 14:34:20

I didn't have to fully explain it, he understood what I meant.. :rolleyes:

R0b0t1

2007-08-16 14:36:01

It didn't sound like it. :p


Nice function BTW, even if it might not work.

Killerdou

2007-08-16 15:03:29

i fixed it already lol

R0b0t1

2007-08-16 16:30:50

Yes… But have you tested it?

Killerdou

2007-08-16 16:39:34

no:cool: im way to important, no not really, tommorow i might have something new;) gonna need to beg freddy :eek: for xyz source though(unless i can find it somewhere else)

Wizzup?

2007-08-16 17:04:04

http://en.wikipedia.org/wiki/CIE_1931_color_space
http://en.wikipedia.org/wiki/XYZ
http://en.wikipedia.org/wiki/Lab_color_space
http://en.wikipedia.org/wiki/Color_models

Wiki loads very slow atm, but the formula is in there.

Killerdou

2007-08-17 03:22:38

thanks, that will help me a lot:)