Best Between Battle Script Ever -- formerly AutoMCD

Haha, I was joking, but no harm done by sharing! :)

I'll be starting my official "collection" of them today!
 
A "meat recovery" script, which attempts to keep your available meat above a specified threshold (which would perhaps be a function of your level). It would work exactly like a recovery script but fire every time your meat drops below a certain point. The script would maintain liquid meat by 1) taking available meat from other accessible locations, 2) (creating and) using meat-containing items, and finally 3) autoselling expendable inventory.
I must at this point express my deep and abiding joy that the phrase "liquid meat" has entered the kolmafia lexicon.
 
Wow. That script was buggy as hell. Now i'm embarassed i even posted it. The Bricko Bat part worked magically though.
 
I am in moxie sign and BBB is trying to auto-adjust my MCD but I haven't built my meatcar yet.

MCD: adjusting to 4...
Resetting mind control device...
Mind control device reset.
Server www4.kingdomofloathing.com returned a blank page from gnomes.php. Complain to Jick, not us.
 
This script does not check gnomes.php -- if this is happening, it's due to a mafia command encountering the error, which I believe might qualify as a bug.

In particular, check change_mcd() to see if you get that result outside of a script, i.e. "ash change_mcd(5)"
 
So, I've been tinkering with this script a bit ...

I tend to use the bathroom to level inbetween quests as a myst class and I find myself wishing for some GMOB prep for the L12 quest.

I have a bit of code that gets inserted whenever I use the bathroom to level, so I thought I'd adapt it for BBB and see what you thought. It's not formatted exactly like you write code, and it changes the choiceadv every turn ... but it works.

Code:
	  case $location[haunted bathroom]:
	  // assume that if we're in the bathroom and less than level 12, we probably don't want to activate the GMOB
		 if (!to_boolean(vars["bbb_prep_gmob"]) && to_int(get_property("guyMadeOfBeesCount")) < 4 && my_level() < 11 ) 
		{
		    friendlyset("choiceAdventure105", "3", "Letting you say 'GMOB' to prep you for the battlefield quest." );
		    if (to_int(get_property("guyMadeOfBeesCount")) >= 4)
		    {  
			    friendlyset("choiceAdventure105", "2", "Turning saying 'GMOB' off.");
		    }
		    else
			{
			    friendlyset("choiceAdventure105", "3", "Letting you say 'GMOB' to prep you for the battlefield quest." );
			}
		 }
 
That is so cool. I'll add that in to the next update. Which will be pretty sweet -- container item use will now include all containers in use_for_items! Also, checking putty monsters for goals will consider container items.
 
I tend to use the bathroom to level inbetween quests as a myst class and I find myself wishing for some GMOB prep for the L12 quest.
But if you prep the GMoB, then you'll miss out on tons of mysticality stats! Isn't it better to level up if your reason for being in the Bathroom is to level up? It's not that hard to complete the flyers without using the GMoB.
 
But if you prep the GMoB, then you'll miss out on tons of mysticality stats! Isn't it better to level up if your reason for being in the Bathroom is to level up? It's not that hard to complete the flyers without using the GMoB.

Perhaps you underestimate my laziness here ... plus, at -20% combats, the grudge comes up often enough.

:)
 
Found a strange bug w/ the script. I set the condition to 1 milky potion, and it adventured until I had a dead mimic for some reason. I seem to have a lot of trouble like this w/ scripts.
I also had to disable the turtle taming because it would attempt to tame an infinite number of turtles despite already having one of the zone's turtles when adventuring (underwater).
Is there any way for it to buy a dolphin whistle w/ sand dollars instead of meat? I would prefer that.
Code:
Validating adventure sequence...
Condition set: milky potion of ettin strength
milky potion of ettin strength
Requests complete.

Checking for updates (running ZLib ver. : 15)...
_version_zlib => : 15
You have a current version of ZLib.
Checking for updates (running Best Between Battle Script Ever ver. 1.8)...
_version_automcd => 1.8
You have a current version of Best Between Battle Script Ever.
MCD: adjusting to 10...
Resetting mind control device...
Mind control device reset.

Request 1 of 156 (Dungeon: Dungeons of Doom) in progress...
Changing auto-attack: attack with weapon

[2246] Dungeons of Doom
Encounter: mind flayer
Strategy: attack with weapon
Round 0: terrabull wins initiative!
Round 1: terrabull attacks! (auto-attack)
You lose 10 hit points
You acquire an item: mind flayer corpse
You gain 10 Strengthliness
You gain 5 Magicalness
You gain 4 Sarcasm

Request 2 of 156 (Dungeon: Dungeons of Doom) in progress...

[2247] Dungeons of Doom
Encounter: large kobold
Strategy: attack with weapon
Round 0: terrabull wins initiative!
Round 1: terrabull attacks! (auto-attack)
You lose 10 hit points
You gain 7 Beefiness
You gain 4 Mysteriousness
You gain 7 Roguishness

Request 3 of 156 (Dungeon: Dungeons of Doom) in progress...

[2248] Dungeons of Doom
Encounter: large kobold
Strategy: attack with weapon
Round 0: terrabull wins initiative!
Round 1: terrabull attacks! (auto-attack)
You lose 10 hit points
You gain 12 Beefiness
You gain 5 Magicalness
You gain 3 Smarm

Casting Leash of Linguini 1 times...
You acquire an effect: Leash of Linguini (duration: 10 Adventures)
Leash of Linguini was successfully cast.

Request 4 of 156 (Dungeon: Dungeons of Doom) in progress...

[2249] Dungeons of Doom
Encounter: Quantum Mechanic
Strategy: attack with weapon
Round 0: terrabull wins initiative!
Round 1: terrabull attacks! (auto-attack)
You lose 10 hit points
You acquire an item: large box
You gain 11 Fortitude
You gain 5 Magicalness
You gain 3 Sarcasm

Using 1 large box...
You acquire an item: milky potion of ettin strength
You acquire bubbly potion (2)
You acquire an item: effervescent potion of teleportitis
You acquire dark potion (2)
Finished using 1 large box.

Request 5 of 156 (Dungeon: Dungeons of Doom) in progress...

[2250] Dungeons of Doom
Encounter: Ouch! You bump into a door!
Encounter: mimic
Strategy: attack with weapon
Round 0: terrabull wins initiative!
Round 1: terrabull attacks! (auto-attack)
Round 2: terrabull attacks!
You lose 10 hit points
You acquire an item: dead mimic
You gain 10 Fortitude
You gain 5 Mysteriousness
You gain 7 Smarm

Conditions satisfied after 5 adventures.
 
Last edited:
Is there any way for it to buy a dolphin whistle w/ sand dollars instead of meat? I would prefer that.

Actually, this script checks the price of sand dollars and the price of dolphin whistles. Then, if the sand dollar is cheaper in the mall it purchases the whistle with a sand dollar, even if it has to purchase it.
 
The issue with the mimic actually had nothing to do with the mimic. Between combats, BBB will automatically use items that contain (or may contain) goals. You used a large box and got your goal. The problem was, BBB ran because mafia had told it to adventure -- so after getting your goal, it still adventured one more time before mafia realized that you had satisfied your conditions. There's no way around this spending of an extra adventure -- other than changing mafia to check for goals both before and after running the between-battle script.

About the turtles: you were getting ballast turtles, right? There is no special handling for those, so it should have tried to get bbb_turtles of them, then stopped. What is your bbb_turtles setting, and how many did you have in inventory?

The sand dollar / dolphin whistle purchasing is by design, as Bale pointed out. If you intend to use sand dollars to buy whistles even when that's more costly, then buy some dolphin whistles using your sand dollars before auto-adventuring.
 
There's no way around this spending of an extra adventure -- other than changing mafia to check for goals both before and after running the between-battle script.
Now that we have a BBB that can satisfy goals, that seems reasonable.
 
Ha, so the mimic was purely a coincidence. That's pretty amuzing. Although it does give me a suggestion for BBB. If you have a wand maybe it should change the choice adventure to not get another dead mimic.

I never changed my bbb_turtles setting, so I think it was 1. It is now 0 to prevent it from firing at all. I had at least 1 ballast turtle in my inventory, perhaps more. I let it capture one turtle, thinking it might stop, but then it tried to capture a second, and third. I know because I needed my off hand item to survive, so Mafia kept aborting. (And my Smiling Turtle would be out.)

I must have mixed up some numbers when looking at the prices of sand dollars/whistles. I will make a note of that next time I want to use sand dollars. (A character w/ Busker Do unlocked can sometimes get sand dollars cheaper than mall price.)

Question: What does the 100_run_familiar (or whatever that variable is, sorry) actually do?
 
I must have mixed up some numbers when looking at the prices of sand dollars/whistles. I will make a note of that next time I want to use sand dollars. (A character w/ Busker Do unlocked can sometimes get sand dollars cheaper than mall price.)
Even if they're free you can still sell them at mall price.
 
@Veracity: That would be lovely. Want me to submit the feature request or is this already on your list now?

@Terrabull: Odd about the ballast turtles. Next time I'm swimming I'll see if I can duplicate the problem.

The ZLib setting is_100_run (default: "none") contains the familiar that you want to use for a 100% familiar run. If you specify a familiar for this variable (i.e. "nervous tick"), all of my scripts and hopefully other scripts that use ZLib will not change your familiar from this familiar. Furthermore, if you are using BBB, it will ensure you have that familiar equipped before auto-adventuring anywhere.

Given the name, you may expect it to be a boolean. It used to be, but now it's a familiar. I kept the old name for "legacy" reasons.
 
There's no way around this spending of an extra adventure -- other than changing mafia to check for goals both before and after running the between-battle script.

Veracity already pointed out this could be a possibility, but could there be a way for BBB to stop mafia from adventuring without an actual abort? I guess exit() would just skip to the next pre-adventuring action in the sequence.
 
No -- there's no way to check for the absense of goals (all goals being met, particularly vs. never having goals to begin with) in a script.
 
Back
Top