PDA

View Full Version : Help with a mining script



L4L0
03-05-2015, 03:45 AM
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.

Lipcot
03-05-2015, 06:21 AM
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.

try putting the code between [/SIMBA]this [SIMBA]

pd: sorry, drunk posting

cosmasjdz
03-05-2015, 11:17 AM
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.

Upload a picture .png or .bmp format. It might findobject function not searching for small chunks of color, actually i dont know cause dont use it.