SRL Archive - OSR Help

Does ''FindFallyRoadColor'' Work?


rya

2010-03-01 10:34:40

Edit: Could some one add me on msn or something and help me please because i read a lot of tuts and tryed a couple of ways bu still cant get started on making a walking function

FEAR

2010-03-01 10:51:26

Nothing from AutoColor.scar works :/

Edit: Use the Auto Color Aid (ACA) v2 from the scripting folder to make your own auto color.

rya

2010-03-01 10:53:10

From: FEAR
Nothing from AutoColor.scar works :/

Edit: Use the ACA v2 from the scripting folder to make your own auto color.

Ok thanks
but why is it there is nothing works?

FEAR

2010-03-01 10:56:38

From: rya
Ok thanks
but why is it there is nothing works?


Its very very old and no one bothered to fix it.

NCDS

2010-03-01 11:02:45

From: rya
Ok thanks
but why is it there is nothing works?


From: FEAR
Its very very old and no one bothered to fix it.


Not many people use AutoColoring these days honestly. Not that I see anyways…

TPA's make AutoColoring not as necessary.

Dynamite

2010-03-01 12:56:23

From: NCDS
Not many people use AutoColoring these days honestly. Not that I see anyways…

TPA's make AutoColoring not as necessary.


Hmm, I use AC in my TPAs :)

Camaro'

2010-03-01 20:01:06

Find FallyRoadColor works sometimes. I am working on re writing one, I will release it when i'm done.

Awkwardsaw

2010-03-01 20:11:48

From: NCDS
Not many people use AutoColoring these days honestly. Not that I see anyways…

TPA's make AutoColoring not as necessary.


autocoloring makes the tpas more reliable. why wouldnt you use them?

Wanted

2010-03-01 20:18:45

There is no longer a specific color for any road. The best solution is to use tolerance with a color from ACA, or to just use CTS 2 all together in combination with TPAs because whatever single color you return from auto color on a road isn't going to cover all of it.

NCDS

2010-03-01 21:02:03

From: Awkwardsaw
autocoloring makes the tpas more reliable. why wouldnt you use them?


Usually if something doesn't work wih just a single color and tolerance I will just loop through a few colors instead of taking the time to do an AutoColor routine.

twobac

2010-03-18 21:42:07

Is there a function like radialwalk that does not use any colour at all, just a pure geometry walk?

Wanted

2010-03-18 21:44:58

From: twobac
Is there a function like radialwalk that does not use any colour at all, just a pure geometry walk?


That makes no sense.

tarajunky

2010-03-18 23:16:40

I wrote this a few days ago for Varrock. Since the roads are now broken up into many colors, it would be nice to return more than one color for the roadcolor and loop through them…


function RadialWalks(TheColors:TIntegerArray; StartRadial, EndRadial, Radius, Xmod, Ymod: Integer): Boolean;
var
TPA,TPA2: TPointArray;
I,J,N: Integer;
begin
Result := False;
n:=High(TheColors);
if n=0 then exit;
for j:= 0 to n do
begin
if RadialWalkEx(tpa, MMCX, MMCY, TheColors[j], 0, StartRadial, EndRadial, Radius) then
TPA2:=CombineTPA(TPA,TPA2);
end;
SortCircleWise(tpa2, MMCX, MMCY, StartRadial, False, StartRadial > EndRadial);
for i:= 0 to High(TPA2) do
if MFNF(tpa2[i].x, tpa2[i].y, Xmod, Ymod) then
begin
FFlag(10);
Result := True;
Exit;
end;
end;

Function FindVarrockRoadColors:TIntegerArray;
var
ii, i, c, n, w: Integer;
TestColours: TIntegerArray;
TPA: TPointArray;
x, y, z: Extended;
r, g, b: Integer;
BlackList, ResultArr: TIntegerArray;
RoadColorsString:string;
begin
FindColorsSpiralTolerance(mmcx, mmcy, tpa, 8881291, mmx1, mmy1, mmx2, mmy2, 70);
if length(tpa) > 0 then
begin
c := high(TPA);
TestColours := GetColors(TPA);
for i := 0 to c do
begin
ColorToRGB(TestColours[i], r, g, b);
ColorToXYZ(TestColours[i], x, y, z);
if not InIntArray(blacklist, TestColours[i]) then
if InRange(R - B, -5, 13) then
if InRange(R - G, -7, 10) then
if InRange(G - B, -5, 9) then
if ((x > 22.5) and (x < 26.5)) then
if ((y > 22.5) and (y < 27.8)) then
if ((z > 23.5) and (z < 28.7)) then
begin
n := high(ResultArr);
SetArrayLength(ResultArr, n + 2);
ResultArr[n+1] := TestColours[i];
end;
w := high(blacklist);
SetArrayLength(BlackList, w + 2);
BlackList[w+1] := TestColours[i];
end;
end;
if length(resultarr) < 1 then
begin
SetArrayLength(Result, 1);
result[0] := -1;
writeln('Could not find Varrock road color!');
exit;
end;
RoadColorsString:='';
w := high(resultArr);
for i := 1 to w do
begin
ii := CountColor(resultarr[i], mmx1, mmy1, mmx2, mmy2);
if ii > 20 then
begin
if (RoadColorsString='') then RoadColorsString:=IntToStr(ResultArr[i]) else
RoadColorsString:=RoadColorsString+','+IntToStr(ResultArr[i]);
n := high(Result);
SetArrayLength(Result, n + 2);
Result[n+1] := resultarr[i];
end;
end;
writeln('Varrock Road Colors Found = '+RoadColorsString);
end;

Basically, it returns all matching colors, and then walks based on the color array rather than just one color.

noidea

2010-03-18 23:21:09

From: tarajunky
I wrote this a few days ago for Varrock. Since the roads are now broken up into many colors, it would be nice to return more than one color for the roadcolor and loop through them…


function RadialWalks(TheColors:TIntegerArray; StartRadial, EndRadial, Radius, Xmod, Ymod: Integer): Boolean;
var
TPA,TPA2: TPointArray;
I,J,N: Integer;
begin
Result := False;
n:=High(TheColors);
if n=0 then exit;
for j:= 0 to n do
begin
if RadialWalkEx(tpa, MMCX, MMCY, TheColors[j], 0, StartRadial, EndRadial, Radius) then
TPA2:=CombineTPA(TPA,TPA2);
end;
SortCircleWise(tpa2, MMCX, MMCY, StartRadial, False, StartRadial > EndRadial);
for i:= 0 to High(TPA2) do
if MFNF(tpa2[i].x, tpa2[i].y, Xmod, Ymod) then
begin
FFlag(10);
Result := True;
Exit;
end;
end;

Function FindVarrockRoadColors:TIntegerArray;
var
ii, i, c, n, w: Integer;
TestColours: TIntegerArray;
TPA: TPointArray;
x, y, z: Extended;
r, g, b: Integer;
BlackList, ResultArr: TIntegerArray;
RoadColorsString:string;
begin
FindColorsSpiralTolerance(mmcx, mmcy, tpa, 8881291, mmx1, mmy1, mmx2, mmy2, 70);
if length(tpa) > 0 then
begin
c := high(TPA);
TestColours := GetColors(TPA);
for i := 0 to c do
begin
ColorToRGB(TestColours[i], r, g, b);
ColorToXYZ(TestColours[i], x, y, z);
if not InIntArray(blacklist, TestColours[i]) then
if InRange(R - B, -5, 13) then
if InRange(R - G, -7, 10) then
if InRange(G - B, -5, 9) then
if ((x > 22.5) and (x < 26.5)) then
if ((y > 22.5) and (y < 27.8)) then
if ((z > 23.5) and (z < 28.7)) then
begin
n := high(ResultArr);
SetArrayLength(ResultArr, n + 2);
ResultArr[n+1] := TestColours[i];
end;
w := high(blacklist);
SetArrayLength(BlackList, w + 2);
BlackList[w+1] := TestColours[i];
end;
end;
if length(resultarr) < 1 then
begin
SetArrayLength(Result, 1);
result[0] := -1;
writeln('Could not find Varrock road color!');
exit;
end;
RoadColorsString:='';
w := high(resultArr);
for i := 1 to w do
begin
ii := CountColor(resultarr[i], mmx1, mmy1, mmx2, mmy2);
if ii > 20 then
begin
if (RoadColorsString='') then RoadColorsString:=IntToStr(ResultArr[i]) else
RoadColorsString:=RoadColorsString+','+IntToStr(ResultArr[i]);
n := high(Result);
SetArrayLength(Result, n + 2);
Result[n+1] := resultarr[i];
end;
end;
writeln('Varrock Road Colors Found = '+RoadColorsString);
end;

Basically, it returns all matching colors, and then walks based on the color array rather than just one color.


When runetek5 came out, I proposed using an int arr, but every one wanted to stick to a single colour >.<

@FEAR: iirc, my findTreeColor works.

twobac

2010-03-18 23:51:48

From: IceFire908
That makes no sense.



sorry, what I meant was, is there a function that will click on the MM based the start radial, end radial and radius, but ignore the colours, ie clicking on a random pixel in the crust of the pizza slice.

Hope that is clearer.

Wanted

2010-03-19 00:00:05

From: twobac
sorry, what I meant was, is there a function that will click on the MM based the start radial, end radial and radius, but ignore the colours, ie clicking on a random pixel in the crust of the pizza slice.

Hope that is clearer.


Oh that's, quite easy. But is nothing at all like RadialWalk/RadialRoadWalk/Radarwalk ect…

tarajunky

2010-03-19 00:12:01

With the ability to click the compass and set everything to perfect north, it would probably be possible to walk without anything but coordinates…

Wanted

2010-03-19 00:14:11

From: tarajunky
With the ability to click the compass and set everything to perfect north, it would probably be possible to walk without anything but coordinates…


I thought the same.

Sadly it doesn't work out. I tried with the firecrafter and it doesn't work to well. You have to remember it deteriorates more and more over time with each click.

KingKong

2010-12-12 22:10:14

From: twobac
Is there a function like radialwalk that does not use any colour at all, just a pure geometry walk?


WalkToTile? or WalkPath should be good for walking(but its reflection…)