Universal Recovery Script

Bale

Minion
You're going to have to help me out here. That wasn't sufficient information for me to find a bug. I couldn't find a place where I was matching on the wrong case in the code.

Anyway, it's just the way ash works that strings are case sensitive.
 

Theraze

Active member
Hellno may have been calling UR manually for restoration, rather than using it as the mafia recovery script. Guessing here.
 

Keeblar

New member
Hello! I'm new to using scripts in KoLMafia, and I'm trying to use this autorecovery script. However, every time I try to use it, it says "Did not fully restore HP for some reason". When I check the CLI, it says:

You need 4 more anti-anti-antidote to continue.
Can't cure poison! OOoch! It burns in my veins!
Purchasing some Knob Goblin superseltzers for use as a combat restorative.
You need 2 more Knob Goblin superseltzer to continue.
Did not fully restore HP for some reason.

I'm not currently poisoned, and I don't need combat restoratives for the farming that I'm doing. What should I do to make this script work for me? I'm on a softcore run, and I'm not on a path.
 

Bale

Minion
Do you have any meat? I'm gonna guess that you cannot afford to purchase anti-anti-antidotes.


Edit: It knows you want them before of how your combat settings are. If you don't want antidotes, go to Aventure Tab -> Custom Combat subtab -> Right click in the open field with the icons -> Minimum poison level for antidote use -> No antidote use.

Of course I might be entirely wrong. Let me know.
 
Last edited:

Keeblar

New member
Aha! Found it. I was digging through my preferences, and apparently my "buy items from the mall" setting was disabled. I re-enabled that, and now it works.

Thanks!
 

Veracity

Developer
Staff member
anti-anti-antidote is available from an NPC store for 30 - which is cheaper than you can get in the mall. Perhaps you should make sure that "buy items from NPC stores" is enabled.

super seltzer is from the mall (or adventuring) only, though.
 

shoptroll

Member
I just got hit with the same issue. I don't know the limitations of the scripting interface, but is there any way to put a message in the logs suggesting end users check their combat or mall settings if the script is unable to purchase restoratives from the mall for combat purposes.

And on second thought... In my case I've got the script set to "purchase freely" mode via the relay browser, but I've disabled Mafia from auto-purchasing in general (a long time ago I did something stupid in the CLI and ended up buying way too many cherries from the mall or something by accident. Don't ask). Why isn't that setting respected when it comes to buying restoratives for combat restoratives? Or is this something else in Mafia firing as a side effect of this script?

See attached log for what I'm seeing in the CLI: View attachment shoptroll_recovery.txt What's triggering the healing is I'm attempting to cast Ode after breakfast has burned all my MP down, so I'm left with 6/1308 MP. Script is trying to restore enough to cast Ode.

EDIT: Upon further investigation... I have Mafia set to buy items from NPC stores (but no mall buy enabled). However, I don't have access to the dispensary as that's not something I've unlocked in this ascension.

EDIT 2: Is it possible this is related to the disabling of anrath1? I had a similar issue a couple days ago where it kept wanting to buy mountain stream soda and that account's store was also the one with the lowest mall price like today with the superseltzer...
 
Last edited:

Bale

Minion
EDIT 2: Is it possible this is related to the disabling of anrath1? I had a similar issue a couple days ago where it kept wanting to buy mountain stream soda and that account's store was also the one with the lowest mall price like today with the superseltzer...

Veracity recently added code to deal with disabled shops. That was r17622 on Jan 3, 2017.
 

fronobulax

Developer
Staff member
Veracity recently added code to deal with disabled shops. That was r17622 on Jan 3, 2017.

To be fair that code just logs that the store's inventory is frozen. My experience with Synthesis (and a vague memory of other things) is that the change does not recompute the price without the frozen store, nor does it eliminate that store and it's prices from further consideration during the session. That is what I recall happening before the days of frozen stores so this is neither a Bug Report nor a complaint. It might someday evolve into a Feature Request but we can hope that if a store is frozen, KoL would stop teasing us by including the frozen inventory in searches.

Point being, I think shoptroll's problems may be related to frozen stores.
 

shoptroll

Member
Veracity recently added code to deal with disabled shops. That was r17622 on Jan 3, 2017.

Oh right, forgot to put the version number. I'm on r17638 currently, so I should have that fix

It might someday evolve into a Feature Request but we can hope that if a store is frozen, KoL would stop teasing us by including the frozen inventory in searches.

Point being, I think shoptroll's problems may be related to frozen stores.

That's kinda what I figured it was. In an ideal world this feels like something that shouldn't be an issue because they filter frozen stores out server-side. If nothing can really be done in the script or mafia that's fine, no worries. Was just wondering if anyone knew for sure what was causing it and if it could be fixed in the script or Mafia.

Thanks for the fast replies both of you :)
 

Veracity

Developer
Staff member
The problem is that, client side, we don't know that a store is frozen until you try to purchase from it and KoL says, "Oops! Sucks to be you!"

The feature request would be for us to remember that store ID and not try to go there for the rest of the session, at least. And that would be reasonable, regardless, since it is the same issue with shops who have baleeted you; we should remember that and leave them alone henceforth.

The CORRECT fix would be for KoL to fix it server-side and not present a store for consideration if it is frozen.

I'm going to submit a bug report, by and by, but it sure would be helpful if a dev with the admins' ear(s) would comment on this - if only to look at my bug report and say "fuck, yeah!"
 

AlbinoRhino

Active member
So I kind of wandered out of my way to gather some candy this run. It appears there are candies included in the map file for this script. There should probably be some logic added to not use those as restoratives if one has the Sweet Synthesis skill. At least in my opinion, the candy is more valuable for use with the skill than as a restorative.
 

Bale

Minion
What an excellent point.

I really had not noticed that there were restorative candies.

Edit: Script updated with this change. It will still use candy if you have mall access.
 
Last edited:

Bale

Minion
No, thank you for pointing this out. I remember looking at my synthesis possibilities in a previous run and wondering what happened to a candy that I was sure must have been there when I previously checked. I'm betting I lost it this way and never knew! Finally the mystery is solved so that the tragedy will never be repeated.
 
Top