SRL Archive - Help and Support

Detecting Varrock Road Color by Grand Exchange?


FrÕzÑ_§ÕµL

2007-12-02 18:43:11

Hey guys, just wondering what I can use to get the color of the road to the east of the Grand Exchange? I tries FindDirtRoadColor and FindVarrockRoadColor but neither works :(

XcanadamanX

2007-12-02 20:34:19

make your own!! get a bunch of colours the put them in the attached file (modded from boreas i think)

then change the colour ranges in one of the already made autocolourers

FrÕzÑ_§ÕµL

2007-12-02 20:38:30

Thanku vry much!

XcanadamanX

2007-12-02 20:40:28

I hope it helps:p

FrÕzÑ_§ÕµL

2007-12-02 20:41:40

Wait what the hell is a .xls file?!

XcanadamanX

2007-12-02 20:42:42

its an excel file

FrÕzÑ_§ÕµL

2007-12-02 20:49:19

uh so how the hell can i run it lol i don't have excel. No just of a change to another type… notepad?

FrÕzÑ_§ÕµL

2007-12-02 21:23:52

I got these numbers from the 3 colors that the road is.

Color Red Green Blue R-g G-b R-b
6454418 146 125 98 21 27 48
6388368 144 123 97 21 26 47
6256781 141 121 95 20 26 46

Min of range 0 0 0 0 0 0
Max of range 146 125 98 21 27 48
Range 146 125 98 21 27 48

Generic Color 6388368 Range of Colors 1788500
Total range 16777216
Percent 10.6602907180786 %

AutoColorThis(Bitmap, MaxTol, X1, Y1, X2, Y2: Integer): Integer;
I'm going to make a bimap thats like (4,4) of the road. Is the MaxTol the MaxOfRange from the table? Obviously I will use MMX1, MMY1, MMX2, MMY2 for the rest. Is making that bitmap correct? And the tol?

Thanks!

XcanadamanX

2007-12-02 21:30:31

bitmap? no use
function FindVarrockRoadColor: Integer;
var
GC, a, l, TestColor, Red, Green, Blue : integer;
var
P:array of Tpoint;
begin
GC := 7304312; //change generic color
Flag;
FindColorsSpiralTolerance(MMCX, MMCY, P, GC, MMX1, MMY1, MMX2, MMY2, 60);
l:=GetArrayLength(P);
for a:= 0 to l-1 do
begin
if rs_OnMinimap(P[a].x,P[a].y) then
begin
TestColor := GetColor(P[a].x,P[a].y);
if SimilarColors(TestColor,GC,60) then
begin
red := (TestColor mod 256);
green := ((TestColor / 256) mod 256);
blue := ((TestColor / 256) / 256);
if Red - Blue <= 12 then if Red - Blue >= 8 then //change these values
if Red - Green <= 6 then if Red - Green >= -1 then //change these values
if Green - Blue <= 10 then if Green - Blue >= 4 then //change these values
if GetColor(P[a].x + 5, P[a].y + 5) = TestColor then
if GetColor(P[a].x + 3, P[a].y + 3) = TestColor then
if GetColor(P[a].x, P[a].y + 5) = TestColor then
if GetColor(P[a].x + 5, P[a].y) = TestColor then
if GetColor(P[a].x, P[a].y + 3) = TestColor then
if GetColor(P[a].x + 3, P[a].y) = TestColor then
if GetColor(P[a].x + 5, P[a].y + 3) = TestColor then
if GetColor(P[a].x + 3, P[a].y + 5) = TestColor then
begin
Result := TestColor;
WriteLn('Varrock RoadColor = ' +
IntToStr(TestColor));
Exit;
end;
end;
end;
end;
WriteLn('Could not find Varrock Road Color!');
Result := 0;
end;

FrÕzÑ_§ÕµL

2007-12-02 21:46:21

So change it to:

 if Red - Blue <= 50 then if Red - Blue >= 46 then //from 48
if Red - Green <= 23 then if Red - Green >= 19 then // from 21
if Green - Blue <= 29 then if Green - Blue >= 25 then
//from 27

XcanadamanX

2007-12-02 21:50:05

make it a bigger range
these are the ranges for my one.
if Green - Red >= 24 then if Green - Red <= 65 then
if Red - Blue >= 1 then if Red - Blue <= 33 then
if Green - Blue >= 40 then if Green - Blue <= 78 then

p.s. get more colours!

FrÕzÑ_§ÕµL

2007-12-02 21:53:25

Well every time I log in and out or make the rs colors reload, they only switch between those three?

Santa_Clause

2007-12-03 00:50:11

Just make a DDTM, then GetColor.

FrÕzÑ_§ÕµL

2007-12-03 00:59:28

Well that would be a lot easier lol… OK I'll read up on some more tut's :) thanks Santa!