program New;
{.include SRL\SRL.scar}
var
x, y: Integer;
Bee: Array[0..3] of Integer;
BoxArray: TBoxArray;
procedure DeclareDTMs;
begin
Bee[3] := DTMFromString('78DA63DCC6C0C0709D0105AC5DB890811F483' +
'302F17F20603C0F64BC4555B36CF62CB81A10609C0324DEA1AA59' +
'3C633AAA9A2940E226AA9A6DAB57A1AAB90C246EA1AA99DCD989A' +
'20600DCDF158B');
Bee[2] := DTMFromString('78DA63FCC2C0C0F09E0105880A0A32F003694' +
'620FE0F048C37808C87A86AF66CDE0C5703028CD780C4275435BB' +
'366C80C8C1D4F00359F751D5AC9E3F1FD51C6120EB0BAA9A39132' +
'7A2AAF90C241EA0AAD9B67A158A1A0037F817A7');
Bee[1] := DTMFromString('78DA6364656460B8C48002766FDCC8C00FA48' +
'1320CFF8180F12590710C55CDA15D3BE16A4080F10990B883AAE6' +
'E89E3DA86A9480ACE3A86A56CD9B8BAA460DC8BA8BAA66D6847E5' +
'435FF31EDDAB96E2DAA1A5E4CBBB6AC5A89A2060093191BA1');
Bee[0] := DTMFromString('78DA639CCDC0C0708701055CBF7491811F483' +
'302F17F2060AC05329EA3AA7970FB365C0D0830760289CBA86A9E' +
'3F7982AA662690388DAAE6C2C993A86AD600896BA86AF66DD982A' +
'A662BA67B56CF9F8FAA660E90788DAA66D7860D286A0066D81EFE' +
'');
end;
procedure MovePiece(Num: Integer);
begin
case Num of
1: MouseBox(138, 279, 159, 299, True);
2: MouseBox(191, 258, 209, 284, True);
3: MouseBox(308, 270, 336, 288, True);
4: MouseBox(350, 268, 378, 288, True);
end;
end;
procedure MoveToSpot(Num: Integer);
var
Move, i: Integer;
begin
FindDTM(Bee[Num - 1], x, y, MSX1, 180, MSX2 - 150, MSY2);
if (x > 335) then Move := 3 else
if (x < 200) then Move := 4;
repeat
MovePiece(Move);
for i := 0 to 5 do
begin
Wait(100 + Random(400));
if (FindDTM(Bee[Num - 1], x, y, 210, 185, 335, 250)) then Exit;
end;
until (FindDTM(Bee[Num - 1], x, y, 210, 185, 335, 250));
case Num of
1: repeat
MovePiece(1);
for i := 0 to 5 do
begin
Wait(100 + Random(400));
if (FindDTM(Bee[Num - 1], x, y, 210, 25, 335, 75)) then Exit;
end;
until (FindDTM(Bee[Num - 1], x, y, 210, 25, 335, 75));
2: repeat
MovePiece(1);
for i := 0 to 5 do
begin
Wait(100 + Random(400));
if (FindDTM(Bee[Num - 1], x, y, 210, 80, 335, 125)) then Exit;
end;
until (FindDTM(Bee[Num - 1], x, y, 210, 80, 335, 125));
3: repeat
MovePiece(1);
for i := 0 to 5 do
begin
Wait(100 + Random(400));
if (FindDTM(Bee[Num - 1], x, y, 210, 140, 335, 175)) then Exit;
end;
until (FindDTM(Bee[Num - 1], x, y, 210, 140, 335, 175));
4: while not FindDTM(Bee[Num - 1], x, y, 210, 185, 335, 230) do
begin
MovePiece(1);
for i := 0 to 5 do
begin
Wait(100 + Random(400));
if (FindDTM(Bee[Num - 1], x, y, 210, 185, 335, 230)) then Exit;
end;
end;
end;
end;
function FindFirstPiece: TPoint;
var
Points: TPointArray;
ax, ay: Integer;
begin
if (FindColorSkipBoxArrayTolerance(x, y, 9605789, 88, 75, 276, 172, 15, BoxArray)) then
begin
FindColorsSpiralTolerance(ax, ay, Points, GetColor(x, y), x - 50, y - 50, x + 50, y + 50, 30);
if (GetArrayLength(Points) > 2000) and (GetArrayLength(Points) < 4000) then
begin
Result.x := x;
Result.y := y;
Exit;
end else
begin
SetArrayLength(BoxArray, GetArrayLength(BoxArray) + 1);
BoxArray[GetArrayLength(BoxArray) - 1].x1 := x - 35;
BoxArray[GetArrayLength(BoxArray) - 1].x2 := x + 35;
BoxArray[GetArrayLength(BoxArray) - 1].y1 := y - 35;
BoxArray[GetArrayLength(BoxArray) - 1].y2 := y + 35;
Result.x := -1;
end;
end else Result.y := -1;
end;
function MoveFirstPiece: Integer;
var
Coord: TPoint;
i: Integer;
begin
repeat
Coord := FindFirstPiece;
if (Coord.x > 0) and (Coord.y > 0) then MMouse(Coord.x, Coord.y, 2, 2);
Wait(100 + Random(1900));
until (FindColorTolerance(x, y, 2565929, 4, 4, 100, 25, 25));
Mouse(Coord.x, Coord.y, 2, 2, true);
repeat
MovePiece(2)
for i := 0 to 3 do
if (FindDTM(Bee[i], x, y, MSX1, 195, MSX2 - 150, MSY2)) then
begin
Result := i + 1;
MMouse(x, y, 2, 2);
Exit;
end;
Wait(100 + Random(400));
until (not (LoggedIn));
end;
begin
SetupSRL;
ActivateClient;
DeclareDTMs;
Wait(1000 + Random(1000));
MoveToSpot(MoveFirstPiece);
end.
That's the one I started on, but I stopped autoing for a little bit. It should get the first one fine, it should be hard at all to finish. Just add the spot that the DTM was moved to into the box array and do the same thing over and over again.