string r = get_ccs_action(round);
print("CCS: " + r, "blue" );
return r;
string consultBarrr(int round, string opp, string text) {
if (!isExpectedMonster(opp)) return ((my_primestat() == $stat[Mysticality] && in_hardcore()) ? consultMyst(round, opp, text) : get_ccs_action(round));
print("In consultBarrr()", "red" );
if (round == 0 || round == 1 && have_effect($effect[Embarrassed])==0 ) {
if (my_path() == "Bees Hate You") return "item Massive Manual of Marauder Mockery";
return "item the big book of pirate insults";
}
// return ((my_primestat() == $stat[Mysticality] && in_hardcore()) ? consultMyst(round, opp, text) : get_ccs_action(round));
string r = get_ccs_action(round);
print("CCS: " + r, "blue" );
return r;
}
[ barrrney's barrr ]
call athard
[ global prefix ]
sub checkfamiliar
if hasskill release the boots
skill release the boots
endif
if happymediumglow red
skill siphon spirits
endif
endsub
sub atnormal
attack with weapon
endsub
sub athard
if hasskill Accordion Bash && !mpbelow 5
skill Accordion Bash
endif
attack with weapon
endsub
When the CCS was:Round 2: You gain 27 Mojo Points
In consultBarrr()
CCS: call athard
You don't have enough null
You're on your own, partner.
[ barrrney's barrr ]
if hasskill Accordion Bash && !mpbelow 5
skill Accordion Bash
endif
attack with weapon
When the CCS was:In consultBarrr()
CCS: endif
You don't have enough null
You're on your own, partner.
[ barrrney's barrr ]
if hasskill Accordion Bash && !mpbelow 5; skill Accordion Bash; endif
attack with weapon
But you could also argue that:This will only return a value from the section of the CCS for the monster that is currently being fought.
indicates that Macros and "global prefix" will be part of any actions.Macros may be used in a Custom Combat Script in addition to the basic commands. Any line in quotes and any macro command used in a CCS will be made into part of the macro which KoLmafia is passing to KoL. You can find an primer on all KoL's macros at Combat Macros.
Also there is a section in the CCS called "global prefix" which will be part of every combat macro KoLmafia generates, regardless of the monster encountered.
Hmm, the second example obviously doesn't match your interpretation, otherwise it would have returned "if hasskill Accordion Bash && !mpbelow 5". Anyway it is not a BumCheekCityAscend issue so I need to move it to bugs.
Beaten up and 0 health, and so it can't actually clover-level?
net.sourceforge.kolmafia.KoLAdventure.findAdventure("adventure.php?snarfblat=395")
(net.sourceforge.kolmafia.KoLAdventure) Manor2: The Haunted Ballroom
net.sourceforge.kolmafia.KoLAdventure.findAdventure("adventure.php?snarfblat=395&confirm=on")
null
string _outer_clover_protection = get_property('cloverProtectActive');
try {
set_property('cloverProtectActive','false');
// adventure in the place
} finally {
set_property('cloverProtectActive', _outer_clover_protection);
}
private static String CONFIRM_COUNTER = "confirm0";
private static String CONFIRM_CLOVER = "confirm1";
private static String CONFIRM_MCD = "confirm2";
private static String CONFIRM_FAMILIAR = "confirm3";
private static String CONFIRM_RECOVERY = "confirm4";
private static String CONFIRM_SORCERESS = "confirm5";
private static String CONFIRM_WOSSNAME = "confirm6";
private static String CONFIRM_TOKENS = "confirm7";
private static String CONFIRM_SEAL = "confirm8";
private static String CONFIRM_ARCADE = "confirm9";
private static String CONFIRM_KUNGFU = "confirm10";
private static String CONFIRM_POOL_SKILL = "confirm11";
private static String CONFIRM_WINEGLASS = "confirm12";
private static String CONFIRM_COLOSSEUM = "confirm13";
private static String CONFIRM_GREMLINS = "confirm14";
private static String CONFIRM_HARDCOREPVP = "confirm15";
private static String CONFIRM_DESERT_UNHYDRATED = "confirm16";
private static String CONFIRM_MOHAWK_WIG = "confirm17";
private static String CONFIRM_CELLAR = "confirm18";
private static String CONFIRM_BOILER = "confirm19";
private static String CONFIRM_DIARY = "confirm20";
private static String CONFIRM_BORING_DOORS = "confirm21";
private static String CONFIRM_SPELUNKY = "confirm22";
private static String CONFIRM_ZEPPELIN = "confirm23";
public static String removeConfirmationFields( String adventureURL )
{
return CONFIRMATION_PATTERN.matcher( adventureURL ).replaceAll( "" );
}
private static final Pattern CONFIRMATION_PATTERN = Pattern.compile( "&confirm[\\d]+=on" );
> BCC: Getting Clovers
> BCC: We're going to end up with one and exactly one ten leaf clover
Use 1 disassembled clover
You acquire an item: ten-leaf clover
Unknown Adventure #31 = adventure.php?snarfblat=31&confirm=on
Unknown Adventure #31 = adventure.php?snarfblat=31&confirm=on
Unknown Adventure #31 = adventure.php?snarfblat=31&confirm=on
[261] Guano Junction
Encounter: How I Wonder What You're At
You lose 5 hit points
You acquire an item: sonar-in-a-biscuit
You acquire an item: sonar-in-a-biscuit
use 1 sonar-in-a-biscuit
use 1 sonar-in-a-biscuit
while (item_amount($item[sonar-in-a-biscuit]) < 1 && !contains_text(visit_url("place.php?whichplace=bathole"), "bathole_bg4")) {
//Let's use a clover if we can.
if (i_a("sonar-in-a-biscuit") == 0 && cloversAvailable(true) > 0) {
if (my_hp() < 1 && !restore_hp(1)) abort("You can't get enough health to adventure. :(");
clover_result[0] = visit_url("adventure.php?snarfblat=31&confirm=on");
if(!contains_text(clover_result[0], "but you see a few biscuits left over from whatever bizarre tea party")) {
map_to_file(clover_result, "BCCDebug.txt");
abort("BCC: There was a problem using your clover. Please try it manually.");
}
} else {
bumAdv($location[Guano Junction], "+10stench res", "items", "1 sonar-in-a-biscuit", "Getting a Sonars");
}
if (cli_execute("use * sonar-in-a-biscuit")) {}
}
if (cli_execute("use * sonar-in-a-biscuit")) {}
if ( AdventureDatabase.isPotentialCloverAdventure( adventureName ) && InventoryManager.cloverProtectionActive() )
{
KoLmafia.protectClovers();
}
because we're already doing what we have to.