SRL Archive - Outdated / Broken

[Project RS06] Simple Power Miner v0.1


Sneakdella

2013-02-10 15:17:48

Breaking down from my current project I'm working on "East Varrock Miner and Banker" I coded a Power Miner.

Simply it mines the ore you choose, drops when its a full inventory and repeats. If the bot is being attacked, it runs away.

I find this script a little more risky than anything though, because it makes it pretty obvious you're botting when the bot just drops the ore and keeps mining. This is just to skill up mining.


program SimplePowerMiner;
{$I SRL/SRL.Simba}
{$I P06Include/P06Include.Simba}

// **Simple Power Miner 0.1**
// By Sneakdella
// Mines, Drops and repeats
//
//
// Version 0.1 contains - Mining the rock
// dropping the inventory except slot one
// choosing the rock you want to mine
// Runs Away When Attackted

// ********* SETUP ***********
const
ROCK_COLOR = 1910335 ; // Set the rock color with the color picker and enter it.

var
X, Y: Integer; // Don't touch this

Procedure P06_DeclarePlayer;
Begin
P06_PlayerName:='username';
P06_PlayerPass:='password';
End;
// ********* END OF SETUP ******
// DON'T TOUCH ANY OF THE BELOW AND MINE AWAY MY FRIENDS!

procedure MineOre;
begin
if P06_InvEmpty then;
begin repeat
if findcolortolerance(X,Y,ROCK_COLOR,0,0,515,338,5) then
begin
MMouse(X,Y,5,5);
If (P06_IsUpTextMultiCustom(['Mine Rock','ine Rock', 'ne rock'])) Then
ClickMouse2(mouse_left);
wait(7000 +random(200));
end;
until (P06_InvFull);
end;
end;
Procedure DropOre;
begin
P06_DropAllExcept([0]);
end;
procedure AntiRandom;
begin
if findcolortolerance(X,Y,65280, 245, 130, 285, 195,5) then
begin
writeln('Attacker detected.');
mouse(675,125,3,3,true);
wait(12000+random(5000));
mouse(617,8,3,3,true);
writeln('Ran away from attacker.');
end;
end;

begin
P06_DeclarePlayer;
SetupP06Include;
ActivateClient;
If (Not P06_LoggedIn) Then
begin repeat
P06_LogInPlayer;
until P06_LoggedIn;
end;
repeat
MineOre;
DropOre;
until false;
end.

Dormik

2013-02-10 15:55:27

Nice! How do you detect if you're in combat/being attacked? And is it efficient?

Sneakdella

2013-02-10 17:37:00

I was like half asleep last night when I wrote this, I think I had it detect the green bar that comes above your head. If you're in a crowded area this would be a problem but you'd want to be smart with this bot and have it somewhere not that populated anyways so It's not a big deal.

polo

2013-02-11 04:49:23

Aslong as you start it in the right spot and tweak the wait time right… This got me 10 levels but then I died. It had to of ran over an hour.

DannyRS

2013-02-11 05:01:00

Think you forgot to mention to users that you need P06 Include installed to run this :p

Good job, I can see your learning fast :)

Very minor thing, but you should not need to repeat the login procedure from the include, if you just call it once when not logged in, it should repeat it'self until you are logged in ;) does not really matter tho, just something I noticed looking through

Also are you searching the whole screen for the rocks? If you are this would work too and looks neater:


If FindColorTolerance(X,Y,ROCK_COLOR,P06_MSX1,P06_MSY1,P06_MSX2,P06_MSY2,5) Then

Sneakdella

2013-02-11 12:21:43

So the MSX1, MSY1 P06 Include functions allow the mouse to search around your character? I need to add that in, that would be way batter

EDIT: Yes I'm learning fast >:) thank you for all your help. Especially just starting out. I learned during the blizzard here in New England a couple days ago so it was a perfect time to sit there and learn some programming rather than trying to go out in 2 feet of snow with my friends. I favor the warmth.

Also built another script last night on the PTR. Did you see my Falador Coal Miner?

voltag00

2013-02-12 22:02:55

Best power mining script so far, after changing the speed. One major bug that needs to be fixed though is that after the script drops all of the ore, the ore on the ground is the same color as the rocks. As a result the bot will hover over the dropped iron most of the time, and only click on one rock. Resulting in very slow, insufficient Xp.

Sneakdella

2013-02-13 00:54:43

From: voltag00
Best power mining script so far, after changing the speed. One major bug that needs to be fixed though is that after the script drops all of the ore, the ore on the ground is the same color as the rocks. As a result the bot will hover over the dropped iron most of the time, and only click on one rock. Resulting in very slow, insufficient Xp.


I will get on that asap. I havent had time this week so far to do anything.

I promise <3