Universal Recovery Script

Razorsoup

Member
Just started getting the following today:
>Purchasing some magical mystery juices for use as a combat restorative.
You need 1 more magical mystery juice to continue.
Did not fully restore MP for some reason.

I get this between every adventure. This is on a disco bandit in aftercore so I don't think he'd have access to MMJs. Do you think I have a setting borked somewhere? This just started happening and I haven't changed anything so I'm not sure what's going on.

Edit: This only happens if baleUr_UseMmjStock = true. If I set baleUr_UseMmjStock = false, everything works as expected.
 
Last edited:

edgy

Member
Universal recovery will always fail in the initial svn update fails. Not sure if this is intended behavior.

Note: svn_exist() does not catch the svn connection issue (bug report has been submitted).

Code:
> restore HP

Validating repo...
svn: E175002: connection refused by the server
Something went wrong while fetching svn directory info
Done.
Did not fully restore HP for some reason.
 

Bale

Minion
I should definitely remove automatic updating. It is kinda a relic of a previous paradigm before SVN updating which was badly updated into the current modus. Properly it shouldn't have a place anymore since it should be up to the user to decide if they want to update the script. I'll remove that once I get around to it...

Oh, and the reason for the fail was because of a sourceforge issue.
 

Winterbay

Active member
I should definitely remove automatic updating. It is kinda a relic of a previous paradigm before SVN updating which was badly updated into the current modus. Properly it shouldn't have a place anymore since it should be up to the user to decide if they want to update the script. I'll remove that once I get around to it...

Oh, and the reason for the fail was because of a sourceforge issue.

Well, the same would be the case if behind a firewall that blocks sourcefotge access.
 

psly4mne

Member
Just came across a bug - If I have >2 MMJs, but not enough to cover my in-combat restoration, UR will try to buy more MMJs even if buy_mmj is false.

I think the appropriate block in choose_reserve_purch() needs to check that the number of MMJs available is sufficient to cover restoration, not just 2.
 
Last edited:

Cool12309

Member
I thought this script allowed you to import it and you could grab the value of 1 MP/1 HP? If so, how do I do that? If not, do you know what script I'm thinking of?
 

Bale

Minion
It's actually easier than that. Those values are saved as daily preferences whenever the script restores your hp or mp. Since it already had to figure that out, it makes the information available.

Code:
[COLOR="#808000"]> get _meatperhp[/COLOR]

0.32499998807907104

[COLOR="#808000"]> get _meatpermp[/COLOR]

2.6
 

digitrev

Member
Feature request: use soul sauce to restore MP. It's a cheap resource, and it'd be nice to have it be used automatically, especially when I need it.
 

xKiv

Active member
Counterpoint: using soulsauce *at all* prevents you from using soul blaze in the next turn. Not that I ever used it for anything but checking how much damage it does (not enough to justify the cost, except when forced to lose all MP).
 

Bale

Minion
I make soul sauce part of a mana burning routine in my preAdventureScript...

Code:
void sauce() {
	if(my_class() == $class[Sauceror]) {
		if((my_soulsauce() > 75 && have_effect($effect[Soulerskates]) < 20) || (my_soulsauce() > 35 && have_effect($effect[Soulerskates]) < 5))
			use_skill(1, $skill[Soul Rotation]);
		if(my_soulsauce() > 90 && my_mp() < my_maxmp() - 15)
			use_skill((my_soulsauce() - 90)/5, $skill[Soul Food]);
		if(my_soulsauce() > 93)
			use_skill(1, $skill[Soul Rotation]);
	}
}
 

torne

New member
Maybe super-niche and not worth adding, but while I was configuring OCD I did some math and determined that while the most profitable thing to do with knob goblin seltzer is to autosell it since you can use the meat to buy a better MP restorative, the autosell price of superseltzer is so low that it looks like you're better off using it to restore MP if you have it in inventory, since the 49 meat won't buy you more than the 25-29 MP it restores unless you are using MMJs at a *very* high level. Maybe UR should use up superseltzer from inventory even if another restore is cheaper? (maybe there are also other items whose mp-to-autosell ratio is similar as well?)
 

Bale

Minion
I'm gonna skip out on checking autosale prices to use up stuff with low autosell prices. Sounds like a PITA.
 

Bale

Minion
Today's skill update broke this script's ability to recover horde for Zombie Slayers. Only the Zombie Slayer skills were broken since those are the only skills which KoLmafia cannot completely automate on its own.

By some bizarre chance I am a Zombie Slayer at this very moment. There was a whole story that led me to this atypical choice, but the upshot is that for completely unrelated reasons I was able to easily troubleshoot and test my fixes for Zombie Slayers. The coincidence is amazing since ZS is the only path that breaks my script.

Well, if anyone else out there is actually in the Zombie Slayer path at the moment... Rejoice!
 
Last edited:
Hey Bale, I am getting this when I first run my character
Code:
Validating repo...
svn: E170001: OPTIONS of '/p/mafiarecovery/code':     403 Forbidden (https://svn.code.sf.net)
Something     went wrong while fetching svn directory info
Done.
Did     not fully restore HP for some reason.

Not sure if this is a problem with your thing or forge. I can type "svn update recovery" just fine in the CLI and it will "update" it without the error. Also, my other character which I ran ~3-4 hours earlier didn't run into this message. It seems to only occur the first time it tried to heal.
 
Last edited:

Bale

Minion
I cannot do anything about that on my end. The script checks for updates the first time it activates, that is why it only happens the first time.
 

fronobulax

Developer
Staff member
Given the discussion of infinite loops generated under mafia control, I note the following.

Today I got an infinite loop trying to buy Medicinal Herbs with a character who was not in a Muscle class. I have no idea why - it could have been related to finishing Picky or a preference set incorrectly or a failure on the part of mafia to detect the logical inability to satisfy the request or a failure of UR to recognize the report of such a failure. This is for anecdotal purposes only since I am unlikely to be able to reproduce it with and generate more information unless mall prices remain stable and I, for one, would rather the effort be put into creating 1 Up ;-)
 

Theraze

Active member
I've had it happen before a few times, usually when mafia got out of sync on my inventory. A quick refresh inv and everything worked properly again. Not sure why it got out of sync though, and not likely a script problem. What it takes to fix is looking at the logs before they bloat to 5mb instead of 150kb on that day.
 
Top