Best Between Battle Script Ever -- formerly AutoMCD

lostcalpolydude

Developer
Staff member
Rinn, I see your point -- but it only applies if you're only adventuring for a mimic, which is impossible to detect in ASH, and you're not likely to gain meat by adventuring, which is difficult to predict. In short, I like the idea but adding it makes certain situations impossible to automate.

If you have the choice adventure set to grab a mimic, then you want a mimic. Otherwise you're throwing away 5k every time you get that noncombat and you should change that setting to not lose meat; if you don't have 5k, then it's a waste of a turn when you can walk away without using an adventure. Even if you're backfarming for ! potions you still probably want to buy a mimic if it shows up.

I see now that you mentioned the idea of someone gaining meat in the DoD in order to buy a wand. Shouldn't they be in the treasury (or some better zone, but the treasury should always be a reasonable option) to get the meat before going to the DoD? The person that tries to gain meat from the DoD for a wand is going to get the adventure on turn 2 and have it in the queue, making the zone much longer.
 

Theraze

Active member
Isn't part of the problem that if you've set the mimic as the goal, choice handling is up to mafia, not BBB?
 

Rinn

Developer
How is the dead mimic impossible to check, it's an item

Code:
> ash is_goal($item[dead mimic])
Returned: true

Either way it's not a big deal.
 

roippi

Developer
@roippi: I think the KoLmafia Tech Support Magic 8-Ball would be a good web app -- maybe I will write it in my spare time. The question is, would there be any other answers? We could get clever and let people type in their questions/problems and then match certain keywords ("stickers", "unknown", etc.), but it's probably funnier with just the one answer. :)

I think it's funnier if that's the only answer. Maybe one more, "ask again later." :)
 

zarqon

Well-known member
it only applies if you're only adventuring for a mimic

You missed the second "only." There may be other concurrent goals, including choiceadvs or autostops, which are impossible to detect in ASH. Aborting in that case would be undesirable.
 

Theraze

Active member
Wouldn't Rinn's abort work better as an unconditional mood? Something like:
PHP:
if (my_location == $location[dungeons of doom] && is_goal($item[dead mimic]) && my_meat() < 5000)
  abort("Go get some meat somewhere else first!");

It just seems like this is one of those times where a mood is better than a script modification, because then Rinn won't have to keep updating and it should do exactly what's desired, for those that desire it... yes?
 

Rinn

Developer
I call bbb from a custom between battle script so I can do custom handling without modifying zarqon's script, also to override a few of the choice adventures he modifies that I don't like the settings of.

I'm not a big fan of unconditional mood triggers because I make a lot of temp moods and I always forget to add the script call in, but that kind of screws me if I'm in the relay browser because between battle scripts don't fire.
 
Last edited:

Bale

Minion
I'm not a big fan of unconditional mood triggers because I make a lot of temp moods and I always forget to add the script call in.

Did you miss THIS amazing update?

I love being able to command mood active, noncom or mood active, orchard
 
Looks like the choice adventure for the Defiled Cranny didn't get updated when the quest was revamped. The new choice adventure there is 523. Locally I've got it changed to this:

Code:
      case $location[defiled cranny]:
         if (item_amount(to_item("Ghuol-B-Gone")) < to_int(vars["bbb_miniboss_items"]))
            friendlyset(523,"3","Get "+vars["bbb_miniboss_items"]+" cans of Ghuol-B-Gone.");
          else friendlyset(523,"4","A swarm of evil whelps.");
         return;
 

zarqon

Well-known member
That also needs a be_good() check. I've got that locally, guess I never posted the update in the state of disorganization that switching computers caused. I'm on it, thanks for the alert.
 

Glazius

Member
I've tweaked the famitems block slightly to account for the xenomorph and mini-hipster, thus:

Code:
   if (have_effect($effect[absinthe-minded]) == 0) dfams[$familiar[green pixie]] = to_int(get_property("_absintheDrops")) - 5;
   dfams[$familiar[baby sandworm]] = to_int(get_property("_aguaDrops")) - 5;
   dfams[$familiar[astral badger]] = to_int(get_property("_astralDrops")) - 5;
   dfams[$familiar[llama lama]] = to_int(get_property("_gongDrops")) - 5;
   dfams[$familiar[rogue program]] = to_int(get_property("_tokenDrops")) - 5;
   dfams[$familiar[li'l xenomorph]] = to_int(get_property("_transponderDrops")) - 5;
   dfams[$familiar[mini-hipster]] = to_int(get_property("_hipsterAdv")) - 7;
   if (dfams contains my_familiar() && dfams[my_familiar()] < 0) return true;
   foreach f,d in dfams if (have_familiar(f) && d < 0) return use_fam(f);
 

divergentdave

New member
I'm doing a Way of the Surprising Fist run, and BestBetweenBattle.ash is trying to autosell meat stacks I get from monster drops, but they get "donated to charity." Could you change line 271 to read as follows?
Code:
if (!can_interact() && my_path() != "Way of the Surprising Fist" ) cli_execute("sell * meat stack; sell * dense meat stack");
 

zarqon

Well-known member
Yes. Can anyone think of any other adjustments needed to this script for Fistcore? I'm about to hop into a Fist run with a multi, so if you don't suggest it I might find it eventually, but then again I haven't had time to attend the running of my scripts lately, so perhaps not.
 

Glazius

Member
Sorry, I should have clarified what I did with the familiar-swapping bit. I subtracted the maximum number of drops (or drop-equivalents) from everything, and then tested for less than zero, instead of just taking the number of drops today and testing for less than 5.

Code:
   if (!to_boolean(vars["bbb_famitems"]) || to_familiar(excise(get_property("taming"),"|","")) != $familiar[none]) return true;
   int[familiar] dfams;
   if (have_effect($effect[absinthe-minded]) == 0) dfams[$familiar[green pixie]] = to_int(get_property("_absintheDrops")) - 5;
   dfams[$familiar[baby sandworm]] = to_int(get_property("_aguaDrops")) - 5;
   dfams[$familiar[astral badger]] = to_int(get_property("_astralDrops")) - 5;
   dfams[$familiar[llama lama]] = to_int(get_property("_gongDrops")) - 5;
   dfams[$familiar[rogue program]] = to_int(get_property("_tokenDrops")) - 5;
   dfams[$familiar[li'l xenomorph]] = to_int(get_property("_transponderDrops")) - 5;
   dfams[$familiar[pair of stomping boots]] = to_int(get_property("_bootStomps")) - 7;
   dfams[$familiar[mini-hipster]] = to_int(get_property("_hipsterAdv")) - 7;
   if (dfams contains my_familiar() && dfams[my_familiar()] < 0) return true;
   foreach f,d in dfams if (have_familiar(f) && d < 0) return use_fam(f);
   return true;
 

Theraze

Active member
Found another Fistcore change... Bedroom:
case $location[haunted bedroom]:
if (have_item("lord spookyraven's spectacles") == 0)
friendlyset(84,"3","Get Spooky's specs from the ornate nightstand.");
else if (my_primestat() == $stat[mysticality] || my_path() == "Way of the Surprising Fist")
friendlyset(84,"2","Get myst stats from the ornate nightstand.");
else friendlyset(84,"1","Get meat from the ornate nightstand.");
return;
Since the meat just goes away, the myst stats are better than nothing.
 

Bale

Minion
Are you saying that the plight of starving orphans in Seaside Town means nothing? You cruel man.
 
Top