Applezz
2011-12-29 14:38:39
When I call a created procedure in my main loop, the mouse just moves over inventory and clicks in a periodic fashion, and does nothing else and I cannot work out why, here is the procedure:
procedure MineOre;
var x, y, OreCount, i: integer;
begin
OreCount:= InvCount + 1;
if (FindObjCustom(x, y, ['ine', 'ocks'], [16448250, 987409], 3)) then
begin;
Writeln('Found Ore');
Mouse(x, y, 3, 3, true);
Wait(100 + Random(50));
end;
MarkTime(i);
repeat
Wait(300);
if (InvCount=OreCount) then
Writeln('Mined Ore');
until (InvCount=OreCount) or (TimeFromMark(i) > 30000);
end;