Recovery Script for Hardcore

Status
Not open for further replies.
Interesting. I can see the reason for the first one. It's not so much a bug, but it is reasonably easy to fix.

The second time though is a completely different problem... It's distinctly odd and I'm going to have to think about it carefully.

I appreciate the logs. This will definitely help make the script better.
 
I encountered an annoying behavior today, when the script used a scented massage oil in preference to a scroll of drastic healing to recover hp. I was out of Ronin at the time. I think, but am not positive, that I had a scroll in my inventory.

I've also seen it use partial restore items like gauze garters before then restoring for full with a drastic healing scroll.

I think I've fixed all the possible causes for such behavior. Please try the new version. I've improved/fixed a lot of other things as well. Note that it makes use of a new feature added in revision 6926.

version 1.8 - February 11, 2009
- As of revision 6926 KolMafia added the ability for this script to prevent normal healing. This is important to keep from using up items or free rests that are being reserved.
- Improved handling of aftercore healing.
- If you've got both massage oil and a scroll of drastic healing, it will chose the scroll now.
- Major update to the "combat healing" reserve.
- Properly handle healing at the unlucky entryway. (Or other places where less than default healing is requested.)
- Various bugs that I'm too embarassed to enumerate.

Also, if you have any Nardz energy beverage you'll want to update the recoveryScript_map to make use of the new item.
 
Thanks again for your work on this. The only remaining bug I've seen so far (which I should have mentioned before, as it's been there from the beginning) is that the script is not properly using SGEEAs to undo beaten up if it lacks a tounge skill or tiny house. You need to switch it over to using "uneffect beaten up" rather than just using the SGEEA.
 
Thanks again for your work on this. The only remaining bug I've seen so far (which I should have mentioned before, as it's been there from the beginning) is that the script is not properly using SGEEAs to undo beaten up if it lacks a tounge skill or tiny house. You need to switch it over to using "uneffect beaten up" rather than just using the SGEEA.

Actually, it will use SGEEAs to cure beaten up if you don't have Transcendent Olfaction. My thinking on this, is that if you have Olfaction, then the use of SGEEAs to cure beaten up wastes a chance to switch your olfacted monster. After all, there are ways to cope with a few turns of beaten up, but olfaction is important!

Do you think my logic is faulty on this? I'm quite willing to change my thinking for the sake of people who have olfaction, but don't have a tongue. (A category that does not include me.)
 
Do you think my logic is faulty on this? I'm quite willing to change my thinking for the sake of people who have olfaction, but don't have a tongue. (A category that does not include me.)

No, I don't think your logic is faulty on this. Your code is faulty, the item use in the code doesn't actually work, because SGEEAs can be used for more than just removing beaten up.
 
No, I don't think your logic is faulty on this. Your code is faulty, the item use in the code doesn't actually work, because SGEEAs can be used for more than just removing beaten up.

Oh. :eek: Do you know an ash command to use SGEEA? If not, I'll just change that to cli_execute.
 
Oh. :eek: Do you know an ash command to use SGEEA? If not, I'll just change that to cli_execute.

I'm afraid I don't personally know of such a command. I've been working around the bug by using "uneffect beaten up" in my mood as well, but that's a lot less intuitive.
 
Well I've fixed that and perfected my "combat healing" reserve. Now I just want to finally fix a little problem with using the nuns to heal during the island quest when you're wearing the wrong outfit.

Once I test my solution to that problem (tomorrow) I'll post the new version.
 
Rewrote a couple of sections more thoroughly than I anticipated. I retract my claim that I'll post the new version today since it needs a bit more testing.
 
Version 1.9 has been released

I'm really happy with this version. I finally perfected my "combat healing reserve". Yay. As a bonus, it now scales so that you reserve more items for combat when you're rich as opposed to when you're poor.

I also fixed it so that if you use a bunch of healing items and only have a tiny amount of HP to heal (less than any other healing item in your inventory), it won't waste an entire 10 Mp for tongue of the walrus. Now it will get an aliment ointment to deal with such a small amount. Yay, again.

StormCrow42, You should be pleased that it will now properly use SGEEAs to heal beaten up if you don't have Olfaction.

I'm feeling that when I'm ready to release 2.0 it will really be perfect!
 
Unfortunately I'd completely forgotten about adding the cotton candy items dropped by the cotton candy carnie! Silly me.

Anyway, if you have a cotton candy carnie, please update your recoveryScript_map.txt and it will use those items properly now. If you don't have a carnie, then this doesn't really matter. :D
 
Odd behavior trying to unpoison

I'm getting some really weird behavior from this script. I'm sitting at 137/179 hp and 41/42 mp, no negative effects and 1184 meat. After every fight I'm getting this...

[547] Guano Junction
Encounter: baseball bat
Round 0: tamerllama wins initiative!
Round 1: tamerllama attacks!
You gain 22 Meat
You gain 7 Beefiness
You gain 5 Enchantedness
You gain 2 Roguishness
Attempting to autoheal HP with Bale's hardcore recoveryScript.
Purchasing anti-anti-antidote (1 @ 40)...
Failed to yield. Skipping...
Desired purchase quantity not reached (wanted 1, got 0)
Purchasing anti-anti-antidote (1 @ 40)...
Failed to yield. Skipping...
Desired purchase quantity not reached (wanted 1, got 0)
You need 1 more anti-anti-antidote to continue.
Can't cure poison! OOOoch! It burns in my veins!
AutoHeal if at -8HP, up to -> 179HP.
HP has been healed up to default levels. My work here is done.

It doesn't heal me, which is fine, but it seems to report that it has. It doesn't detect that there is no poison to cure, but reports a failure to cure it. I have no idea why this is happening. I checked the script to see if maybe I was missing a variable, since I just grabbed it today, but I can't find anything.

Thoughts, comments, advice?

Thanks!

-Tug
 
If you are not poisoned and you have enough money to afford an antidote, I have to admit that makes no sense to me... What version of kolMafia are you using? And is this the latest version of my script?

BTW, it isn't saying that it necessarily healed you. It simply says that your HP are healed to levels that it finds acceptable and then exits happily. It always says that if things are good.
 
Last edited:
KolMafia v12.9 and Bale's hardcore recovery script v 1.9 - February 20, 2009

I'm not unfamiliar with QA and troubleshooting, so if there's some way I can help you figure this out...

I tried it with a Ronin-free Alt with 11,000+ meat. Ran one adventure to see what would happen.

Saucerer with 192/213 HP, 47/290 MP, and no negative effects. Output to follow

Attempting to autoheal HP with Bale's hardcore recoveryScript.
Refreshing stash contents...
Stash list retrieved.
Pulling items from stash...
You acquire an item: anti-anti-antidote
Purchasing anti-anti-antidote (3 @ 40)...
Failed to yield. Skipping...
Desired purchase quantity not reached (wanted 3, got 0)
Purchasing anti-anti-antidote (3 @ 40)...
Failed to yield. Skipping...
Desired purchase quantity not reached (wanted 3, got 0)
You need 3 more anti-anti-antidote to continue.
Can't cure poison! OOOoch! It burns in my veins!
Purchasing some unrefined Mountain Stream syrup for use as a combat restorative.
Searching for "unrefined Mountain Stream syrup"...
Purchasing unrefined Mountain Stream syrup (4 @ 400)...
Purchasing unrefined Mountain Stream syrup (1 @ 400)...
Purchasing unrefined Mountain Stream syrup (4 @ 400)...
Purchasing unrefined Mountain Stream syrup (4 @ 400)...
Purchasing unrefined Mountain Stream syrup (2 @ 400)...
Purchasing unrefined Mountain Stream syrup (4 @ 400)...
Purchasing unrefined Mountain Stream syrup (2 @ 400)...
Purchasing unrefined Mountain Stream syrup (1 @ 400)...
KoLmafia declares world peace.

Attempting to autoheal HP with Bale's hardcore recoveryScript.
Pulling items from stash...
You acquire an item: anti-anti-antidote
Purchasing anti-anti-antidote (2 @ 40)...
Failed to yield. Skipping...
Desired purchase quantity not reached (wanted 2, got 0)
Purchasing anti-anti-antidote (2 @ 40)...
Failed to yield. Skipping...
Desired purchase quantity not reached (wanted 2, got 0)
You need 2 more anti-anti-antidote to continue.
Can't cure poison! OOOoch! It burns in my veins!
Purchasing some unrefined Mountain Stream syrup for use as a combat restorative.
Searching for "unrefined Mountain Stream syrup"...
Purchasing unrefined Mountain Stream syrup (1 @ 400)...
Purchasing unrefined Mountain Stream syrup (4 @ 400)...
KoLmafia declares world peace.

I finally stopped it, because it seemed to be looping. And it spent a considerable amount of meat. I'm totally at a loss here.

-Tug
 
Purchasing anti-anti-antidote (1 @ 40)...

Antidote does not cost 40 Meat any more. You've either got an outdated version of KoLmafia, or outdated data files from a previous use of the "update" command, that doesn't know that antidotes are now sold by Doc Galaktik.
 
Slammin' script. It's everything I'd put into a script if I made one myself. In fact, I don't think I could have done it any better.

I do have a quick question though. The script is updating after every round, which seems strange to me. Is it supposed to do that? I'm asking because the script activity is getting logged, which is making my log files really big.

I'm using the script in aftercore, so I'm also not sure if this will cause issues.
 
Thank you very much. That compliment means a lot to me.

I'm not sure what you mean about "updating after every round". If by "round" you mean that it is run between each combat, KolMafia checks to see if you need recovery between every round of combat. That's a function of mafia so I have no ability to keep it from doing so.

As for all the logging. If you don't want to get updates about what it is doing, and I could imagine not wanting that, then just you could just remove every line that starts with "print" and it will work the same, but without all the logging. In fact, I'll do that for you if you want. It should be attached to the end of this post. Basically version 1.9: Same healing, less logging.

Running the script in aftercore shouldn't be a problem at all although it isn't as optimal in that environment. Anyway, now that we have mall_price() I'm planning on releasing an aftercore optimal recovery script. :D
 

Attachments

Sweet. Thanks for the information, and the update. I wish I'd just thought to remove the print lines myself, lol.

Also, I was looking through your script, and mad props for the commenting.
 
Also, I was looking through your script, and mad props for the commenting.

Glad you like all my commenting. I figured that I was writing the first recovery script so a lot of other people who wanted to write their own would want to dissect my script for ideas and I wanted to help them out. Because of that I got a bit more detailed than if I was just writing for my own purposes. I know that when I was learning how to do ash, I was very grateful when I found comments in someone else's script. :D
 
Status
Not open for further replies.
Back
Top