SRL Archive - Reflection

[R]ArdougneMiner (Iron/Coal)


Flight

2011-03-26 09:08:50


My second official script. I realize this might not be as popular as the other scripts because it's for members, but it is very fast and very efficient and I hope you atleast give it try. :)

I recommend you wear an amulet of glory AND ring of wealth for very fast gem mining, this increases your profit ALOT.



Features:
  • Mines and banks Iron/Coal ore at the Ardougne mine
  • Mines full load, runs to bank, rests to 100, back to mine
  • Solid breaking system (Credit to _Echo for his wonderful BreakHandler)
  • Single-player (I'm not a fan of multi, this can be easily added)
  • On-screen printing
  • SRL Stats (Yay!)
  • Solid script (Test ran for hours and hours)

Anti-Ban/Fail-Safes: (My personal anti-bans)
  • HumanMouse (Random human mouse movement)
  • ACR (Active camera rotation)
  • Very efficient object tracking
  • 50/50 chance of mining nearest or second nearest rock
  • 'Click check' if we clicked 'Mine' or 'Walk here'
  • Location checking

Fill in lines starting at 17, and just below fill in the DeclarePlayers vars. Start with your player at the mine, pickaxe either equipped or in your inventory, press run, practice playing your guitar(like me!).

Note: There is a known bug I'm aware of, "Field not found:….". I've tried everything I could and search on the forums to no avail. If someone knows what this is all about, please give me some help me out. I'll probably have some updates for it later, but if you have some suggestions feel free to post 'em here. :)

Update log:
V 1.1
  • Serious tile bug fixed
  • Cleaned up script, better variable defining (thanks for suggestions!)
V 1.2
  • Tiles re-done (Much faster/safer)
  • Gem counting! (Also saved to SRL Stats)
  • Area-detecting failsafes (Before there were 3 places to places to go wrong: Mine,Bank, and the walking path in-between, this fixes the Mine and Bank, all that can go wrong, at this point, is the walking)

(V1.2 ran at level 75 Mining with a rune pickaxe mining Coal ores)
=-=-=-=-= Ardougne Miner by Flight =-=-=-=-=
Time Running: 17 Hours, 7 Minutes and 1 Seconds
Ores mined: 2962 (148100 Exp)
Total gems: 90
Loads: 109
Breaks: 17
Camera rotations: 1370
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
=-=-=-=-= Ardougne Miner by Flight =-=-=-=-=
Time Running: 6 Hours, 6 Minutes and 4 Seconds
Ores mined: 1094 (54700 Exp)
Loads: 40
Breaks: 5
Camera rotations: 590
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
=-=-=-=-= Ardougne Miner by Flight =-=-=-=-=
Time Running: 12 Hours, 18 Minutes and 16 Seconds
Ores mined: 2377 (118850 Exp)
Loads: 88
Breaks: 12
Camera rotations: 909
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
=-=-=-=-= Ardougne Miner by Flight =-=-=-=-=
Time Running: 10 Hours, 27 Minutes and 11 Seconds
Ores mined: 3198 (159900 Exp)
Total gems: 104
Loads: 117
Breaks: 12
Camera rotations: 846
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
=-=-=-=-= Ardougne Miner by Flight =-=-=-=-=
Time Running: 9 Hours, 50 Minutes and 3 Seconds
Ores mined: 2344 (117200 Exp)
Total gems: 62
Loads: 86
Breaks: 10
Camera rotations: 670
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

=-=-=-=-= Ardougne Miner by Flight =-=-=-=-=
Time Running: 18 Hours, 3 Minutes and 27 Seconds
Ores mined: 4209 (210450 Exp)
Total gems: 129
Loads: 155
Breaks: 18
Camera rotations: 1231
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

HarryJames

2011-03-26 09:39:23

My members ran out yesterday, so I can't test :(
I've had a read through your script, it looks pretty solid but I think you should try using types. You have a lot of If rock is this or that, then exp is this, etc etc.


type TRock = record
RockIDs: TIntegerArray;
OreID, OreType, Exp : Integer;
end;

var
RockInfo : TRock;

Then you'd just be able to use RockInfo.Exp * OreCount instead of;
    if ((Mining = 'Iron') Or (Mining = 'iron')) then
Exp := (OreCount*35);
if ((Mining = 'Coal') Or (Mining = 'coal')) then
Exp := (OreCount*50);

I'm not saying your way is bad/wrong, it's just a bit cleaner imo :)

Floor66

2011-03-26 09:42:50

Besides what HarryJames said, I guess you could also use a case statement:

case ToLower(Mining) of //or w/e the lowercase func is
'iron': ExpMultiplier := 35;
'coal': ExpMultiplier := 50;
end;
Exp := OreCount * ExpMultiplier;

HarryJames

2011-03-26 09:53:17

Or that ;)

I was suggesting Types becuase there are quite a few if functions to check the rock information. Either way works though.

I just checked (as I'm writing some more for my Draynor Fisher/Cooker), and it's;

Lowercase(S : String);

Flight

2011-03-26 09:57:50

Yeah I just recently read up on Types so I've not really experimented with them that much. I really do appreciate the suggestions guys, I'll be sure to look into them. :)

William

2011-03-26 10:41:21

- My mems ran out yesterday would have loved to try this out :(

Flight

2011-03-27 01:02:39

Updated to version 1.1. :)

Sorry to hear that Willie :(. Maybe if you get it back you can give this a shot.

trojan

2011-03-27 06:02:54

Ill give it a shot now, leave it on while im in work :)

edit: didn't work untill I changed stage to 3 in load vars
the running lagged me out, I dont think that was the script though I think that was because of reflection

Flight

2011-03-27 06:51:09

Oh yeah I've had some similar problems but I've also seen it's something to do with Reflection, maybe even Smart.

As far as the 'Stage' goes, I think because you tried starting the script at the bank? Stage 0 (default) is the mining procedure, so you'd start at the rock mine.

Bonfield

2011-03-27 07:53:42

i suggest adding multiple ores pretty easy fix all i did was change OreID to a TIntegerArray, and add the rock ids to one array

EDIT: doing what i did messed the counting =]

also i think if you learn cases it will cut down alot of the if … then loops and types to but this has already been said

good script

Flight

2011-03-27 07:59:02

Thanks Bonfiled. :) Yes I converted a little bit more to cases, I'm sure I can do some more later, but I'm still fairly new to alot of SRL, so much I haven't seen used or atleast used that often.

Bonfield

2011-03-27 08:01:00

no worries, also i would suggest you try to keep all variables local to each proc/func

you could also add gem counting and gp per hour to the progress report

Flight

2011-03-29 07:46:30

Added my longest report yet and my current take-ins from using this and KhazardMiner script.

I'm more accustomed to global variables as this was just sort of my style when I worked with Java. I'm sure most of you don't care for it that much because maybe you think it's sloppy or just not traditional, but it's made no faults in my scripts yet and they're still running strong. So I do appreciate your suggestions, Bonfield, don't get me wrong. :)

trojan

2011-03-29 12:30:10

=-=-=-=-= Ardougne Miner by Flight =-=-=-=-=
Time Running: 6 Hours, 6 Minutes and 4 Seconds
Ores mined: 1094 (54700 Exp)
Loads: 40
Breaks: 5
Camera rotations: 590
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


Not a bad script lad :) does this include breaks btw? I was at college so I decided to have often and long breaks to avoid ban. Rep+

William

2011-03-29 16:49:40

From: trojan
Not a bad script lad :) does this include breaks btw? I was at college so I decided to have often and long breaks to avoid ban. Rep+


this scripts has breaks ^^

cause

2011-03-29 18:31:39

=-=-=-=-= Ardougne Miner by Flight =-=-=-=-=
Time Running: 4 Hours, 18 Minutes and 8 Seconds
Ores mined: 857 (42850 Exp)
Loads: 32
Breaks: 4
Camera rotations: 335
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Awesome man, still runnning :)!

Flight

2011-03-29 20:24:23

Ha thanks for the complements everyone. I added Trojan's and Cause's reports the the first post, if you don't mind. :)

cause

2011-03-29 20:48:43

Time Running: 6 Hours, 24 Minutes and 2 Seconds
Ores mined: 1290 (64500 Exp)
Loads: 48
Breaks: 6
Camera rotations: 473
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

That's the same one finished now :). And you are right, with the ability to mine diamonds with the coal it is great cash, an additional 80k just in gems! 50k from 6 diamonds wow!
And crafting exp as well :D!

cause

2011-03-31 01:54:41

=-=-=-=-= Ardougne Miner by Flight =-=-=-=-=
Time Running: 12 Hours, 18 Minutes and 16 Seconds
Ores mined: 2377 (118850 Exp)
Loads: 88
Breaks: 12
Camera rotations: 909
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Booya baby!

Flight

2011-03-31 05:41:55

12 hours, that's amazing. :O I can't go more then 5 and Smart crashes on me. :/

omgloljee

2011-03-31 10:56:04

Hi,
I'm a real beginner with botting and programming so I can't really fix things myself yet.

Anyway, your bot seems to run fine until it reaches the bank. My char gets "stuck" a few tiles away from the banker and Simba starts to spam "Running to bank" until my char gets logged out. Any ideas?

Flight

2011-03-31 11:25:15

Forget to put your Bank Pin in the script? (Under DeclarePlayers)

Pin  := 'Bank Pin number goes here';

If that doesn't work then tell me a little bit more, are you inside or outside the bank? Did you successfully click on the bank booth?

Edit: I recently finished up a beta V1.2, if it runs successfully over night tonight then I'll release it tomorrow. I re-did all of the walking tiles, they should be more accurate now, so maybe in the newer version you'll find that your problem is solved. A handful of fixes/improvements in other areas of the script. :)

omgloljee

2011-03-31 11:59:36

From: Flight
Forget to put your Bank Pin in the script? (Under DeclarePlayers)

Pin  := 'Bank Pin number goes here';

If that doesn't work then tell me a little bit more, are you inside or outside the bank? Did you successfully click on the bank booth?


I think it never even tried to excecute the banking stage so unfortunately adding a pin didn't change a thing. After getting my inventory full of iron / coal that running part always ends in the same spot, around 3-5 tiles away from the booth, next to stairs (or whatever there were) INSIDE the bank. Guess it's about those tiles then, gotta wait for a new version :)

Thanks for your work anyway!

trojan

2011-03-31 15:20:42

From: William
this scripts has breaks ^^


no… I mean't does the progress report time include the time for breaking?

Flight

2011-03-31 21:04:42

Yes in the progress report it includes the time running + the break time added in. By the way, the tiles seem to be much more accurate, but once again the WalkPath function is giving me problems, I don't know if it's my slower internet or WalkPath itself being old and outdated.

Flight

2011-04-01 09:19:16

Updated to version 1.2. Be sure to try it out, it's much safer now. :)

gamer716

2011-04-01 13:02:13

Walking has definitely improved and more efficient. Thanks for updating and sharing!

Flight

2011-04-02 10:44:27

If anyone has problems logging out and not back in let me know. I modified this version a little bit to make loggout checks much more often and will log you back in if you're logged out. This work in-sync with my location/stage checks written in my failsafes.

By the way, the script is now ranked in the top 20! :garfield: And it looks like we're about to break 20,000 total coal-mined.

cause

2011-04-02 19:00:07

Ya man I'm helping you out with those stats AKA you're helping me get rich!! Currently at 5 hours today :)

Flight

2011-04-02 23:42:40

I changed alot of the "if not LoggedIn then Exit;" to "if not LoggedIn then LoginPlayer;" and now I'm running extremely longer periods of time. Before I could get just over 5 hours and somehow I'd get logged/lagged out and that was the end of the script, now I'm pushing 16 hours and still running strong. I'm up to almost 20,000 coal and a total of 23-24 gained Mining levels.

At this point there's nothing that can stop the script if you're at the Mining area or in the bank area, the only thing that can potential stop it is the walking in between which I will be modifying today and adding even more fail-safes. I plan on converting it to color as well today, but keeping reflection simply for the walking only.

cause

2011-04-04 21:16:15

Love it man, I think you posted in some other thread about finding a rock that is closer in actuality versus distance wise, would it be a good idea to define which tiles the rocks are on and therefore run a check for which which are available and set a priority for which rock to click (with some randomness of course) based on your players current position? I'll attach a picture :P
So based on your position (using reflection tiles), you check the availability of coal in rocks in a specific order, since there arent that many places you can stand in the mine or at least you could specify boxes which would check specific orders… (dunno if that made any sense)

Flight

2011-04-04 22:15:46

That's a really good suggest, as this is a static script I know the exact tiles for the coal rocks (and iron rocks), so I could make it go by a 'tile priority' rather than closest distance object. I might not do this for a while, I'm experimenting with a Living Caverns coal mining script in development, and it's a bit tricky…

cause

2011-04-05 14:27:51

Ok cool im at least glad you got the jist of it :). Are the living caverns faster coal mining than this?

Flight

2011-04-05 20:29:42

Very. The deposits down there hold well over one hundred coal each and you only click them one time and you keep mining until either you're full or the rock dissipates. And since you're already 77 Mining at that point, they come rapidly to your inventory.

I just kept using this script (from 53 to 77 Mining) and now I'm getting coal like crazy.

cause

2011-04-05 22:25:14

Sweet man! I hope you release it :) (or if you need any testers just let me know ;P)

gamer716

2011-04-05 23:32:29

Definitely looking forward to it. I'm 71 mining atm thanks to your script :)

enoyhs

2011-04-06 11:18:55

=-=-=-=-= Ardougne Miner by Flight =-=-=-=-=
Time Running: 10 Hours, 27 Minutes and 11 Seconds
Ores mined: 3198 (159900 Exp)
Total gems: 104
Loads: 117
Breaks: 12
Camera rotations: 846
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Very nice script :) Left it on while I was at work, no problems encountered so far…
My mining and smithing level may not go untrained after all :)

cause

2011-04-06 13:14:32

=-=-=-=-= Ardougne Miner by Flight =-=-=-=-=
Time Running: 9 Hours, 50 Minutes and 3 Seconds
Ores mined: 2344 (117200 Exp)
Total gems: 62
Loads: 86
Breaks: 10
Camera rotations: 670
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Manually stopped woot!

Flight

2011-04-06 20:38:19

Some very nice reports.

And about what I said earlier, I'm starting to have second thoughts about the Living Caverns. I really think it's a tad too dangerous to bot down there, even though there's hundreds of bots, they're still dropping like flies with all the grave markers covering the ground. That and I've just not been actively working on the script as of late, I've had other things on my agenda.

cause

2011-04-16 14:58:50

=-=-=-=-= Ardougne Miner by Flight =-=-=-=-=
Time Running: 18 Hours, 3 Minutes and 27 Seconds
Ores mined: 4209 (210450 Exp)
Total gems: 129
Loads: 155
Breaks: 18
Camera rotations: 1231
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Lol totally forgot I left my guy running for that long! Hope I don't get banned lol but very stable script!

Flight

2011-04-16 22:25:38

18 hours that's crazy :D. Might be one of the longest reports for a single player on SRL. :O I'll definitely add that to the main post.

Spelletje

2011-05-09 07:36:57

Used it once after starting the script the entire pc slows down, simba starts using all cpu time game is so lagged it's just not able to do anything

BraK

2011-05-09 07:43:14

From: Spelletje
Used it once after starting the script the entire pc slows down, simba starts using all cpu time game is so lagged it's just not able to do anything


Umm what type of computer do you have? What are the Specs?

~BraK

Flight

2011-05-09 08:35:34

Yeah it's probably my WalkPath. Evidently that induces mass lag…

Spelletje

2011-05-09 18:35:40

From: BraK
Umm what type of computer do you have? What are the Specs?

~BraK


Intell Celeron 2 mhrz

I set all to minimum have nothing else open and this is the only script it did this with