Best Between Battle Script Ever -- formerly AutoMCD

zarqon

Well-known member
Best Between Battle Script Ever

Best Between Battle Script Ever

Ladies and gents, I'm proud to announce the BEST BETWEEN BATTLE SCRIPT EVER! Here's what it does. (Variables mentioned (in this font) can be configured by typing "zlib settingname = value" in the CLI, or by editing your vars_myname.txt file. See what they are set to currently by typing "zlib vars" in the CLI.)

Using/Equipping/Consuming Items
  • It will intelligently drink Lucky Lindies or eat fortune cookies for you depending on your location and your current counters. Details below.
  • It will use items containing goals. This means you can set "1 black pepper" as a goal in the Black Forest, or even "1 meat engine" as a goal at Degrassi Gnoll. Sweet!
  • In the Smut Orc Logging Camp, it will use keepsake boxes, provided you will gain at least bbb_use_keepsakes_for necessary planks and fasteners (total). The default is 3; changing it to a number higher than 10 will disable it.
  • In the Fun House, it will equip Clownosity items as you get them.
  • In the Hidden Hospital, it will equip Surgeonosity items as you get them.
  • In the Mob of Zeppelin Protesters, it will create/equip lynyrd items as possible.
  • It will fight monsteritems that drop goals, including putty monsters, shaking 4-d cameras, and dolphins. This means that if your custom combat script puttied a monster, following that combat this script would automatically keep fighting the putty monster until either goals were met or you ran out of putty uses. It will also fight these monsters if they drop your bounty hunt item, even if it is not explicitly specified as a goal.
  • In the case of dolphins, it will also whistle for them if you have no goals specified and the stolen item is worth more than twice the cost of whistling (you can disable this by setting bbb_dolphin_goodies to false).

Familiar Swapping
  • Includes 100% run protection! If you have specified a familiar for is_100_run, it will make sure you are using that familiar.
  • If bbb_famitems is true (default is false), it will automatically farm daily familiar drops (mushrooms, absinthe, tokens, etc) by making sure you're always using a familiar with undropped items. Of course, this will have no effect if you have a familiar specified for is_100_run.
  • In the FantasyRealm, it will unequip your familiar for you.

Lucky Lindy/Fortune Cookie Details
  • BBB will drink a Lucky Lindy or eat cookies for you depending on your auto_semirare setting. To avoid awkward grammar, the below text uses only "eat cookies" to refer to either drinking a Lucky Lindy or eating a fortune cookie. BBB will prefer to drink a Lucky Lindy if possible as it's by far the more lucrative of the two. There are three valid values:
  • "never": BBB will never eat cookies.
  • "always": BBB will attempt to eat cookies whenever you have no active Fortune Cookie counters.
  • "timely": In tandem with a smart counterScript such as Bale's CounterChecker, this is the optimal method. It will not eat cookies if a) you are not within your semirare window, or 2) you are already adventuring in a zone with a "good" semirare (8 different zones, consult the script if you wish to edit these zones).
  • For any of these values, you can tell BBB the maximum number of cookie counters you want to be active by adding that number (1-3) to the end. For example, with an auto_semirare setting of "always 1", BBB would eat enough cookies to guarantee that you have only one active Fortune Cookie counter.

Auto-MCD
  • Like its forbear AutoMCD, if automcd is true, it will automatically adjust your MCD based on your location's safe moxie value for maximum stat gains. Gain a moxie point? Ding! Up goes the MCD. This is especially useful for low-skilled characters.
  • BBB will try to adjust your MCD so that your moxie is threshold lower than the location's safe moxie. Will skip adjusting for locations with no combats, or MCD-sensitive zones (like certain bosses and the Slime Tube).
  • The default threshold is 4. To change this, type "zlib threshold = value" or "zlib threshold = up" or "zlib threshold = down" in the CLI. You can keep your MCD maxed by setting this to a ridiculously high value, but it would probably be easier to simply disable automcd and set it manually to 10.

How to use it:
  • Install BBB by typing the following in your CLI:
    Code:
    svn checkout https://svn.code.sf.net/p/bestbetweenbattle/code
  • Type "set betweenBattleScript=BestBetweenBattle.ash" in the CLI.
  • To disable this script, simply type "set betweenBattleScript=" in the CLI. However, since you can separately disable/enable almost every component of this script using the relevant script setting, I hope this will be an unlikely event.

Changelog
5.19.08 - ver. 1.0 posted.
5.29.08 - 1.0.1 changes: oops - don't adjust unknown area MCD to 0 if it's already 0.
11.27.08 - Happy Thanksgiving! 1.0.2 changes: don't print anything unless actually changing the MCD. Use "safetyThreshold" setting to allow per-character settings for threshold.
6.14.09 - 1.0.3 changes: move some functions out -- now requires ZLib. Now do once-daily version checking. Account for Hero of the Half-Shell.
7.25.09 - 1.0 changes: It's a new script! Introducing the Best Between Battle Script Ever, with loads of new functionality. Enjoy.
7.28.09 - 1.1 changes: A batch of excellent user-submitted updates! Move auto_mcd() to ZLib. Smash Sonofa Beach gear, apply bbb_miniboss_items to the phylactery, and skip non-mainstat, non-moxie, or small stat gains in the Cyrpt. Thanks Bale and dj_d!
7.31.09 - 1.2 changes: fight putty monsters if they drop your current bounty item, regardless of goals. Fight MechaMechs if you need to.
8.05.09 - 1.3 changes: add haunted library choiceadvs. Don't fight putty monsters if there is a counter expiring or you're Absinthe-Minded < 10.
10.18.09 - 1.4 changes: introduce auto-taming of turtles!! Improve when-to-fight-putty logic. Include more of Bale's changes to the Airship choiceadv. Attempt to maintain diverse base pairs in inventory in the Primordial Soup. Strictly police 100% familiar runs. Improve use of goal-containing items: sped up checking, and now only uses 1 at a time until goals are met, rather than all of them.
11.28.09 - 1.5 changes: add Sea goal-containing items. Automatic dolphin whistling for goals or thingpouches.
12.02/09 - 1.6 changes: smarter dolphin whistling thanks to provocation by Bale.ㅋㅋ Added support for fighting 4-d camera monster. Slight reworking of container item code. Print user-friendly message when adjusting choiceadv.
12.30.09 - 1.7 changes: added handling for planting seeds in Octopus's Garden. Added corpse-looting to Spooky Forest. Use meat stacks and dense meat stacks in HC. Save time in container item code by making it location-sensitive. Use ZLib's new vprint().
1.23.10 - 1.8 changes: use ZLib's new load_current_map(). Add pile of candy to containers.
3.07.10 - 1.9 changes: use ZLib's new has_goal() to drastically simplify use of container items / fighting of monster items. Added Whitey's Grove choiceadv. Slightly reworked fight_items() to make adventures/counter/absinthe-minded checks before fighting any monster item. Consider ULEW's for looting corpses/turtle taming.
4.25.10 - 2.0 changes: has_goal() now returns a float. Yes, major landmark version!
10.19.10 - 2.1 changes: add ability to farm familiar items (automatic familiar swapping). Add smart fortune cookie eating. Totally rework auto-taming to not use goals, and account for taming windows; untested but should be much better. Use best turtle familiar when preparing to tame. Choiceadvs: don't get a picket fence unless it's a goal. Remove Spooky Forest handling for now.
10.20.10 - 2.2 changes: adjust blackberry shoes choiceadv to account for additional choice (galoshes). Don't use pheremones if you'll be unable to tame due to your familiar.
3.13.11 - 2.3 changes: introduced "Reactions" section. Clear checkpoints when swapping familiars. Handle Kegger choiceadv. Equipping pool cue is no longer necessary. Lots of ideas from Bale: Spooky Forest is back. Exchange tokens for tickets if you'll probably need them. Handle Ornate Nightstand choiceadv, Palindome Fleece choiceadv, and new Knob Barracks outfit choiceadv. It's been a while since this was updated, so there are probably some other tweaks which also snuck in there.
3.16.11 - 2.4 changes: closet possibly needed bar skins before adventuring for a spooky sapling. Play smarter with CC for fortune cookie eating.
4.21.11 - 2.5 changes: always use evil eyes in inventory.
8.30.11 - 2.6 changes: tweaks for Bees and Fists, finally. Don't get 'b' Cyrpt items. Don't autosell meat stacks or try to auto-tame Tier 2 or 3 turtles in Fistcore.
7.06.13 - 2.7 changes: Exact names for typed constants. Various other changes which I've not diffed yet -- nor does this incorporate all enhancements suggested in the thread yet. That will come for the SVN release.
8.11.13 - 2.8 changes: Many! Also, BBB is now hosted on SourceForge.


Changes beyond this point may be found on BBB's SourceForge changelog; however, I will continue to make more detailed release notes in this thread.
 
Last edited:

dj_d

Member
Re: AutoMCD -- between-battle script to adjust your MCD for max statgain

Love this script. I wish it worked better with bonerdagon, though; with this active, you can't set the MCD manually when you adventure with him.
 

zarqon

Well-known member
Re: AutoMCD -- between-battle script to adjust your MCD for max statgain

Really? When I adventure manually (relay browser) the betweenBattleScript is not called.
 

dj_d

Member
Re: AutoMCD -- between-battle script to adjust your MCD for max statgain

Who said anything about manually? :)
 

zarqon

Well-known member
Re: AutoMCD -- between-battle script to adjust your MCD for max statgain

Oh, I see what you mean. I would be a big fan of betweenBattle scripts actually only happening between battles. As it is, it's more of a beforeBattle script. Which means if you want to do any single adventures (i.e. boss fights), you have to turn it off. (Which isn't hard, just one line in the CLI. I've set mine as custom buttons -- one to turn it on and one to turn it off.)

Perhaps we could bug the devs to stop the betweenBattle script from running before your first combat. Or at least change the name, since the current name is misleading.
 

Braska

Member
As of mafia version 13.2 this script is no longer working for me.

All I get between battles is a message that says

Adjusting MCD: Unavailable

I tried re-installing it, changing the MCD through the Travel tab, and changing it manually. None of these corrected the problem.
 

StormCrow42

Member
As of mafia version 13.2 this script is no longer working for me.

All I get between battles is a message that says

Adjusting MCD: Unavailable

I tried re-installing it, changing the MCD through the Travel tab, and changing it manually. None of these corrected the problem.

What moon sign are you? If a moxie sign, do you have the meat car in your inventory?
 

Braska

Member
Under a moxie sign, and yes, have meatcar. As I said.. I can adjust the MCD myself through mafia or the relay browser... AutoMCD just wouldn't work itself. The problem is fixed in the latest daily build though. Don't know how, but it's fixed itself.
 

StormCrow42

Member
Here's a slight modification I made to the script to take your muscle into consideration instead of your moxie if you have the Hero skill and are wielding a shield. It seems to provide a decent threshold for the MCD when doing muscle runs.

Edit: This script is now obsolete with the update to the first post.
 

Attachments

  • AutoMCD-hero.ash
    2.5 KB · Views: 230
Last edited:

Raven434

Member
What moon sign are you? If a moxie sign, do you have the meat car in your inventory?

Same issues with newest build 7470. I am a SC under a Moxie zodiac sign. In HC.

Don't have a meat car in my inventory. I untinkered it to make a meat maid.

I can set the MC manually.

Why would the car be a factor? I don't understand the potential relationship.

Thanks!
 
Last edited:

Raven434

Member
Stranger still....

2 'toons I am playing.

1 is SCNP SC w/ Moxie moon
1 is HCNP SC w/ Moxie moon

The HC SC is the one getting the error message.

The SC SC is bueno.

:-/
 

StormCrow42

Member
Why would the car be a factor? I don't understand the potential relationship.

Under the Moxie moon sign, AutoMCD uses the presence of the meat car in your inventory as a sign that you can get to the beach, and therefore to the Annoyotron. You can edit out the detection line if that is a problem.

As for your SC character working fine, the script also detects if you could create a meat car, so perhaps you have enough inventory to do so (or have a meat car).
 

zarqon

Well-known member
At the time of writing, I couldn't see any other way to detect if the beach had been unlocked without costing a server hit. There still isn't, to my knowledge. I didn't like doing that, since I know that many players untinker the car after opening the beach. If you can think of a detection method that accounts for untinkered meatcars yet still doesn't hit the server, I'm all ears! I would love to get rid of that weakness in the script.

I'm soon to be rebranding AutoMCD as I roll some additional functionality into it beyond just MCDing. I have recently rewritten all my scripts to use a per-character script settings map, and I've made a serious bunch of updates to things in the process.

Perhaps later this weekend, I'll have everything ready to roll out.
 

zarqon

Well-known member
Dude... how do I rename this thread? Can it not be done by puny regular users such as I?
 

Bale

Minion
There's a thread renaming time limit. The time limit is set by the forum administrator. (It can range from never to always.) I don't know how long that time limit is on this forum, but until the deadline passes, you can easily rename the thread by just changing it in the first post. After the deadline only a forum moderator can change the thread title.
 

zarqon

Well-known member
In that case, could a forum mod rename this thread? I already renamed the title of the first post. I'd like to keep the version-checking thread number from AutoMCD pointing here, and since this script is replacing AutoMCD I'd also like to avoid creating a new thread.
 

Bale

Minion
Just took a look at what the new script is supposed to do. Holy Crap! Honestly, I think it lives up to its name.

In other news, it is interesting to see some of the many uses you've made of is_goal().
 

zarqon

Well-known member
And I could make so many more uses of it if it returned an int! Alas, it does not... yet.

I'm sure there are some additional choiceadvs and/or items containing items which could be added to this script. I expect time and usage to reveal them, in addition to community-minded script users to report them here! Any suggestions about items-containing-items/choiceadv settings to add are welcome.

EDIT: Okay, so I've already found problems. Evidently, "conditions check" causes an abort state if there are conditions unmet, which is probably a bug. Capturing the result still didn't fix the problem, so I just removed the calls to conditions check. Further, I discovered I can't use betweenBattleScripts to fire between putty fights, so I've made fight_putty() recurse if fighting the putty monster results in another putty monster. I don't want to bump the version number since only two people have downloaded so far, so I've uploaded the (hopefully) fixed version without adjusting the version number.

Hey two people! Download it again!
 
Last edited:

dj_d

Member
Cool stuff! Some thoughts.
Goal = hobo nickel means you skip the market? Why? You might be collecting nickels for item #2 while you're waiting to buy item #1.
Put the mcd calculations in zlib, return the adjustment amount as an int, and then both B3SE and ascend.ash can use it.
Should be bbb_automcd per your own naming convention :). You might want bbb_automcd=false while ascend_automcd=true, for example.
 
Top