Hello, Im making a coal miner, but i find that when the coal is detected it keeps clicking on it even if it has no ore.
Code:procedure CoalColor; var text:TstringArray; color:TintegerArray; begin text := ['ine', 'ocks']; // color := [3163975, 3361611, 2834496, 2636860]; // color := [2834496, 2307124]; // color := [3163975]; color := [1845802]; repeat then if FindObjCustom(x, y, text, color, 3) then MMouse(x+5,y,0,0); until (IsUpText('ine')); GetMousePos(x,y); MMouse(x,y,4,4); if (IsUpText('ine')) then RockColor := GetColor(x,y); end; procedure Mine_FindObj; begin if not LoggedIn then begin LogInPlayer; end; if InvFull then begin Exit; end else if (FindObj(x,y,'ine',RockColor,0)) then begin Mouse(x,y,4,4,false); ChooseOption('ine'); Wait(1350); WaitwhileMining; if (FindBlackChatMessage('currently')) then begin MakeCompass(IntToStr(random(360))); end; end; end;
um..... i sorta stole the CoalColor procedure, so i dont really understand it, i just know i changed it to FindObjCustom, because the original function was outdated...
i tried using TPAs but they were slower in finding the ore...
so how can i change that autocolor, or just add failsafes, to this to stop it keeping clicking on the ore-less rock?
P.S. off-topic, but how do you apply scar colouring to your code boxes





Reply With Quote








