Now I added an Alkharid auto road color function! For those of you who already read this thread, please take your time to read through the new one, thanks! 
Some people might still remember my old autocolor function for the mining rocks in the mining guild, it worked quite well, but i guess jagex made some big color change at somepoint, because it doesn't work correctly anymore. oh well, i might update that once i get time, but until then, here is another function which is quite useful in alkharid. ^^
SCAR Code:
program New;
{.include srl/srl.scar}
var
GArea, GTol, x, y, i, t: Integer;
function PureRockDDTM: Integer;
var
PRMainPoint: TDTMPointDef;
PRSubPoints: Array [0..4] of TDTMPointDef;
PureRockTDTM: TDTM;
begin
PRMainPoint.x := 766;
PRMainPoint.y := 247;
PRMainPoint.AreaSize := 1;
PRMainPoint.AreaShape := 0;
PRMainPoint.Color := 2840716;
PRMainPoint.Tolerance := GTol;
PRSubPoints[0].x := 766;
PRSubPoints[0].y := 247;
PRSubPoints[0].AreaSize := GArea;
PRSubPoints[0].AreaShape := 0;
PRSubPoints[0].Color := 2840716;
PRSubPoints[0].Tolerance := GTol;
PRSubPoints[1].x := 766;
PRSubPoints[1].y := 251;
PRSubPoints[1].AreaSize := GArea;
PRSubPoints[1].AreaShape := 0;
PRSubPoints[1].Color := 1654631;
PRSubPoints[1].Tolerance := GTol;
PRSubPoints[2].x := 770;
PRSubPoints[2].y := 248;
PRSubPoints[2].AreaSize := GArea;
PRSubPoints[2].AreaShape := 0;
PRSubPoints[2].Color := 2840716;
PRSubPoints[2].Tolerance := GTol;
PRSubPoints[3].x := 766;
PRSubPoints[3].y := 244;
PRSubPoints[3].AreaSize := GArea;
PRSubPoints[3].AreaShape := 0;
PRSubPoints[3].Color := 3367836;
PRSubPoints[3].Tolerance := GTol;
PRSubPoints[4].x := 763;
PRSubPoints[4].y := 248;
PRSubPoints[4].AreaSize := GArea;
PRSubPoints[4].AreaShape := 0;
PRSubPoints[4].Color := 2444664;
PRSubPoints[4].Tolerance := GTol;
PureRockTDTM.MainPoint := PRMainPoint;
PureRockTDTM.SubPoints := PRSubPoints;
Result := AddDTM(PureRockTDTM);
end;
function PureRockAutocolor: integer;
begin
Status('Looking for the rock auto color DDTM...');
GTol:= 0;
GArea:= 0;
for i:= 0 to 5 do
begin
GTol:= i*3+15;
GArea:= i+2;
if (DTMRotated(PureRockDDTM, x, y, MMX1, MMY1, MMX2, MMY2)) then
begin
Result:=GetColor(x,y);
Writeln('RockColor = '+IntToStr(Result));
exit;
end;
end;
Writeln('RockColor NOT Found!');
Result:=0;
TerminateScript;
end;
begin
t:=0;
ActivateClient;
Wait(1000);
MarkTime(t);
Writeln(IntToStr(PureRockAutocolor));
Writeln('Took '+IntToStr(TimeFromMark(t))+' ms');
end.
Here is the pic of the rock it detects 100% of the time (haven't tried the others yet, but it should work on them, too, they are quite similar:

My only recorded time so far was:
SCAR Code:
Successfully compiled (1060 ms)
RockColor = 2840716
2840716
Took 32 ms
Successfully executed
I guess that is pretty good ^^
Feel free to comment, post constructive critisism.
(I might try to make one with RGB coloring once I have more experience with the parameters, until then, anyone who is too lazy/not experienced enough, feel free to use this, but you must give me credits...
)
~~~~~Another function by me~~~~~
This One detects the road and building color in Alkharid:
SCAR Code:
program New;
{.include srl/srl.scar}
var
GTol, GArea, x, y, i, t, ICounter: Integer;
function FindAlkharidBuildingDDTM: Integer;
var
FAMainPoint: TDTMPointDef;
FASubPoints: Array [0..4] of TDTMPointDef;
FindAlkharidBuildingTDTM: TDTM;
begin
FAMainPoint.x := 806;
FAMainPoint.y := 311;
FAMainPoint.AreaSize := 1;
FAMainPoint.AreaShape := 0;
FAMainPoint.Color := 5932165;
FAMainPoint.Tolerance := GTol;
FASubPoints[0].x := 813;
FASubPoints[0].y := 318;
FASubPoints[0].AreaSize := GArea;
FASubPoints[0].AreaShape := 0;
FASubPoints[0].Color := 5932165;
FASubPoints[0].Tolerance := GTol;
FASubPoints[1].x := 799;
FASubPoints[1].y := 304;
FASubPoints[1].AreaSize := 1;
FASubPoints[1].AreaShape := 0;
FASubPoints[1].Color := 5932165;
FASubPoints[1].Tolerance := GTol;
FASubPoints[2].x := 799;
FASubPoints[2].y := 318;
FASubPoints[2].AreaSize := GArea;
FASubPoints[2].AreaShape := 0;
FASubPoints[2].Color := 5932165;
FASubPoints[2].Tolerance := GTol;
FASubPoints[3].x := 813;
FASubPoints[3].y := 304;
FASubPoints[3].AreaSize := GArea;
FASubPoints[3].AreaShape := 0;
FASubPoints[3].Color := 5932165;
FASubPoints[3].Tolerance := GTol;
FASubPoints[4].x := 799;
FASubPoints[4].y := 304;
FASubPoints[4].AreaSize := GArea;
FASubPoints[4].AreaShape := 0;
FASubPoints[4].Color := 5932165;
FASubPoints[4].Tolerance := GTol;
FindAlkharidBuildingTDTM.MainPoint := FAMainPoint;
FindAlkharidBuildingTDTM.SubPoints := FASubPoints;
Result := AddDTM(FindAlkharidBuildingTDTM);
end;
function PureAlkhiBuildingColor: Integer;
begin
GArea :=1;
GTol :=0;
ICounter := 0;
for i:=0 to 15 do
begin
GTol:= i * 5;
Icounter := ICounter + 1;
if (ICOunter mod 3 = 0) then GArea := GArea + 1;
if DTMRotated(FindAlkharidBuildingDDTM, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
Writeln('Color found with a Tolerance of '+IntToStr(GTol));
Result:= GetColor(x, y);
Writeln('AlkharidBuildingColor = '+IntToStr(Result));
Exit;
end;
end;
Result := 0;
Writeln('AlkharidBuildingColor NOT Found!');
end;
begin
ActivateClient;
Wait(1000);
MakeCompass('N');
MarkTime(t);
Writeln(IntToStr(PureAlkhiBuildingColor));
Writeln('The search took '+IntToStr(TimeFromMark(t))+'ms');
end.
And again, a report on how it went:
SCAR Code:
Successfully compiled (1053 ms)
Color found with a Tolerance of 25
AlkharidBuildingColor = 5011320
5011320
The search took 1594ms
Successfully executed
I know, i know, this is kinda slow, and it causese a lag for less than 1 sec, but this was the worst world, and it took some experimenting, because if the SPs are too close to the MP, it detetcts the color on the stuff surrounding the minimap, so yeah... But oh well, it works, any suggestions on how to make it better?
EDIT: OMG, I am a King Black Dragon!
(Now let's go pown some noobs who are trying to kill me in my cave... xD)
EDIT 2: Added a few more lines into the PureRockAutocolor function to make it saver if i should be used more than once.