SCAR Code:
program New;
{.include SRL\SRL.scar}
var
x, y, i, R, W: integer;
counter: integer;
MyTPA : TPointArray;
MyPoint : TPoint;
procedure clickreddot;// gaurdian on minimap
begin
if FindColorTolerance(x, y, 237, MMX1, MMY1, MMX2, MMY2, 10) then
begin
mouse(x, y, 2, 2, true);
flag;
wait(300+ random(400));
end;
end;
procedure clickyellowdot; // the guardian helper guy on minimap
begin
repeat
Counter:=counter+1;
if FindColorTolerance(x, y, 62965, MMX1, MMY1, MMX2, MMY2, 10) then
begin
mouse(x, y, 2, 2, true);
flag;
wait(300+ random(400));
clickreddot;
end;
until FindColorTolerance(x, y, 237, MMX1, MMY1, MMX2, MMY2, 10) or (Counter=10);
end;
procedure walktomaze; //walks to the maze, so i can see the gaurdian to get into observe mode
begin
clickreddot;
if not FindColorTolerance(x, y, 237, MMX1, MMY1, MMX2, MMY2, 10) then
begin
wait(300);
clickyellowdot;
end;
end;
procedure clickguardian; //goes into observe mode
begin
flag;
FindColorsTolerance(MyTPA, 11576484, MSx1, MSy1, MSx2, MSy2, 10);
if Length(MyTPA) = 0 then FindColorsTolerance(MyTPA, 8156019, MSX1, MSY1, MSX2, MSY2, 10);
begin
if Length(MyTPA) = 0 then MakeCompass('E');
FindColorsTolerance(MyTPA, 11576484, MSx1, MSy1, MSx2, MSy2, 10);
if Length(MyTPA) = 0 then FindColorsTolerance(MyTPA, 8156019, MSX1, MSY1, MSX2, MSY2, 10);
if Length(MyTPA) = 0 then MakeCompass('S');
FindColorsTolerance(MyTPA, 11576484, MSx1, MSy1, MSx2, MSy2, 10);
if Length(MyTPA) = 0 then FindColorsTolerance(MyTPA, 8156019, MSX1, MSY1, MSX2, MSY2, 10);
if Length(MyTPA) = 0 then MakeCompass('E');
FindColorsTolerance(MyTPA, 11576484, MSx1, MSy1, MSx2, MSy2, 10);
if Length(MyTPA) = 0 then FindColorsTolerance(MyTPA, 8156019, MSX1, MSY1, MSX2, MSY2, 10);
if Length(MyTPA) = 0 then MakeCompass('W');
FindColorsTolerance(MyTPA, 11576484, MSx1, MSy1, MSx2, MSy2, 10);
if Length(MyTPA) = 0 then FindColorsTolerance(MyTPA, 8156019, MSX1, MSY1, MSX2, MSY2, 10);
if Length(MyTPA) = 0 then Writeln('can not find gaurdian, exiting');
exit;
for i := 0 to High(MyTPA)do
begin
MyPoint := MyTPA[i]
MMouse (MyPoint.x, MyPoint.y, 3, 3);
if (IsUpText('uardian')) then
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, False);
ChooseOption('bserve');
Wait(5000+random(250));
writeln('found color');
Wait(900+random(350));
end;
end;
end;
end;
procedure findmaze1; //checks if its maze #1
begin
if Length(MyTPA) = 0 then FindColorsTolerance(MyTPA, 8156019, MSX1, MSY1, MSX2, MSY2, 10); //i need to change the coords
for i := 0 to High(MyTPA)do
begin
MyPoint := MyTPA[i]
MMouse (MyPoint.x, MyPoint.y, 3, 3);
if (IsUpText('uardian')) then
begin
if FindColorTolerance(x, y, 2107433, 243, 68, 110, 284, 10) then// ending point, darkest color
writeln('this is maze 1');
end;
end;
end;
{procedure findmaze2;
procedure findmaze3;
procedure findmaze4;
procedure findmaze5;
procedure findmaze6;
procedure findmaze7;
procedure findmaze8;
procedure findmaze9;
procedure findmaze10;
procedure findmaze;}
begin
MakeCompass('N');
mousespeed := 7;
walktomaze;
wait(5000);
clickguardian;
end.