Universal Recovery Script

I didn't buy any and I had already pulled all my items from storage long ago. I probably had enough restoratives, but if so I probably had that while it was complaining as well.

It started trying to do this when I pulled my 19M meat from storage after having freed Ralph at the end of my rather long and lazy softcore fist-run.
 
The only thing I can think of is that you have it set to use mmj if it finds them in your inventory, but then you used up the last few mmj in your inventory, but for some reason the script didn't know that so it kept trying until mafia refreshed inventory.

That would fit with this happening shortly after breaking prism, but then stopping.
 
No clue why it does this... just did it again.Took my 6-pack, broke it... and then said it wanted another 6-pack. That's... rather confused.

Keeps doing this to me as well, except it hangs up and doesn't buy any mmj.

Restoring MP! Currently at 347 of 360 HP, 39 of 352 MP, current meat: 157837 ... Target MP = 141.
You need 1 more six-pack of New Cloaca-Cola to continue.
Did not fully restore MP for some reason.
 
im running the script and it keeps buying unrefined mountain syrup, even though i have 1000 mmj, and even deselected UMS from mafias list of restores to use. ive tried different settings to use my mmj i already bought. the use mmj even if it cant be purchased is selected. if i change it to never buying restores it wont use and UMS (because i dont have any) and still will not use my mmj
 
What class are you and did you enable the option to "Use MMJ in stock, even if it cannot be purchased this ascension". If you did not enable that option and they are not currently purchasable, then it won't use them

If that didn't answer the question, then please copy-paste CLI output so that I can have more detail about script's actions than you are providing.
 
im level 27 AT with store access
in the relay page "Use MMJ in stock, even if it cannot be purchased this ascension" is selected.
"Prefer using inventory instead of mall, regardless of value" is selected
"Allow recovery to purchase restoratives?" is set to Kolmafia pref
in mafias hp/mp usage tab: all the mp restores from "visit the nuns" and below are selected except for the oyster eggs and soda water

turning on U_R and getting a count of mmj
Code:
recoveryScript => Universal_recovery

> inv magical mystery juice

magical mystery juice (10,000)
Code:
> restore mp

_meatpermp => 0.028571429
_meatperhp => 0.0010
Checking for updates (running Universal Recovery ver. 3.9.1)...
_version_BalesUniversalRecovery => 3.9.1
You have a current version of Universal Recovery.
Searching for "anti-anti-antidote"...
Search complete.
Purchasing anti-anti-antidote (4 @ 30)...
You acquire anti-anti-antidote (4)
You spent 120 Meat
Purchases complete.
Purchasing some bottles of Monsieur Bubble for use as a combat restorative.
Searching for "bottle of Monsieur Bubble"...
Search complete.
Purchasing bottle of Monsieur Bubble (1 @ 101)...
You acquire an item: bottle of Monsieur Bubble
Purchasing bottle of Monsieur Bubble (1 @ 390)...
You acquire an item: bottle of Monsieur Bubble
Purchasing bottle of Monsieur Bubble (1 @ 394)...
You acquire an item: bottle of Monsieur Bubble
Purchases complete.
_meatpermp => 2.1978023
Restoring MP! Currently at 1005 of 1822 HP, 28 of 2017 MP, current meat: 17766649 ... Target MP = 1009.
_meatpermp => 0.018181818
Using cached search results for bottle of Monsieur Bubble...
Purchasing bottle of Monsieur Bubble (2 @ 394)...
Purchasing bottle of Monsieur Bubble (2 @ 400)...
You acquire bottle of Monsieur Bubble (2)
Purchasing bottle of Monsieur Bubble (7 @ 419)...
You acquire bottle of Monsieur Bubble (7)
Purchasing bottle of Monsieur Bubble (1 @ 419)...
You acquire an item: bottle of Monsieur Bubble
Purchasing bottle of Monsieur Bubble (8 @ 420)...
You acquire bottle of Monsieur Bubble (8)
Purchases complete.
Using 18 bottle of Monsieur Bubble...
You gain 980 Mojo Points
Finished using 18 bottle of Monsieur Bubble.
Using cached search results for bottle of Monsieur Bubble...
Purchasing bottle of Monsieur Bubble (1 @ 420)...
You acquire an item: bottle of Monsieur Bubble
Purchases complete.
Using 1 bottle of Monsieur Bubble...
You gain 46 Mojo Points
Finished using 1 bottle of Monsieur Bubble.
burn some mp and turn U_R off

Code:
> cast 50 leash

Casting Leash of Linguini 50 times...
You acquire an effect: Leash of Linguini (duration: 500 Adventures)
Leash of Linguini was successfully cast.

> call scripts\MISC\UnivRecovery OFF.txt

recoveryScript =>

> restore mp

Using 3 bottle of Monsieur Bubble...
You gain 169 Mojo Points
Finished using 3 bottle of Monsieur Bubble.
Using 8 magical mystery juice...
You gain 361 Mojo Points
Finished using 8 magical mystery juice.
Using 1 magical mystery juice...
You gain 46 Mojo Points
Finished using 1 magical mystery juice.

> cast 50 leash

Casting Leash of Linguini 50 times...
You acquire an effect: Leash of Linguini (duration: 500 Adventures)
Leash of Linguini was successfully cast.

> restore mp

Using 13 magical mystery juice...
You gain 581 Mojo Points
Finished using 13 magical mystery juice.

> cast 50 leash

Casting Leash of Linguini 50 times...
You acquire an effect: Leash of Linguini (duration: 500 Adventures)
Leash of Linguini was successfully cast.

> restore mp

Using 13 magical mystery juice...
You gain 575 Mojo Points
Finished using 13 magical mystery juice.
Using 1 magical mystery juice...
You gain 46 Mojo Points
Finished using 1 magical mystery juice.
back on
Code:
> call scripts\MISC\UnivRecovery ON.txt

recoveryScript => Universal_recovery

> cast 50 leash

Casting Leash of Linguini 50 times...
You acquire an effect: Leash of Linguini (duration: 500 Adventures)
Leash of Linguini was successfully cast.

> restore mp

Purchasing some Knob Goblin superseltzers for use as a combat restorative.
Searching for "Knob Goblin superseltzer"...
Search complete.
Purchasing Knob Goblin superseltzer (1 @ 100)...
You acquire an item: Knob Goblin superseltzer
Purchasing Knob Goblin superseltzer (1 @ 180)...
You acquire an item: Knob Goblin superseltzer
Purchasing Knob Goblin superseltzer (2 @ 180)...
You acquire Knob Goblin superseltzer (2)
Purchases complete.
_meatpermp => 2.1978023
Restoring MP! Currently at 1005 of 1822 HP, 432 of 2017 MP, current meat: 17758077 ... Target MP = 1009.
_meatpermp => 0.028571429
Using 17 Notes from the Elfpocalypse, Chapter I...
You gain 607 Mojo Points
You gain 613 hit points
Finished using 17 Notes from the Elfpocalypse, Chapter I.
off
Code:
> call scripts\MISC\UnivRecovery OFF.txt

recoveryScript =>

> cast 50 leash

Casting Leash of Linguini 50 times...
You acquire an effect: Leash of Linguini (duration: 500 Adventures)
Leash of Linguini was successfully cast.

> restore mp

Using 12 magical mystery juice...
You gain 544 Mojo Points
Finished using 12 magical mystery juice.
Using 1 magical mystery juice...
You gain 44 Mojo Points
Finished using 1 magical mystery juice.
 
Last edited:
i assume its working as intended. since i freed the king, its using Mallcore Mode and buying the best items by price.
Mallcore Mode: ...It will not use any more expensive restoratives in your inventory, as it assumes they would be sold in your store since you can make more meat that way....

i can understand that, but since you cant trade MMJ's is there anyway for it to use them first? i switched the "buy from mall" option to never, and its working for me right now
 
There is an option to "use mmj from inventory even if it cannot be bought this run" (or something similar) and also the "use items from inventory no matter their cost" which will also help (but will use other things than mmj as well).
 
Except that charred said he enabled both options...

And he's an AT with the guild store open so that it can be purchased.

And MMJ is definitely a better purchase option.

... so this doesn't make any sense to me.

(It prices mmj as 100 meat even though they cannot be purchased in the mall.)
 
Last edited:
For now, maybe change line 1572 to:
PHP:
reserve_num = (heal[reserve_purch].minmp == 0) ? 999999 : ceil(100.0/heal[reserve_purch].minmp);

But I dunno what "reserve_num" should default to, so that may not be a good permanent solution.
 
Last edited:
It's the number of combat MP restore items to keep on hand. Maybe people will not like seeing the script buying 999999 MMJs or more expensive items.
 
Something has already gone seriously wrong if reserve_purch will only restore 0 mp since the only option that can produce that is null and the previous line already verified that it is not null. Perhaps the map never loaded somehow? It should have aborted if the map didn't load.
 
I just checked my map and its contents are correct. However, there are 21 items whose minimum MP is equal to zero. I don't know the code, but could it be that perhaps one of those items was selected?
 
Those are hp healing items.

Okay, help me out here. What class are you; is your guild store open; what level are you; are you in ronin or hardcore; is mafia set to automatically purchase from NPCs or the mall?

My best guess at this moment is that you are clear of ronin, but ran into lag when checking a price which caused mall_price() to return -1... No, that couldn't cause the problem since in mallmode it won't choose an item with restoration lower than 20mp. I got nothing.
 
I'm a level 37 Seal Clubber clear of Ronin, my guild is open, and mafia is allowed to buy from either the mall or NPC Stores.

I've gone and added a few lines in the script to output the state, and I'll see if I can reproduce the error.
 
Scratch that idea, I just ran 200+ turns doing the same thing as yesterday and I couldn't get the error. It must of been an anomaly.
 
Small feature request: in hardcore mode, if the user has set is_100_run, only consider that familiar for the purposes of deciding whether spleen is available for Medicinal Herbs, rather than checking all familiars the player owns.
 
To do that, I'd have to actually load the vars file. I've been very happy not adding that to UR so far.

On the other hand, that does seem reasonable.

I hate being caught between desires.
 
Back
Top