I have made a coal miner that i want to repeat the mining process until the inventory is full but it only mines one ore then starts clicking randomly on the rest of the screen. I am new to scripting and when i am mining i get attacked so i don't know if that has something to do with it or what.
Function GetOre:Boolean;
var
x, y, PlusOne, OreCounter:Integer;
Begin
PlusOne:= InvCount + 1;
x:=MSCX;
y:=MSCY;
If FindColorSpiral(x, y, oalColor, MSX1, MSY1, MSX2, MSY2) Then
Begin
Writeln('found one');
Case Random(2) Of
0: Mouse(x, y, 5, 5, True);
1: Begin
Mouse(x, y, 5, 5, False);
WaitOption('ine', 500);
End;
End;
Flag;
Repeat
MarkTime(OreCounter);
Antiban;
Wait(1000);
If InvCount=Plusone Then
Writeln('got one');
Until (Invcount=plusone) or (TimeFromMark(OreCounter) > 10000)
end;
end;
That is my code i am using and then i have the GetOre function on a repeat in the final part of the script. If anyone knows why it will only mine once then start randomly clicking that would be great!


Reply With Quote

