Best Between Battle Script Ever -- formerly AutoMCD

Sputnik1

Member
currently I'm having trouble, im pretty sure with this script

Code:
MCD: unavailable

Request 15 of 49 (Friars: Dark Heart of the Woods) in progress...

[439] Dark Heart of the Woods
Encounter: Fallen Archfiend
Strategy: C:\Users\AustinCPC\Desktop\KoL Shit\ccs\sputnik1.ccs [default]
Round 0: sputnik1 loses initiative!
Round 1: sputnik1 attacks!
Round 2: sputnik1 attacks!
Round 3: sputnik1 attacks!
Round 4: sputnik1 attacks!
You gain 117 Meat
You gain 5 Fortitude
You gain 5 Mysteriousness
You gain 6 Smarm

MCD: unavailable

between adventures the script is supposed to be checking to see if my ML is optimized
but it keeps saying that the MCD is unavailable when it most certainly isnt especially when the ascend.ash script changes my ML perfectly
 

zarqon

Well-known member
This has been mentioned several times before. You're a moxie sign and you've untinkered your meatcar to make a maid, and in that case I can't think of a way to check for the availability of the MCD without using a server hit.

However, now that CanAdv stores unlocked locations in a preference, I could include CanAdv in ZLib and use that to detect the unlocked-ness of the beach. That would be quite a sizable addition to ZLib though, and I'm not sure if CanAdv is release-worthy yet.
 

unfako

New member
I'm getting "No available namespace with function: bestbetweenbattle.ash"... anyone an idea what I'm doing wrong?
edit: Oh, forget it. The script name is BestBetweenBattle.ash, not bestbetweenbattle.ash. You might want to adjust your "How to set it up"-Section though, I think I copied it from there like that.
 
Last edited:

Bale

Minion
It's only Unix that has that problem with case sensitivity. The instructions in the first post are properly cased so zarqon has nothing to change. Next time remember that copy-paste wants to be your friend.

Incidentally, while checking that, this bit in the instructions bothered me...
Type "set betweenBattleScript=BestBetweenBattle.ash" in the CLI.
OR
If you also want this script to run while adventuring in the relay browser, you could add it as an unconditional trigger in your mood. Make sure mafia is set to run moods while relay-adventuring in your preferences.
Zarqon, aren't moods checkpointed? If BBB equips a pool cue as part of a mood, then won't it promptly remove that pool cue at the end of the mood check?
 

zarqon

Well-known member
I think Unix's case-sensitivity is a preferable OS behavior. But I wish that mafia would do string matching for "call", as it does with most other commands.

Zarqon, aren't moods checkpointed?

That bit in the instructions was a carryover from AutoMCD. I'll remove it to avoid confusion, although other than gear swapping everything else should still work by using it in a mood.
 

mredge73

Member
Low priory request:

I am not sure if this has been mentioned yet but can AutoMCD be automatically disabled when adventuring in locations where you can get different rewards based on what your ML is? Mostly for Boss Bat since I set my device and then auto-fight the bats then boss bat comes up and I find out that BB has set my mcd to 0 and I didn't get the reward.

Thanks and keep up the good work.
 

zarqon

Well-known member
@edge: Excellent idea. It should probably also abort or delay if you have it set to a non-reward-granting level (other than 0). I'll put that in the next update.

EDIT: This update has been added (to ZLib, where the auto_mcd() function lives), without any abort/delay added in.
 
Last edited:

Rinn

Developer
New bathroom choice adventure:
Code:
      case $location[haunted bathroom]:
         switch (my_primestat()) {                       // Set the new 'Don't Hold a Grudge' to the prime stat choice.
            case $stat[muscle]:
               set_property("choiceAdventure402","1"); break;
            case $stat[mysticality]:
               set_property("choiceAdventure402","2"); break;
            case $stat[moxie]:
               set_property("choiceAdventure402","3"); break;
         }
         // to add: guy made of bees support?
         return;
Zarqon you use really weird spacing for tabs.
 

zarqon

Well-known member
Haha, I use 3-space tabs, not that weird. I do use some unconventional indenting for some things though.

I'd be happy to add this, but what if a non-prime stat was a goal? Perhaps a muscle-class character wants to equip something awesome that requires a bit more myst, and chooses the bathroom as a good leveling spot. This would prevent the person from achieving that goal optimally. I realize this is a comparatively rare situation, but I also think that Veracity is planning to add a "primestat" option to that choiceadv sooner or later, so unless ASH gets better knowledge of goals I'll leave that out.
 

Manxome

New member
The auto-fighting putty monsters made me miss a semi-rare. :( Does it check the counters before fighting?

Here's what happened: I adventured a few times in the Chasm (manually) and puttied the Spam Witch. I then fought one putty'd witch, then my fortune counter expired. In the CLI, I typed "adventure 1 outskirts knob". The BBB Script kicked in and fought the other 3 puttied witches (the bounty was still in the goals, mind you) before adventuring once in the outskirts.

I'd like to see it so instead of auto-fighting the putty, it only fights as many times as you have left to adventure in the putty monster's zone. If I adventure 10 times in the Chasm and putty the witch on the 8th, it should spend the 9th and 10th adventure fighting the putty but not go further than that (I didn't check if this is the case already). Likewise, if I have a witch puttied and adventure elsewhere, it shouldn't fight the putty since I'm obviously not going after that monster right now.

Thanks for this otherwise great script. :)
 

zarqon

Well-known member
Unfortunately, so far as I know there's no way around this without writing an abort into the script, which would interfere with many users' automation. Between battle scripts are misleadingly-named -- they're actually pre-battle scripts. So if you auto-adventure somewhere, you will always adventure there after BBB does its thing, for the number of times you specified (or one more time if you had met goals by puttying). When running the bounty script, if BBB satisfies my bounty goal by fighting putty monsters, mafia still adventures one more time in the bounty location before it is aware that I have obtained my goal and stops. This is not the most desirable behavior, but I don't see a scripting way around it.

The fixable bug here is that BBB should not fight a putty monster if you have an expired cookie counter. I'll put that in the next update.
 

zarqon

Well-known member
Updates!

  • As mentioned in the ZLib thread (or possibly the OCW thread, I forget), with the change to is_100_run (it should now contain a familiar not a boolean), BBB can now police 100% runs. So, after accidentally flubbing my last Kittycore effort WHILE TRAINING MY LAST FAMILIAR BEFORE FIGHTING THE NS, I've very angrily added that in -- BBB will now make sure you are using the familiar specified in is_100_run before adventuring. You can still screw yourself up in the relay browser, but it is an additional measure of security and may help some people.
  • A few changes to the choiceadv section: 1) attempts to keep three different base pairs in your inventory if possible when adventuring in the Primordial Soup. 2) Added a bit more of Bale's choiceadv tweaking for choiceadv182 in the airship.
  • And the big one...

    AUTOMATIC TURTLE TAMING!

    More details in the first post.

Enjoy!
 

Bale

Minion
betweenBattleMood

For those who care, this is my current personal version of this script. :D

Since I'm a relay browser fanatic, mine is designed to be called by the character's mood like this:


It has a few features that aren't in zarqon's script, particularly mana burning. This takes care of mana burning that mafia won't handle. In ronin/hardcore it will burn mana for noodles, reagents and cocktailcrafting. That's important to me since mafia won't do that unless I let it burn mana on skills that aren't in my mood. Out of ronin it will regularly cast librams. Both of these take preference over mafia's desire to cast more buffs since moods happen before regular mana burning.

This script also takes extra care of figuring out the optimal decision for the choice adventure in the airship and maxes out the MCD if you're not relying on moxie to avoid being hit.

It will also set a counter for your organ of steel and your shore item if you've got a full telescope.

zarqon, feel free to add any of that into your version if you like it. I only adapted your work to this form because I love the idea, but want to do my things in my own style. Thanks for giving me the basis.

Edit: Updated to include dolphin whistling: December 4, 2009
 

Attachments

  • betweenBattleMood.ash
    8.4 KB · Views: 44
Last edited:

zarqon

Well-known member
Bale, thanks for sharing!

  • The mana burning looks very useful! I put quite a bit of effort into the mana-burning section of my logout script -- detecting rollover MP, available free MP restores, and castable buffs/summonses. Then it maximizes rollover MP (to a limited extent) and intelligently casts skills, maximizing the use of available free restores, until your MP is <= the point at which rollover will top you off. I think it's just about the best mana burning available, but it's too bulky for this script, so I'm curious to see your solution. Something like it will almost certainly make its way into BBB.
  • Perhaps you didn't notice that almost all of your code for the airship choiceadv is in the current version...?
  • The MCD thing is very easy to deal with by simply adjusting one setting (either by turning off automcd or setting your threshold high). You could probably save a good bit of processing time (in the long run) by simply adjusting those settings based on your class in your postAscensionScript (you can use cli_execute("call zlib automcd = false"); to adjust script settings in ASH).
 

Bale

Minion
Glad you like my mana burning function. I hope you can make some use of it.

As for the airship choiceadv, I don't think that your version really works quite right. You're not considering the possibility that boosted ML will ensure getting stats from mechamechs which give more exp than other fights. Very high ML plus a stat gaining familiar can make that choice superior to the stat choice, even if non-combats are boosted.

Perhaps you're right about handling the MCD. I'll consider it.
 

zarqon

Well-known member
Well, on that score, you're not considering the casual gamer who is more interested in items than stats. I have tried to avoid preventing playstyles where possible -- I would rather the script just not do something than do it in a way that prevents someone from playing the game their way. I consider BBB's current handling of the airship choiceadv something of a compromise in that regard.
 

zarqon

Well-known member
1.5 Updates!

Some Sea-centric updates:

  • Added thingpouch, foodbucket, and mermaid's purse to list of goal-containing items. This allows you to do things like set sand dollars as a condition at the Wreck of Edgar. (emphasis mine)
  • Automatic dolphin whistling! If a dolphin steals either a goal or a thingpouch (and you don't have an active dolphin cooldown counter), BBB will whistle for it. This allows you to automate Sea adventuring without sacrificing possible goods from dolphins.
 
Last edited:
1.5 Updates!

Some Sea-centric updates:

  • Added thingpouch, foodbucket, and mermaid's purse to list of goal-containing items. This allows you to do things like set sand dollars as a condition at the Wreck of Edgar.
  • Automatic dolphin whistling! If a dolphin steals either a goal or a thingpouch (and you don't have an active dolphin cooldown counter), BBB will whistle for it. This allows you to automate Sea adventuring without sacrificing possible goods from dolphins.

(emphasis mine)

You might want to throw in an exception for sand dollars in the automatic whistling, because someone could wind up spending a sand dollar to retrieve one.

And by "someone" I mean me, and by "could" I mean just did.
 
Top