Code:
program PickSilk;
{$i SRL-OSR/SRL.simba}
Function GreenRandom: Boolean;
begin
Result := (CountcolorTolerance(1207359, 552, 4, 697, 152, 13) > 10000);
end;
function LeftGreenRandom:Boolean;
begin
if (not CountcolorTolerance(1207359, 552, 4, 697, 152, 13) > 10000) then
Result := True;
end;
function RandomSolver: Boolean;
begin
Gametab(tab_magic);
Wait(500);
MouseBox(658, 325, 674, 342, mouse_left);
Wait(2000 + Random(500));
MouseBox(230, 423, 288, 435, mouse_left);
if WaitFunc(@LeftGreenRandom, 100, 8000) then
Writeln('Left the random');
end;
function StealFromStall: Boolean;
var
x, y: Integer;
begin
if FindObjCustom(x, y, ['Gem', 'stall'], [1908001, 2229602, 11579274], 7) then
begin
Writeln('Found Gems') // debug
Mouse(x, y, 3, 3, true); // leftclicking :)
Result := True;
Wait(2500);
Exit;
end;
end;
Function FindGems: Boolean;
var
x, y : Integer;
begin
if (FindObjCustom(x, y, ['Gem', 'stall'], [1908001, 2229602, 11579274], 7)) then
begin
Writeln('We Found Gems!');
if (not (FindObjCustom(x, y, ['Gem', 'stall'], [1908001, 2229602, 11579274], 7))) then
begin
Gametab(tab_magic);
Wait(500);
MouseBox(658, 325, 674, 342, mouse_left);
Wait(2000 + Random(500));
MouseBox(230, 423, 288, 435, mouse_left);
if WaitFunc(@FindGems, 100, 8000) then
Writeln('Saved your self!');
end;
end;
end;
begin
SetupSRL;
ActivateClient;
repeat
if (GreenRandom = True) then RandomSolver;
FindGems;
StealFromStall
until(false);
end.