Universal Recovery Script

Lure Minions in the hunger tree is actually pretty darn efficient too, at least for softcore. With sc turngen and extra item boosters (and ML for better brains) it's easy to get hordes over 100 by the end of day 2. Especially with that skullcracker skill toward the bottom of the hunger tree. Mafia can't currently use the Lure Minions in the CLI without a couple visit_urls, but I got 'em here for your convenience :P.

Code:
ash visit_url("skills.php?action=Skillz&whichskill=12002&pwd="+my_hash()); visit_url("choice.php?pwd="+my_hash()+"&whichchoice=599&option=3");

option=3 is a "good brain". it's all i have left, and I assume 1 and 2 are crappy and decent, respectively. The code there works, and each execution sacrifices one brain. Also crappy lures 1 zombie, decent lures 2, and good lures 3 (a reason I think the other two numbers are right). Haven't checked if boss and hunter brains have an option yet but I'll check firebug next time I have one.

Oh and option=5 is backing out of the choice adv.

Edit: Yep options 1 and 2 are crappy and decent.

Edit2: Confirming boss brain as opt 4.
 
Last edited:
I think option 4 is to use a boss brain, for whatever absurd reason. :P

Also, I can vouch for the crappy and decent [as options that give 1 and 2 horde, respectively]; haven't tried a boss brain, since I prefer turngen over a few more zombies.
 
I keep getting Bad Skill Value: "Bite Minion" (Universal_recovery.ash line 336)

Is there any way that I can go back to the older version until this is fixed? Because everytime I try to auto adventure in mafia I get an error and can't adventure.

Update: I didn't have the latest version of Mafia.....after downloading the latest build, it works now.
 
Last edited:
The bite minion does not restore 10 hp, it restores 10% of your hp, minimum 10, rounded down. I changed the minion line to
Code:
if(have_skill($skill[Bite Minion])) skills[$skill[Bite Minion]].ave =max(10,my_maxhp() / 10);
 
And I believe the following line should be:

Code:
if(have_skill($skill[Devour Minions])) skills[$skill[Devour Minions]].ave =max(my_maxhp()/2, 20);
 
That is very possible, but I've not gotten that skill yet so :)
(over all I feel that the skills are a bit lackluster, but that might be me not being very fond of zombies over all I guess)
 
Can someone please help me with the visit_url() for casting summon minion and summon horde. Right now I have this....

Code:
boolean zombie_mp(int target) {
	int x = target - my_mp();
	if(have_skill($skill[Summon Horde]) && my_meat() >= 1000) {
		x = ceil(x / 12.0);
		x = min(my_meat() / 1000, x);
		if(x > 0)
			visit_url("??" + x);
	} else if(have_skill($skill[Summon Minion]) && my_meat() >= 100) {
		x = min(my_meat() / 100, x);
		if(x > 0)
			visit_url("choice.php?pwd&whichchoice=600&option=1&choiceform1=Summon+zombie+%28100+Meat+each%29&quantity=" + x);
	}
	return my_mp() >= target;
}

Unfortunately the visit_url() for Summon Minion does not work and I do not understand how to fix it. I have not learned Summon Horde so I need that one also.

I will not implement Lure Minion because I do not want to decide how many brains a character can spare.
 
You have to visit_url for the skill page and choose summon minion. It looks to me like yours is trying to go straight to the choice page and mafia doesn't know how to get there.

visit_url("skills.php?action=Skillz&whichskill=12021&pwd="+my_hash());

(from a look at yours I guess the my_hash isn't necessary, i just put it in in case. I'm also not sure about the action=Skillz but it worked. It was in the PHP.
 
Thanks both.

Universal recovery v 3.10 released!



Changelog:
version 3.10 August 21, 2012
  • In Zombiecore: Fix an infinite loop bug when Horde reaches zero. Ooops.
  • In Zombiecore: Summon Minions and Horde to recover MP Horde.
  • In Zombiecore: Several more fixes to allow Zombie Slayer to work.




(from a look at yours I guess the my_hash isn't necessary, i just put it in in case.

my_hash() is never necessary in a visit_url() unless it is in a relay script that puts a link into the browser. Mafia fills in the password hash wherever it sees pwd so I enjoy that shortcut.
 
Last edited:
Universal recovery v 3.10.1 released!



Changelog:
version 3.10.1 August 21, 2012
  • In Zombiecore: Allow use of mixed HP&MP restoration items without regards for the wasted MP.
 
Last edited:
Might be useful as a relay option to be able to set how much horde you want UR to leave, if you're both using your horde for skills and restoration... would suck to end up in a fight without enough horde to win because you got that extra bit of health.
 
Even after updating this script, mafia keeps buying knob goblin seltzers 'just in case'. I'm not sure if it's this script or mafia in general. UR is my recovery script. I also disabled kg seltzer from the items to use for recovery but it does it anyway.
 
Sigh. Yeah, I'll have to do something about that also. Thank you. Restoration is rather different in Zombiecore so I appreciate it when people point out how to fix this script to work for Zombie Masters.



Universal recovery v 3.10.2 released!



Changelog:
version 3.10.2 August 21, 2012
  • In Zombiecore: Recover from Beaten Up if you have Devour Minions
  • In Zombiecore: Recover from other unpleasant effects if you have Devour Minions
  • In Zombiecore: Reserve MP restoration not needed. (Don't buy those knob goblin seltzers!)


Download Universal Recovery v3.10.12 here:
(Universal_Recovery.ash goes in the /scripts folder)​
 
Last edited:
Theraze's suggestion has been implemented so that recovery can maintain Horde at a combat effective level of your choice. I really am hoping for feedback telling me if it does work, or what is wrong with it. Highly experimental!

I'm currently considering the possibility of adding Lure Minions to the script also. I'm thinking to only lure minions with brains of less than your current best quality, and only if you have enough of those brains to fill up your stomach. How does that sound to people? Would it be better if it lured with whatever brains will not fill up today's stomach? (Is there a chance that will leave you unable to fill up your stomach tomorrow?) Which is more important to conserve, spare brains or meat?



Universal recovery v 3.10.3 released!
Universal recovery Configuration UI v1.3 released!


Changelog:
UR version 3.10.3 & UI version 1.3, August 22, 2012
  • Zombiecore: relay script configures Horde restoration. Until it is configured Horde will not be restored by the recovery script.
    The option to recover Horde will only be seen during a Zombie Slayer ascension.


Download Universal Recovery v3.10.3 here: View attachment 6798
(Universal_Recovery.ash goes in the /scripts folder)
Download Universal Recovery Configuration relay UI v1.3 here: View attachment 6795
(Universal_Recovery.ash goes in the /relay folder)​
 
Last edited:
It appears to be mainly working although I keep running into this (now that I have devour minions):
Code:
[COLOR=#66CC00]Restoring HP! Currently at 105 of 186 HP, 11 of 11      MP, current meat: 34162 ... Target HP = 177.[/COLOR]
_meatperhp =>      0.34408602150537637
[COLOR=red]You don't have a skill uniquely      matching "1 Devour Minions"[/COLOR]
_meatperhp =>      0.4444444444444444
Casting Bite Minion 1 times...
You gain 18 hit      points
Bite Minion was successfully cast.
[COLOR=blue]Try to      heal HP from inventory.[/COLOR]
[COLOR=blue]Try to heal HP with      skills.[/COLOR]
Casting Bite Minion 3 times...
You gain 54 hit points
Bite Minion was successfully cast.

I have no idea why it would be matching on "1 devour minions" rather than "devour minions" and a quick look at the code didn't help clarify that either.

Edit: Also the restoration with meat seems to be working fine. It took me a while to notice the change in wording in the relay-script to update my restoration value though :)
 
Maybe if you turn verbosity up to "Super Verbose" we'll get a good clue as to why we want to match "1 Devour Minions". I'm not gonna get that skill this ascension so I won't be able to test it myself for a while.
 
Back
Top