SmartStasis -- a complex script for a simple CCS

therealtahu

New member
Is there a secret list somewhere of these properties?
I know that it won't have user created properties on it but it would help to know what properties mafia uses.

The closest that you can come to the secret list would be in settings\name_prefs.txt
As a bonus, and user created properties also show up in that.
 

Bale

Minion
Not a very secret list at all. All user created properties and mafia properties cuddled together as equals. I've sometimes wished that there was some way to differentiate between mafia's properties and the properties that somebody's script snuck into the list, but alas no.

Except, of course, that "_checkedToday" is a horrible choice for the name.
Well, of course. I was just making the example obvious about the meaning of the variable. Perhaps I should have anticipated that someone might actually copy the example word-for-word?
 

mredge73

Member
Bonus indeed!
This will help big time, and to think I was writing entire functions to find out some of those little fun facts that are in the property list.
 

dj_d

Member
Very happy about the "once per day" thing - just so I don't jump to conclusions, is "day" defined by rollover, or by the clock, or by something else?
 

Bale

Minion
Very happy about the "once per day" thing - just so I don't jump to conclusions, is "day" defined by rollover, or by the clock, or by something else?

It is determined by mafia, just like it performs breakfast only once per day. In other words, once per rollover.
 

zarqon

Well-known member
This was always doable with today_to_string() -- which depends on KoL date, not local time (just like the new properties, dj_d). But the new way is a bit easier since it does half of it for you.

Perhaps I'll add version checking to FTF and SS only on Tuesdays when you get a critical hit against a monster that starts with 'P'.
 

zarqon

Well-known member
1.7 Update!

I went on a bit of a coding spree lately. Updates to OCW, FTF, and SS, in addition to getting the CanAdv project underway. Whee!

In this update: SS required some changes to keep up with the changes I also made to FTF, but the most notable change is that I've added gremlin detection logic as previously discussed. So, it will only stasis gremlins that actually have a chance of dropping a tool. I haven't tested this yet, but I'm pretty sure it ought to work. Enjoy the extra HP!
 
Last edited:

Veracity

Developer
Staff member
You need to stasis monsters in the Seaside Megalopolis that drop elemental disks. Do you handle that? I was pleased when I (finally) figured out how that works; KoLmafia now color-codes the messages to let you know when to claim your disks...
 

Bale

Minion
You need to stasis monsters in the Seaside Megalopolis that drop elemental disks. Do you handle that? I was pleased when I (finally) figured out how that works; KoLmafia now color-codes the messages to let you know when to claim your disks...
Did you code it for elemental miss messages as well as hit messages?
 

zarqon

Well-known member
@V: Not enough information in the wiki for me to figure out how to handle that yet. I do see that the relevant monsters including quest drops have been added to mafia though.

If anyone cares to volunteer further information (why do they need stasising, what are the messages SS should look for) I can add that in, otherwise you'll have to wait until I get around to doing that quest myself, which could be a while.

EDIT: That'll learn me to upload untested updates. My update would ONLY stasis gremlins that might have tools... and NOTHING ELSE. Yeah. Updated in the first post.
 
Last edited:

Veracity

Developer
Staff member
@V: Not enough information in the wiki for me to figure out how to handle that yet. I do see that the relevant monsters including quest drops have been added to mafia though.
Given the monster data I added, there is enough info on the wiki. Look for the exact messages there.

- The monster which drops the heat item has both hit and a miss messages that refer to a "lit match".
- cold, "liquid nitrogen"
- stench, "vile-smelling blood"
- sleaze, "tubular appendage"
- spooky, "freaky alien thing"

You need to stasis the monster until it does its elemental thing and then, as your next attack, use the Ruby Rod to claim the disk. Completely analogous to the gremlins.
 

zarqon

Well-known member
Just one further question and it's good as done: does getting the disc end combat, as with gremlins?
 

Veracity

Developer
Staff member
It does not end the combat.

Edit: one comment, which I'm sure will be obvious, once you look at this: the Ruby Rod is a weapon, not a combat item like the molybdenum magnet. Therefore, it's pointless to stasis the megalopolis unless you have it equipped.
 
Last edited:

zarqon

Well-known member
1.8 Update

Close on the heels of 1.7, another update! Stasising Megalopolis monsters has now been added. It will stasis them only if you have the Ruby Rod equipped and lack the elemental disc that monster drops. Otherwise, regular rules for stasis apply. Thanks Veracity for providing the necessary info!

Also, I finally got around to adding Consume Burrowgrub to the restore skills section, but you will only use it if you will make full use of its restore ability (both HP and MP). I felt that was safe enough to prevent anyone being annoyed at using a daily-limited skill.
 
Last edited:

Rinn

Developer
Is there any reason you basically have the main() function copied between ftf and SmartStasis? Wouldn't it be a bit cleaner and less prone to missing a change that needs to go into both by separating out the common functionality into a different function? I'm not saying it's broken, but as a programmer I've always noticed trends where if code is written twice there's twice as many chances of bugs to appear because of it.

If a character has saucy salve and lasagna bandages, is it better to only cast salve until you get the quickly cast 3 times? I'm actually not sure about this and I'm curious.
 

zarqon

Well-known member
Is there any reason you basically have the main() function copied between ftf and SmartStasis?

Yes; I wrote FTF first. :) I did give some thought to moving most of that up to a separate function in FTF and just calling that function from SS, but it didn't make its way into any of the recent updates, because I still haven't strategized what the eventual combat branch of the CCS suite will work like.

If a character has saucy salve and lasagna bandages, is it better to only cast salve until you get the quickly cast 3 times? I'm actually not sure about this and I'm curious.

Given that this is almost always happening when "in the clear," it's kind of a nonissue for the purposes of the script. Or do you see another possible advantage besides avoiding the monster's action?
 

Rinn

Developer
True, but typically the only thing I stasis with your script are gremlins which are going to hit me. Thinking about it more though, maybe the opposite is true and it should only be using bandages, we wouldn't really ever want to block a combat action from a gremlin that might drop a tool because it's really just causing more server hits to get to the same outcome and those stasis fights typically aren't being used for healing anyway.

Ignoring that, I am confused by two checks you're doing:

Code:
if (my_class() == $class[accordion thief] || my_class() == $class[disco bandit]) {
      if ([COLOR=Red][B]get_property("autoSteal") != true[/B][/COLOR]) return act(steal());
Code:
if ([COLOR=Red][B]get_property("autoEntangle") == "false"[/B][/COLOR] || (flyereverything && flyers != $item[none]) ||
   (my_location() == $location[barrr] && item_amount($item[the big book of pirate insults]) > 0))
      url = try_skill(url,$skill[entangling noodles]);
Shouldn't you be checking if autoSteal and autoEntangle are "true", and additionally that you're not in the clear before entangling? Stealing also isn't supported in form of bird.
 
Last edited:

Braska

Member
Don't know if this is an expected action or not... but the script seems to be casting Entangling Noodles on... everything. If I don't get the jump, EN is cast... and yet my moxie has been triple what is needed to be in the clear. For example:

Fighting a white knight in whitey's grove during MacG quest. EN is cast... when my moxie is at 120 buffed as a muscle class. Using latest daily build, and latest version of this.

Not sure if this is the fault of FTF or SS...
 
Top