Log in

View Full Version : Need help with autominer



bustinthejus
03-14-2007, 04:53 AM
I want to make an autominer using antirandoms from the SRL includes, and gas detection from includes, etc. etc. Here's what I've got so far.



program New;

{.include SRL\SRL.scar}
{.include SRL\SRL\Skill\mining.scar}


Const
RockColor=2437457; //set your rock color
WaitTime=10000; //time to wait in milliseconds

begin
repeat
if(FindColor(x,y,RockColor,0,0,765,504)) then
begin
MoveMouseSmoothEx(x,y +random(0),20,40,45,25,20);
Wait(100+random(10));
ClickMouse(x,y,true);
wait(WaitTime);
end
until(false);


end.

m0u53m4t
03-14-2007, 04:37 PM
Firstly, use Mouse instead of MoveMouseSmoothEx, and you also should use FindObj3 instead of If FindColor, so it doesn't attack something of the same colour or something:
program New;

{.include SRL\SRL.scar}
{.include SRL\SRL\Skill\mining.scar}


Const
RockColor=2437457; //set your rock color
WaitTime=10000; //time to wait in milliseconds

begin
repeat
if(FindObj3(x,y,'Mine',RockColor,5)) then
begin
Mouse(x,y,3,3,true)
wait(WaitTime);
end
until(false);
end.

bustinthejus
03-17-2007, 03:05 AM
what does mine do?

Mjordan
03-17-2007, 03:42 AM
what does mine do?

its the object that you want to find. you need to make a Bitmap of something then put the name in there. he just used "mine" for an example.

bustinthejus
03-17-2007, 10:41 PM
K.