PDA

View Full Version : new road walk(edited a little bit) not tested!



Killerdou
08-16-2007, 01:40 PM
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?
08-16-2007, 03:13 PM
roadpoints[roadcount].x ;)

Killerdou
08-16-2007, 03:15 PM
what do you mean?

Wizzup?
08-16-2007, 03:18 PM
what do you mean?

lol.

Martingon
08-16-2007, 04:25 PM
lol.

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

Wizzup?
08-16-2007, 04:51 PM
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
08-16-2007, 06:27 PM
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.

NOOBNOOBNOOBNOOBNOOBNOOBNOOBNOOBNOOBNOOBNOOBNOOB

You, Wizzup?, have been reported for being a NOOB.
Your Current violations include Useless Post for http://www.greg.impwiki.org/noobpoints/noobpoints.png (http://www.villavu.com/forum/showthread.php?t=5265)
This brings you to a new total of http://www.greg.impwiki.org/noobpoints/noobpoints.png (http://www.villavu.com/forum/showthread.php?t=5265) (1) Noob Points!

For more information on Wizzup? (http://noobpoints.tehintar.net/noobadmin.php?noob_name=Wizzup%3F) please go Here. (http://noobpoints.tehintar.net/noobadmin.php?noob_name=Wizzup%3F)

For more information from This database (http://noobpoints.tehintar.net/noobadmin.php) please go Here. (http://noobpoints.tehintar.net/noobadmin.php?)

For more information on The Noob Points System (http://noobpoints.tehintar.net/) please go Here. (http://noobpoints.tehintar.net/)

For more information on Noobs (http://www.villavu.com/forum/showthread.php?t=5265) please go Here. (http://www.villavu.com/forum/showthread.php?t=5265)

NOOBNOOBNOOBNOOBNOOBNOOBNOOBNOOBNOOBNOOBNOOBNOOB

Remember... :p you asked.

(No hard feelings? :D)

n3ss3s
08-16-2007, 06:32 PM
lmao

Wizzup?
08-16-2007, 06:34 PM
I didn't have to fully explain it, he understood what I meant.. :rolleyes:

R0b0t1
08-16-2007, 06:36 PM
It didn't sound like it. :p


Nice function BTW, even if it might not work.

Killerdou
08-16-2007, 07:03 PM
i fixed it already lol

R0b0t1
08-16-2007, 08:30 PM
Yes... But have you tested it?

Killerdou
08-16-2007, 08:39 PM
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?
08-16-2007, 09:04 PM
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
08-17-2007, 07:22 AM
thanks, that will help me a lot:)