Code:
Procedure UpdateRockCord;
begin
repeat
FindObjCustom(nrx, nry, ['ock ', 'ine '], [CurrentColor], 0);
Wait(200 + Random(50));
Until IsUpTextMulti('ine', 'ock', 'ine ');
If IsUpTextMulti('ine', 'ock', 'ine ') then
begin
MMouse(nrx, nry, 1, 1);
Wait(100 + Random(50));
end;
end;
Procedure GoldMining;
Var
hits, Rockx, Rocky, px, py: Integer;
begin
If Not LoggedIn then exit;
hits := 0;
repeat
repeat
FindObjCustom(Rockx, Rocky, ['ock ', 'ine '], [5028302, 3905192], 5);
Wait(200 + Random(50));
Until IsUpTextMulti('ine', 'ock', 'ine ');
If IsUpTextMulti('ine', 'ock', 'ine ') then
begin
Mouse(Rockx, Rocky, 1, 1, True);
CurrentColor := GetColor(Rockx, Rocky);
hits := hits + 1;
Flag;
Wait(200 + Random(50));
UpdateRockCord;
if (GasFound(nrx, nry)) then
begin
Mouse(646, 82, 1, 1, True);
Wait(10000 + Random(2000));
end;
FindRandoms;
Wait(200 + Random(50));
if (FindGas(nrx, nry)) then
begin
Mouse(650, 82, 1, 1, True);
Wait(10000 + Random(2000));
end;
if (FindBitmapSpiralTolerance(PickHandle, px, py, 550, 200, 745, 465, 30)) then
FindPick;
Wait(100 + Random(50));
WaitUntilMined;
end;
until InvFull or (hits > 99);
end;
I think the reason is, cause after the initial click on the rock, you walk to it and mess up the rock coords, so the gascheck coord are way off. Then i made the UpdateRockCord, but every load there will be 4-5 rocks that it updates the coords to the wrong rock.