Universal Recovery Script

> restore hp

_meatpermp => 5.4054055
_meatperhp => 6.0
_version_BalesUniversalRecovery => 3.76
You've had the crap beaten out of you... attempting to find some more crap.
Unable to cure beaten up! Go sewer or adventure someplace wussier.
Restoring HP! Currently at 0 of 52 HP, 51 of 53 MP, current meat: 30406 ... Target HP = 52.
Visiting Doc Galaktik...

Restore 52 HP at Doc Galaktik's
You gain 52 hit points
You spent 312 Meat
Cure purchased.


Is the CLI output, it seems to be using MMJ just fine as an AT, but not the herbs. I have them checked in what to use.


EDIT: Another example,

> restore hp

Restoring HP! Currently at 23 of 68 HP, 60 of 68 MP, current meat: 33448 ... Target HP = 68.
Using 1 scroll of drastic healing...
Finished using 1 scroll of drastic healing.


I'm initiating the restore HP by pressing the numbers in the relay browser
 
Last edited:
can you improve the medicinal herbs use? I turned it on, and it never used them, and then when I freed the king, it started using them. I haven't tested it a lot.

also, can we have a setting to always have 5 combat mp restorers on hand? it's sometimes unreliable and runnning out is annoying
 
can you improve the medicinal herbs use? I turned it on, and it never used them, and then when I freed the king, it started using them. I haven't tested it a lot.

What would make it better?

also, can we have a setting to always have 5 combat mp restorers on hand? it's sometimes unreliable and runnning out is annoying

A reasonable idea. What do you mean by "unreliable"? I'll consider making that configurable.
 
I'd imagine "use them more often if you don't have spleen familiars or wads to fill spleen for adventures" would make some folks happy.
 
the mp restorers works, it just keeps 3-10, and I'd rather it was enough for olfaction plus a bit extra
you could compare medicinal herbs to things like strongness elixirs, but that depends on other factors. it's probably a bad idea, forget I mentioned it :(
 
Well, having it as a configurable amount wouldn't hurt... based on meat-farmingness and paranoia, you may even be fine keeping 20 in inventory, in case you hit one of those thorns-heal fights...

For that matter, if the amount you buy isn't the same as the amount it guesses you'll need, depending on your OCD level regarding the CLI, you may want to always buy enough to do 3 or 4 full heals at once, so your log doesn't get updated with purchases as often. It'll still be efficient, since you'll still have the items you were going to heal with, but you just have a greater initial outlay. Less server hits and delay there, as well.
 
The script is going insane on me, trying to buy medicinal herbs while I'm an AT and failing and trying again forever. I updated to the latest mafia version (8592) and it's not helping. I'm using the latest version of the recovery script.

Edit: I completed my guild guild tests and that fixed it. Was pretty annoying anyway.
 
Last edited:
I suspect that, much like with the MMJ as an AT issue, it keeps re-checking, assuming that you'll open that store any minute... and forgetting that as an AT, you probably won't.

Also, the configurable quantities would be great; from the short time* I've used this script, I have over 30 anti-anti-antidotes sitting in my inventory (my combat strategy is such that for most cases of poisoning, it's cheaper / easier to finish combat first, using higher level spells perhaps, and then use only 1 anti-anti-antidote; so keeping more than 1 on hand isn't really required).

*In terms of # of ascensions, mostly 'cause I've been having week-long runs for a while. :(
 
Also, the configurable quantities would be great; from the short time* I've used this script, I have over 30 anti-anti-antidotes sitting in my inventory.

Whoa! That isn't entirely my doing! When you are out of ronin/hardcore KoLmafia will refuse to purchase only 1 antidote, even if that's all you need. The theory is that those things (and some others like sgeeas) are so commonly used and so cheap that it won't purchase less than 30 at a time to save server hits. This script never purchases that many of its own will.
 
My guess is that he's talking about how he'll have 5 in-run, never use them, then have that amount added to his total when he breaks the prism.
 
Heeheehee's assumption was correct; that's how many I've accumulated after having 3 left after many consecutive runs.
 
If we get a spammer that takes us to 200 will you congratulate us on quantity again?

No, because that would just be a junk. This is 100 pages of questions, problems, requests, answers and fixes for a very popular and useful script used by the community.
 
Something I got bitten by today: the script won’t restore more than the minimum amount of HP in the Hidden Temple, which is usually a good thing. Unfortunately, it conflicts somewhat with the Hipster—I got a free fight and promptly lost since I had 1 HP. I’m thinking a good solution would be to use the normal restoration behaviour iff the Hipster is active. Ideally, it would also check that you actually can get more fights, but since Mafia doesn’t yet track those, it seems reasonable to me to simply assume that if the player has the Hipster out in the Temple, they’re expecting more fights.

Hacked together a small patch:
Code:
--- Universal_recovery 3.76.ash Wed Sep 15 15:55:37 2010
+++ Universal_recovery.ash      Wed Sep 15 16:09:18 2010
@@ -1487,8 +1487,11 @@
        }
 }

-// This returns true if the character is currently mining, or is in the Hidden
Temple.
+// This returns true if the character is currently mining, or is in the Hidden
Temple, as long there are no free Mini-Hipster fights left.
 boolean need_only_1hp() {
+       if (my_familiar() == $familiar[Mini-Hipster])
+               return false; // be prepared for free fights
+
        switch(my_location()) {
        case $location[hidden temple]:
        case $location[Desert (Unhydrated)]:
(Untested.)
 
Eh, if you're going to go that route, then you'd want/need to take into account the whole bounty hunters sent out as part of the LEW quest. Since they can happen anywhere you're adventuring as well, etc, etc. I think the easier solution is to just not try to use the Temple if you know you're going to end up in fights...

Though I suppose this doesn't have THAT many options yet on its Relay settings page... an "always use restoration levels" setting could be added that allows for ignoring the location, always returns need_only_1hp() as false, and can be set by the user whenever their status changes without needing to implement a lot of hacks to try to figure out current status, familiar, or other problematic feature.
 
Eh, if you're going to go that route, then you'd want/need to take into account the whole bounty hunters sent out as part of the LEW quest. Since they can happen anywhere you're adventuring as well, etc, etc. I think the easier solution is to just not try to use the Temple if you know you're going to end up in fights...
The LEW quest bounty hunters seem to me to have a much broader scope than this, which is limited to the use of one familiar (and, once Mafia tracks them, only while you can still have fights). That said, I don’t think that paying attention to when bounty hunters are after you is something outside the scope of the script, although I don’t expect it to be implemented. More below.

As for not using it at the Temple, that sequence is one of the major draws of the Hipster: it’ll speed up your Hidden Temple because the fights can replace non-combats (i.e. good, free stats replace low-yield adventures) but not the quest superlikelies.
Though I suppose this doesn't have THAT many options yet on its Relay settings page... an "always use restoration levels" setting could be added that allows for ignoring the location, always returns need_only_1hp() as false, and can be set by the user whenever their status changes without needing to implement a lot of hacks to try to figure out current status, familiar, or other problematic feature.
I dunno, I don’t really see this as a hack, conceptually. In general, you only need 1 HP in the areas that the function checks for because you know you aren’t going to be meeting any enemies. If that changes—i.e. you know you might meet enemies—then shouldn’t you act accordingly? As regards bounty hunters, consider this: is it really safe to adventure with 1 HP during that 15 adventure window where one can appear? Is the feature outside the scope of the script or is it rather that implementing that feature in a robust fashion would be a pain in the neck (if not impossible)?

I would agree with what you’re saying if the script always blindly restored HP/MP, but it already is context-aware simply through paying attention to your location. This is a simple change that would make it slightly more context-aware.
 
Back
Top