Knocked this up in 10 mins.
Test.
program New;
{.include srl/srl.scar}
{.include srl/srl/skill/mining.scar}
var
x,y:Integer;
Oresmined: Integer;
procedure WaitWhileMining;
var
Mark : Integer;
begin
MarkTime(mark)
repeat
FindNormalRandoms;
If GasFound(x,y) then
begin
RunAway('e',false,1,7000 + Random(3000))
writeln('We avoided Gas!!! :P')
end;
until (FindBlackChatMessage('You manage to mine some')) or (TimeFromMark(mark)>20000)
end;
Procedure MineRock(Rock : String);
begin
Case Rock of
'Clay': begin
repeat
if FindObjOre2(x, y, 'Mine', 6989253, 5, 2) then
mmouse(x, y, 2, 2);
if IsUpTextMultiCustom(['min', 'ne', 'rocks']) then
wait(100 + Random(300));
mouse(x, y, 0, 2, true);
WaitWhileMining;
OresMined := OresMined + 1;
until (invcount = 28)
end;
'Copper': begin
repeat
if FindObjOre2(x, y, 'Rock', 2902115, 5, 2) then
mmouse(x, y, 0, 2);
if IsUpTextMultiCustom(['min', 'ne', 'rocks']) then
wait(100 + Random(300));
mouse(x, y, 0, 2, true);
WaitWhileMining;
OresMined := OresMined + 1;
until (invcount = 28)
end;
'Tin':begin
repeat
if FindObjOre2(x, y, 'Mine', 7829380, 5, 2) then
mmouse(x, y, 0, 2);
if IsUpTextMultiCustom(['min', 'ne', 'rocks']) then
wait(100 + Random(300));
mouse(x, y, 0, 2, true);
WaitWhileMining;
OresMined := OresMined + 1;
until (invcount = 28)
end;
'Iron': begin
repeat
if FindObjOre2(x, y, 'Mine', 610943, 5, 2) then
mmouse(x, y, 0, 2);
if IsUpTextMultiCustom(['min', 'ne', 'rocks']) then
wait(100 + Random(300));
mouse(x, y, 0, 2, true);
WaitWhileMining;
OresMined := OresMined + 1;
until (invcount = 28)
end;
'Silver': begin
repeat
if FindObjOre2(x, y, 'Mine', 10724528, 5, 2) then
mmouse(x, y, 0, 2);
if IsUpTextMultiCustom(['min', 'ne', 'rocks']) then
wait(100 + Random(300));
mouse(x, y, 0, 2, true);
WaitWhileMining;
OresMined := OresMined + 1;
until (invcount = 28)
end;
'Coal':begin
repeat
if FindObjOre2(x, y, 'Mine', 530456, 5, 2) then
mmouse(x, y, 0, 2);
if IsUpTextMultiCustom(['min', 'ne', 'rocks']) then
wait(100 + Random(300));
mouse(x, y, 0, 2, true);
WaitWhileMining;
OresMined := OresMined + 1;
until (invcount = 28)
end;
'Gold':begin
repeat
if FindObjOre2(x, y, 'Mine', 2197148, 5, 2) then
mmouse(x, y, 0, 2);
if IsUpTextMultiCustom(['min', 'ne', 'rocks']) then
wait(100 + Random(300));
mouse(x, y, 0, 2, true);
WaitWhileMining;
OresMined := OresMined + 1;
until (invcount = 28)
end;
'Mith':begin
repeat
if FindObjOre2(x, y, 'Mine', 6765885, 5, 2) then
mmouse(x, y, 0, 2);
if IsUpTextMultiCustom(['min', 'ne', 'rocks']) then
wait(100 + Random(300));
mouse(x, y, 0, 2, true);
WaitWhileMining;
OresMined := OresMined + 1;
until (invcount = 28)
end;
'Addy':begin
repeat
if FindObjOre2(x, y, 'Mine', 3228209, 5, 2) then
mmouse(x, y, 0, 2);
if IsUpTextMultiCustom(['min', 'ne', 'rocks']) then
wait(100 + Random(300));
mouse(x, y, 0, 2, true);
WaitWhileMining;
OresMined := OresMined + 1;
until (invcount = 28)
end;
'Rune':begin
repeat
if FindObjOre2(x, y, 'Mine', 8090954, 5, 2) then
mmouse(x, y, 0, 2);
if IsUpTextMultiCustom(['min', 'ne', 'rocks']) then
wait(100 + Random(300));
mouse(x, y, 0, 2, true);
WaitWhileMining;
OresMined := OresMined + 1;
until (invcount = 28)
end;
end;
end;
Begin
MineRock('Rune')
end.