SRL Archive - Research & Development Lounge

Map AutoColor


Shuttleu

2010-07-12 15:04:59

By using the fact that Symbols on the MM are EXACTLY the same as the colors on the main map
I have come up with this function
function MapClosed: Boolean;
begin
Result:= (not(GetColor(744, 14)= 1118997));
end;

function WaitTillMapLoaded: Boolean;
begin
if (GetColor(230, 196)= 118604) then
repeat
Result:= (not(GetColor(230, 196)= 118604));
until(Result);
end;

function MapAutocolor(Which: Integer): Integer;
begin
if (not(LoggedIn)) then
Exit;
MouseBox(530, 130, 552, 153, 1);
Wait(2000+Random(1000));
if (WaitTillMapLoaded) then
begin
Result:= AutoColor(Which);
MouseBox(741, 11, 745, 24, 1);
repeat
Wait(20);
until(MapClosed);
end;
end;

The first color is one which i picked from the Mini Map and the second color is what i picked from the Large Map

The advantage of using this function over the normal AutoColor is that there is no chance of a NPC or a Genuine Player or an item covering the symbol because they are not shown on the map. Also you can get the color of symbols that are not on the screen.

The downsides to this is that you have to load the map everytime you want to run the autocolor and it takes around 6 seconds each time

But if you save the color of the symbol when you start then you wont need to get it again

Also this would be useful for NewAutoColor.scar

Let me know what you think

~shut

EDIT: also this would be useful for NewAutoColor.scar

Shuttleu

2010-07-13 10:03:08

just realised it doesnt work

im making a few changes to the include to see if i can get it to work

~shut