SmartStasis -- a complex script for a simple CCS

If you attack and kill the monster on round 9, your familiar can still act on round 10 (results page). This means up to 1 server hit saved per combat, which is why it was changed from 10 to 9.

My current incarnation parses the round from the page, rather than relying on the passed round number. Unfortunately, you'll just have to wait for it.
 
Ah... that would make sense. Logic. It breaks the brain. :)

Eagerly awaiting the eventual BatMan combat suite. :)
 
I know the code is supposed to properly skip out on non-tool-wielding gremlins, but I was having problems with it trying to stasis them as I'm cursed to get a gremlin juice in BM for my tower entryway. I made the following changes to my stasis function:
PHP:
     // detect non-huckleberries
      if (contains_text(to_string(last_monster()),"Gremlin") &&          // gremlin lacks tool
          (get_property("warProgress") != "started" || get_property("sidequestJunkyardCompleted") != "none" ||
           contains_text(page,"A.M.C. gremlin") || contains_text(page,"does a bombing run") ||
           contains_text(page,"picks a beet") || contains_text(page,"picks a radish") ||
           contains_text(page,"bites you in the fibula") || contains_text(page,"make an automatic eyeball"))) {
         vprint("This gremlin does not have a molybdenum item!","olive",2); break;
Basically, if the war isn't currently set to started there's no way I'm looking for a junkyard part. If the junkyard has been completed, I don't need any tools either.
 
I'm pretty sure it already accounts for the first one by checking if you have the magnet. Do you keep the magnet after the sidequest? I thought not, but perhaps I was wrong.
 
It's possible that the inventory hadn't refreshed, since it was the same session as when I actually ran the quest. Possible that mafia is sloppy with it... It was in the post-war junkyard too, which is a location that should be impossible to require magnetting in anyways.

Edit: Regarding sloppiness, similar to Torso Awareness (doesn't activate the shirt slot in mafia until you do a refresh all or new session, at least during BM) and mosquito larva (again in BM, it hides it though it's still in your inventory, a refresh inv is enough for this one). Minor issues generally...
 
Last edited:
I love the SmartStasis for meat farming, haven't actually tried it outside of that yet. I am currently using farming gear (ok just the Bough) that regens more MP than I am using for the DB combos, I can't find in the script anywhere that calculates the amount of acceptable MP to use/adv. It could easily use both the Rave Nirvana and Disco Nirvana in the same fight, but never uses the Disco Nirvana.

Am I overlooking it?

Donavin
 
It checks to see if the monster officially drops meat first... in this code right here:
PHP:
   if (meat_drop() > 0) {
      dcomb[$effect[disco nirvana],0] = $skill[disco dance of doom];                 // nirvana
      dcomb[$effect[disco nirvana],1] = $skill[disco dance ii: electric boogaloo];
      clist = create_matcher("(.+),(.+),(.+)", get_property("raveCombo2"));          // raveana
      if (clist.find()) { for i from 1 to 3 dcomb[$effect[rave nirvana],i-1] = clist.group(i).to_skill(); }
   }

Later, it checks to see which combos are worth it, like so:
PHP:
      case $effect[rave nirvana]: bonus = 0.5;
      case $effect[disco nirvana]: if (last_monster() == $monster[dirty thieving brigand] && vars["ocw_nunspeed"] == "false") return -mpcost;
         return (bonus*to_float(meat_drop()) - mpcost);

Basically (and bonus is normally .3 in the case of DN) if an additional 30% added on to the base meat drop for the monster is worth more than the cost of running the combo, run it. If it isn't automatically running for you, it's possible that wherever you're farming doesn't think it's fiscally sound to do it. Regardless of whether or not you're regenerating tons of MP for free, it's not officially viable. I know it used to run the combos for me when I was in farmland, so I know it's not broken.

If you want to break the system and tell it to ignore cost, you could remove the - mpcost part of that last bit. That means that if it'll help improve the meat drops ever, it's always worth running the nirvanas. Just be warned that it'll run in the haunted pantry or any other such lowbie zone as well as in the actual farming zones. You'll likely need/want to replace your copy of SS when you change familiars later, just so it doesn't end up burning money needlessly.
 
What I will do, is just add the combo Disco Nirvana after the consult:
consult SmartStasis.ash
combo Disco Nirvana
attack with weapon

This way, I don't break the script, but still add the additional +30...if it already does the combo, I'm only out 12 MP for that adv...and I don't forget to change anything back later.

Donavin
 
Donavin -- thanks for reminding me, I need to consider MP regen when calculating MP costs. Anything above max_mp() - numeric_modifier("Regen Min") is free! I'll make a note to add that in to BatBrain.

Speaking of, I'll probably have a sweet new SS to whip out pretty soon. I was using it today with a newly ascended multi -- it started stasising using Magic Missle and I was like "wtf?" Then I realized that with a 22-lb NPZR and Jingle Jangle, it was profitable to stasis using a 3 MP skill. Awesome!

My current incarnation also submits DB combos as macros, which will speed things up a good bit for farmers. Not too far down the road will be predictive entire-combat macro generation -- one very smart server hit per combat. But not yet -- my action builder is buggy and I'm having trouble tracking down and squashing the little guys.

EDIT: Even more awesome! I leveled up and it started stasising using Toss instead! Because Magic Missile got more costly and started doing more damage. So cool!
 
Last edited:
Yes. I can also be bribed with assistance!

Currently, BatMan's knowledge of some skills is inaccurate, because the function that calculates your regular hit damage is only used for... your regular attack. Ok, and the Smacks, lunging and not. However, there are several other attack skills that result in regular attack damage, often augmented in some way, such as with TT butting skills. My question is bipartate: which skills count as a regular hit for the purposes of, say getting Cunctatitis, or retaliation damage from a cactuary's spines? Of those, which ones include regular attack damage (including any bonus elemental damage) as all or part of the result? This is one of my current tasks.

Another task: many new things have been added to the game since the data files were made. The data files (dmg_*.txt in the Map Manager) need to be updated to include these. I'd imagine that would involve perusing the wiki's item-by-number list, starting at the highest number and going backwards until you find an item that is in the data files.

Now the question is, can you be bribed?
 
Most of this stuff is at least partially included on the wiki. Gimme the format and I'll help! (Ie feel free to tell me "write an ash function that returns a boolean for whether or not a given attack can trigger negative consequence X as a string" or whatever.) Also, I still never see you on Skype. :( I'm not stalking. Exactly. I just really really want to touch base on a few things. ;)
 
The mimic, Cocoabo, and elemental fairies have only ever dropped once per round.

Is the Cocoabo here talking about meat gained through Stasising? If so, I was fairly certain I'd seen it happen more than once in the same combat... Yep, here we go from Crimbco this year:
[5731] CRIMBCO WC
Encounter: Vincentrond Navidad, the Sleigh Bell Ringer
Round 0: Theraze wins initiative!
> Monster value: 0
> Meat/round from Cocoabo: 10.97
> MP/round from Cocoabo: 3.15
> HP/round from Cocoabo: 3.15
> Profit per round: 34.56
Round 1: Theraze uses the facsimile dictionary!
Round 2: Theraze uses the facsimile dictionary!
Round 3: Tog roots around in the ground, and comes up with some Meat. He wings it to you. LIMIT BREAK!
You gain 324 Meat.
Round 3: Theraze uses the facsimile dictionary!
Round 4: Tog roots around in the ground, and comes up with some Meat. He wings it to you.
You gain 104 Meat.
Round 4: Theraze uses the facsimile dictionary!
Round 5: Theraze uses the facsimile dictionary!
Round 6: Theraze uses the facsimile dictionary!
Round 7: Theraze uses the facsimile dictionary!
Round 8: Tog paws at the ground for a second, and then charges your opponent, bashing him for 33 damage.
Round 8: elf hobo takes 33 damage.
Round 8: Theraze uses the facsimile dictionary!
Round 9: Theraze uses the facsimile dictionary!
Round 10: Theraze uses the facsimile dictionary!
Round 11: Theraze executes a macro!
Round 11: Theraze attacks!
Round 12: elf hobo takes 583 damage.
Round 12: Tog squawks loudly and runs in a circle around your opponent. He looks a little bit confused.
Round 12: elf hobo drops 10 attack power.
Round 12: elf hobo drops 10 defense.
You acquire an item: candy cane
You acquire an item: Crimbo peppermint bark
You gain 6 Muscleboundness
You gain 2 Enchantedness
[5732] CRIMBCO WC
Encounter: Carolin' Elmerfindel "Silver Bells" Fudgeboxer, Who May Or May Not Be Home For Crimbo
Round 0: Theraze wins initiative!
> Monster value: 0
> Meat/round from Cocoabo: 10.97
> MP/round from Cocoabo: 3.15
> HP/round from Cocoabo: 3.15
> Profit per round: 34.56
Round 1: Theraze uses the facsimile dictionary!
Round 2: Tog roots around in the ground, and comes up with some Meat. He wings it to you.
You gain 159 Meat.
Round 2: Theraze uses the facsimile dictionary!
Round 3: Theraze uses the facsimile dictionary!
Round 4: Tog coos softly, and nuzzles you with his beak.
You gain 38 hit points
You gain 38 Muscularity Points
Round 4: Theraze uses the facsimile dictionary!
You lose 1 hit point
Round 5: Theraze uses the facsimile dictionary!
Round 6: Theraze uses the facsimile dictionary!
Round 7: Tog roots around in the ground, and comes up with some Meat. He wings it to you.
You gain 128 Meat.
Round 7: Theraze uses the facsimile dictionary!
Round 8: Theraze uses the facsimile dictionary!
Round 9: Theraze uses the facsimile dictionary!
Round 10: Theraze uses the facsimile dictionary!
Round 11: Theraze executes a macro!
Round 11: Theraze attacks!
Round 12: elf hobo takes 567 damage.
Round 12: Tog paws at the ground for a second, and then charges your opponent, bashing him for 33 damage.
Round 12: elf hobo takes 33 damage.
You acquire an item: bottle of whiskey
You acquire an item: Wint-O-Fresh mint
You gain 3 Fortitude
You gain 2 Enchantedness
You gain 3 Chutzpah

In each of those fights, two meat-wingings happened. The first had a critical and normal, the second had 2 normals.
 
Too lazy to check the thread, but I think he was talking about the drops you get when these familiars are placed in the Crown of Thrones?
 
Yeah, another case of TL;DR, folks. Here's short and nasty for you, in no way affiliated with midget mud wrestling.
The [Crown of Thrones] is missing action rate for quite a few of these familiars, which makes it very difficult to add the information.
The mimic, Cocoabo, and elemental fairies have only ever dropped once per round.
That's supposed to be once per combat, not round.
 
Sorry. I found that thread when I was trying to find information on the run_combat only running one line of CCS. I was trying to figure it out whether it was related to meat drop or item drop, but it's hard to track when threads don't have quotes and most thread follow 2-4 conversations at once. :D
 
Again, thanks for the script.

I've found a slight bug: Line 81 needs to be removed.

Code:
   if (item_amount($item[turtle totem]) > 0) return $item[turtle totem];

For the curious, it manifested as my turtle totem being consumed every time I burned mp on buffs. :)

Edit to above: Reusable combat items (i.e. seal teeth) should not be used versus the bonerdagon.
 
Last edited:
That would be in stasis_item(), I believe. Mine currently looks like this:

PHP:
advevent stasis_action() {
   sort opts by dmg_dealt(value.dmg);
   foreach i,opt in opts if (to_profit(opt) > to_float(vars["BatMan_profitforstasis"])) return opt;
   advevent blank;
   return blank;
}
 
Back
Top