I added to your mineclay procedure. When an item is added to the inventory after clicking mine the script will then click on a new rock instead of waiting the full 4 seconds. It should work but be sure to test it before releasing it.
Code:
procedure MineClay;
var x, y, PlusOne, RockCounter: integer;
begin
repeat
FindNormalRandoms;
ToggleXPBar(true);
PlusOne:= InvCount + 1
WriteLn('Finding a rock to mine.');
if FindObj(x, y, 'ocks', 7647960, 10) then //This finds the object, records the X and Y values, and tells the script to find the option "Rocks".
WriteLn('Mining rock.');
Mouse(x, y, 0, 0, true);
ChooseOption('ine'); //This tells the script to left-click on the object and select "Mine".
MarkTime(RockCounter);
AntiBanSm;
Repeat
Wait(150);
Findnormalrandoms;
Until (InvCount=PlusOne) Or (TimeFromMark(RockCounter) > 3000 + random(1000))
until (InvFull); //This is an Until function. It stops the repeat function if the rock has been mined or your inventory is full.
end;