You need Zlib, theres a link in the first post!
I modifies a few things, here are the changes:
- added a zlib variable called "autoBasement_get_drops". If set to true, item dropping familiars will be used for combats until they give 5/5 drops (Astral Badger, then Green Pixie, then Llama Lama). A sombrero type will then be used (Baby Sandworm if you have one, or a hovering Sombrero). Default is false.
- I removed the equipment maximizing from increase_stat(), so that its function is only to use potions.
- reverted to using saved outfits for stat tests, the gauntlet and combats. As with Mafia's automatic basementing feature, you should have outfits with these names: "muscle", "mysticality", "moxie", "gauntlet" and "damage". This allows for example to find a good equilibrium between HP and DA for the gauntlet, or tinkering with your combat outfit.
- Damage Absorption from your "gauntlet" outfit will be taken into account when calculating the damage you have to survive.
- the maximizer is used to maximize mp for MP drain tests. I left it this way because I am currently a DB, and when moxie happens to be high, wielding a moxie magnet can be more interesting. This part is easy to comment out.
- for HP and MP drain tests, once you are equipped, the relevant stat will be buffed if needed, taking into account percentage-based HP and MP increasing skills (wisdom etc...).
- changed the way elemental tests are handled:
. "maximize 0.5 elem1 0.5 elem2 res, 0.01 hp, switch Exotic Parrot" is used
. if this is not enough, the appropriate elemental form potion is used, then the maximizer is used again: "maximize elem1 res, 0.01 hp, switch Exotic Parrot"
. if this is still not enough, muscle is buffed to raise your max HP enough (taking into account HP increasing skills)
- added matt.chugg's code to handle levels 100, 200 etc...
For combats, my outfit maximizes moxie and I funksling love songs of naughty innuendo. I'm only on level 360 right now, and testing, maybe it will be necessary to buff moxie to a certain point on higher levels.
That's about where my scripting skills can get me. I would love to see how one could find out the cheapest way to buff a stat up to a certain goal. Maybe I'll try working on that next. Tracking meat spend on potions would be easy to add too.
EDIT: typo in stat buffing goal for MP drain tests.
That would be quite nice indeed. Jason didn't seem to care about it though when I suggested it.Having an ash maximize function which gives the output without actually switching equipment would be nice on page hits too.
There's still one aching problem with the maximizer, namely that its results are not available in a script.
Could you implement something like one of these
item [slot] maximize(string keyword_list) - a full list of equipment that would maximize
string maximize(string keyword_list) - outputs a list of equip, unequip suitable for providing to whatif
Figuring out the cheapest way to buff is going to have to come later, but it is a goal I have for this script. I believe someone else actually just released something that can determine the meat cost for using potions, which should help.On my DB basement run, the maximizer only used the magnet (and moxie boosting equipment) when my moxie happened to be buffed a lot higher than my myst. What I did was just to let him decide what was best given the current buffed stats, and buff more the relevant stat if needed. Maybe deciding which is cheaper to buff could help us decide.
This is exactly how I changed increase_stat() beyond your changes. The issue with what you did is you were passing in an HP value and it was checking if that number was less then or equal to your buffed stat before it stopped using potions, in practically most cases your hp is going to be way higher then your buffed muscle, so it would have been wasting a lot of unnecessary potions at low levels.Edit: oh, and I was asking him to maximize MP, not a stat. That was another reason why I took out the maximizer part of increase_stat() and put it in each test. Maybe a increase_equip() that could handle MP and HP as well as stats would be more flexible.
Whoops, I was checking for true instead of false in the elemental tests, I'll fix this.So I tried to use this script for my basement run today and it seems to be stopping when it gets to an elemental test - it changes equipment and gets out my parrot and then just says:
"unable to pass elemental test, quitting
Unable to continue automating the basement."
and stops.
I can actually beat the test, after it happens I go in and just press the button manually and I pass, so I don't know what's up.
The issue with what you did is you were passing in an HP value and it was checking if that number was less then or equal to your buffed stat before it stopped using potions, in practically most cases your hp is going to be way higher then your buffed muscle, so it would have been wasting a lot of unnecessary potions at low levels.
increase_stat(damage * 100 / hp_mod, $stat[muscle]);
int mp_mod = 100 ;
if ( have_skill($skill[Wisdom of the Elder Tortoises]) )
{
mp_mod = mp_mod + 50 ;
}
if ( have_skill($skill[Marginally Insane]) )
{
mp_mod = mp_mod + 10 ;
}
if ( have_skill($skill[Cosmic Ugnderstanding]) )
{
mp_mod = mp_mod + 5 ;
}
int hp_mod = 100 ;
if ( have_skill($skill[Spirit of Ravioli]) )
{
hp_mod = hp_mod + 25 ;
}
if ( have_skill($skill[Abs of Tin]) )
{
hp_mod = hp_mod + 10 ;
}
if ( have_skill($skill[Gnomish Hardigness]) )
{
hp_mod = hp_mod + 5 ;
}
increase_stat(mp * 100 / mp_mod, $stat[mysticality]);
increase_stat(damage * 100 / hp_mod, $stat[muscle]);
That looks like a problem with the maximizer...Does it happen again when you try relaunching the script?
What happens when you type maximize Muscle, switch Disembodied Hand in the gCLI?
I was going to change the check back to how you had it but I decided to keep it checking direct hp and mp values as there's a ton of modifiers besides the % increasing skills (equipment being the big one) and this will be more accurate without doing a bunch of math. It's really no problem, I overloaded the function so every case that isn't mp and hp can still use the old version without modification.What I was passing on for the gauntlet or elemental tests was:
where hp_mod is the ratio between muscle and hp (due to % increase skills like Ravioli).Code:increase_stat(damage * 100 / hp_mod, $stat[muscle]);
damage * 100 / hp_mod is effectively the amount of muscle needed to have an amount of hp equal to damage.
Edit: I checked v1.4 and I saw you didn't keep mp_mod and hp_mod. If you count on changing increase_stat() in the future, I think it will make your life a little bit easier to pass on only a goal in terms of buffed stat without the "hp" and "mp" switches. The relevant code was:
I only accounted for % increasing skills. To pass on MP or HP as a goal, simply use:Code:int mp_mod = 100 ; if ( have_skill($skill[Wisdom of the Elder Tortoises]) ) { mp_mod = mp_mod + 50 ; } if ( have_skill($skill[Marginally Insane]) ) { mp_mod = mp_mod + 10 ; } if ( have_skill($skill[Cosmic Ugnderstanding]) ) { mp_mod = mp_mod + 5 ; } int hp_mod = 100 ; if ( have_skill($skill[Spirit of Ravioli]) ) { hp_mod = hp_mod + 25 ; } if ( have_skill($skill[Abs of Tin]) ) { hp_mod = hp_mod + 10 ; } if ( have_skill($skill[Gnomish Hardigness]) ) { hp_mod = hp_mod + 5 ; }
I also wanted to apologize if I seem to be trying to be imposing my changes to your script: I am still learning a lot from everyone's work and I'm simply happy to contribute =)Code:increase_stat(mp * 100 / mp_mod, $stat[mysticality]); increase_stat(damage * 100 / hp_mod, $stat[muscle]);