Results 1 to 5 of 5

Thread: Using both a combat filter and a ccs?

  1. #1
    Senior Member
    Join Date
    Dec 2008
    Posts
    276

    Default Using both a combat filter and a ccs?

    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 by fxer; 03-02-2013 at 11:46 PM.

  2. #2

    Default

    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.
    Before you ask, please check the FAQ.
    Veracity: My "humble opinion" trumps your "humble opinion". IMHO.

  3. #3
    Senior Member
    Join Date
    Dec 2008
    Posts
    276

    Default

    Thanks St., added some example CCS & combat filter code to the first post

  4. #4
    Developer jasonharper's Avatar
    Join Date
    Sep 2008
    Location
    Oklahoma
    Posts
    1,122

    Default

    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.
    In game: Seventh (#363053), originally a Seal clubber. I am the Ap'ostle of Ak'gyxoth! (Or is that Ap'ostrophe?)

  5. #5
    Senior Member
    Join Date
    Dec 2008
    Posts
    276

    Default

    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 by fxer; 03-03-2013 at 09:49 PM.

Similar Threads

  1. Feature - Implemented run_combat() with a combat filter.
    By That FN Ninja in forum Bug Reports
    Replies: 37
    Last Post: 03-24-2015, 06:47 PM
  2. Feature Add text filter to KoL's old style combat
    By Bale in forum Bug Reports
    Replies: 3
    Last Post: 11-14-2013, 12:54 PM
  3. Combat skill/item filter
    By Schik in forum Relay Override Scripts
    Replies: 30
    Last Post: 09-17-2013, 11:01 AM
  4. Replies: 0
    Last Post: 04-02-2011, 09:21 PM
  5. Bug - Fixed adventure() from a between battle script changes combat filter
    By picklish in forum Bug Reports
    Replies: 0
    Last Post: 03-13-2011, 06:14 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •