Using both a combat filter and a ccs?

fxer

Member
I have a semi-complex CCS that handles most of my daily combats, checks when to Release the Boots, kill roaming scaling monsters etc. However I would like to use a combat filter to handle things such as buffing for Nanobrawny, and using Unleash the Nanites when possible. However I can't figure out how to use both, or if it is possible?

I've tried 'return get_ccs_action()' in the combat filter, but that both gets out of sync with the combat rounds when you insert something, or fails when it returns a ccs action that is an 'if monstername <something>' line or something similar. Also doesn't look like you can just do a 'run_combat()' out of a combat filter if you don't wish inject anything else into the current combat?

An exmaple CCS:
Code:
[ default ]
special action
if monstername Malevolent Tofurkey || monstername Candied Yam Golem || monstername Stuffing Golem || monstername Possessed Can of Cranberry Sauce || monstername *Cadáver*
    skill entangling noodles
    mark killscaling
    skill fearful fettucini
    goto killscaling
endif
try to steal an item
if monstername procrastination giant
    skill give your opponent the stinkeye
endif
if !monstername clod hopper
    skill release the boots
endif
item fat stacks of cash
item fat stacks of cash
item fat stacks of cash
item fat stacks of cash
item fat stacks of cash
item fat stacks of cash
item fat stacks of cash
item fat stacks of cash
item fat stacks of cash
skill candyblast

[ global prefix ]
scrollwhendone
"abort missed 5"
"abort pastround 27"

Example of combat filter actions i'd like to inject into that ccs, to accomplish banishing with the Nanorhino:
Code:
string farm_combat(int round, monster enemy, string text){
	// Do we need to get the Nanobrawny buff?
	if( can_banish() && my_familiar() == $familiar[nanorhino] ){
		set_property("_nanorhinoUsed","true");
		return use_skill( muscleCombatSkill );
	}
	// Are we ready to unleash the nanites and banish?
	if( enemy == farmConfig.banish && have_effect( $effect[nanobrawny] ) >= 40 ){
		return use_skill( $skill[unleash nanites] );
	}

      return ???
}
 
Last edited:

StDoodle

Minion
It's probably simpler to combine all of your various CCS stuff into one script that can be called from the KoLmafia CCS settings, but I'm not 100% sure I follow all of what you're doing correctly. I've been looking at making one for myself lately, so this is kind of on my mind; if you'd like to post more info I'd be happy to look at it.
 

jasonharper

Developer
Combat filters force your CCS to be executed a line at a time, rather than being macrofied and submitted to the server all at once. They therefore cannot support "if"/"endif" and other macro-only commands.
 

fxer

Member
So is the best way to accomplish this maybe to move everything into a consult script and ditch the CCS & combat filter? I would kind of miss the easy modification from the CCS panel within mafia. Maybe macros can be built inside the combat filter?

Edit: hmm maybe using SmartStasis+BatBrain is what I should be doing? Then my CCS would just become:

Code:
[ default ]
consult my_consult.ash
attack

Which imports those scripts and has all my assorted combat code in there, and maybe BatBrain will let me resubmit the whole combat as a macro? Can't really find a guide to BatBrain around to see if that's the case
 
Last edited:
Top