Originally Posted by
L4L0
So I have this for finding iron and clicking it, but it says no colors found even when trying several different iron colors. And yes, i did drag the little target to my rsps window:
program IronMiner;
{$I SRL-6/SRL.simba}
function MineIron(): boolean;
var
X,Y:Integer;
Begin
result:=false;
if mainscreen.findObject(x, y, 2964579, 21, ['Iron'], MOUSE_MOVE) Then
begin
wait(250);
ClickMouse(X, Y, mouse_left);
result:=true; // returns true if found and clicked on iron so loop can stop itself.
end
else writeln('iron not found'); // <- failsafe to prevent mouse clicking -1,-1 if iron not found.
end;
begin
MouseSpeed := 15;
repeat
wait(100); // waits few ms before trying again
until MineIron();
end.