MylesMadness
2010-07-12 13:51:41
I think this was used in newautocolor.scar but I was never able to understand it. I'll just put the code here, then explain it.
To use the pattern finder you need to pick some colors. You find go into the game, pick a color from one object and and another color from another object. Remember what point you found those colors at (Not, the coords, like I picked the very top of a cactus because it was easy to remember that point). Reload the client and pick the colors again. Put the colors in the right spot(I have no idea how to explain this). And hit run, if a piece of code is output then there is a relationship, if one does not then there is no relationship.
I can almost guaranty there will be questions, so please ask them.
program Generate;
const
color1 = 1794118;
color2 = 6722717;
color3 = 1795141;
color4 = 6723740;
var
R, G, B, R1, G1, B1:Integer;
Strings:array [0..1] of String;
begin
ColorToRGB(Color1, R, G, B);
ColorToRGB(Color2, R1, G1, B1);
Strings[0]:=ToStr(R1-R)+', '+ToStr(G1-G)+', '+ToStr(B1-B);
ColorToRGB(Color3, R, G, B);
ColorToRGB(Color4, R1, G1, B1);
Strings[1]:=ToStr(R1-R)+', '+ToStr(G1-G)+', '+ToStr(B1-B);
if Strings[0]=Strings[1] then Writeln('AutoColorWithRelationship('+ToStr(Color1)+', '+Strings[0]+');');
end.
function AutoColorWithRelationship(Color:TColor; RC, GC, BC:Integer):Integer;
var
r, g, b:Integer;
begin
ColorToRGB(color, r, g, b);
Result:=RGBtoColor(r+RC, g+GC, b+BC);
end;Many colors on the minimap have relationships between each other. If you know one of the colors and you know another if you know it's patter, you can find the second color. The first piece of code finds the pattern. The second uses the patten to find the other color.To use the pattern finder you need to pick some colors. You find go into the game, pick a color from one object and and another color from another object. Remember what point you found those colors at (Not, the coords, like I picked the very top of a cactus because it was easy to remember that point). Reload the client and pick the colors again. Put the colors in the right spot(I have no idea how to explain this). And hit run, if a piece of code is output then there is a relationship, if one does not then there is no relationship.
I can almost guaranty there will be questions, so please ask them.