OK, I thought that I understood this, but maybe I don't.
SCAR Code:
program New;
{.include SRL/SRL.scar}
var
FaladorGrass, SimilarColor ,red, green, blue, a, x, y : integer; J: array of TPoint;
begin
SimilarColor := 2662783
FindColorTolerance(x, y, SimilarColor, MMX1, MMY1, MMX2, MMY2, 30);
red := (SimilarColor mod 256);
green := ((SimilarColor / 256) mod 256);
blue := ((SimilarColor / 256) / 256);
writeln('Red equals ' + inttostr(red));
writeln('Green equals ' + inttostr(green));
writeln('Blue equals ' + inttostr(blue));
if Green >= Red then if Red >= Blue then
begin
if Green - Red <= 35 then if Green - Red >= 30 then
if Green - Blue <= 125 then if Green - blue >= 110 then
if Red - Blue <= 95 then if Red - Blue >= 77 then
if GetColor(J[a].x, J[a].y) = SimilarColor then
if GetColor(J[a].x + 1, J[a].y + 1) = SimilarColor then
if GetColor(J[a].x + 2, J[a].y + 2) = SimilarColor then
if GetColor(J[a].x + 3, J[a].y + 3) = SimilarColor then
if GetColor(J[a].x + 4, J[a].y + 4) = SimilarColor then
if GetColor(J[a].x + 5, J[a].y + 5) = SimilarColor then
if GetColor(J[a].x + 6, J[a].y + 5) = SimilarColor then
if GetColor(J[a].x + 7, J[a].y + 8) = SimilarColor then
begin
Writeln('The Falador Grass Color is ' +
inttostr(SimilarColor));
FaladorGrass := SimilarColor
FindColor(x,y,FaladorGrass,MMX1,MMY1,MMX2,MMY2);
end;
end;
end.
I don't see this doing anything. To me, it looks like it just takes a random point then does nothing to it other than tell me what "The Falador Grass Color is" which STILL doesn't work.
I got it to split into R/G/B.
After that, it gives me "[Runtime Error] : Out Of Range in line 20 in script C:\Program Files\SCAR 3.12\Scripts\AutoColor.scar"
I do not know how I should go about doing this.
I do not want you to do it for me, I just want to know what the devil I'm doing wrong.
This is very annoying. I had to use one of Tarajunky's functions for learning, so it is very similar.