SRL Archive - Simba (Testing) Scripts

Runite Ore Miner -Ownedlikenoob-


ownedlikenoob

2011-02-02 16:21:32

I've been holding this script back from everyone for a really long time because I wanted to get all the money to myself.

Yup, selfish.

Anyways, I quit RS after the Health update that changed a 10 hit to a 100 hit.
I have now returned due to the release of the wilderness and I have decided to make the script public.

Keep in mind, the script is about 2 years old and some of the procedures may be outdated.

I am using it right now, and it seems to be getting the job done alright (besides some small bugs)
anyways,

because this community has been very good to me and helped me to create a lot of scripts, I will post the code for the script.

Also, The script does not bank the ore. If anyone can figure out how to make it bank, That would be awesome. Anyone can use the code I used. If you do add walking, let me know please.

AND I DIDN'T USE STANDARDS. DO NOT COMPLAIN ABOUT IT!

-Bugs-
WorldSwitcher needs to be updated, causing the script to get stuck at high risk wilderness worlds.

-Features-
Mines Runite ore in heroe's guild
DOES NOT BANK ORE
Logs out when full inventory
gives a progress report (At bottom of Simba)
uses SMART

-Setup-
Start in hero's guild
(I would advise bringing falador teleports)

script:

program MiningRune;
{$DEFINE SMART}
{.Include SRL/SRL.scar}

const
Rune = 10261864; {9998694} {11446133}
Rune2 = 9998694;
Rune3 = 11446133;

var
x, y, i, a, LastCount : Integer;
s : String;

procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

Players[0].Name :=''; //insert username
Players[0].Pass :=''; //insert password
Players[0].Nick :='';
Players[0].Active := True;
Players[0].WorldInfo := [True, -1, False];
end;

Procedure AntiBann;
begin
case (Random(500)) of
0: Begin
RandomRClick;
a := a+1;
end;
1: Begin
SleepAndMoveMouse(200 + Random(50));
a := a+1;
end;
2: Begin
ExamineInv;
a := a+1;
end;
3: Begin
PickUpMouse;
a := a+1;
end;
4: Begin
Mouse(572,485,5,5,true);
Wait(1000+random(1000));
a := a+1;
end;
5: Begin
HoverSkill('mining', False);
a := a+1;
end;
end;
end;

Procedure LookforRocks;
begin
MakeCompass('n');
Wait(200+Random(50));
KeyDown(38);
Wait(400+random(200));
end;

Procedure StartMining;
Begin
if(FindObjTPA(x, y, Rune, 8, 2, 26,29, 3, ['Mine', 'Rocks'])) or
(FindObjTPA(x, y, Rune2, 8, 2, 26,29, 3, ['Mine', 'Rocks'])) or
(FindObjTPA(x, y, Rune3, 8, 2, 26,29, 3, ['Mine', 'Rocks'])) then
Begin
WriteLn('Found Rock, Mining');
Wait(700+random(300));
case (Random(2)) of
0: Begin
LastCount := InvCount;
wait(100+random(50));
Mouse(x,y,5,2,False);
wait(100+random(200));
ChooseOption('Mine');
Wait(1300+random(300));
Repeat
Wait(1000+random(500));
AntiBann;
InvCount;
Until(LastCount < InvCount) or
(Not(FindObjTPA(x, y, Rune, 10, 2, 26,29, 3, ['Mine', 'Rocks']))) and
(Not(FindObjTPA(x, y, Rune2, 10, 2, 26,29, 3, ['Mine', 'Rocks']))) and
(Not(FindObjTPA(x, y, Rune3, 10, 2, 26,29, 3, ['Mine', 'Rocks'])));
end;
1: Begin
LastCount := InvCount;
Wait(100+random(100));
Mouse(x,y,2,2,True);
Wait(1300+random(300));
repeat
Wait(1000+random(400));
AntiBann;
InvCount;
Until(LastCount < InvCount) or
(Not(FindObjTPA(x, y, Rune, 10, 2, 26,29, 3, ['Mine', 'Rocks']))) and
(Not(FindObjTPA(x, y, Rune2, 10, 2, 26,29, 3, ['Mine', 'Rocks']))) and
(Not(FindObjTPA(x, y, Rune3, 10, 2, 26,29, 3, ['Mine', 'Rocks'])));
End;
end;
end;
end;

Procedure Check;
Begin
If(Not(FindObjTPA(x, y, Rune, 10, 2, 26,29, 3, ['Mine', 'Rocks']))) and
(Not(FindObjTPA(x, y, Rune2, 10, 2, 26,29, 3, ['Mine', 'Rocks']))) and
(Not(FindObjTPA(x, y, Rune3, 10, 2, 26,29, 3, ['Mine', 'Rocks']))) then
Begin
WriteLn('Did not find Rock, Changing worlds');
ExitToLobby;
LoginPlayer;
Wait(3000+random(200));
end;
end;

Procedure InvCheck;
Begin
InvCount;
If(InvCount = 28) then
Begin
WriteLn('Inventory is full!');
Logout;
TerminateScript;
end;
end;

Procedure ProgressReport;
Begin
I := GetTimeRunning;
s := MsToTime(i,0);
WriteLn('Antibann happened '+IntToStr(a)+' Times');
WriteLn(s);
end;

begin
SetupSRL;
AllowPVP := False;
DeclarePlayers;
LoginPlayer;
Wait(2000+random(500));
LookforRocks;
Wait(400+random(500));
a := 0;
Repeat
StartMining;
Wait(200+random(300));
StartMining;
Wait(200+random(300));
StartMining;
Wait(200+random(300));
StartMining;
Wait(200+random(300));
InvCheck;
FindNormalRandoms;
Check;
ProgressReport;
Until(False);
end.


I am a beginner scripter.
That's why the code is basic garbage… But it gets the job done.
That's all that counts.

-OwnedLikeNoob

Sex

2011-02-02 20:00:45

Someone here had a program that calculated the respawn times of the ore on every world :p.

doom0791

2011-02-02 20:40:02

Unfortunately I can't mine rune so I can't test it :P. It has most the basic components a script needs; I don't see a detection system so that you're not continuously clicking a full rock, though. Good script, though, considering all you were going for was functionality!

From: Sex
Someone here had a program that calculated the respawn times of the ore on every world :p.


I like that idea! Switch worlds to mine each for maximum profit, using a script. ;)

ownedlikenoob

2011-02-02 23:42:27

From: Sex
Someone here had a program that calculated the respawn times of the ore on every world :p.


does it still work? Would be real nice to implement my script with that one, maybe have one of the super scripters here do it.

Simba/Scarfags would make Powerbotfags cry.

Bebe

2011-02-03 00:04:19

http://runescape.wikia.com/wiki/Rune_ore
There is a formula there to calculate respawn time for runite ores

Tlachtli

2011-02-03 00:13:43

One of my projects in the works is a Runite miner for the Mining Guild's resource dungeon.

A) would you mind if I borrowed your colors for Runite rocks? (yeah, I'm lazy as hell)

B) How would I go about making a world-switcher using pre-set worlds? I'd like to have the user define an array of 10 or so worlds to use, then it cycles through them in a random order; the part with arrays and randomizing them I can do fine, but how would I go about having it select each world? Is there a procedure for that?

Sex

2011-02-03 00:13:47

I might actually do this. However I do not have an account with a high enough mining level :(.

Edit: ^ WorldSwitcher.scar in Misc I think. Include it and use the functions :).

ownedlikenoob

2011-02-03 11:07:44

From: dd409
One of my projects in the works is a Runite miner for the Mining Guild's resource dungeon.

A) would you mind if I borrowed your colors for Runite rocks? (yeah, I'm lazy as hell)

B) How would I go about making a world-switcher using pre-set worlds? I'd like to have the user define an array of 10 or so worlds to use, then it cycles through them in a random order; the part with arrays and randomizing them I can do fine, but how would I go about having it select each world? Is there a procedure for that?


I would use WorldSwitch.scar. If you want to do what I did, you can just put this:

Players[0].WorldInfo := [True, -1, False];
[Code]

in declare players and it will choose a random world for you.

It means this:
Players[0].WorldInfo := [MembersWorld?(True or False), Choose Random world, Pvp(True or False)];

ownedlikenoob

2011-02-03 11:09:07

From: Sex
I might actually do this. However I do not have an account with a high enough mining level :(.

Edit: ^ WorldSwitcher.scar in Misc I think. Include it and use the functions :).


It would be awesome if you did though.

60k/hr using a granite miner btw :)

That's how I did it, Went from like 65 mining to 85 in a week.

Se7eN

2011-02-26 13:18:05

if someone needs to borrow a 85 miner they are free to use mine. pm me to set it up.

-Se7eN

tofurocks

2011-02-26 19:16:46

kMiner has been able to mine and then worldhop while remembering to return back to that world in the exact amount of time the ore will takes to respawn (calculated by player population). It has also done this for over a year.

kMiner can't even pull 400k/hour anymore, so it would be hard to make a script that would get anything even slightly worthwhile, plus tons of people use kMiner so you will have to be as efficient or better to not get all your rocks stolen.

Just some practical advice if you really want to develop with script.