Page 1 of 9 1 2 3 ... LastLast
Results 1 to 10 of 85

Thread: Recovery Script for Hardcore

  1. #1
    Minion Bale's Avatar
    Join Date
    Jun 2008
    Posts
    13,287

    Default Recovery Script for Hardcore

    In build 6461 JasonHarper added support for user defined recovery scripts to over-ride KoLmafia's HP/MP restoration mechanism. When KolMafia version 12.7 was released on Dec 7, 2008, the feature became part of the official release. As long as your version of kolMafia is 12.7 or later, you can use this script.

    Finally I have a healing script that supports my style of play. If the user is in HC or Ronin and resources are scarce, they must be used efficiently and thoroughly. Since MP are the most valuable resource it will attempt to use healing items rather than waste them. It allows me to play care-freely yet still recover with utmost efficiency, as if I was micromanaging my healing. This script will account for any combination or lack of skills, so it can be used by any character. Truly unskilled characters can even tell it to waste adventures resting at the campground, though that obviously is not recommended for most characters.

    Someone who is used to long softcore farming runs might be a bit dismayed by the scripts propensity to use every single healing item existing in inventory rather than purchase mmj, but the script assumes that meat is valuable and any items in inventory are there for use. If that's a problem, you can put any healing items into your closet to keep the script from using them, but this script is probably not for you, even though you might appreciate the efficient way that it makes use of the nuns. It has a bit of support for aftercore, but really is not primarily intended for that purpose.

    Early discussion of this script's development was in this thread. While I am extremely happy with its current abilities, I am always eager to hear comments and suggestions for improvement. Right now I'm working on a variant for farmers, but it requires a lot more work than you'd suspect.

    To use this script, put hardcore_recoveryScript in the /script directory and put restore_map.txt in the /data directory. Then in the gCLI type:
    set recoveryScript = hardcore_recoveryScript

    If you ever want to turn the script off again, use the gCLI command: set recoveryScript =

    Updates:
    version 1.1 - November 27, 2008
    - Various Bugfixes, Various Optimizations, and reserves healing items to fight your shadow.
    Now will not use restoratives needed to beat the shadow regardless of them being in the closet. It will reserve 4 red pixel potions if you don't have funkslinging or if you do have ambidextrous funkslinging it will reserve 5 gauze garter and/or filthy poultices.

    version 1.2 - December 4, 2008
    - More bugfixes and small improvements.
    Now it expends adventures resting if checked in preferences -- this is not recommended unless your character is very low skill.

    version 1.3 - December 5, 2008
    - Found another bug... pesky things! Killed it.
    - Multi-cast healing skills instead of casting them once, again and again.
    - Will not switch to knob goblin elite guard uniform if that would lower maxMP or HP below current levels.

    version 1.4 - December 18, 2008 -- Alert: This version requires updating the mapfile: recoveryScript_map
    - Will always attempt to keep one combat usable MP recovery item in reserve, just in case of trouble.
    - Some more aftercore/out-of-ronin support:
    - If there is mall access, likes to use canneloni cocoon even when there are items to heal hp.
    - If you have mall access, but don't have a tongue, tiny houses will be used for curing beaten up ONLY,
    that way you can just buy a lot of tiny houses and not worry that they'd be used for healing mp.
    - I learned that the boolean returned by use is less useful than I thought it should be. Oops! Bugfix.

    version 1.5 - December 28, 2008
    - Minor improvements, fixed various and sundry bugs.

    version 1.6 - Jan 15, 2009
    - Many efficiency improvements and bug fixes.
    - Drastically improved healing of small amounts.
    - Now will only use a disco rest if you have a campground dwelling of some sort.

    version 1.6.1 - Jan 15, 2009
    - Fixes two bugs added with the previous update.

    version 1.6.2 - Jan 16, 2009
    - Fixes one more bug added by the previous update.

    version 1.6.3 - Jan 19, 2009
    - I hate this bug more than this bug hates me!

    version 1.7 - Jan 29, 2009
    - Fixed integer round-off bug that was causing the wrong choice of healing skills.

    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.

    version 1.9 - February 20, 2009
    - More fine tuning of the "combat healing" reserve.
    - Properly uses SGEEA when beaten up if you don't have Olfaction or tongue.
    - Fixed problem with using nuns for recovery with the war is still ongoing.
    - What to do when there are only 6 hp left to heal? I figured it out!
    - Cast Canelloni Cocoon instead of 2 Walrus Tongues if both will restore full HP.

    Version 1.99 FINAL - February 26, 2009
    - Reduced CLI feedback since it is irrelevant to most users.
    - Fixed a few bugs and generally perfected it.

    RecoveryScript_map.txt - February 11, 2009
    - Updated to include Nardz energy beverage.

    RecoveryScript_map.txt - February 20, 2009
    - Updated to include cotton candy items.
    Attached Files
    Last edited by Bale; 03-04-2009 at 07:34 AM.
    If people like my scripts, please send me stuffed Hodgmen.
    Universal Recovery, OCD Inventory Control, CounterChecker, newLife, ChIT.

  2. #2
    Minion Bale's Avatar
    Join Date
    Jun 2008
    Posts
    13,287

    Default Re: Recovery Script for Hardcore

    Well I've uploaded a new verison of my recovery script. There were a few bugs that I've fixed (including a silly error with personal massagers). Those bugs are the sort that will definitely make you want to upgrade if you are actually using my script. Is anyone actually using my script?

    There's one new feature: Now it will stubbornly refuse to use healing items that you need to fight your shadow with. It doesn't matter if you put them in your closet or not: those items are completely safe from being used by this script. If you don't have ambidextrous funkslinging then it will assume you need 4 red pixel potions. If you do have funkslinging then it will freely use any rpps for healing and assume that you'll stock up on gauze garters and/or filthy poultices to fight your shadow with. (It saves 5 gauze garters/filthy poutices.)
    If people like my scripts, please send me stuffed Hodgmen.
    Universal Recovery, OCD Inventory Control, CounterChecker, newLife, ChIT.

  3. #3
    Minion Bale's Avatar
    Join Date
    Jun 2008
    Posts
    13,287

    Default Re: Recovery Script for Hardcore

    A newly updated version now available in the first post. More little bugfixes and optimizations. It works better and doesn't screw up in weird situations anymore.

    New Feature: Now it will also allow you to choose to rest at your campsite even if you don't have a free disco nap. I figure some very low skill characters actually need this option, but obviously most people wouldn't want it. This will only take place if it is marked in your HP/MP Usage preferences in your aventure tab so it won't suddenly happen to you unless you were already allowing mafia to do that.

    Next update I'm finally going to fix it to cast tongue multiple times at once instead of this nonsene with 1 cast, 1 cast, 1 cast... I have a character without Cocoon testing this script so I know that it is both time consuming and bloody annoying.

    By the way: Is anyone actually using this? I notice that 12 people seem to have downloaded the last version so I hope some are actually using it or at least dissecting it for ideas to make their own recovery scripts. If it helps you to make your own script, then good for you.

    By the way, if you don't want to see this cluttering up your script directory you can always put it in your base KoL directory instead and use:
    set recoveryScript = ..\\hardcore_recoveryScript

    I personally prefer that since I never call it directly as I do other scripts in that directory. Or you could make a directory for automatically called scripts...
    set recoveryScript = ..\\autoscripts\\hardcore_recoveryScript
    If people like my scripts, please send me stuffed Hodgmen.
    Universal Recovery, OCD Inventory Control, CounterChecker, newLife, ChIT.

  4. #4
    Minion Bale's Avatar
    Join Date
    Jun 2008
    Posts
    13,287

    Default Re: Recovery Script for Hardcore

    Just updated the script again and I'm really pleased with a new feature I added.

    Now, it will actually check to see what your maximum HP and MP would be if you were to change into the guard uniform to purchase knob seltzer. If this will lower either maximum below your current HP/MP, then it will find another way to recover mps. After all, there's no darn point in purchasing seltzer if you have to lose mp to do it.

    This was really bugging me when I was in my War Hippy gear with a wonderwall shield. Big HP boost goes bye-bye every time I bought some seltzer. Heck, just for this one feature it was worth writing the script.
    If people like my scripts, please send me stuffed Hodgmen.
    Universal Recovery, OCD Inventory Control, CounterChecker, newLife, ChIT.

  5. #5
    Junior Member
    Join Date
    Mar 2007
    Posts
    7

    Default Re: Recovery Script for Hardcore

    Thanks for this! I've always been mostly lazy when it came to restoring my HP and MP, but thanks to you I can actually be SMART about it...what a concept.

    Again, thanks for posting this up!
  6. #6
    Minion Bale's Avatar
    Join Date
    Jun 2008
    Posts
    13,287

    Default Re: Recovery Script for Hardcore

    Not to sound pathetic or anything, but quite frankly you made my day by telling me that at least one other person is finding this helpful.

    I would have made this anyway, just for my own use, but I'm still happy.
    If people like my scripts, please send me stuffed Hodgmen.
    Universal Recovery, OCD Inventory Control, CounterChecker, newLife, ChIT.

  7. #7
    Minion asturia's Avatar
    Join Date
    Apr 2006
    Location
    Belgium
    Posts
    199

    Default Re: Recovery Script for Hardcore

    Thanks indeed, it made playing a badmoon run easier.
  8. #8
    Minion Bale's Avatar
    Join Date
    Jun 2008
    Posts
    13,287

    Default Re: Recovery Script for Hardcore

    You're very welcome. Glad I could help your Bad Moon.
    If people like my scripts, please send me stuffed Hodgmen.
    Universal Recovery, OCD Inventory Control, CounterChecker, newLife, ChIT.

  9. #9

    Default Re: Recovery Script for Hardcore

    I created this account just to tell you how damn awesome this is.
  10. #10
    Minion Bale's Avatar
    Join Date
    Jun 2008
    Posts
    13,287

    Default Re: Recovery Script for Hardcore

    Wow. I'd decided to stop posting in response to individual thanks, but that was such an awesome thing to say that I had to post and tell you I'm really glad it's helping you so much.
    If people like my scripts, please send me stuffed Hodgmen.
    Universal Recovery, OCD Inventory Control, CounterChecker, newLife, ChIT.

Similar Threads

  1. Universal Recovery Script
    By Bale in forum Buff Upkeep Scripts
    Replies: 2372
    Last Post: Today, 12:09 PM
  2. KAscend - Hardcore Community Service 3-Day Script
    By Kavokane in forum Turn-Burning Scripts
    Replies: 12
    Last Post: 03-31-2016, 10:09 PM
  3. Anecdote - Recovery Script not firing between auto-adventures?
    By fronobulax in forum Community Support
    Replies: 1
    Last Post: 02-20-2015, 07:36 PM
  4. what are all the ways mafia can consult a script? like recovery, breakfast
    By forgot my password in forum Scripting Discussion
    Replies: 5
    Last Post: 06-11-2009, 09:05 PM
  5. Very New, Need a MP Recovery Script
    By Willie0248 in forum Scripting Discussion
    Replies: 2
    Last Post: 04-15-2006, 09:30 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •