SRL Archive - OSR Help

FindVarrockRoadColor


0lumpy

2010-05-16 22:08:35

When i try to autocolor the road it is not turning up anyvalues at all. I have had 1 or 2 instances where it returns a value and works perfectly but alot of times all it will give me is 0. Any help is appreciated.

  repeat
begin;
rcol := FindVarrockRoadColor;
writeln(inttostr(rcol));
end;
until rcol > 0

NCDS

2010-05-16 22:31:38

I'm pretty sure AutoColor.scar is rather outdated right now.

Perhaps that's something I'll look into soon.

YoHoJo

2010-05-17 00:37:13

(ACA= Auto Color Aid)

Simple ACA code for Varrock road color:
Function VRC: TPoint;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(16.49, 0.84);
FindColorsSpiralTolerance(MMCX, MMCY, arP, 9013892, MMX1, MMY1, MMX2, MMY2, 3);
if (Length(arP) = 0) then
begin
Writeln('Failed to find the color, no result.');
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
Exit;
end;
arC := GetColors(arP);
ClearSameIntegers(arC);
arL := High(arC);
for i := 0 to arL do
begin
If CountColor(Arc[i],MMX1,MMY1,MMX2,MMY2) > 100 Then
Begin
Result.x := arC[i];
Writeln('AutoColor = ' + IntToStr(arC[i])+'px:'+IntToStr(CountColor(Arc[i],MMX1,MMY1,MMX2,MMY2)));
Result.y:=CountColor(Arc[i],MMX1,MMY1,MMX2,MMY2);
Break;
End Else
Continue;
end;
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
end;

List of multiple Varrock road colors to be used with ACA

8620683
8752269
8489097
8291717
8160131
8357511
8818318
8949648
8816777
8422019
8947853
8555145
8094342
8686479
9013897
8947848
8487296
9145489
8947337
9013386
9013388
8684424
8750216
8421251
8552837
8684422
8618888
8684682
8816268
8947854
8355717

0lumpy

2010-05-18 09:56:58

If i wanted to use this to RadialRoadWalk how exactly would i do this? To tell you the truth im not really sure how to use your function. The RadialRoadWalk is working fine for me but im not sure how i would use this to get the color for it.

nielsie95

2010-05-18 10:05:21

The colour from yohojo's function is stored in Result.x, so VRC.x ;)

0lumpy

2010-05-18 10:20:33

lol thanks nielsie im a nub if you didn't notice haha.