Universal Recovery Script

Crowther

Active member
I'm glad Bale likes to limit the scope of things. That code isn't really used by very many items. My guess is your file "data/recoveryScript_map_v2.txt" is bad. If any important items are missing from that file, that could cause a divide by zero at 730. Check and see. I think you can safely delete it and it will automatically be downloaded again next time you run UR. You can also find it here.
 
I'm glad Bale likes to limit the scope of things. That code isn't really used by very many items. My guess is your file "data/recoveryScript_map_v2.txt" is bad. If any important items are missing from that file, that could cause a divide by zero at 730. Check and see. I think you can safely delete it and it will automatically be downloaded again next time you run UR. You can also find it here.

Deleted, the file re-downloaded, and the script ran without error. Thank you so much!
 

digitrev

Member
So I'm not entirely certain if this is a UR issue or a mafia issue, but Base Resting MP returns 5.0 if you don't have any housing in your campground. This means that a disco rest will never be used. However, since I have it set to use Chateau resting, this means that my resting MP is considerably higher than that. I've added a simple check to look for chateau mantegna / chateau resting. Here's the helper function
Code:
boolean chateau(){
	return is_unrestricted("Chateau Mantegna") && get_property("chateauAvailable").to_boolean() && get_property("restUsingChateau").to_boolean();
}
And I changed the following code block
Code:
	if(contains_text(mpAutoRecoveryItems, "free disco rest") 
	  && (numeric_modifier("Base Resting MP") >= 10 || bees || chateau()))
		while(to_int(get_property("timesRested")) < total_free_rests()  && my_mp()<target
		  && my_maxmp() - my_mp() >=rest_mp() && (DiscoResting != "hp" || (my_maxhp() - my_hp())/2 >= rest_hp()))
			rest();
 
Hey Bale, I was wondering if you could add in a preference to not abort if failed to cure beaten up. This occurs at the end of the check_restore function. Thanks for the consideration.

Edit: Never mind I found it, sorry!
 
Last edited:

fronobulax

Developer
Staff member
Something in my recovery world generates the following

Restoring HP! Currently at 1088 of 3172 HP, 1788 of 2099 MP, current meat: 1328866 ... Target HP = 3014.
Purchasing Medicinal Herb's medicinal herbs (1 @ 95)...
You spent 95 Meat
You acquire an item: Medicinal Herb's medicinal herbs
Purchases complete.
Medicinal Herb's medicinal herbs must be chewed.
Casting Cannelloni Cocoon 1 times...
You gain 2,084 hit points
Cannelloni Cocoon was successfully cast.

My suspicion is the UR is not chewing the herbs and so tries something else. This might explain why I ended a turtle tamer run with 30+ herbs in inventory several weeks ago and perhaps several other issues that were triggered by the presence of the herbs in inventory. If it is not UR that needs chewing lessons please point me elsewhere, Thanks.
 

fronobulax

Developer
Staff member
Back 8 months ago, you reverted the change Bale made for chewing the herbs to UR.
http://kolmafia.us/showthread.php?1780-Universal-Recovery-Script&p=122667&viewfull=1#post122667

I'm afraid I'm not sure what you are trying to tell me. I am running the latest version of Bale's (r23) and there are no local changes. "revert" is a local to me operation because do not have commit access to UR.

The problem I was trying to describe then was related to availability - it was trying to use them when they could not be purchased and were not in inventory. That situation is specific to a non-muscle class. In this case the logic to decide to use them seems correct, the ability to obtain them is present since this is a muscle class and the issue is that the UR is using "use" and not "chew" (or whatever the exact commands are).
 

Theraze

Active member
Just deleted and reinstalled it from the first post - to make sure that I haven't made any modifications - and the only spot where herbs are specifically called are in lines 1180-1184, and that uses chew.

What MIGHT be happening is that it could possibly be trying to use the herb again in lines 1196-1198, where it simply parses through the entire heal collection and picks one and then uses it. It might need an exception there to eliminate herbs from consideration...
 
Using r23 and set to heal 100%. The script is choosing to cast 15 lasagna bandages instead of 1 cocoon. I have cocoon, lasagna bandages, Tongue of the Walrus and Scrolls of Drastic Healing checked off in KoLmafia, but I guess the script ignores that.

Below is the super verbose log from one attempt to heal.

Code:
Calling Universal Recovery 3.15 for type=HP, amount=325
Restoring HP! Currently at 64 of 325 HP, 353 of 698 MP, current meat: 14233529 ... Target HP = 325.
testing Doc Galaktik's Pungent Unguent...
Could heal 261HP with 66 Doc Galaktik's Pungent Unguent for 1827.0 meat.
Doc Galaktik's Pungent Unguent is now the best for restoring HP.
testing Doc Galaktik's Homeopathic Elixir...
Could heal 261HP with 14 Doc Galaktik's Homeopathic Elixir for 1566.0 meat.
Doc Galaktik's Homeopathic Elixir is now the best for restoring HP.
testing red pixel potion...
Could heal 261HP with 3 red pixel potion for 3355.0363636363636 meat.
testing green pixel potion...
Could heal 261HP with 6 green pixel potion for 5220.0 meat.
testing cast...
Could heal 261HP with 15 cast for 1491.4285714285716 meat.
cast is now the best for restoring HP.
testing tiny house...
Could heal 261HP with 12 tiny house for 2538.8181818181815 meat.
testing phonics down...
Could heal 261HP with 6 phonics down for 1250.625 meat.
phonics down is now the best for restoring HP.
testing scroll of drastic healing...
Could heal 261HP with 1 scroll of drastic healing for 462.0 meat.
scroll of drastic healing is now the best for restoring HP.
testing forest tears...
Could heal 261HP with 35 forest tears for 7621.2 meat.
testing pixellated candy heart...
Could heal 261HP with 58 pixellated candy heart for 11774.0 meat.
testing Medicinal Herb's medicinal herbs...
Cannot use Medicinal Herb's medicinal herbs.
testing bottle of Vangoghbitussin...
Could heal 261HP with 3 bottle of Vangoghbitussin for 2591.73 meat.
testing filthy poultice...
Could heal 261HP with 3 filthy poultice for 443.7 meat.
filthy poultice is now the best for restoring HP.
testing gauze garter...
Could heal 261HP with 3 gauze garter for 443.7 meat.
testing scented massage oil...
Could heal 261HP with 1 scented massage oil for 4500.0 meat.
testing honey-dipped locust...
Could heal 261HP with 8 honey-dipped locust for 1715.142857142857 meat.
testing palm frond...
Could heal 261HP with 14 palm frond for 1305.0 meat.
testing palm-frond fan...
Could heal 261HP with 7 palm-frond fan for 1239.75 meat.
testing ancient Magi-Wipes...
Could heal 261HP with 5 ancient Magi-Wipes for 987.0545454545454 meat.
testing mummy wrapping...
Could heal 261HP with 5 mummy wrapping for 1423.6363636363635 meat.
testing really thick bandage...
Could heal 261HP with 3 really thick bandage for 474.5454545454545 meat.
testing plump juicy grub...
testing cotton candy cone...
Could heal 261HP with 7 cotton candy cone for 1204.6153846153848 meat.
testing cotton candy pinch...
Could heal 261HP with 29 cotton candy pinch for 5075.0 meat.
testing cotton candy smidgen...
Could heal 261HP with 16 cotton candy smidgen for 32225.823529411766 meat.
testing cotton candy skoshe...
Could heal 261HP with 12 cotton candy skoshe for 6426.4 meat.
testing cotton candy plug...
Could heal 261HP with 10 cotton candy plug for 1053.157894736842 meat.
testing cotton candy pillow...
Could heal 261HP with 6 cotton candy pillow for 4042.941176470588 meat.
testing cotton candy bale...
Could heal 261HP with 5 cotton candy bale for 21219.51219512195 meat.
testing dueling turtle...
Could heal 261HP with 18 dueling turtle for 16999.8 meat.
testing ancient turtle shell powder...
Could heal 261HP with 3 ancient turtle shell powder for 159500.0 meat.
testing sugar shard...
Could heal 261HP with 18 sugar shard for 1739.9999999999998 meat.
testing Pokëmann band-aid...
Could heal 261HP with 3 Pokëmann band-aid for 508.95 meat.
testing Notes from the Elfpocalypse, Chapter I...
Could heal 261HP with 8 Notes from the Elfpocalypse, Chapter I for 1491.4285714285716 meat.
testing Notes from the Elfpocalypse, Chapter II...
Could heal 261HP with 8 Notes from the Elfpocalypse, Chapter II for 1491.4285714285716 meat.
testing Notes from the Elfpocalypse, Chapter III...
Could heal 261HP with 8 Notes from the Elfpocalypse, Chapter III for 1491.4285714285716 meat.
testing Notes from the Elfpocalypse, Chapter IV...
Could heal 261HP with 8 Notes from the Elfpocalypse, Chapter IV for 1491.4285714285716 meat.
testing Notes from the Elfpocalypse, Chapter V...
Could heal 261HP with 8 Notes from the Elfpocalypse, Chapter V for 1491.4285714285716 meat.
testing Notes from the Elfpocalypse, Chapter VI...
Could heal 261HP with 8 Notes from the Elfpocalypse, Chapter VI for 1491.4285714285716 meat.
testing elven medi-pack...
Could heal 261HP with 3 elven medi-pack for 870.0 meat.
testing magnolia blossom...
Could heal 261HP with 14 magnolia blossom for 1373.6842105263158 meat.
testing Camp Scout pup tent...
Could heal 261HP with 1 Camp Scout pup tent for 92.655 meat.
Camp Scout pup tent is now the best for restoring HP.
testing pixel energy tank...
Could heal 261HP with 1 pixel energy tank for 4959.0 meat.
testing cartoon heart...
Could heal 261HP with 6 cartoon heart for 835.1999999999999 meat.
testing red potion...
Could heal 261HP with 3 red potion for 3836.7 meat.
testing extra-strength red potion...
Could heal 261HP with 2 extra-strength red potion for 13050.0 meat.
In mallmode, best HP restorative is: Camp Scout pup tent @ 92.655 meat total.
testing Knob Goblin seltzer...
Could heal 174MP with 18 Knob Goblin seltzer for 1322.3999999999999 meat.
Knob Goblin seltzer is now the best for restoring MP.
testing Knob Goblin superseltzer...
Could heal 174MP with 7 Knob Goblin superseltzer for 663.7777777777778 meat.
Knob Goblin superseltzer is now the best for restoring MP.
testing Dyspepsi-Cola...
Could heal 174MP with 15 Dyspepsi-Cola for 1508.0 meat.
testing Mountain Stream soda...
Could heal 174MP with 5 Mountain Stream soda for 696.0 meat.
testing blue pixel potion...
Could heal 174MP with 3 blue pixel potion for 2944.6153846153843 meat.
testing green pixel potion...
Could heal 174MP with 5 green pixel potion for 4971.428571428572 meat.
testing magical mystery juice...
Could heal 174MP with 6 magical mystery juice for 570.4918032786885 meat.
magical mystery juice is now the best for restoring MP.
testing tiny house...
Could heal 174MP with 8 tiny house for 1692.5454545454545 meat.
testing phonics down...
Could heal 174MP with 4 phonics down for 833.75 meat.
testing Blatantly Canadian...
Could heal 174MP with 8 Blatantly Canadian for 1160.0 meat.
testing Wint-O-Fresh mint...
Could heal 174MP with 44 Wint-O-Fresh mint for 4350.0 meat.
testing soda water...
Could heal 174MP with 44 soda water for 2871.0 meat.
testing Cloaca-Cola...
Could heal 174MP with 15 Cloaca-Cola for 1508.0 meat.
testing tonic water...
Could heal 174MP with 5 tonic water for 2579.5499999999997 meat.
testing Cherry Cloaca Cola...
Could heal 174MP with 22 Cherry Cloaca Cola for 2175.0 meat.
testing Diet Cloaca Cola...
Could heal 174MP with 22 Diet Cloaca Cola for 2175.0 meat.
testing Regular Cloaca Cola...
Could heal 174MP with 22 Regular Cloaca Cola for 1653.0 meat.
testing unrefined Mountain Stream syrup...
Could heal 174MP with 4 unrefined Mountain Stream syrup for 1265.4545454545455 meat.
testing bottle of Vangoghbitussin...
Could heal 174MP with 2 bottle of Vangoghbitussin for 1727.82 meat.
testing bottle of Monsieur Bubble...
Could heal 174MP with 4 bottle of Monsieur Bubble for 696.0 meat.
testing carbonated soy milk...
Could heal 174MP with 3 carbonated soy milk for 788.8 meat.
testing natural fennel soda...
Could heal 174MP with 2 natural fennel soda for 680.34 meat.
testing banana spritzer...
Could heal 174MP with 3 banana spritzer for 4598.571428571428 meat.
testing Monstar energy beverage...
Could heal 174MP with 3 Monstar energy beverage for 696.0 meat.
testing New Cloaca-Cola...
Could heal 174MP with 2 New Cloaca-Cola for 1288.76 meat.
testing six-pack of New Cloaca-Cola...
Could heal 174MP with 1 six-pack of New Cloaca-Cola for 1546.28 meat.
testing honey-dipped locust...
Could heal 174MP with 6 honey-dipped locust for 1160.0 meat.
testing carbonated water lily...
Could heal 174MP with 3 carbonated water lily for 663.876923076923 meat.
testing palm frond...
Could heal 174MP with 9 palm frond for 869.9999999999999 meat.
testing palm-frond fan...
Could heal 174MP with 5 palm-frond fan for 826.4999999999999 meat.
testing ancient Magi-Wipes...
Could heal 174MP with 4 ancient Magi-Wipes for 658.0363636363636 meat.
testing black cherry soda...
Could heal 174MP with 18 black cherry soda for 1322.3999999999999 meat.
testing delicious shimmering moth...
testing cotton candy cone...
Could heal 174MP with 5 cotton candy cone for 803.0769230769231 meat.
testing cotton candy pinch...
Could heal 174MP with 15 cotton candy pinch for 2537.5 meat.
testing cotton candy smidgen...
Could heal 174MP with 11 cotton candy smidgen for 21483.882352941175 meat.
testing cotton candy skoshe...
Could heal 174MP with 8 cotton candy skoshe for 4284.266666666666 meat.
testing cotton candy plug...
Could heal 174MP with 7 cotton candy plug for 702.1052631578948 meat.
testing cotton candy pillow...
Could heal 174MP with 4 cotton candy pillow for 2695.2941176470586 meat.
testing cotton candy bale...
Could heal 174MP with 3 cotton candy bale for 14146.341463414634 meat.
testing high-pressure seltzer bottle...
Could heal 174MP with 1 high-pressure seltzer bottle for 1680.3428571428572 meat.
testing Nardz energy beverage...
Could heal 174MP with 3 Nardz energy beverage for 736.1538461538461 meat.
testing sugar shard...
Could heal 174MP with 24 sugar shard for 2320.0 meat.
testing Wolfman Nardz...
Could heal 174MP with 1 Wolfman Nardz for 13919.999999999998 meat.
testing Notes from the Elfpocalypse, Chapter I...
Could heal 174MP with 5 Notes from the Elfpocalypse, Chapter I for 994.2857142857143 meat.
testing Notes from the Elfpocalypse, Chapter II...
Could heal 174MP with 5 Notes from the Elfpocalypse, Chapter II for 994.2857142857143 meat.
testing Notes from the Elfpocalypse, Chapter III...
Could heal 174MP with 5 Notes from the Elfpocalypse, Chapter III for 994.2857142857143 meat.
testing Notes from the Elfpocalypse, Chapter IV...
Could heal 174MP with 5 Notes from the Elfpocalypse, Chapter IV for 994.2857142857143 meat.
testing Notes from the Elfpocalypse, Chapter V...
Could heal 174MP with 5 Notes from the Elfpocalypse, Chapter V for 994.2857142857143 meat.
testing Notes from the Elfpocalypse, Chapter VI...
Could heal 174MP with 5 Notes from the Elfpocalypse, Chapter VI for 994.2857142857143 meat.
testing elven magi-pack...
Could heal 174MP with 4 elven magi-pack for 1160.0 meat.
testing cup of hickory chicory...
Could heal 174MP with 5 cup of hickory chicory for 1000.4999999999999 meat.
testing magnolia blossom...
Could heal 174MP with 11 magnolia blossom for 1054.5454545454545 meat.
testing pixel energy tank...
Could heal 174MP with 1 pixel energy tank for 3305.9999999999995 meat.
testing gold star...
Could heal 174MP with 7 gold star for 696.0 meat.
testing blue potion...
Could heal 174MP with 4 blue potion for 689.04 meat.
testing fancy blue potion...
Cannot use fancy blue potion.
testing creepy ginger ale...
Could heal 174MP with 5 creepy ginger ale for 669.9 meat.
testing Doc Galaktik's Invigorating Tonic...
Could heal 174MP with 18 Doc Galaktik's Invigorating Tonic for 1478.9999999999998 meat.
In mallmode, best MP restorative is: magical mystery juice @ 570.4918032786885 meat total.
Mall price to restore 14MP is 44 meat.
Cast a healing skill.
Casting Lasagna Bandages 13 times...
You gain 260 hit points
Lasagna Bandages was successfully cast.
Current HP: 324, MP: 249
testing Doc Galaktik's Pungent Unguent...
Could heal 1HP with 1 Doc Galaktik's Pungent Unguent for 7.0 meat.
Doc Galaktik's Pungent Unguent is now the best for restoring HP.
testing Doc Galaktik's Homeopathic Elixir...
Could heal 1HP with 1 Doc Galaktik's Homeopathic Elixir for 6.0 meat.
Doc Galaktik's Homeopathic Elixir is now the best for restoring HP.
testing red pixel potion...
Could heal 1HP with 1 red pixel potion for 12.854545454545454 meat.
testing green pixel potion...
Could heal 1HP with 1 green pixel potion for 20.0 meat.
testing cast...
Could heal 1HP with 1 cast for 5.714285714285714 meat.
cast is now the best for restoring HP.
testing tiny house...
Could heal 1HP with 1 tiny house for 9.727272727272728 meat.
testing phonics down...
Could heal 1HP with 1 phonics down for 4.791666666666666 meat.
phonics down is now the best for restoring HP.
testing scroll of drastic healing...
Could heal 1HP with 1 scroll of drastic healing for 462.0 meat.
testing forest tears...
Could heal 1HP with 1 forest tears for 29.2 meat.
testing pixellated candy heart...
Could heal 1HP with 1 pixellated candy heart for 45.11111111111111 meat.
testing Medicinal Herb's medicinal herbs...
Cannot use Medicinal Herb's medicinal herbs.
testing bottle of Vangoghbitussin...
Could heal 1HP with 1 bottle of Vangoghbitussin for 9.93 meat.
testing filthy poultice...
Could heal 1HP with 1 filthy poultice for 1.7 meat.
filthy poultice is now the best for restoring HP.
testing gauze garter...
Could heal 1HP with 1 gauze garter for 1.7 meat.
testing scented massage oil...
Could heal 1HP with 1 scented massage oil for 4500.0 meat.
testing honey-dipped locust...
Could heal 1HP with 1 honey-dipped locust for 6.571428571428571 meat.
testing palm frond...
Could heal 1HP with 1 palm frond for 5.0 meat.
testing palm-frond fan...
Could heal 1HP with 1 palm-frond fan for 4.75 meat.
testing ancient Magi-Wipes...
Could heal 1HP with 1 ancient Magi-Wipes for 3.7818181818181817 meat.
testing mummy wrapping...
Could heal 1HP with 1 mummy wrapping for 5.454545454545454 meat.
testing really thick bandage...
Could heal 1HP with 1 really thick bandage for 1.8181818181818181 meat.
testing plump juicy grub...
testing cotton candy cone...
Could heal 1HP with 1 cotton candy cone for 4.615384615384615 meat.
testing cotton candy pinch...
Could heal 1HP with 1 cotton candy pinch for 19.444444444444443 meat.
testing cotton candy smidgen...
Could heal 1HP with 1 cotton candy smidgen for 123.47058823529412 meat.
testing cotton candy skoshe...
Could heal 1HP with 1 cotton candy skoshe for 24.622222222222224 meat.
testing cotton candy plug...
Could heal 1HP with 1 cotton candy plug for 4.035087719298246 meat.
testing cotton candy pillow...
Could heal 1HP with 1 cotton candy pillow for 15.490196078431373 meat.
testing cotton candy bale...
Could heal 1HP with 1 cotton candy bale for 81.30081300813009 meat.
testing dueling turtle...
Could heal 1HP with 1 dueling turtle for 65.13333333333333 meat.
testing ancient turtle shell powder...
Could heal 1HP with 1 ancient turtle shell powder for 611.1111111111111 meat.
testing sugar shard...
Could heal 1HP with 1 sugar shard for 6.666666666666667 meat.
testing Pokëmann band-aid...
Could heal 1HP with 1 Pokëmann band-aid for 1.95 meat.
testing Notes from the Elfpocalypse, Chapter I...
Could heal 1HP with 1 Notes from the Elfpocalypse, Chapter I for 5.714285714285714 meat.
testing Notes from the Elfpocalypse, Chapter II...
Could heal 1HP with 1 Notes from the Elfpocalypse, Chapter II for 5.714285714285714 meat.
testing Notes from the Elfpocalypse, Chapter III...
Could heal 1HP with 1 Notes from the Elfpocalypse, Chapter III for 5.714285714285714 meat.
testing Notes from the Elfpocalypse, Chapter IV...
Could heal 1HP with 1 Notes from the Elfpocalypse, Chapter IV for 5.714285714285714 meat.
testing Notes from the Elfpocalypse, Chapter V...
Could heal 1HP with 1 Notes from the Elfpocalypse, Chapter V for 5.714285714285714 meat.
testing Notes from the Elfpocalypse, Chapter VI...
Could heal 1HP with 1 Notes from the Elfpocalypse, Chapter VI for 5.714285714285714 meat.
testing elven medi-pack...
Could heal 1HP with 1 elven medi-pack for 3.3333333333333335 meat.
testing magnolia blossom...
Could heal 1HP with 1 magnolia blossom for 5.263157894736842 meat.
testing Camp Scout pup tent...
Could heal 1HP with 1 Camp Scout pup tent for 0.355 meat.
Camp Scout pup tent is now the best for restoring HP.
testing pixel energy tank...
Could heal 1HP with 1 pixel energy tank for 19.0 meat.
testing cartoon heart...
Could heal 1HP with 1 cartoon heart for 3.2 meat.
testing red potion...
Could heal 1HP with 1 red potion for 14.700000000000001 meat.
testing extra-strength red potion...
Could heal 1HP with 1 extra-strength red potion for 50.0 meat.
In mallmode, best HP restorative is: Camp Scout pup tent @ 0.355 meat total.
testing Knob Goblin seltzer...
Could heal 174MP with 18 Knob Goblin seltzer for 1322.3999999999999 meat.
Knob Goblin seltzer is now the best for restoring MP.
testing Knob Goblin superseltzer...
Could heal 174MP with 7 Knob Goblin superseltzer for 663.7777777777778 meat.
Knob Goblin superseltzer is now the best for restoring MP.
testing Dyspepsi-Cola...
Could heal 174MP with 15 Dyspepsi-Cola for 1508.0 meat.
testing Mountain Stream soda...
Could heal 174MP with 5 Mountain Stream soda for 696.0 meat.
testing blue pixel potion...
Could heal 174MP with 3 blue pixel potion for 2944.6153846153843 meat.
testing green pixel potion...
Could heal 174MP with 5 green pixel potion for 4971.428571428572 meat.
testing magical mystery juice...
Could heal 174MP with 6 magical mystery juice for 570.4918032786885 meat.
magical mystery juice is now the best for restoring MP.
testing tiny house...
Could heal 174MP with 8 tiny house for 1692.5454545454545 meat.
testing phonics down...
Could heal 174MP with 4 phonics down for 833.75 meat.
testing Blatantly Canadian...
Could heal 174MP with 8 Blatantly Canadian for 1160.0 meat.
testing Wint-O-Fresh mint...
Could heal 174MP with 44 Wint-O-Fresh mint for 4350.0 meat.
testing soda water...
Could heal 174MP with 44 soda water for 2871.0 meat.
testing Cloaca-Cola...
Could heal 174MP with 15 Cloaca-Cola for 1508.0 meat.
testing tonic water...
Could heal 174MP with 5 tonic water for 2579.5499999999997 meat.
testing Cherry Cloaca Cola...
Could heal 174MP with 22 Cherry Cloaca Cola for 2175.0 meat.
testing Diet Cloaca Cola...
Could heal 174MP with 22 Diet Cloaca Cola for 2175.0 meat.
testing Regular Cloaca Cola...
Could heal 174MP with 22 Regular Cloaca Cola for 1653.0 meat.
testing unrefined Mountain Stream syrup...
Could heal 174MP with 4 unrefined Mountain Stream syrup for 1265.4545454545455 meat.
testing bottle of Vangoghbitussin...
Could heal 174MP with 2 bottle of Vangoghbitussin for 1727.82 meat.
testing bottle of Monsieur Bubble...
Could heal 174MP with 4 bottle of Monsieur Bubble for 696.0 meat.
testing carbonated soy milk...
Could heal 174MP with 3 carbonated soy milk for 788.8 meat.
testing natural fennel soda...
Could heal 174MP with 2 natural fennel soda for 680.34 meat.
testing banana spritzer...
Could heal 174MP with 3 banana spritzer for 4598.571428571428 meat.
testing Monstar energy beverage...
Could heal 174MP with 3 Monstar energy beverage for 696.0 meat.
testing New Cloaca-Cola...
Could heal 174MP with 2 New Cloaca-Cola for 1288.76 meat.
testing six-pack of New Cloaca-Cola...
Could heal 174MP with 1 six-pack of New Cloaca-Cola for 1546.28 meat.
testing honey-dipped locust...
Could heal 174MP with 6 honey-dipped locust for 1160.0 meat.
testing carbonated water lily...
Could heal 174MP with 3 carbonated water lily for 663.876923076923 meat.
testing palm frond...
Could heal 174MP with 9 palm frond for 869.9999999999999 meat.
testing palm-frond fan...
Could heal 174MP with 5 palm-frond fan for 826.4999999999999 meat.
testing ancient Magi-Wipes...
Could heal 174MP with 4 ancient Magi-Wipes for 658.0363636363636 meat.
testing black cherry soda...
Could heal 174MP with 18 black cherry soda for 1322.3999999999999 meat.
testing delicious shimmering moth...
testing cotton candy cone...
Could heal 174MP with 5 cotton candy cone for 803.0769230769231 meat.
testing cotton candy pinch...
Could heal 174MP with 15 cotton candy pinch for 2537.5 meat.
testing cotton candy smidgen...
Could heal 174MP with 11 cotton candy smidgen for 21483.882352941175 meat.
testing cotton candy skoshe...
Could heal 174MP with 8 cotton candy skoshe for 4284.266666666666 meat.
testing cotton candy plug...
Could heal 174MP with 7 cotton candy plug for 702.1052631578948 meat.
testing cotton candy pillow...
Could heal 174MP with 4 cotton candy pillow for 2695.2941176470586 meat.
testing cotton candy bale...
Could heal 174MP with 3 cotton candy bale for 14146.341463414634 meat.
testing high-pressure seltzer bottle...
Could heal 174MP with 1 high-pressure seltzer bottle for 1680.3428571428572 meat.
testing Nardz energy beverage...
Could heal 174MP with 3 Nardz energy beverage for 736.1538461538461 meat.
testing sugar shard...
Could heal 174MP with 24 sugar shard for 2320.0 meat.
testing Wolfman Nardz...
Could heal 174MP with 1 Wolfman Nardz for 13919.999999999998 meat.
testing Notes from the Elfpocalypse, Chapter I...
Could heal 174MP with 5 Notes from the Elfpocalypse, Chapter I for 994.2857142857143 meat.
testing Notes from the Elfpocalypse, Chapter II...
Could heal 174MP with 5 Notes from the Elfpocalypse, Chapter II for 994.2857142857143 meat.
testing Notes from the Elfpocalypse, Chapter III...
Could heal 174MP with 5 Notes from the Elfpocalypse, Chapter III for 994.2857142857143 meat.
testing Notes from the Elfpocalypse, Chapter IV...
Could heal 174MP with 5 Notes from the Elfpocalypse, Chapter IV for 994.2857142857143 meat.
testing Notes from the Elfpocalypse, Chapter V...
Could heal 174MP with 5 Notes from the Elfpocalypse, Chapter V for 994.2857142857143 meat.
testing Notes from the Elfpocalypse, Chapter VI...
Could heal 174MP with 5 Notes from the Elfpocalypse, Chapter VI for 994.2857142857143 meat.
testing elven magi-pack...
Could heal 174MP with 4 elven magi-pack for 1160.0 meat.
testing cup of hickory chicory...
Could heal 174MP with 5 cup of hickory chicory for 1000.4999999999999 meat.
testing magnolia blossom...
Could heal 174MP with 11 magnolia blossom for 1054.5454545454545 meat.
testing pixel energy tank...
Could heal 174MP with 1 pixel energy tank for 3305.9999999999995 meat.
testing gold star...
Could heal 174MP with 7 gold star for 696.0 meat.
testing blue potion...
Could heal 174MP with 4 blue potion for 689.04 meat.
testing fancy blue potion...
Cannot use fancy blue potion.
testing creepy ginger ale...
Could heal 174MP with 5 creepy ginger ale for 669.9 meat.
testing Doc Galaktik's Invigorating Tonic...
Could heal 174MP with 18 Doc Galaktik's Invigorating Tonic for 1478.9999999999998 meat.
In mallmode, best MP restorative is: magical mystery juice @ 570.4918032786885 meat total.
Mall price to restore 1MP is 4 meat.
Cast a healing skill.
Casting Lasagna Bandages 1 times...
You gain 29 hit points
Lasagna Bandages was successfully cast.
Current HP: 325, MP: 241
My meat: 14233529. Should be successfully healed...
 
So, I'm not certain if this is a bug with mafia or UR, but I had an odd occurrence earlier today. I was working on getting more bacteria from the fun-guy mansion, and was clicking on the HP value in the charpane to restore between battles. After getting beaten up at one point, I had it restore HP and this was what went through the CLI:
Code:
> restore hp

You've had the crap beaten out of you... attempting to find some more crap.
Visiting Relaxing Hot Tub in clan VIP lounge
You lose an effect: Beaten Up (0)
You gain 1,045 hit points
Did not recover from being Beaten Up!
Now, I'm not sure what it was thinking, as I had in fact removed Beaten Up. What makes me think it's not a mafia thing is that the log only contains
Code:
Visiting Relaxing Hot Tub in clan VIP lounge
You lose an effect: Beaten Up (0)
You gain 1,045 hit points

I can try and see if it will reproduce this, but it's the first time it's happened to me and I won't have more uses of the hot tub until tomorrow.
 
Last edited:

Bale

Minion
That's pretty darn odd because UR checks if mafia believes you have Beaten Up and gives that abort message if mafia says you've got it.
 

VladYvhuce

Member
Placing this where it belongs...

So, I installed Universal Recovery and it gives this error message in the CLI when I try to adventure:
You need 4 more anti-anti-antidote to continue.
Can't cure poison! OOoch! It burns in my veins!
Purchasing some cans of Mountain Stream soda for use as a combat restorative.
You need 4 more Mountain Stream soda to continue.
Did not fully restore HP for some reason.
Shows up in Mafia v17.3 r16933 and r16934.
Here are the effects I have active:
Aspect of the Twinklefairy (10)
Octolus Gift (30)
The Rich Get Richer (30)
Weird Vibrations (30)
Pajama Party (40)
Red Menace (50)
Turkey-Ambitious (133)
Scarysauce (4,204)
☺ Icy Glare (4,263)
Antibiotic Saucesphere (5,343)
Singer's Faithful Ocelot (5,413)
Elemental Saucesphere (8,683)
Jalapeño Saucesphere (18,663)
Spirit of Cayenne (∞)
If I happened to break something this time, it must be something to do with another script. I haven't touched this one. Just installed it from Mafia's script manager.
 

Bale

Minion
I have never heard of that problem before and I have to admit it doesn't make any sense to me. The only way it can return that response is if you are beset with one of the following $effects[Hardly Poisoned at All, A Little Bit Poisoned, Really Quite Poisoned, Somewhat Poisoned, Majorly Poisoned].

There's not a lot of room to be confused about how the code works, especially since nobody has ever seen it fail before, but I'll post the relevant portions of the script in hopes that someone else can perceive a potential problem..

Code:
boolean zombie = my_path() == "Zombie Slayer";

// Will return true if the user is afflicted with any one of a number of $effects[]
boolean beset(boolean [effect] badstuff) {
	foreach e in badstuff
		if(have_effect(e) > 0) return true;
	return false;
}

// This will cure poisoning. It will only fail if the character does not possess an antidote, or can't afford to buy one.
// It will also attempt to keep a few spare anti-anti-antidotes in inventory, for emergency in-combat use.
boolean unpoison() {
	if(zombie)		 // Zombie Masters don't stay poisoned and cannot purchase antidotes.
		return true;

	// Am I poisoned?
	boolean poisoned() {
		return beset($effects[Hardly Poisoned at All, A Little Bit Poisoned, Really Quite Poisoned,
			Somewhat Poisoned, Majorly Poisoned]);
	}
	// Won't purchase antidotes if not allowed to purchase from NPC stores.
	void acquire_antidote(int howmany) {
		if(howmany > item_amount($item[anti-anti-antidote]))
			retrieve_item(howmany, $item[anti-anti-antidote]);
	}
	
	if(poisoned()) {
		if(my_hp() < my_maxhp() /4) {
			if(!hot_tub())
				use(1, $item[anti-anti-antidote]);
		} else
			use(1, $item[anti-anti-antidote]);
		set_autohealing();
	}
	if(my_level() > 4 && buy_npc) 	// There's no reason to stockpile antidotes until level 5, minimum
		switch {
		case my_meat() > 6000: acquire_antidote(4);
			break;
		case my_meat() > 3000: acquire_antidote(3);
			break;
		case my_meat() > 1200: acquire_antidote(2);
			break;
		case my_meat() > 200:  acquire_antidote(1);
		}
	return !poisoned();
}

	if(!unpoison()) print("Can't cure poison! OOoch! It burns in my veins!", "red");
 

xKiv

Active member
Hypothesis: the script went to acquire some antidotes, because (my_level() > 4 && buy_npc) == true, with more than 6000 meat onhand, but retrieve_item(4 antidotes) somehow put mafia in a non-continue state (no idea why) and aborted execution ...
.. but capturing the result value of poisoned() put mafia back into "yes-continue" state, and continued as if poisoned() returned false (the default for boolean).
 

Theraze

Active member
Best guess. Auto satisfy is disabled, but the baleUr_Purchase was not modified to be aware of this. In line 64, buy_npc is set as true even if asw NPCs is off, as long as bU_P is >1. As such, acquire fails to get any items, but doesn't know why, so keeps trying.

Code:
int baleUr_Purchase = get_property("baleUr_Purchase").default_int(3);
boolean buy_mall = baleUr_Purchase > 2 || (baleUr_Purchase == 1 && get_property("autoSatisfyWithMall").to_boolean());
boolean buy_npc = baleUr_Purchase > 1 || (baleUr_Purchase == 1 && get_property("autoSatisfyWithNPCs").to_boolean());
Might I suggest 1 as the default to actually work rather than 3, which means that retrieve_item will fail? Or changing the check to use buy rather than retrieve_item, or at very least not trusting buy_npc...
 
Top