Shuttleu
07-12-2010, 06:31 PM
NewAutoColor.scar is a way of autocoloring symbols on the MM by getting only one color. So for example, you can get the color of a rock, and by getting the color of the rock you can get the color of many other symbols on the MM without having to AutoColor them
The colors that you can AutoColor are
grey rock
brown rock
bank symbol
anvil symbol
magic shop symbol
clothes shop symbol
quest symbol
mining symbol
plate symbol
general store
transport
palm tree green(VEB is surrounded by them)
fishing spot symbol
farming spot symbol
guide symbol
cooking range
green tree(the roundish green trees on the minimap)
training dummy
There are 3 main functions that you need to know about NewAutoColor.scar
These are
procedure SetupNewAutoColor;
procedure SetAutoColorReference(Name: string; Color: Integer);
function srl_AutoGetColor(Name: string): Integer;
Before you use NewAutoColor you need to run
SetupNewAutoColor;
What this does is it sets the constants, loads the colors and sets other variables that are needed
Next you need to set the variable that will get you the colors for all the other symbols that you can get from NewAutoColor.scar
To do this you need
procedure SetAutoColorReference(Name: string; Color: Integer);
this is easy to use
You get the color of one of the symbols or items on the MM and use it like so
TempRockColor:= GetRockColor;
if (TempRockColor > 0) then
SetAutoColorReference('grey rock', TempRockColor);
This is just an example of how to use it.
REMEMBER, to use the above, there MUST be a grey rock on the MM that it can AutoColor
From here you have everything that you need set up
So to get the color of the general store you can do the following
srl_AutoGetColor('general store');
So a way that you can use this is
FindColor(x, y, srl_AutoGetColor('general store'), MMX1, MMY1, MMX2, MMY2);
Because it gets the color of the store symbol, you do not need to set tolerance :)
The only downside to this is if Jagex decide to change the relationship between the symbol colours.
There are other functions that you can use
For example
srl_AutoGetColorsMulti(Name: TStringArray): TIntegerArray;
You can use this like so
var
TheSymbolColors: TIntegerArray;
begin
TheSymbolColors:= srl_AutoGetColors(['magic shop symbol', 'clothes shop symbol', 'quest symbol', 'mining symbol']);
This way
TheSymbolColors[0] will equal magic shop symbol
TheSymbolColors[1] will equal clothes shop symbol
TheSymbolColors[2] will equal quest symbol
TheSymbolColors[3] will equal mining symbol
Well thats the end of my tutorial
If you have any questions or queries then ask away and i will answer then ASAP
~shut
The colors that you can AutoColor are
grey rock
brown rock
bank symbol
anvil symbol
magic shop symbol
clothes shop symbol
quest symbol
mining symbol
plate symbol
general store
transport
palm tree green(VEB is surrounded by them)
fishing spot symbol
farming spot symbol
guide symbol
cooking range
green tree(the roundish green trees on the minimap)
training dummy
There are 3 main functions that you need to know about NewAutoColor.scar
These are
procedure SetupNewAutoColor;
procedure SetAutoColorReference(Name: string; Color: Integer);
function srl_AutoGetColor(Name: string): Integer;
Before you use NewAutoColor you need to run
SetupNewAutoColor;
What this does is it sets the constants, loads the colors and sets other variables that are needed
Next you need to set the variable that will get you the colors for all the other symbols that you can get from NewAutoColor.scar
To do this you need
procedure SetAutoColorReference(Name: string; Color: Integer);
this is easy to use
You get the color of one of the symbols or items on the MM and use it like so
TempRockColor:= GetRockColor;
if (TempRockColor > 0) then
SetAutoColorReference('grey rock', TempRockColor);
This is just an example of how to use it.
REMEMBER, to use the above, there MUST be a grey rock on the MM that it can AutoColor
From here you have everything that you need set up
So to get the color of the general store you can do the following
srl_AutoGetColor('general store');
So a way that you can use this is
FindColor(x, y, srl_AutoGetColor('general store'), MMX1, MMY1, MMX2, MMY2);
Because it gets the color of the store symbol, you do not need to set tolerance :)
The only downside to this is if Jagex decide to change the relationship between the symbol colours.
There are other functions that you can use
For example
srl_AutoGetColorsMulti(Name: TStringArray): TIntegerArray;
You can use this like so
var
TheSymbolColors: TIntegerArray;
begin
TheSymbolColors:= srl_AutoGetColors(['magic shop symbol', 'clothes shop symbol', 'quest symbol', 'mining symbol']);
This way
TheSymbolColors[0] will equal magic shop symbol
TheSymbolColors[1] will equal clothes shop symbol
TheSymbolColors[2] will equal quest symbol
TheSymbolColors[3] will equal mining symbol
Well thats the end of my tutorial
If you have any questions or queries then ask away and i will answer then ASAP
~shut