Universal Recovery Script

I don't know if this is an error in yoru script or somewhere else but if I click "Use MMJ in stock even if you can't buy any this ascencion" and I do in fact not have any in stock it tries to buy some anyway between each battle. Unticking that box removes the problem.

Thanks for testing the feature. (There were a few changes since I first implemented it and haven't used it since.) You didn't give me much information in your bug report or post a session log of the problem so I had to guess at the details. I found a possibility that it will purchase mmj for combat restoration when it shouldn't and fixed that problem. If it was purchasing mmj for something other than combat use, then please tell me.

I'm attaching v3.601 to this post for you to test out.
 
Last edited:
Sorry for the horrible bug report. It was indeed trying to buy MMJ for combat restoration.

Edit: Yep, that removed the problem.
 
Last edited:
EDIT: First version was me jumping to conclusions. When I installed 3.6 and ate black puddings at the start of the day, I got the following error message before each fight:
Function 'is_integer( string )' undefined (universal_recovery.ash, line 54)
Function 'is_integer( string )' undefined (universal_recovery.ash, line 54)

Thanks for the awesome script btw :)

2nd Edit: Reproduced it on an alt, both times I was using Mafia 14.0
Then I downloaded the last .exe build and the error message doesn't come up anymore.
 
Last edited:
Universal recovery v 3.61 released!
This version requires a recent build of kolMafia: download here!

Changelog:
version 3.61 April 14, 2010
  • fix compatibility with r8382
  • fixed problem with using stockpile of mmj
  • fix verbosity default


Unfortunately this update is necessary for r8382 up, or else you may encounter a runtime error.
 
Last edited:
…so they may not be able to see the bottom of the form.

Won't there be a scroll bar if it goes below the bottom edge?

If you were to actually have your browser window that tiny, then yes, scrolling to the bottom works just fine.

Or anyone using less than 1024x768, or anyone not using the full screen for their browser window (probably quite a few mac users)

Er, what? How's that? I use somewhere around half my screen for my browser window when playing KoL, and with no overlapping windows, the visible browser space (not including menu bar, title bar, toolbar, bookmark bar, tab bar, status bar, or scroll bars) is 1004 x 1068. Wouldn't browser window size have more to do with display resolution and user preference, then with any particular OS?
 
Hey Bale,

Remind me what the policy on using soda water to restore mana was?

On my HC account (that is set up the same way as my aftercore accounts), I had some soda water on hand so that if I summoned paper umbrellas, I'd be (potentially) immediately aware that I could mix some myst boosting drinks as I'm on a Sauceror run. Alternatively, due to my preferred settings, I need to notice that I've summoned umbrellas and then go buy some soda waters to see what I can mix up. I do have access to MMJ.

In this particular instance, I called UR to restore both (as is my habit):

Code:
_meatpermp => 5.0
_meatperhp => 1.4285715
_version_BalesUniversalRecovery => 3.61
Restoring HP! Currently at 79 of 80 HP, 9 of 234 MP, current meat: 12896 ... Target HP = 80.
Restoring MP! Currently at 79 of 80 HP, 9 of 234 MP, current meat: 12896 ... Target MP = 127.
Try to heal MP from inventory.
Using 1 Dyspepsi-Cola...
You gain 13 Mana Points
Finished using 1 Dyspepsi-Cola.
Using 9 soda water...
You gain 37 Mana Points
Finished using 9 soda water.
Last attempt to purchase MP with meat.
Searching for "magical mystery juice"...
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 80 Mana Points
Finished using 4 magical mystery juice.
Casting Tongue of the Walrus 1 times...
You gain 32 hit points
Tongue of the Walrus was successfully cast.
Restoring MP! Currently at 80 of 80 HP, 129 of 234 MP, current meat: 12496 ... Target MP = 234.
Try to heal MP from inventory.
Last attempt to purchase MP with meat.
Searching for "magical mystery juice"...
Purchasing magical mystery juice (6 @ 100)...
You acquire magical mystery juice (6)
You spent 600 Meat
Purchases complete.
Using 6 magical mystery juice...
You gain 118 Mana Points
Finished using 6 magical mystery juice.

So 9 soda water (that I had on hand) = 37 mp. Soda water is 70 meat each, so cost = 630 meat
4 MMJ = 80 mp MMJ is 100 meat each, so cost = 400 meat (to restore about double that the above restored for higher overall cost)

Now I do recall that being in HC, cost is factored differently, but I'd personally like to have the option to disable soda water (and also tonic water) from being used as a restorative since I'd rather have them for drink mixing and not have to buy them for two different purposes. MMJ is only to restore mana so it makes sense that mana restoration is what they are used for. In any event, soda water is not a configurable option in the current GUI version of the script, so that's what brings me here :)

BTW, the character in question is currently lv 10.
Soda water restores 3-5mp averaging 4mp per 70 meat
MMJ restores (1.5 X level) + (4 to 6) = 15+5 = 20 mp avg per 100 meat

If my logic is bad, feel free to enlighten me. I'm not the best number cruncher, but it seems a valid reason to have an option in this case.

Edit: It's my understanding that it doesn't matter what restoratives are selected in mafia's hp/mp usage chart. Your script overides it to use those selected in the GUI version and all else is used freely. Am I wrong in that assumption or do I need to go thru the list in the hp/mp usage within mafia and deselect all that are checked except for those in the GUI interface of your script?
 
Last edited:
Running Mafia 8386 and have "Use MMJ in stock even if it cannot be purchased this ascension" unchecked,

Mafia continues to try and purchase MMJs regardless if "never" is checked under "allow KOLMafia to purchase restoratives"

Thoughts?
 
[Soda waters also shouldn't ever be worth it. Doc's MP-restore pre-quest is slightly cheaper -- 17 meatpermp as opposed to 17.5 meatpermp.]

In the instance two posts up, it looks like it's choosing soda waters because they're currently in inventory. Perhaps this shouldn't always be the case?
 
Remind me what the policy on using soda water to restore mana was?
It won't ever use soda water unless you've already purchased it AND you're in hardcore. Soda water is worse than Doc Galaktik's invigorating tonic, even if you haven't completed the quest. Don't waste meat on soda water you don't need. If you do waste your meat, then it will use them just because they're there and you might have gotten it from a barrel or something.

Edit: It's my understanding that it doesn't matter what restoratives are selected in mafia's hp/mp usage chart. Your script overides it to use those selected in the GUI version and all else is used freely.
This is correct.


Running Mafia 8386 and have "Use MMJ in stock even if it cannot be purchased this ascension" unchecked,

Mafia continues to try and purchase MMJs regardless if "never" is checked under "allow KOLMafia to purchase restoratives"

Thoughts?
in the CLI, tell me the response to

Code:
[COLOR="#808000"]get baleUr_Purchase[/COLOR]
Please confirm for me your current class, level and if you're in hardcore or ronin.
 
Last edited:
Without guild store access, UR shouldn't be trying to buy MMJ. If you want to help out finding the bug, it would be better to leave it closed =)

Try typing set baleUr_Verbosity = 3 in the gCLI, and run the restoration process by typing restore both. If the same problem happens, Bale can try to work out where it's coming from if you paste the resulting output here.
 
The same thing happened when i was ascending my multi, for some reason it kept trying to buy MMJ for an in-combat restore before EVERY adventure taken. it only stopped showing the error when i opened the store.
 
Um. If everyone could quiet down a bit. I believe he was complaining that he wanted my script to STOP purchasing mmj.


Then you are mistaken about setting my script not to purchase restoratives. Perhaps you didn't click the update button. Try again. Select the correct radio button and click update.
 
Just popping in to say I like the new Relay Browser interface.
Is it possible for me to modify Mr. Script to link to that page from the Martini Guy or something? The way I have my top menu laied out the scripts drop-down covers up part of it.
 
Back
Top