volcano_mining.ash - Automate mining of the Velvet/Gold Mine at That 70s Volcano

coandco

Member
Hello all!

I've modified Bombar's Crimbo Mining script to work with the Velvet/Gold Mine. By default, the script follows the following algorithm:

  1. Mine sparkles in the first three rows as efficiently as possible, stopping as soon as a gold is found.
  2. If a velvet has been uncovered or no gold has been found, mine all of the velvets.
  3. If it still hasn't found a gold, continue hitting sparkles until gold is found.
  4. Go to a new mine.

The script assumes that a) you have an outfit named "Volcano Mining" which will meet the requirements to enter, and that b) you have enough turns of Object Detection remaining to cover the script's entire run, as the algorithm it uses relies on the effect.

How to install:
Code:
svn checkout https://github.com/coandco/mafia-volcano-mining/trunk/

How to use:
Once you have it checked out, run "volcano_mining.ash" from the scripts menu.

Special Thanks:
Bombar, for writing the original Crimbo Mining script I based this on.
 
Last edited:

coandco

Member
Changelog:
3/28/2016
* Added in a new switch to allow for mood maintenance while mining.
3/19/2016
* Removed support for velvet mining now that velvet is all but worthless in the mall from overfarming
* Added support for "lazy mining", i.e. only mining directly-accessible sparkles in the first two rows before moving to a new mine. Testing shows an efficiency improvement of ~0.5 when using this method (average ~5.5 adv/gold, rather than 6).
10/31/2015
* Whoops. The "mining will cost an Adventure" text the script was looking for doesn't show up when Unaccompanied Miner is in play. It now looks for something else on the page to verify it actually has a mine.
10/26/2015
* Restore MP before restoring HP, not after
* Detect when we're unable to access the mine and abort with an informative message
10/22/2015
* Trigger Mafia's built-in MP restore as well when using it for HP restore
9/27/2015
* Added a "total gold autosale" stat to the end text.
9/16/2015
* Fixed a bug with non-velvet mining that would sometimes fail to mine a single square before moving to a new mine
* Refactored the script to be more friendly to being called by other scripts
* Added zlib as a dependency, as the refactor relies on it
9/15/2015
* Added an option to let the script automatically re-up Object Detection when it needs it
9/13/2015
* Added "lookForVelvet" as an option when first running the script, to govern whether it specifically tries to go for velvet or only farms it incidentally
9/12/2015
* Track adventures used while mining
* Present an "average turns per gold" statistic to the readout at the end
* Now asks how many adventures you want to spend when starting the script
 
Last edited:

LostDreams

New member
Hi there!

I've been wanting to run this script but I run into an issue I couldn't find on the forums.

When I copy-paste the svn command, it gives me this:


Starting Checkout...
Validating repo...
Repo validated.
svn: E155000: 'C:\Users\XXX\Dropbox\XXX\Kol Mafia\svn\coandco-mafia-volcano-mining-trunk' is already a working copy for a different URL; perform update to complete it
SVN ERROR during checkout operation. Aborting...
Done.
Requests complete.

Any suggestions?

Thank you for your time!
 

Crowther

Active member
LD, it sounds like you already have some version of this script installed. "svn list' will show you what you have. Since the URL is different, you then might want to "svn delete" what you currently have installed, then run the "svn checkout" command from the first post again.
 

AssHandy

Member
I'm getting an error when I try to update/install the script:

Validating repo...
Repo validated.
Updating coandco-mafia-volcano-mining-trunk...
C:\Users\Marit\Desktop\KoLmafia\svn\coandco-mafia-volcano-mining-trunk
svn: E170001: Authentication required for '/github.com:443> GitHub'
Done.
Requests complete.
 

coandco

Member
Hmm. Try using "svn checkout https://github.com/coandco/mafia-volcano-mining/branches/master/" instead of "trunk/" -- I haven't quite figured out what the best way is to access GitHub-hosted scripts.
 

Skittius

New member
So, I've been trying this out a bit, but I find it restores HP using skills, but fails to restore MP until they run out, and then prematurely ends w/o trying to heal again and continue. Am I doing something terribly wrong here on my end? (BTW, Do Like! Nice way to quickly earn a bit of meat between CS runs! Thanks!)
 
Last edited:

coandco

Member
By default, volcano_mining.ash just uses the built-in Mafia restore_hp function. Do you have your mana recovery set up correctly in Mafia? I thought that the Mafia restores could be configured to manage both HP and MP, but I could be wrong.
 

Bale

Minion
It's a script issue. Mafia's default mp restoration isn't going to activate outside of adventuring unless you invoke it. Adding a call to restore_mp(0) right after the call to restore_hp(1) would solve the matter.
 

Skittius

New member
=/ FYI: Just finished my CS run and tried the updated script. Still not recovering after restoring MP.

[589] The Velvet / Gold Mine (Mining)
Beaten Up will be removed by skill Tongue of the Walrus...
Restoring MP! Currently at 0 of 41 HP, 4 of 44 MP, current meat: 13121024 ... Target MP = 10.
Using 1 carbonated water lily...
You gain 66 Mojo Points
Finished using 1 carbonated water lily.
Did not recover from being Beaten Up!

Ended up replacing the call to use Potion of Detection with a call to use carbonated water lily, and it's running like a charm. It's ugly, but I've got a ton of them so it works. Not a coder, so unsure how to implement a call to restore MP when checking for Object Detection. It seems like doing so keeps MP up enough to keep the script from ending.
 
Last edited:

coandco

Member
Could you try moving the restore_mp line to just before the restore_hp line, instead of just after it? I'd test it, but my volcano-ready character doesn't have access to any healing skills.
 

Theraze

Active member
Well, restore_hp(0) and restore_mp(0) just do whatever you'd set. If you haven't set your recovery to actually trigger on normal adventuring, the (0) means nothing. If you want to force something, set a specific value. But you definitely want to run it after the hp restoration, not before, unless you want to possibly restore mp, use it all on restoring health, and then not actually restoring any mp for after. Which makes the mp restoration entirely useless.
 

coandco

Member
Right, but HP restoration is the only thing that uses MP in the Volcano Mining script, and the only reason we care about MP is so that the HP-restoration process doesn't fail. Thus, if we make sure we have sufficient MP before attempting to recover HP, we should be covered, right?
 

Theraze

Active member
Possibly, possibly not? I know my mafia will auto restore mp for restoring health, but that might be part of the magic of UR.

If you're naive-coding mp recovery for hp recovery, rather than doing restore_mp(0); restore_hp(1); with the expectation of tongue being your cheap healer, you should do restore_mp(10); restore_hp(1); to try to reach enough mp to cast your heal, even if they haven't set their mp to normally auto-recover.
 

Skittius

New member
Sorry, started another HCCS run already, and my alt can't get to the volcano. Should be out of it tomorrow night though. Also, I do have auto-recovery set in Mafia, the script just doesn't seem to be triggering it.

Just hit me, does the Mafia Auto-Restore even trigger after a non-combat? Seems if it did then the char would be unlikely to reach the Beaten Up stage, as constant healing would take place after each rockfall.
 
Last edited:

jeff

Member
Haven't really read through this thread, but a solution I've been using is:

Set auto-restore for HP/MP
Install this script.

Run

Code:
restore hp; call scripts/volmining_net.ash 5; restore hp; call scripts/volmining_net.ash 5; restore hp; call scripts/volmining_net.ash 5; restore hp; call scripts/volmining_net.ash 5; restore hp; call scripts/volmining_net.ash 5; restore hp; call scripts/volmining_net.ash 5; restore hp; call scripts/volmining_net.ash 5; restore hp; call scripts/volmining_net.ash 5; restore hp; call scripts/volmining_net.ash 5; restore hp; call scripts/volmining_net.ash 5; restore hp; call scripts/volmining_net.ash 5; restore hp; call scripts/volmining_net.ash 5; restore hp; call scripts/volmining_net.ash 5; restore hp; call scripts/volmining_net.ash 5; restore hp; call scripts/volmining_net.ash 5;

What happens is that it restores HP/MP, runs the script to mine 5 blocks, and restores HP again and continues, depending on the number of times you execute the " restore hp; call scripts/volmining_net.ash 5; " command. You can change it to mine any number of blocks per cycle, if you find that you are getting beaten up too often.
 

coandco

Member
Jeff, this script is an evolution of the volMining script you're linking. The volMining script performs a very rudimentary "only mine immediately visible squares in the first two rows and then go to the next mine" strategy; this script analyzes the full sparkle map shown by Object Detection and computes the shortest way to mine sparkles until it hits a gold. Also, this script automatically does that "restore hp" call on its own -- where Skittius is running into issues is when it tries to do so with no MP left.
 

coandco

Member
Just hit me, does the Mafia Auto-Restore even trigger after a non-combat? Seems if it did then the char would be unlikely to reach the Beaten Up stage, as constant healing would take place after each rockfall.

Nope. Mafia auto-restore doesn't trigger after manual noncombats like this script performs. The script does, however, manually call restore_hp whenever it detects that it has 0 HP. I'm hoping that making it also call restore_mp first will eliminate your out-of-MP issues.
 
Top