Universal Recovery Script

It's newLife, here in recovery_settings:
Code:
void recovery_settings() {
	// Optimal restoration settings for level 1. These will need to be changed by level 4
		set_choice("hpAutoRecovery", "0.25", "Resetting HP/MP restoration settings to minimal");
		set_choice("hpAutoRecoveryTarget", "0.95", "");
		set_choice("manaBurningTrigger", "-0.05", "");
		set_choice("manaBurningThreshold", "0.80", "");
	// Zombie Slayers have an alternative to using mana
	if(my_path() == "Zombie Slayer") {
		if(get_property("baleUr_ZombieAuto") != "")
			set_property("baleUr_ZombieAuto", "-0.05");
		if(get_property("baleUr_ZombieTarget") != "")
			set_property("baleUr_ZombieTarget", 1);
	} else {
		set_choice("mpAutoRecovery", "0.0", "");
		set_choice("mpAutoRecoveryTarget", "0.0", "");
	}
	
}
But yeah, nothing to do with UR, it's nL.
 
Having a problem with (I think) UR.

I tell Mafia to auto-adventure and get nothing but:

Code:
Division by zero (Universal_recovery.ash, line 610)

And then the sidebar goes red and no automation of combat occurs.

I've updated UR and KoL Mafia to the most current versions, (3.10.6 and 11567 respectively) and still get this error.

EDIT: I'm in aftercore of a ZM run, with 0 Horde.

EDIT2: The error went away when I added some members to my horde.
 
Last edited:
Those are due to trying to calculate meat per hp and meat per mp. If you apply the tweaks I suggested in 1855, they should go away.
 
Purchasing some magical mystery juices for use as a combat restorative.
Searching for "magical mystery juice"...
Search complete.
Desired purchase quantity not reached (wanted 3, got 0)
Restoring MP! Currently at 2861 of 5964 HP, 759 of 7999 MP, current meat: 4925649 ... Target MP = 760.
Searching for "magical mystery juice"...
Search complete.
Desired purchase quantity not reached (wanted 1, got 0)
Cannot spend meat to fully restore MP! Failed to use magical mystery juice for some reason.
Did not fully restore MP for some reason.

Any idea why it keeps trying to purchase MMJs? I'm a TT right now and I obviously don't have access to it.
 
Probably because recent builds think that every $stat[stat1] == $stat[stat2] and buying mmj is based off primestat == $stat[mysticality].
 
So I was thinking. It would be nice if there was a setting in which you could set the "use campground" as on, but it will only use the campground if all other restores fail. That way it can be a last ditch effort sort of thing, rather than what it seems now, as being the first choice always.
 
Hello.
This script doesn't seem to know about CSA all-purpose soap, which is quite good for restoring large amounts of mana (while basementing, for example). I've checked recoveryScript_map_v2 file and it doesn't appear there.
 
UR does not supply a correct meatpermp value for Zombie Slayers, which in turn causes BatBrain to behave badly during ZS runs. I hackishly made it work by adding

if (zombie) return have_skill($skill[summon horde]) ? 80 : 100;

at the top of meatpermp(), and a similar set-meatpermp-and-return at the top of best_mall(). You have a more thorough knowledge of the script and may know a better way to do it.
 
True... here's my tweaked version of 1855.
Code:
string meatpermp() {
	switch {
	case zombie:
		return (have_skill($skill[summon horde]) ? "80.0" : "100.0");
	case buy_mmj:
Code:
float meatperhp() {
	if(zombie)
		return (100.0 / (my_maxhp() / (zombie ? 8 : 10)));
	if(galaktik_cures_discounted() && contains_text(hpAutoRecoveryItems, "curative nostrum"))
 
Suddenly Universal_recover stopped working properly for me:

Restoring HP! Currently at 3708 of 5760 HP, 1368 of 4064 MP, current meat: 857223 ... Target HP = 5760.
Purchasing Medicinal Herb's medicinal herbs (1 @ 100)...
You acquire an item: Medicinal Herb's medicinal herbs
You spent 100 Meat
Purchases complete.
Purchasing Medicinal Herb's medicinal herbs (1 @ 100)...
You acquire an item: Medicinal Herb's medicinal herbs
You spent 100 Meat
Purchases complete.
Purchasing Medicinal Herb's medicinal herbs (1 @ 100)...
You acquire an item: Medicinal Herb's medicinal herbs
You spent 100 Meat
Purchases complete.
Did not fully restore HP for some reason.
 
Wild guess... your spleen is full and somehow mafia has gotten out of sync. Try a refresh all and see if that fixes it maybe.
 
Part of the refresh all was because inventory is also apparently out of sync, since it keeps buying more when you already still have, since it wasn't able to use them when you were already over-spleen... :)
 
To fix compatability with most recent nightly build, you need to change line 1683 and 1684 to

case $monster[naughty sorceress]:
case $monster[naughty sorceress (2)]:
 
Back
Top