SmartStasis -- a complex script for a simple CCS

Gdunge

Member
Do you have any older versions of SS sitting around in a subfolder or something? This error could only happen due to mafia running an older version of SS than the current one.

There was one in the trash folder. I emptied the trash, and the problem went away.

Hmmm....

Perhaps the Mac is too persistent in maintaining links to items that move to the Trash?

Anyway, this might explain why I often have strange problems that mysteriously go away. I'll keep an eye on it.

Thanks again!

- Gdunge
 

Spiny

Member
The wiki can't be updated because the page is too large already. Someone with more wiki knowledge would have to start splitting up the page into several pages, and a fourth column is really needed. HP/MP should always be the first 3 rounds, items/meat should always be once per combat on a random round (I might be wrong about meat, but I hope it's just once per combat). I would guess that damage can happen any number of times on any rounds, but who would use a damage familiar? Also note that mafia should already have the first round of HP/MP regen reported as part of the total regen for your character, but I believe none of the other in-combat stuff is reported by mafia in any way.

Sorry, I haven't been following this thread, but I know for certain that a leprechaun in the crown will give meat 3 times (rounds 1 thru 3). As for elemental fairies in the crown, it's hit or miss, definitely not restricted to the first 3 rounds and uncertain if it's guaranteed per combat, but it is only once per combat if at all. Spooky Pirate skeleton and other stunners do not necessarily stun in a given fight, but have the chance of stunning multiple times per fight. I will admit I was running that while also running the rogue program as my familiar with its equipment, so that might skew things a bit as they both can block actions.
 

Edir

Member
Found a problem, not sure if it's already been reported but - if you have Rave Combos but haven't beat your Nemesis yet(say you worked on the quest but you just couldn't defeat the Demon Spirit, so you decided to do other things), it still tries to use these combos - and fails, since they won't work outside the island until the Nemesis quest is finished.


Edit: Also, don't forget the rogue program is a starfish type and so should be added to the list of familiars that can be used while stasising for MP.
 
Last edited:

halfvoid

Member
Edit: Also, don't forget the rogue program is a starfish type and so should be added to the list of familiars that can be used while stasising for MP.

You can add any familiar you want into the "cases" section near the top of smartstasis. just copy the format of one of the other normal starfish familiars there.
 

Edir

Member
You can add any familiar you want into the "cases" section near the top of smartstasis. just copy the format of one of the other normal starfish familiars there.
I know, I had done just that before - just saying this change should be applied to the official version too.
 

Gdunge

Member
Something (SS or FTF?) is trying the Rave Steal combo over and over again, until I die or run out of turns.

Visit to The Sea: Madness Reef in progress...

[34395] Madness Reef
Encounter: pufferfish
Strategy: /Users/dougw/Library/Application Support/KoLmafia/ccs/SmartStasis.ccs [default]
Round 0: Gdunge wins initiative!
(unable to macrofy due to action: consult SmartStasis.ash)
Monster value: 2907.66
Profit per round: 0
Round 1: Gdunge tries to steal an item!
You lose 4 hit points
You lose 8 hit points
Round 2: Gdunge casts RUN LIKE THE WIND!
You lose 16 hit points
Round 3: Gdunge casts BREAK IT ON DOWN!
You lose 32 hit points
Round 4: Gdunge casts POP AND LOCK IT!
You lose 64 hit points
Round 5: Gdunge casts RUN LIKE THE WIND!
You lose 128 hit points
Round 6: Gdunge casts BREAK IT ON DOWN!
You lose 256 hit points
Round 7: Gdunge casts POP AND LOCK IT!
You lose 512 hit points

Requests complete.

Using soft green whatever...
Beaten Up removed.
Restoring HP! Currently at 20 of 714 HP, 474 of 717 MP, current meat: 72165 ... Target HP = 679.
Using 1 scroll of drastic healing...
Finished using 1 scroll of drastic healing.

Any ideas?
 

Gdunge

Member
Probably needs to be hardcoded that you're not safe if you've been poisoned by a pufferfish.

It will also blindly keep trying the Rave Steal combo until round 31, when the fight is declared over.

I didn't post that log because it's longer :) I will if there's interest, though.
 

Gdunge

Member
More information:

This only appears to happen when I'm under the sea. I stopped going to the sea for awhile and everything was working fine, but now that I'm back in the sea I'm getting the same thing. Something keeps casting Rave Steal over and over.

(verbosity at 5, aborted after I realized that the problem was back again)


[35454] The Wreck of the Edgar Fitzsimmons
Encounter: cargo crab
Strategy: /Users/dougw/Library/Application Support/KoLmafia/ccs/SmartStasis.ccs [default]
Round 0: Gdunge wins initiative!
(unable to macrofy due to action: consult SmartStasis.ash)
Monster value: 2869.27
Profit per round: 0
Round 1: Gdunge tries to steal an item!
Round 2: Gdunge casts RUN LIKE THE WIND!
Round 3: Gdunge casts BREAK IT ON DOWN!
Round 4: Gdunge casts POP AND LOCK IT!
Round 5: Gdunge casts RUN LIKE THE WIND!
Round 6: Gdunge casts BREAK IT ON DOWN!
Round 7: Gdunge casts POP AND LOCK IT!
Round 8: Gdunge casts RUN LIKE THE WIND!
Round 9: Gdunge casts BREAK IT ON DOWN!
Round 10: Gdunge casts POP AND LOCK IT!
Round 11: Gdunge casts RUN LIKE THE WIND!
Round 12: Gdunge casts BREAK IT ON DOWN!
Round 13: Gdunge casts POP AND LOCK IT!
Round 14: Gdunge casts RUN LIKE THE WIND!
Round 15: Gdunge casts BREAK IT ON DOWN!
Round 16: Gdunge casts POP AND LOCK IT!
KoLmafia declares world peace.
You're on your own, partner.

Round 17: Gdunge executes a macro!
Round 17: Gdunge casts POP AND LOCK IT!
Round 18: Gdunge casts RUN LIKE THE WIND!
Round 19: Gdunge casts BREAK IT ON DOWN!
You acquire an effect: Rave Concentration (duration: 1 Adventure)
Round 20: Gdunge executes a macro!
Round 20: Gdunge casts DISCO EYE-POKE!
Round 21: Gdunge casts DISCO DANCE OF DOOM!
Round 22: Gdunge casts DISCO DANCE II: ELECTRIC BOOGALOO!
You acquire an effect: Disco Concentration (duration: 1 Adventure)
Round 23: Gdunge attacks!
You gain 141 Meat, but the rest sinks into the murky depths.
You acquire an item: imitation crab crate
You gain 34 Beefiness
You gain 25 Magicalness
You gain 54 Sarcasm
 

Raven434

Member
It's probably buried in the 39 pages of posts, but I have lost facsimile dictionaries via SmartStasis against the Naughty Sorceress.

Oddly, it seems to have only recently started doing that. I have always had the dictionary in my inventory during SCNP runs, after clearing the Orc Chasm and the Gates.

Is there a zlib variable or SS variable I can set to not use that item?

I looked at my vars_*.txt and might have missed it.

My .ccs is just SmartStasis and attack.

Last NS fight during form 2.

Encounter: The Naughty Sorceress (2)
Round 0: Joe Momma loses initiative!
Round 1: Joe Momma uses the facsimile dictionary!
Round 2: Joe Momma attacks!
Round 3: the naughty sorceress (2) takes 100 damage.
Round 3: Joe Momma attacks!
Round 4: the naughty sorceress (2) takes 100 damage.
Round 4: Joe Momma attacks!
Round 5: the naughty sorceress (2) takes 102 damage.
Round 5: Joe Momma attacks!
Round 6: the naughty sorceress (2) takes 104 damage.
Round 6: Joe Momma attacks!
Round 7: the naughty sorceress (2) takes 109 damage.
Round 7: Joe Momma attacks!
Round 8: the naughty sorceress (2) takes 104 damage.
Round 8: Joe Momma attacks!
Round 9: the naughty sorceress (2) takes 100 damage.
Round 9: Joe Momma attacks!
Round 10: the naughty sorceress (2) takes 104 damage.

Encounter: The Naughty Sorceress (3)
Round 0: Joe Momma loses initiative!
You acquire an item: Instant Karma
You gain 170 Fortitude
You gain a Muscle point!
You gain 121 Wizardliness
You gain a Mysticality point!
You gain 243 Smarm


And yeah, I can mod / update my CCS to do something else for the NS, I am bringing it up because I have lost 2 dictionaries during my recent runs and not on the past 30 or so...

Thanks
 
Last edited:

Raven434

Member
Like I said, I know how to fix it programatically.

I am bringing it up because it seems like it could be considered from an internal logic perspective.

Actually, anything that you could lose in a NS / Bonerdagon fight would fit my question.

:)
 

slyz

Developer
Like I said, I know how to fix it programatically.
Oh right, I completely misread that part!

Apparently SmartStasis.ash only avoids stasising naughty sorority nurses (what did they do to you Z?) - line 214 could be expanded to avoid stasising the Bonerdagon and the NS completely, but I think the best way would be to change stasis_item() to:

PHP:
item stasis_item() {
   if ( last_monster() == $monster[The Bonerdagon] || last_monster().to_string().contains_text("Naughty Sorceress") ) return $item[none];
   if (my_location() != $location[orc chasm]) {
      if (item_amount($item[dictionary]) > 0) return $item[dictionary];
      if (item_amount($item[facsimile dictionary]) > 0) return $item[facsimile dictionary];
   }
   if (item_amount($item[turtle totem]) > 0) return $item[turtle totem];
   if (item_amount($item[spices]) > 0) return $item[spices];
   if (item_amount($item[seal tooth]) > 0) return $item[seal tooth];
   if (item_amount($item[spectre scepter]) > 0) return $item[spectre scepter];
   vprint("No stasis item found!","olive",-2);
   return $item[none];
}
 

zarqon

Well-known member
Are ALL sea drops non-pickpocketable? If so, that's an easy fix in FTF's monster_value() (where should_pp is set).

I was thinking of waiting to update until I'd added in the framework for crown stasis but looks like I'll have to release this latest handful of updates before that.

@Edir: Added rogue program with the regular starfish formula (didn't see anything saying the formula is otherwise). Haven't fixed the other issue about the combos yet.

@Raven: BatMan already considers item loss for bosses that block items, but SS doesn't. SS will take the safe route and avoid stasising those monsters entirely.

@slyz: contains_text("Naughty") actually matches only monsters that we don't want to stasis. Neat. I put that in at the top of stasis(). Also added the pufferfish there since you don't want to be stasising if you're poisoned.

Unless you can really do a LOT of damage in your regular attack, stasising naughty sorority nurses will result in the combat going too long (and then you don't get those useful garters). It's better just to skip stasising them entirely.
 

Winterbay

Active member
The wiki states: "Most monsters in The Sea cannot be successfully pickpocketed. Exceptions include the bazookafish (bazookafish bubble gum), patrons of The Dive Bar (all booze drops) and select items in The Skate Park. "

Not sure which select items they allude to though.
 
Top