Function FindTin: Boolean;
var
tmpCTS, i, x, y: Integer;
RockTPA: TPointArray;
RockATPA: T2DPointArray;
begin
tmpCTS := GetToleranceSpeed;
SetColorToleranceSpeed(2);
SetToleranceSpeed2Modifiers(0.06,0.87);
FindColorsTolerance(RockTPA, 10790596, 185, 175, 327, 258, 19)
SetColorToleranceSpeed(tmpCTS);
SetToleranceSpeed2Modifiers(0.02,0.02);
RockATPA := SplitTPAEx(RockTPA, 10, 10);
SortATPASize(RockATPA, True);
for i :=0 to high(RockATPA) do
begin
MiddleTPAEx(RockATPA[i],x,y);
MMouse(x, y, 5, 5);
if WaitUptext('ocks', 400)then
begin
Result := True;
Exit;
end;
end;
end;
Procedure MineTin;
begin
if FindTin then
begin
case random(100) of
0..75:begin
wait(RandomRange(50,150));
FastClick(mouse_left);
repeat
wait(1000 + random(100));
until not PlayerIsMining;
end;
76..100:begin
wait(RandomRange(50,150));
FastClick(mouse_right);
wait(100+Random(100));
ChooseOption('Tin');
repeat
wait(1000 + random(100));
until not PlayerIsMining;
end;
end;
end;
end;