Miner.ash - Automated ore farming

Now that we have try/finally, you can add this at the top level:
...
and replace
PHP:
contains_text(visit_url("seafloor.php"), "mineb.gif")
by
PHP:
contains_text(safe_visit_url("seafloor.php"), "mineb.gif")
on line 282.

Thanks slyz. However, while that prevents the script from aborting it doesn't do what I want it to do, which is just open the sea if all they need to do is talk to the old man.

So here's an update that should just open the sea, but I won't be able to test it for awhile because I'm trying to get my first telescope certificate. Please let me know if this resolves the problem. Thank you.

Update v2.5

Fix mine3/sea detection error.
 
When trying to use the fmine alias to do my free mines, I keep getting the following output (and no free mines are used):

Code:
> fmine

Checking for updates (running Miner ver. 2.5)...
_version_miner => 2.5
You have a current version of Miner.

Calculating the best ore to mine...
According to their autosell prices the best ore to mine would be...
the asbestos ore, which is autosells for: 50 meat.

Saving outfit: Backup
Outfit saved

Putting on outfit: Backup
You are already wearing "Backup."
Out of adventures.
Putting on outfit: Mining Gear
Equipment changed.

I tend to run this at the end of the day when I have 0 adventure left (but before I overdrink).
 
Any chance we could get "Way of the Surprising Fist" support?

I could probably kludge it in myself but at the moment it's only for the luxury of being able to use up free mining.

If you're not feeling motivated, let me know and I'll see what I can do.
 
It's not the motivation that's lacking, it's the time. I'm taking 20 credits this semester and it's starting to get the best of me. I plan on adding support, but I don't know when I'll get to it.
 
Check this... at least, once the new gummi ingots are added to mafia. :) If I understand what I did properly, it should include all the bits to make the gummi mines just as supported as the other mines, including being able to (I believe) use free mining sessions on it automatically, and finding it as the 'best' mining region. Set it to do one server hit to see if the gummi mines are open, but only during the month of December...
 

Attachments

Last edited:
Typo on line 95: containts = contains.

How do I use that script to mine out the gummi mine until I run out of adventures? The documentation is not easy to follow for this usage.
 
Thanks... fixed. Apparently I did that freehand instead of copy-pasting from somewhere. Bad me. :)

Easiest way to do that is pick something that you want a bunch of... say, green gummi ingots, and set its value to something high. For example,
ashq import <miner.ash> greeningot = 30; mine_stuff();
would mine until you had 30 green gummi ingots. If you still had adventures remaining, set the value of greeningot higher... if you want to guarantee that all your adventures are going away, just set it to 3000 or so. :)

Also, I found a few more bits I missed above... download the fixed version and it should work better. Off to sleep now... I'll check it more in the morning, when I'm hopefully more awake and able to not do horrid typos. And maybe the gummi ingots will be in mafia, so it will validate. :) I suppose I could just use the commands to fake the items, or get a few and try it, but... heh. Too tired to type, too tired to play coherently.
 
Last edited:
Extra bracket on line 201. You can introduce KoLmafia to the new items by searching for gum in the mall. That'll find them all so you can validate. ;)

The script does seem to work nicely once I removed the semi-colon!
 
Last edited:
Spurious left bracket removed.

Will be looking into adding sparkling detection. It's one of the few things I've wished it did better, and it will save me a few adventures every ascension...
 
Hmm... try this out. Should check for sparkling squares first (from the bottom right), and mine any of those that are still available. After that, it goes to the upper left and starts looking for how it can dig higher up. Hopefully if there are no promising squares but it's already made it down to the bottom, it should grab a new mine.

Current problems: Always starts with the bottom-right square regardless of promise. I'll fix that soonish, but need to work first. Leaving the above one up, because it definitely works. This one should work more efficiently, but... WIP.

Edit: More happy with this version. Instead of deciding that 54 is always the best square to do and mining that square, it should do a single hit to read the mine first, and use that to decide where to go next. In my testing, it's run well. If there's no good square available, it will dig to the top as quickly as possible, and may end up leaving a square orphaned... but fixing that is one of those things that takes significantly more thinking than I'm currently capable of.
 

Attachments

Last edited:
If you have a dwarvish mining outfit it seems to run fine.

if you have a regular mining outfit it seems to hang forever and not open a new mine.

I was using the version posted right above me in the forums.
 
Last edited:
Hmm... okay, guess I'll need to try it out with a regular outfit at some point. Or stare at it some more. Also... potions of detection are awesome. :D

But expect some fix to come around in the next hour or two. I'm too tired to consistently keep my eyes open, but that shouldn't stop me from breaking the script in ways too horrible to describe.

Edit: Okay, new version on post 54. Should be smarter about just mining the good squares if you have detection, somehow. If you don't, and haven't edited the file to do mine_all, it will mine anything good, as well as mine out the top 3 rows before resetting. If you've set it to mine_all, it will... regardless of that it doesn't actually need to use up all 64 adventures, but hey... your choice. :)

Let me know if it still has problems.
 
Last edited:
No complaints yet about the post 54 version. This one just adds the fossils as possible goals, as well as being considered for where you'll make the most (direct) profit. I said it above, but if you're just trying to burn through as many turns as possible, easiest thing to do is something like... actually, wait. I'll give you an alias that should work to mine through as many mines as the argument you give:
alias adventmine => ashq import <miner.ash> greeningot = item_amount($item[green gummi ingot]) + (4 * "%%".to_int()); mine_stuff();
Basically, set green ingot to your current amount + 4*number given. Want to mine through one mine? adventmine 1. Want 10 mines? adventmine 10. Should work easily.
 

Attachments

The script in the first post works just fine for me when run so I'm assuming you've done something odd.
Line 42 is
Code:
boolean get_tore = false;        // If true will get the ore the trapper is asking for.
which I see no problem with either...

Try redownloading the script?
 
Back
Top