Universal Recovery Script

jcowley

New member
I'd like to ask about something, the anti-antidote thing. I love the script, and it's really useful both in-run and out of run. However, I'd like to turn off the antidote buying for HC speed runs whilst keeping the rest of the script. You might not even need to edit it, if there is a line which tells it not to buy antidotes before level 5, I could just change it to 14?(I did a bit of looking around to make sure the same question hadn't been asked/ answered before.)
Thanks for the script anyway, it probably saved me a great deal of meat in my recent aftercore run.

EDIT: A clanmate has already helped me out with this.
 
Last edited:

Bale

Minion
I don't think that mafia is unaware that I have the KGE uniform in inventory, because when I manually instruct to buy seltzer, mafia switches outfits just fine. I do have a pilgrim shield equipped, so it is the case that I lose max HP by changing outfits. But I submit that the cost of losing (and possibly having to re-obtain) the HP may well be less than the extra cost to use Galaktik instead of seltzer.

Yes, I agree. I'm thinking about the best way to change that code so that it becomes helpful to you as well as others who don't use a Pilgrim Shield (that means me and other HC people). It's definitely screwing you over badly when you cannot afford it. I'm attaching a version of the script that removes the check for HP reduction. Consider it a makeshift fix just to deal with your problem. Eventually I'll add a better fix and release a new version of the script.

EDIT: A clanmate has already helped me out with this.
I'm glad your clannie pointed you to the offending line in unpoison().

Edit: Deleted attachment
 
Last edited:

th3y

Member
I'm thinking about the best way to change that code so that it becomes helpful to you as well as others who don't use a Pilgrim Shield (that means me and other HC people).

Hey, I'm definitely a HC people! (I'm just messing with SC for a couple of runs to get the tattoos). The ironic thing in this case is that I am also doing a 90% robogoose run, so my HP is basically always being replenished for free.


Eventually I'll add a better fix and release a new version of the script.

Aside from the cost-of-HP-vs-MP approach that I alluded to, it's also the case that the hit to my HP from switching outfits is relatively small on a percentage of total HP basis (so the inconvenience of losing the HP is relatively small). I think the goal of not losing HP to outfit switching is a good one, but there should probably be some acceptable margin available. Some ideas might be a) allow to lose HP down to the HP/MP Usage->"try to recover up to xx% health" setting b) a fixed percentage (80% of max?) or c) a configurable percentage.


-TH3Y thank you...
 
Last edited:

zarqon

Well-known member
I know this has been a recurring issue, and I'm not sure if you'd thought you'd fixed it or not. Since I'm not sure, I'm chiming in:

> restore hp

Restoring HP! Currently at 770 of 4923 HP, 185 of 2014 MP, current meat: 347402 ... Target HP = 4677.
Get thee to a nunnery!
You gain 1,000 hit points
Get thee to a nunnery!
You gain 1,000 hit points
Get thee to a nunnery!
You gain 1,000 hit points
Searching for "scroll of drastic healing"...
Purchasing scroll of drastic healing (1 @ 500)...
You acquire an item: scroll of drastic healing
Purchases complete.
_meatperhp => 0.43365097
Using 1 scroll of drastic healing...
Finished using 1 scroll of drastic healing.

Made me grimace as I watched. Running UR 3.52, set to recover HP at 60% up to 95%.
 

Bazaaretw

Member
I keep getting these unable to restore mana errors when trying to summon bricko's

Code:
Summon BRICKOs was successfully cast.
Restoring MP! Currently at 202 of 250 HP, 24 of 533 MP, current meat: 24162667 ... Target MP = 107.
Purchasing magical mystery juice (4 @ 100)...
You acquire magical mystery juice (4)
You spent 400 Meat
Purchases complete.
Using 4 magical mystery juice...
You gain 97 Mana Points
Finished using 4 magical mystery juice.
Casting Summon BRICKOs 1 times...
You acquire BRICKO brick (3)
Summon BRICKOs was successfully cast.
Casting Summon BRICKOs 1 times...
Not enough mana to cast Summon BRICKOs.
Casting Summon BRICKOs 1 times...
Not enough mana to cast Summon BRICKOs.
Casting Summon BRICKOs 1 times...
Not enough mana to cast Summon BRICKOs.
Casting Summon BRICKOs 1 times...
Not enough mana to cast Summon BRICKOs.
Casting Summon BRICKOs 1 times...
Not enough mana to cast Summon BRICKOs.
Casting Summon BRICKOs 1 times...
Not enough mana to cast Summon BRICKOs.

Additional information:

Says Bricko's is only 56 MP to cast and I have 65 mana currently with a max MP of 533...
 

Terrabull

Member
I've been getting some really bad/unusual results from this script.

One time, I got beaten up w/ Cuncta-whatever and I had 5 hot tub visits for that day.
The script used a tiny house, used the medicinal herbs, and left me needing the cure Cunct myself.
Why would it use both the herbs and the house? That doesn't make any sense, and to top it off I'm in hardcore. Your first post advertised that the script would try to find the most cost effective way and would be sparing on my inventory because it is precious.
I let it run yesterday to farm the island war and it spent nearly 5k meat over 150 turns to recover my MP from just thrust smacking twice per battle (and taking a little damage.)
Somehow it managed to spend 2k just today. I have to disable the script because it's just going crazy.

Well I found something. It posted a message for me to adventure elsewhere, but it never actually triggered an abort. It just kept adventuring below my "able-to-hit" threshold and basically spent 20-30 turns while beaten up at a location I couldn't survive. Example in the code box.
Code:
use 1 Medicinal Herb's medicinal herbs
You gain 185 hit points
 > 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.

[2156] Battlefield (Hippy Uniform)
Encounter: Naughty Sorority Nurse
Round 0: terrabull wins initiative!
Round 1: terrabull attacks! (auto-attack)
You lose 4 hit points
Round 2: terrabull attacks!
Round 3: terrabull attacks!
Round 4: terrabull attacks!
2 frat boys defeated; 836 down, 164 left.
You lose 10 hit points
You gain 25 Muscleboundness
You gain 13 Mysteriousness
You gain 13 Smarm
 > 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.
 > 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.

[2157] Battlefield (Hippy Uniform)
Encounter: Naughty Sorority Nurse
Round 0: terrabull loses initiative!
Round 1: terrabull attacks!
Round 2: terrabull attacks!
Round 3: terrabull attacks!
You lose 10 hit points
Round 4: terrabull attacks!
Round 5: terrabull attacks!
Round 6: terrabull attacks!
Round 7: terrabull attacks!
Round 8: terrabull attacks!
Round 9: terrabull attacks!
Round 10: terrabull attacks!
Round 11: terrabull attacks!
Round 12: terrabull attacks!
Round 13: terrabull attacks!
Round 14: terrabull attacks!
Round 15: terrabull attacks!
Round 16: terrabull attacks!
Round 17: terrabull attacks!
Round 18: terrabull attacks!
Round 19: terrabull attacks!
Round 20: terrabull attacks!
Round 21: terrabull attacks!
Round 22: terrabull attacks!
Round 23: terrabull attacks!
Round 24: terrabull attacks!
Round 25: terrabull attacks!
Round 26: terrabull attacks!
Round 27: terrabull attacks!
Round 28: terrabull attacks!
Round 29: terrabull attacks!
Round 30: terrabull attacks!
Round 31: terrabull attacks!
 > 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.
 > 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.

[2158] Battlefield (Hippy Uniform)
Encounter: Sorority Operator
Round 0: terrabull loses initiative!
You lose 49 hit points
Round 1: terrabull attacks!
You lose 3 hit points
You lose 23 hit points
Round 2: terrabull attacks!
You lose 25 hit points
Round 3: terrabull attacks!
Round 4: terrabull attacks!
Round 5: terrabull attacks!
Round 6: terrabull attacks!
Round 7: terrabull attacks!
You lose 24 hit points
Round 8: terrabull attacks!
Round 9: terrabull attacks!
Round 10: terrabull attacks!
Round 11: terrabull attacks!
You lose 23 hit points
Round 12: terrabull attacks!
You lose 24 hit points

cast 1 Leash of Linguini
 > 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 185 HP, 79 of 150 MP, current meat: 381 ... Target HP = 185.

buy 1 Medicinal Herb's medicinal herbs at market price from Smacketeria
You acquire an item: Medicinal Herb's medicinal herbs
You spent 100 Meat

use 1 Medicinal Herb's medicinal herbs
You gain 185 hit points
 > 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.

[2159] Battlefield (Hippy Uniform)
Encounter: War Frat Elite Wartender
Round 0: terrabull loses initiative!
You lose 25 hit points
Round 1: terrabull attacks!
You lose 24 hit points
Round 2: terrabull attacks!
Round 3: terrabull attacks!
You lose 25 hit points
Round 4: terrabull attacks!
You lose 25 hit points
Round 5: terrabull attacks!
You lose 24 hit points
Round 6: terrabull attacks!
Round 7: terrabull attacks!
You lose 24 hit points
Round 8: terrabull attacks!
You lose 24 hit points
Round 9: terrabull attacks!
You lose 24 hit points
 > 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 185 HP, 79 of 150 MP, current meat: 281 ... Target HP = 185.

buy 1 Medicinal Herb's medicinal herbs at market price from Smacketeria
You acquire an item: Medicinal Herb's medicinal herbs
You spent 100 Meat

use 1 Medicinal Herb's medicinal herbs
You gain 185 hit points
 > 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.

[2160] Battlefield (Hippy Uniform)
Encounter: War Frat Elite 110th Captain
Round 0: terrabull loses initiative!
You lose 23 hit points
Round 1: terrabull attacks!
Round 2: terrabull attacks!
Round 3: terrabull attacks!
Round 4: terrabull attacks!
Round 5: terrabull attacks!
You lose 23 hit points
Round 6: terrabull attacks!
Round 7: terrabull attacks!
You lose 23 hit points
Round 8: terrabull attacks!
You lose 22 hit points
Round 9: terrabull attacks!
Round 10: terrabull attacks!
You lose 22 hit points
Round 11: terrabull attacks!
You lose 20 hit points
Round 12: terrabull attacks!
You lose 22 hit points
Round 13: terrabull attacks!
You lose 22 hit points
Round 14: terrabull attacks!
You lose 23 hit points
 > 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 185 HP, 79 of 150 MP, current meat: 181 ... Target HP = 185.

use 1 gauze garter
You gain 96 hit points

use 1 gauze garter
You gain 96 hit points
 > 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.
 
Last edited:

Gdunge

Member
Hi Bale,

Love this script! Thanks for taking the time to create and maintain it.

I am having an issue since I acquired the BRICKO book. Sometimes UR will restore all my mana (usually by buying black cherry soda or going to the nuns), then turn around and spend all my mana on making BRICKOs. Then it notices my mana is gone, buys a bunch of black cherry soda, and summons more BRICKOs. If I sit and watch, this will go on until the BRICKOs are too expensive to summon, and it stops.

If I disable UR, this doesn't happen. I'm also occasionally using Zarquon's FTF and SmartStasis scripts, but not tonight. This time it kicked off when I used the CLI to summon BRICKOs manually. The fight was over and my mana had been restored, and then this: (long listing, sorry)

> cast 10 bricko

Casting Summon BRICKOs 2 times...
You acquire BRICKO brick (3)
You acquire BRICKO brick (3)
Summon BRICKOs was successfully cast.
Restoring MP! Currently at 447 of 447 HP, 80 of 455 MP, current meat: 37928 ... Target MP = 455.
Purchasing black cherry soda (38 @ 80)...
You acquire black cherry soda (38)
You spent 3,040 Meat
Purchases complete.
Using 38 black cherry soda...
You gain 383 Mojo Points
Finished using 38 black cherry soda.
Casting Summon BRICKOs 2 times...
You acquire BRICKO brick (3)
You acquire BRICKO brick (3)
Summon BRICKOs was successfully cast.
Restoring MP! Currently at 447 of 447 HP, 92 of 455 MP, current meat: 34888 ... Target MP = 455.
Purchasing black cherry soda (37 @ 80)...
You acquire black cherry soda (37)
You spent 2,960 Meat
Purchases complete.
Using 37 black cherry soda...
You gain 372 Mojo Points
Finished using 37 black cherry soda.
Casting Summon BRICKOs 2 times...
You acquire BRICKO brick (3)
You acquire BRICKO brick (3)
Summon BRICKOs was successfully cast.
Restoring MP! Currently at 447 of 447 HP, 12 of 455 MP, current meat: 31928 ... Target MP = 455.
Casting Disco Aerobics 12 times...
You acquire an effect: Disco State of Mind (duration: 60 Adventures)
Disco Aerobics was successfully cast.
Get thee to a nunnery!
You gain 1 hit point
You gain 455 Mojo Points
Casting Summon BRICKOs 1 times...
You acquire BRICKO brick (3)
Summon BRICKOs was successfully cast.
Restoring MP! Currently at 447 of 447 HP, 201 of 455 MP, current meat: 31928 ... Target MP = 455.
Purchasing black cherry soda (26 @ 80)...
You acquire black cherry soda (26)
You spent 2,080 Meat
Purchases complete.
Using 26 black cherry soda...
You gain 259 Mojo Points
Finished using 26 black cherry soda.
Casting Summon BRICKOs 1 times...
You acquire BRICKO brick (3)
Summon BRICKOs was successfully cast.
Restoring MP! Currently at 447 of 447 HP, 178 of 455 MP, current meat: 29848 ... Target MP = 455.
Purchasing black cherry soda (28 @ 80)...
You acquire black cherry soda (28)
You spent 2,240 Meat
Purchases complete.
Using 28 black cherry soda...
You gain 278 Mojo Points
Finished using 28 black cherry soda.
Casting Summon BRICKOs 1 times...
You acquire BRICKO brick (3)
Summon BRICKOs was successfully cast.
Restoring MP! Currently at 447 of 447 HP, 154 of 455 MP, current meat: 27608 ... Target MP = 364.
Purchasing black cherry soda (21 @ 80)...
You acquire black cherry soda (21)
You spent 1,680 Meat
Purchases complete.
Using 21 black cherry soda...
You gain 203 Mojo Points
Finished using 21 black cherry soda.
Purchasing black cherry soda (1 @ 80)...
You acquire an item: black cherry soda
You spent 80 Meat
Purchases complete.
Using 1 black cherry soda...
You gain 10 Mojo Points
Finished using 1 black cherry soda.
Casting Summon BRICKOs 1 times...
You acquire BRICKO brick (3)
Summon BRICKOs was successfully cast.

It's kind of entertaining, and I wanted the BRICKOs anyway, but there's apparently something not quite right here.

Let me know if you want more information.

- Gdunge
 

lostcalpolydude

Developer
Staff member
You told mafia to cast 10 bricko. Mafia cast what it could, then it went to restore MP to continue with your request. You have mafia set to use the recovery script, and so on. Maybe cast * bricko would work better? I'm not really sure since letting mafia restore MP for me seems scary.
 

Gdunge

Member
If I'm understanding you correctly, your suggestion is that mafia was trying to summon BRICKOs 10 times, because I told it to. It was set up to use UR as the recovery script, so that's what happened, and I assumed it was UR's fault because I saw UR doing its thing.

Wow, that makes lots of sense. Hmmm. Some testing is in order.

I assumed that mafia would only do as many as it could, then stop. (I'm not sure where this assumption came from. Must test.) I typed "cast 10 bricko" because I just wanted as many as I could get without needing to do any tedious math.

I'm not that worried about KoLmafia or a script going bananas on me. I'm kind of playing the metagame of automated ways to play KoL. It's lots of fun for a computer nerd such as myself.

Besides, I'm only risking meat or turns, both of which are readily available and cost no actual money.

Thanks for the suggestion!

- Gdunge
 

zarqon

Well-known member
If you only want to cast as many as you currently can, use * for the quantity, as in

cast * bricko

No tedious math necessary. :)

~Zarqon (without the 'u')
 

Bale

Minion
I keep getting these unable to restore mana errors when trying to summon bricko's

Code:
Summon BRICKOs was successfully cast.
Restoring MP! Currently at 202 of 250 HP, 24 of 533 MP, current meat: 24162667 ... Target MP = 107.
Purchasing magical mystery juice (4 @ 100)...
You acquire magical mystery juice (4)
You spent 400 Meat
Purchases complete.
Using 4 magical mystery juice...
You gain 97 Mana Points
Finished using 4 magical mystery juice.
Casting Summon BRICKOs 1 times...
You acquire BRICKO brick (3)
Summon BRICKOs was successfully cast.
Casting Summon BRICKOs 1 times...
Not enough mana to cast Summon BRICKOs.
Casting Summon BRICKOs 1 times...
Not enough mana to cast Summon BRICKOs.
Casting Summon BRICKOs 1 times...
Not enough mana to cast Summon BRICKOs.
Casting Summon BRICKOs 1 times...
Not enough mana to cast Summon BRICKOs.
Casting Summon BRICKOs 1 times...
Not enough mana to cast Summon BRICKOs.
Casting Summon BRICKOs 1 times...
Not enough mana to cast Summon BRICKOs.

Additional information:

Says Bricko's is only 56 MP to cast and I have 65 mana currently with a max MP of 533...
I don't think that is a fault with my script. My script was called at the beginning of that log and it performed perfectly. Then mafia summoned brickos and never called for recovery again. Perhaps that is a mafia bug.

I've been getting some really bad/unusual results from this script.

One time, I got beaten up w/ Cuncta-whatever and I had 5 hot tub visits for that day.
The script used a tiny house, used the medicinal herbs, and left me needing the cure Cunct myself.
Why would it use both the herbs and the house? That doesn't make any sense, and to top it off I'm in hardcore. Your first post advertised that the script would try to find the most cost effective way and would be sparing on my inventory because it is precious.
As for using a tiny house + medicinal herbs to cure you from being beaten up, that makes perfect sense. It needed the tiny house to cure Beaten Up and the medicinal herb to heal your HP. Concerning Cunctatitis, it isn't going to cure that. If you think there was a better decision, please tell me what you would have liked it to do and if I agree, I'll be overjoyed to change the script.

I let it run yesterday to farm the island war and it spent nearly 5k meat over 150 turns to recover my MP from just thrust smacking twice per battle (and taking a little damage.)
Somehow it managed to spend 2k just today. I have to disable the script because it's just going crazy.

Well I found something. It posted a message for me to adventure elsewhere, but it never actually triggered an abort. It just kept adventuring below my "able-to-hit" threshold and basically spent 20-30 turns while beaten up at a location I couldn't survive. Example in the code box.
Code:
use 1 Medicinal Herb's medicinal herbs
You gain 185 hit points
 > 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.

[2156] Battlefield (Hippy Uniform)
Encounter: Naughty Sorority Nurse
Round 0: terrabull wins initiative!
Round 1: terrabull attacks! (auto-attack)
You lose 4 hit points
Round 2: terrabull attacks!
Round 3: terrabull attacks!
Round 4: terrabull attacks!
2 frat boys defeated; 836 down, 164 left.
You lose 10 hit points
You gain 25 Muscleboundness
You gain 13 Mysteriousness
You gain 13 Smarm
 > 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.
 > 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.

[2157] Battlefield (Hippy Uniform)
Encounter: Naughty Sorority Nurse
Round 0: terrabull loses initiative!
Round 1: terrabull attacks!
Round 2: terrabull attacks!
Round 3: terrabull attacks!
You lose 10 hit points
Round 4: terrabull attacks!
Round 5: terrabull attacks!
Round 6: terrabull attacks!
Round 7: terrabull attacks!
Round 8: terrabull attacks!
Round 9: terrabull attacks!
Round 10: terrabull attacks!
Round 11: terrabull attacks!
Round 12: terrabull attacks!
Round 13: terrabull attacks!
Round 14: terrabull attacks!
Round 15: terrabull attacks!
Round 16: terrabull attacks!
Round 17: terrabull attacks!
Round 18: terrabull attacks!
Round 19: terrabull attacks!
Round 20: terrabull attacks!
Round 21: terrabull attacks!
Round 22: terrabull attacks!
Round 23: terrabull attacks!
Round 24: terrabull attacks!
Round 25: terrabull attacks!
Round 26: terrabull attacks!
Round 27: terrabull attacks!
Round 28: terrabull attacks!
Round 29: terrabull attacks!
Round 30: terrabull attacks!
Round 31: terrabull attacks!
 > 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.
 > 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.

[2158] Battlefield (Hippy Uniform)
Encounter: Sorority Operator
Round 0: terrabull loses initiative!
You lose 49 hit points
Round 1: terrabull attacks!
You lose 3 hit points
You lose 23 hit points
Round 2: terrabull attacks!
You lose 25 hit points
Round 3: terrabull attacks!
Round 4: terrabull attacks!
Round 5: terrabull attacks!
Round 6: terrabull attacks!
Round 7: terrabull attacks!
You lose 24 hit points
Round 8: terrabull attacks!
Round 9: terrabull attacks!
Round 10: terrabull attacks!
Round 11: terrabull attacks!
You lose 23 hit points
Round 12: terrabull attacks!
You lose 24 hit points

cast 1 Leash of Linguini
 > 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 185 HP, 79 of 150 MP, current meat: 381 ... Target HP = 185.

buy 1 Medicinal Herb's medicinal herbs at market price from Smacketeria
You acquire an item: Medicinal Herb's medicinal herbs
You spent 100 Meat

use 1 Medicinal Herb's medicinal herbs
You gain 185 hit points
 > 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.

[2159] Battlefield (Hippy Uniform)
Encounter: War Frat Elite Wartender
Round 0: terrabull loses initiative!
You lose 25 hit points
Round 1: terrabull attacks!
You lose 24 hit points
Round 2: terrabull attacks!
Round 3: terrabull attacks!
You lose 25 hit points
Round 4: terrabull attacks!
You lose 25 hit points
Round 5: terrabull attacks!
You lose 24 hit points
Round 6: terrabull attacks!
Round 7: terrabull attacks!
You lose 24 hit points
Round 8: terrabull attacks!
You lose 24 hit points
Round 9: terrabull attacks!
You lose 24 hit points
 > 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 185 HP, 79 of 150 MP, current meat: 281 ... Target HP = 185.

buy 1 Medicinal Herb's medicinal herbs at market price from Smacketeria
You acquire an item: Medicinal Herb's medicinal herbs
You spent 100 Meat

use 1 Medicinal Herb's medicinal herbs
You gain 185 hit points
 > 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.

[2160] Battlefield (Hippy Uniform)
Encounter: War Frat Elite 110th Captain
Round 0: terrabull loses initiative!
You lose 23 hit points
Round 1: terrabull attacks!
Round 2: terrabull attacks!
Round 3: terrabull attacks!
Round 4: terrabull attacks!
Round 5: terrabull attacks!
You lose 23 hit points
Round 6: terrabull attacks!
Round 7: terrabull attacks!
You lose 23 hit points
Round 8: terrabull attacks!
You lose 22 hit points
Round 9: terrabull attacks!
Round 10: terrabull attacks!
You lose 22 hit points
Round 11: terrabull attacks!
You lose 20 hit points
Round 12: terrabull attacks!
You lose 22 hit points
Round 13: terrabull attacks!
You lose 22 hit points
Round 14: terrabull attacks!
You lose 23 hit points
 > 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 185 HP, 79 of 150 MP, current meat: 181 ... Target HP = 185.

use 1 gauze garter
You gain 96 hit points

use 1 gauze garter
You gain 96 hit points
 > 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.

I'm not sure how that is my fault. Mafia doesn't normally abort for something like that. If you want to adventure while beaten up, that's up to you. Since my script made it's recovery target it considered itself successful. It isn't going to make decisions about how to adventure.

I am having an issue since I acquired the BRICKO book. Sometimes UR will restore all my mana (usually by buying black cherry soda or going to the nuns), then turn around and spend all my mana on making BRICKOs. Then it notices my mana is gone, buys a bunch of black cherry soda, and summons more BRICKOs. If I sit and watch, this will go on until the BRICKOs are too expensive to summon, and it stops.

If I disable UR, this doesn't happen. I'm also occasionally using Zarquon's FTF and SmartStasis scripts, but not tonight. This time it kicked off when I used the CLI to summon BRICKOs manually. The fight was over and my mana had been restored, and then this: (long listing, sorry)

> cast 10 bricko

[... stuff deleted for space ...]

It's kind of entertaining, and I wanted the BRICKOs anyway, but there's apparently something not quite right here.
You asked for it to cast 10 bricko and it did. Perfectly. My script only decided how to heal, it was mafia that kept calling it to do the healing. You tell me that this won't happen if you disable UR. I assume you did that by turning off your healing settings, because if you switching to mafia's default healing it would have done the same. I'm afraid my script is only doing what mafia is telling it to do.
 

Terrabull

Member
I had five hot tub visits, and it preferred to spent money/items above completely free healing.
Especially when I had effects on me (Beaten Up) that required healing and needing a full heal, I would choose 100% of the time to use the hot tub.

I assumed the red text of "not able to cure beaten up" was an error message and meant that it tried to abort. If that is not the case it would be nice to have a setting "abort if can't cure beaten up."
 

Bale

Minion
If you have a spare hot tub visit and need to recover from Beaten Up it should always use the hot tub. I respectfully suggest that you might be mistaken and ask that the next time you think this has happened to you, please check to see if you really do have a spare hot tub visit. If so, please sent my your CLI output so I can try to make some sense of that. It would also help if you typed these lines into your CLI (without clicking on the actual hot tub) so we can see if mafia agrees:

Code:
get _hotTubSoaks

inv VIP Lounge key

If you are Beaten Up, the very first thing it will do is check if you have a spare hot tub visit. If so, it uses it. Always. Perhaps you clan hopped to a place without a VIP room?
 
Edit: Never mind, I am a complete idiot. The issue of being in Bad Moon aftercore may indeed exist, and I'll test it out tomorrow with actual fights, but of course what was happening to me was just Mafia auto-removing bad status effects! No recovery was called for, so it had nothing to do with UR... Silly me!

I may be having a similar issue, although I have a guess as to what is causing it for me:
Code:
[1815] Itznotyerzitz Mine (in Disguise)
You lose 209 hit points
Pulling items from storage...
Using soft green whatever...
Beaten Up removed.

Background: I broke the prism in Bad Moon today and am still under that sign. However, now that I have broken the prism, I am allowed back into the V.I.P. Room. I've verified this by soaking myself through the relay browser, which Mafia reflects:
Code:
> get _hotTubSoaks

1
So I've checked your code, and yep, since I am still in Bad Moon it doesn't think I can access the hot tub. Perhaps the "kingLiberated" preference could be checked as well if in Bad Moon?

Oh, the joy of corner cases!

(I don't know if this has anything to do with the other report. The username "Terrabull" is not in Bad Moon, so probably not.)
 
Last edited:

Bale

Minion
So I've checked your code, and yep, since I am still in Bad Moon it doesn't think I can access the hot tub. Perhaps the "kingLiberated" preference could be checked as well if in Bad Moon?

Interesting. I wonder if Terrabull's character was also in bad moon... Anyway, your suggestion has great merit so I'll add that check.

Update to v3.53 will be released sometime next week. In the meantime you can use the version I'm attaching to this post.

Edit: Deleted attachment
 
Last edited:

kitzschenius

New member
The drum machine/wormride thingy, mentioned earlier over here, keeps on happening to me from ascension to ascension, even though the script shouldn't be doing a thing while I'm in HC (and other than that doesn't, as far as I can tell). Particularly annoying when limited resources such as palm fronds are used.

Any way to stop that from happening, apart from disabling the whole script?

--

Here's the GCLI output:

[706] Desert (Ultrahydrated)
Encounter: The Sleeper Has Awakened

The Sleeper Has Awakened

You acquire an item: worm-riding hooks
Wielding worm-riding hooks...
Equipment changed.
2732 prices updated from http://zachbardon.com/mafiatools/updateprices.php?action=getmap
5 prices updated from http://nixietube.info/mallprices.txt
Pricelist updated.
_meatpermp => 8.0
_meatperhp => 6.6666665
_version_BalesUniversalRecovery => 3.52
Restoring HP! Currently at 257 of 406 HP, 71 of 132 MP, current meat: 3312 ... Target HP = 406.
Using 2 palm frond...
You acquire an item: palm-frond fan
Finished using 2 palm frond.
Using 1 palm-frond fan...
You gain 36 hit points
You gain 35 Muscularity Points
Finished using 1 palm-frond fan.
Using 1 fizzy potion of healing...
You gain 14 hit points
You gain 14 Muscularity Points
Finished using 1 fizzy potion of healing.
Purchasing Doc Galaktik's Ailment Ointment (6 @ 60)...
You acquire Doc Galaktik's Ailment Ointment (6)
You spent 360 Meat
Purchases complete.
Using 6 Doc Galaktik's Ailment Ointment...
You gain 56 hit points
Finished using 6 Doc Galaktik's Ailment Ointment.
Purchasing Doc Galaktik's Ailment Ointment (1 @ 60)...
You acquire an item: Doc Galaktik's Ailment Ointment
You spent 60 Meat
Purchases complete.
Using 1 Doc Galaktik's Ailment Ointment...
You gain 10 hit points
Finished using 1 Doc Galaktik's Ailment Ointment.
Using 1 drum machine...
Don't forget to equip a weapon!
Finished using 1 drum machine.
Wielding Mace of the Tortoise...
Equipment changed.
Holding snake shield...
Equipment changed.
 

Bale

Minion
The drum machine/wormride thingy, mentioned earlier over here, keeps on happening to me from ascension to ascension, even though the script shouldn't be doing a thing while I'm in HC (and other than that doesn't, as far as I can tell). Particularly annoying when limited resources such as palm fronds are used.

Any way to stop that from happening, apart from disabling the whole script?
This has nothing to do with my script. If you disable my script, mafia will still attempt to heal using its default healing methods. KolMafia wants to heal when you use a drum machine because some times it will summon a giant sand-worm.

Though it is possible for my script to refuse to heal, even if mafia wants it to do so. The trick is figuring out when over-riding mafia's instructions are ideal. Unfortunately there is no way for my script to know that mafia is healing because you used a drum machine. However, it could refuse to heal if you have the worm hooks equipped. The problem is that if it does that, what happens to someone who actually tried adventuring with those hooks equipped? Should such a careless person have all of his auto-healing fail?

What do others think about my script over-riding mafia's decision to auto-heal?

Should this be a mafia feature request not to heal if using a drum machine with worm hooks equipped?
 

psly4mne

Member
What do others think about my script over-riding mafia's decision to auto-heal?

Should this be a mafia feature request not to heal if using a drum machine with worm hooks equipped?
There's no reason to ever adventure with the worm hooks, so I think it would be a good idea to refuse to heal if they are equipped. It probably should be a feature of mafia (don't heal if the drum machine isn't going to be a fight), but until then it would be a nice thing to see in Universal Recovery.
 
Top