http://img166.imageshack.us/img166/5546/aroadwq4.png
Could someone autocolor that road for me, please?
Printable View
http://img166.imageshack.us/img166/5546/aroadwq4.png
Could someone autocolor that road for me, please?
You should have a look in AutoColor.scar located in Includes\SRL\SRL\Core
I think the one for that is FindDirtRoadColor btw, not sure though.
Hmm, and you do want an autocoloring function right? If someone would autocolor it for you you would just get one color, which you do get also by just picking the color from the road.
Try making an autocoloring function of your own ;)
I tried once, but its very difficult andyou need to know much about colors / scar
make a small bitmap and use the function
Autocolorthis
or summtin
= ?Quote:
Wanna learn and post the ruddy 50 posts for wizzup.
The AutoColorThis should work, its also in the SRL\SRL\Core\AutoColor.scar :)
About Tol, maybe around 20 or something?
what road?
http://img166.imageshack.us/img166/5546/aroadwq4.png
This:sasmokin:
hers another option:
itl work perfectly IF that picture you uploaded has no color loss!
if it does, just go into runescape and get the color, and put it where 4284786 is. youl only have to do this once, maybe not even. but it has to have a reference color. which i got from the picture. if the picture does have color loss ul need to get a new color.
usage:SCAR Code:function AutoColorDirtPath : integer;
var
TolLvl : integer;
begin
TolLvl := 0;
repeat
if FindColorTolerance(x, y, 4284786, MMX1, MMY1, MMX2, MMY2, TolLvl) then break;
inc(TolLvl);
until (TolLvl >= 15);
if (TolLvl >= 15) then EXIT;
Result := GetColor(x, y);
end;
i made it so feel free to use it, but DO NOT credit me. its a simple shitty thing that took 34.786 seconds. i don't want credit.Code:FindColor(x, y, AutoColorDirtPath, MMX1, MMY1, MMX2, MMY2);
Oh I love these....
There are several ways of doing this:
1. If you get me a heap of colours (at least 5) from different worlds at different times I may be able to help you.
2. Make a bitmap (like people above me have said) and use AutoColorThis
3. Make a DTM and use GetColor.
From looking at that ss, I think the DTM would be the best method. The autocolour function might not work cos the surround colours are similar to the road.
Maybe just edit FindDirtRoadColor?
SCAR Code:function FindDirtRoadColorForMiles: Integer;
var
GC, a, l, TestColor, Red, Green, Blue, x, y : integer;
var
P:array of Tpoint;
begin
if WaterColor = 0 then WaterColor:=FindWaterColor;
if not (FindColor(x, y, WaterColor, MMX1, MMY1, MMX2, MMY2)) then
WaterColor := FindWaterColor;
GC := 4548987;// <--- put your own color here@!@!@
Flag;
FindColorsSpiralTolerance(MMCX, MMCY, P, GC, MMX1, MMY1, MMX2, MMY2, 140);
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,140) then
begin
red := (TestColor mod 256);
green := ((TestColor / 256) mod 256);
blue := ((TestColor / 256) / 256);
if Red - Green <= 33 then if Red - Green >= 5 then if Red <= 120 then
if Green - Blue >= 17 then if Green - Blue <= 58 then
if Blue <=45 then if Red - Blue >= 30 then if Red - Blue <= 75 then
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
if ((WaterColor = 0) or not (FindColor(x, y,
WaterColor, P[a].x - 10, P[a].y - 10,
P[a].x + 10, P[a].y + 10))) then
begin
Result := TestColor;
WriteLn('Dirt Road Color = ' +
IntToStr(TestColor));
Exit;
end;
end;
end;
end;
WriteLn('Could not find Dirt Road Color!');
Result := 0;
end;
I love autocoloring:D I guess its kinda my specialty?
I could work on a function for ya when I get home, if you wanted and if you still need it by then(at work right now then classes all night:/) Ill play with it when I get home tonight. if you have msn, go ahead and add me.
offtopic, but footballjds's sig scares me, haha.
I made this in about 30 seconds so I'm not sure if it will work.
SCAR Code:function FindDirtRoadColour: Integer;
var
GC, a, TestColor, Red, Green, Blue : integer;
var
P: TPointArray;
begin
GC := 3297113;
FindColorsSpiralTolerance(MMCX, MMCY, P, GC, x1, y1, x2, y2, 60);
for a:= 0 to High(P) 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 <= 47) then if (Red - Blue >= 33) then
if (Red - Green <= 22) then if (Red - Green >= -2) then
if (Green - Blue <= 42) then if (Green - Blue >= 16) then
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;
Exit;
end;
end;
end;
end;
end;
Meh, didn't see his post (^) so I made this... :p
SCAR Code:Function AutoColorDirtRoad: Integer;
Var
I, tmpColor: Integer;
X, Y, Z: Extended;
Points: TPointArray;
Begin
Result:= -1;
FindColorsTolerance(Points, 3296089, MMX1, MMY1, MMX2, MMY2, 50);
B:= High(Points);
For I:= 0 To B - 1 Do
Begin
tmpColor:= GetColor(Points[I].x, Points[I].y);
ColorToXYZ(tmpColor, X, Y, Z);
If (X < 10.0) And (X > 3.0) And (Y < 10.0) And (Y > 3.0) And
(Z < 9.0 ) And (Z > 1.0) Then
Begin
Result:= tmpColor;
Break;
End;
End;
If Result = -1 Then Exit;
WriteLn('The Color is: '+ IntToStr(Result));
End;
I tried it and it worked quite well, but the only problem is that when I stand right
in the same plase as in that pickture it gets wrong color:(
http://img246.imageshack.us/img246/5619/aroadvr0.png
I tried it more and it doesn't seem to work anymore in anyplace:duh: :duh: