SCAR Code:
program AutoMiner;
{.include SRL/SRL.scar}
const
aorb=('');// a is iron, b is coal
IronColour= 2701145;
CoalColour= 8999999;
Function FindIron: Boolean;
begin
if(aorb=('a'))then
x:=256;y:=174;
if(FindColorspiralTolerance(x, y, IronColour, 0, 0, 515, 337, 2))then
begin
Result := True;
Writeln('Fount Some Iron');
wait(1000+random(500));
end else
Writeln('Were Is That Iron?');
wait(1000+random(500));
end;
Function FindCoal: Boolean;
begin
if(aorb=('b'))then
x:=256;y:=174;
if(FindColorspiralTolerance(x, y, CoalColour, 0, 0, 515, 337, 2))then
begin
Result := True;
Writeln('Fount Some Coal');
wait(1000+random(500));
end else
Writeln('Were Is That Coal?');
wait(1000+random(500));
end;
Function MoveMouseToIron: Boolean;
begin
Repeat
if aorb=('a')
if (FindRock) Then
begin
Result := True;
MMouse(x, y, 2, 2);
Wait(10+random(20));
Exit;
end;
until (False)
end;
Function MoveMouseToCoal: Boolean;
begin
Repeat
if aorb=('b')
if (FindRock) then
begin
Result := True;
MMouse(x, y, 2, 2);
Wait(10+random(20));
Exit;
end;
until (False)
end;
procedure ClickIron;
begin
if (MoveMouseToIron = true) then
begin
aorb=('a');
Mouse(x, y, 2, 2, True)
Wait(3500+random(100));
end;
end;
procedure ClickCoal;
begin
if (MoveMouseToCoal = true) then
begin
aorb=('b');
Mouse(x, y, 2, 2, True)
Wait(3500+random(100));
end;
end
Procedure Dropores;
begin
if(InvFull)then
DropTo(3,28);
end;
begin
repeat
setupsrl;
if(aorb=('a'))then
FindIron;
MoveMouseToIron;
ClickIron;
Dropores;
until(false)
repeat
if(aorb=('b'))then
FindCoal;
MoveMouseToCoal;
ClickCoal;
Dropores;
until(false)
end.
a + b base miner
can sombody fix it please or make it shorter
coal isnt the right code, just a number