Universal Recovery Script

notusername

New member
Well...

Code:
mtnoob.php?action=toot
You acquire an item: letter from King Ralph XI

use 1 letter from King Ralph XI
You acquire an item: porquoise
You acquire an item: disassembled clover

mtnoob.php?action=toot

autosell: 1 porquoise
You gain 500 Meat

Use 1 disassembled clover
You acquire an item: ten-leaf clover

buy 1 chewing gum on a string at market price from Market Demon
You acquire an item: chewing gum on a string

[1] Unlucky Sewer

[1] Sewer With Clovers
You acquire an item: turtle totem
You acquire an item: stolen accordion
You acquire an item: worthless trinket

buy 1 anti-anti-antidote at market price from an NPC Store
You acquire an item: anti-anti-antidote
 > Restoring HP! Currently at 20 of 53 HP, 7 of 20 MP, current meat: 440 ... Target HP = 53.
 > Restoring MP! Currently at 20 of 53 HP, 7 of 20 MP, current meat: 440 ... Target MP = 10.

Restore 3 MP at Doc Galaktik's
You gain 3 Mana Points

buy 1 hermit permit at market price from Market Demon

cast 1 Tongue of the Walrus
You acquire an item: hermit permit
You gain 39 hit points
 > Restoring MP! Currently at 53 of 53 HP, 1 of 20 MP, current meat: 289 ... Target MP = 2.

Restore 1 MP at Doc Galaktik's
You gain 1 Mana Point

hermit 1 dingy planks
You acquire an item: dingy planks

cast 1 The Magical Mojomuscular Melody
You acquire an effect: The Magical Mojomuscular Melody (duration: 10 Adventures)

autosell: 1 anti-anti-antidote, 1 stuffed key
You gain 35 Meat

buy 1 detuned radio at market price from Degrassi Knoll General Store
You acquire an item: detuned radio

It necessitates an extra step in this one scenario (right at the start of a softcore ascension). I don't really find it to be a problem, and it is probably my fault for not resetting the restoration limits after ascending anyway, or perhaps for doing these things in this particular order, but it would have taken something extra (an adventure, I guess) to access the detuned radio at that step without the given klaw machine luck. This isn't a big deal, I think.

If it is a more serious concern than I think it is, I suppose zarqon's suggestion makes a lot of sense; including either a level or a location component in addition to the meat requirement. The purpose of pre-buying the antidotes is presumably to have them available in case one should be needed in combat, but a given softcore ascender might not actually have that happen until The Black Forest. Other than self-infliction (in which case you would not need an antidote to be pre-purchased), combat poisoning only occurs in The Daily Dungeon, The Sleazy Back Alley, The Jungles of Ancient Loathing, Whitey's Grove, The Dungeons of Doom, Menagerie Level 3, The Black Forest, The Upper Chamber, The Battlefield, and a few places in The Sea. It is the case that one may only have a few meat on hand during some points in such an ascension, so the 15 meat lost in an emergency antidote autosell could be annoying to some (if it happened before the antidote could be used at all).
 
Last edited:

Bale

Minion
Thanks notusername, some good points there.

Incidently, I've also been annoyed by unncessary restoration on turn 1 which is why my newLife script automatically turns down recovery settings when I ascend. You might want to try it so that you won't forget again. (It's got a lot of other awesome features as well, to save me effort and memory.)

Right now I'm considering turning off stockpiling of antidotes until level 5. That's the earliest anyone is likely to go into the Daily Dungeon and I suspect that nobody seriously needs an antidote to deal with a spider in the back alley. What do people think of that possible solution?
 

lostcalpolydude

Developer
Staff member
I think that makes sense. Being poisoned by a spider takes away something like 1 of each stat? That probably won't even affect the average new player that doesn't know what they're doing and hasn't heard of mafia. I like that your newLife.ash script resets restore options when ascending, and all I had to do was change the values to turn restoring off.
 

Bale

Minion
I think that makes sense. Being poisoned by a spider takes away something like 1 of each stat? That probably won't even affect the average new player that doesn't know what they're doing and hasn't heard of mafia. I like that your newLife.ash script resets restore options when ascending, and all I had to do was change the values to turn restoring off.
I'm glad you agree.

Modifying newLife, I'd just like to point out (in case you don't know), since it isn't immediately obvious, a value of 0 does not turn off restoration. To turn off restoration you need a negative value.
 

lostcalpolydude

Developer
Staff member
I set it with mafia's GUI and checked the setting file to figure that out, but thanks. Now I'm curious what mafia does with 0, but not enough to actually find out.
 

adeyke

Member
I just wanted to thank you for this wonderfully useful script.

If there was one tiny thing I'd change about it, it would be to put tonic water on the list of things that use KoLMafia's preferences, since they have limited availability and are used for the superhuman cocktails.
 

Muhandes

Member
I'm set to "Do not auto-recover mana", yet when I heal HP manually:

Restoring HP! Currently at 2339 of 4865 HP, 74 of 4616 MP, current meat: 1751020 ... Target HP = 4622.
Purchasing magical mystery juice (13 @ 100)...
You acquire magical mystery juice (13)
Purchases complete.
Using 13 magical mystery juice...
You gain 608 Mojo Points
Finished using 13 magical mystery juice.
Using 1 scroll of drastic healing...
Finished using 1 scroll of drastic healing.
 

Spiny

Member
On the flip side of what Muhandes posted above... I was consuming things with ol' scratch's forks and frosty mugs the other day and I knew I was going to die and didn't want to waste mana, meat or items to restore till I was done with my dying so I temporarily changed my hp restoration to do not restore hp and I was restored regardless of that setting. My suspicion is that the script checks these settings when it first runs, but doesn't recognize a change if it is changed mid-session? I'm just guessing. I am almost certain this wasn't a problem in prior versions of the script, but I haven't done extensive testing with this to be honest.
 

slyz

Developer
Mafia passes on to the recovery script the amount it wants restored (and the type), so it's not a mid-session thing (unless Mafia itself didn't recognize the setting change).

As for the MP healing: from what I gather, when restoring HP, the script starts by restoring MP up to a point (amount in settings + amount needed to use cheapest healing skill, capped by maxMPx0.75 ).

That way, if any HP + MP restoratives are used to restore MP, the HP they restore will not be lost. The script then proceeds to restore the remaining HP, if needed.

Bale implemented it this way because people were complaining that HP was restored first, then when MP was restored, the HP recovered by using Magi Wipes or others was lost.

In Muhandes' case, I guess the script restored MP in case using a skill was better, then decided using a scroll was cheaper.

In cases where HP is restored as a side-effect of restoring MP, the amount of HP restored can change the best (or cheapest) method of restoring the remaining HP, so I guess that behavior will stay.

One solution would be to consider 'do not restore MP' as an indication that the user really doesn't want any MP restored (MP will be restored only if a skill is the best/cheaper method, and the HP recovered when restoring MP is ignored) , and 'recover up to 0%' would keep the actual behavior.

This entails more configuration from the user that Bale would like. Another solution would be to not use Bale's script and make Mafia use scrolls or Cocoon, which is the most logical way to restore that many HP.
 

Bale

Minion
slyz basically answered everything. Perhaps I should consider "do not restore MP" to be a concern to not restore any MP unless absolutely necessary to cast that spell. What do you think?

Spiny, I cannot explain why you got healed when you didn't want it. Except for being rather OCD about removing "beaten up", the script shouldn't have insisted on healing you. I'm wondering if even removing "beaten up" is appropriate when you say not to heal. I'm suspecting not. It does check your healing preferences every time it is called.
 

Terrabull

Member
Tried to run the script and got an error message, debug log attached.
Then it bought some Mr. Bubble for some reason. It put this in the CLI:
Purchasing some bottle of Monsieur Bubble for use as a combat restorative.
 

Attachments

  • DEBUG_20091215.txt
    5.3 KB · Views: 49
Last edited:

Spiny

Member
Tried to run the script and got an error message, debug log attached.
Then it bought some Mr. Bubble for some reason. It put this in the CLI:
Purchasing some bottle of Monsieur Bubble for use as a combat restorative.

Interesting that Bale's script is firing off exception reports for the words "no" and "help" as I have yet to see it fire off an exception report for me using v7874 of mafia. As for purchasing the Monsieur Bubble, that is probably the most cost effective combat restorative for you to be using at present. The script is geared to keep combat restoratives on hand, early on it would have seltzers or MMJs or other items. In your case, it has decided the Monseiur Bubble is best so it bought it.
 

Bale

Minion
All Spiny failed to mention was that those errors are the result of mafia's daily builds not working quite right these days. It doesn't have anything to do with my script. If you downgrade to r7859 I'm sure you won't see any problems of that sort.
 

shoptroll

Member
Bale, would it be possible to have the script use Medicinal Herbs if you're in a SC/TT Bad Moon run? Or is there a design reason for why it doesn't do that and opts to flush money away at Docs?
 

Muhandes

Member
slyz basically answered everything. Perhaps I should consider "do not restore MP" to be a concern to not restore any MP unless absolutely necessary to cast that spell. What do you think?
I would definitely prefer this behavior. The last thing I wanted when I have a 9000MP test in the basement, and I click the HP to heal after that, is Mafia trying to heal MP with MMJ. That's why I specifically set it to "do not restore MP".
On the other hand I do see what slyz said. In fact I think I was one of those reporting the issue with lost HP healed. So what would be the side effect of this being implemented? I don't want this to hurt ascension, where the script really matters, just so basementing, which at most is done 7 times, is made easier. I can use scrolls manually for the last 100 floors of my 7th dive :D
 
Last edited:
Top