k9thebeast
2014-01-08 16:45:06
Very simple script taken off a tutorial here but I cannot get it working and would appreciate any help.
I know it says copper, but I just havent changed it. I am trying to make it click on the black of the coal rock. The way I run it is I select a client (an rsps webpage) and then I press start. It returns to me that it couldnt mine/find copper.
Any Ideas?
Thanks
k9
program FindObjExample;
{.include SRL/SRL.simba}
function MineCopper: Boolean;
var
x, y : Integer;
begin
if not LoggedIn then Exit;
if FindObjCustom(x, y, ['ine', 'ocks'], [1250324, 1250328], 5) then//Notice how I used "[]".
begin
Writeln('Found copper rock!');
Mouse(x, y, 0, 0, True);//MMouse and uptext check isn't needed becaue it's already built into FindObjCustom, understand?
Result := True;//Returns true of the copper ore was clicked.
end else
Writeln('Couldn''t find the copper rock.');
end;
//Notice that we didn't use MSCX or MSCY. This is because FindObjCustom automatically starts searching from the center. :)
begin
ClearDebug;
SetupSRL;
ActivateClient;
if MineCopper then
Writeln('Mined copper ore!')
else
Writeln('Didn''t mine copper ore.');
end.I know it says copper, but I just havent changed it. I am trying to make it click on the black of the coal rock. The way I run it is I select a client (an rsps webpage) and then I press start. It returns to me that it couldnt mine/find copper.
Any Ideas?
Thanks
k9