Bug - Fixed combat macro automation

ckb

Minion
Staff member
Something changed with combat macro automation, due to this stack overflow issue. And I think it is contributing to the adv1 abort issue here.

I think the way Mafia is requesting CCS and getting back macros is not working correctly 100% of the time. This seems to happen to me during attempts and Chateau painting fights. Here is my ash code for that:

Code:
buffer page = visit_url("place.php?whichplace=chateau&action=chateau_painting");
page = run_combat();

But mafia aborts instead of running the combat. My debug log is attached (apologies for all the extraneous setup before the fight, but I added the automatic debug on/off to my script so I would capture it).

I don't understand the Mafia code very well, or at all really, but from other threads, I would guess that an empty macro is returned for some reason, or no action is taken for some reason, and Mafia aborts after getting no response to the request. I am not sure why my consult script would not fire, but I know that it used to work, and now it sometimes doesn't.

Starting this thread to help track this down and understand what Mafia is doing and what my consult script is doing and how to fix them to work together again.
 

Attachments

  • DEBUG_20170701.txt
    127.4 KB · Views: 29
  • DEBUG_20170627.txt
    127.3 KB · Views: 32

Veracity

Developer
Staff member
Strange.

Here is the gist of your DEBUG logs:

Code:
Requesting: https://www.kingdomofloathing.com/place.php?whichplace=chateau&action=chateau_painting
Retrieved: https://www.kingdomofloathing.com/place.php?whichplace=chateau&action=chateau_painting
Field: Location = [fight.php?ireallymeanit=1498882208]

[177] Chateau Painting
Connecting to fight.php...

Requesting: https://www.kingdomofloathing.com/fight.php?ireallymeanit=1498882208
Retrieved: https://www.kingdomofloathing.com/fight.php?ireallymeanit=1498882208

Encounter: writing desk

Retrieved: https://www.kingdomofloathing.com/api.php?what=status&for=KoLmafia
Requesting: https://www.kingdomofloathing.com/api.php?what=status&for=KoLmafia
No evidence of anything happening with your consult script.

Here is a test script:

Code:
buffer page = visit_url( "adventure.php?snarfblat=150" );
page = run_combat();
Seems similar in that it visit_urls a location which redirects to a fight. (I chose that location since it ALWAYS redirects to a fight.)

When I run this script, I get this:

Code:
Starting ASH script: runc.ash
class net.sourceforge.kolmafia.request.GenericRequest

Requesting: https://www.kingdomofloathing.com/adventure.php?snarfblat=150
Retrieved: https://www.kingdomofloathing.com/adventure.php?snarfblat=150
Field: Location = [fight.php?ireallymeanit=1499143923]

Connecting to fight.php...

Requesting: https://www.kingdomofloathing.com/fight.php?ireallymeanit=1499143923
Retrieved: https://www.kingdomofloathing.com/fight.php?ireallymeanit=1499143923

[748434] The Orcish Frat House (Bombed Back to the Stone Age)
Encounter: caveman frat boy
Round 0: Brianna wins initiative!

class net.sourceforge.kolmafia.request.FightRequest
Round 1: Brianna executes a macro!
Connecting to fight.php...

Requesting: https://www.kingdomofloathing.com/fight.php?action=macro&macrotext=%0A%0A%0Apickpocket%0Amark+mafiafinal%0Aattack%0Agoto+mafiafinal
Retrieved: https://www.kingdomofloathing.com/fight.php?action=macro&macrotext=%0A%0A%0Apickpocket%0Amark+mafiafinal%0Aattack%0Agoto+mafiafinal

Round 1: Brianna tries to steal an item!
...
Round 3: Brianna wins the fight!
...

Finished ASH script: runc.ash
Notice that mention of class FightRequest. That shows that it was automating. And it did, as you can see.

In your example, it did not do that. And it logged the encounter before following the redirect. That's because your chateau painting is considered an "item redirection" and it is logged immediately.

I'll come up with a version of my script which does an "item redirection" and see how that might behave differently than a standard adventure redirection.
 

Veracity

Developer
Staff member
Code:
buffer page = visit_url( "inv_use.php?whichitem=7204" );
page = run_combat();
Yields this:

Code:
[color=green]> runc[/color]

[748435] lynyrd snare
Encounter: lynyrd
Round 0: Brianna loses initiative!
Round 1: You lose 20 hit points
Round 1: Brianna executes a macro!
Round 1: Brianna tries to steal an item!
KoLmafia thinks it is round 2 but KoL thinks it is round 1
Round 1: Brianna attacks!
Round 2: lynyrd takes 4510 damage.
Round 2: Brianna wins the fight!
You acquire an item: lynyrd skin
After Battle: You gain 11 Strongness
After Battle: You gain 14 Magicalness
After Battle: You gain 51 Sarcasm
Of course, I am not using a consult script. I changed my CCS to be this:

Code:
[ default ]
consult consult.ash
Where consult.ash is this:

Code:
void main(int initround, monster foe, string page)
{
    print( "initround = " + initround );
    print( "monster = " + foe );
    attack();
}
Now I get this:

Code:
[color=green]> runc[/color]

[748435] lynyrd snare
Encounter: lynyrd
Round 0: Brianna loses initiative!
Round 1: You lose 19 hit points
initround = 1
monster = lynyrd
Round 1: Brianna attacks!
Round 2: lynyrd takes 4531 damage.
Round 2: Brianna wins the fight!
You acquire an item: lynyrd skin
After Battle: You gain 13 Beefiness
After Battle: You gain 15 Enchantedness
After Battle: You gain 45 Chutzpah
Let's look at the DEBUG .

Code:
[color=green]> runc[/color]

Starting ASH script: runc.ash
class net.sourceforge.kolmafia.request.GenericRequest
Connecting to inv_use.php...

Requesting: https://www.kingdomofloathing.com/inv_use.php?whichitem=7204
Retrieved: https://www.kingdomofloathing.com/inv_use.php?whichitem=7204
Field: Location = [fight.php?ireallymeanit=1499145387]

[748435] lynyrd snare
Connecting to fight.php...

Requesting: https://www.kingdomofloathing.com/fight.php?ireallymeanit=1499145387
Retrieved: https://www.kingdomofloathing.com/fight.php?ireallymeanit=1499145387
Encounter: lynyrd
Round 0: Brianna loses initiative!
Parsing result: You lose 19 hit points
Round 1: You lose 19 hit points
Processing result:  HP: -19

Starting consult script: consult.ash
initround = 1
monster = lynyrd
class net.sourceforge.kolmafia.request.GenericRequest
Round 1: Brianna attacks!
Connecting to fight.php...
Requesting: https://www.kingdomofloathing.com/fight.php?action=attack
Retrieved: https://www.kingdomofloathing.com/fight.php?action=attack
Round 2: lynyrd takes 4531 damage.
Round 2: Brianna wins the fight!
You acquire an item: lynyrd skin
Processing result: lynyrd skin
Parsing result: You gain 13 Beefiness
After Battle: You gain 13 Beefiness
Processing result:  Substats: 13 / 0 / 0
Parsing result: You gain 15 Enchantedness
After Battle: You gain 15 Enchantedness
Processing result:  Substats: 0 / 15 / 0
Parsing result: You gain 45 Chutzpah
After Battle: You gain 45 Chutzpah
Processing result:  Substats: 0 / 0 / 45

Finished consult script: consult.ash
Finished ASH script: runc.ash
Looks pretty normal.

It's 1:21 AM. I need to sleep. I'll see if I come up with inspiration about why your DEBUG log shows no evidence of your consult script being called, whereas mine is called and operates fine.
 

Veracity

Developer
Staff member
Oh, heck. One more test.

I changed consult.ash to print out the length of the page it was given, since my consult script did not look at that, whereas perhaps WHAM does.

Code:
void main(int initround, monster foe, string page)
{
    print( "initround = " + initround );
    print( "monster = " + foe );
    print( "page length = " + length( page ) );
    attack();
}
I changed back to going to the Bombed Out Frat House and got this:

Code:
[color=green]> runc[/color]

[748435] The Orcish Frat House (Bombed Back to the Stone Age)
Encounter: caveman sorority girl
Round 0: Brianna wins initiative!
initround = 1
monster = caveman sorority girl
page length = 14240
Round 1: Brianna attacks!
Round 2: caveman sorority girl takes 4453 damage.
Round 2: Gronald climbs up and sits on your shoulder, and hands you some Meat. Huh, where did he find that?
You gain 75 Meat.
Round 2: Brianna wins the fight!
After Battle: Gronald sits on your fallen opponent's body, blows a smoke ring, and winks at you.
You gain 329 Meat
After Battle: You gain 11 Muscleboundness
After Battle: You gain 20 Enchantedness
After Battle: You gain 42 Chutzpah
Looks like it really did pass in the expected page. I ran it again with debugging and got this:

Code:
[color=green]> runc[/color]

[748436] The Orcish Frat House (Bombed Back to the Stone Age)
Encounter: caveman frat pledge
Round 0: Brianna wins initiative!
Round 1: Brianna executes a macro!
Round 1: Brianna attacks!
Round 2: caveman frat pledge takes 4471 damage.
Round 2: Brianna wins the fight!
After Battle: Gronald sits on your fallen opponent's body, blows a smoke ring, and winks at you.
You gain 215 Meat
After Battle: You gain 14 Strongness
After Battle: You gain 13 Magicalness
After Battle: You gain 57 Chutzpah
It did not execute my consult script.

OK, I have personally experienced something odd. I'll debug in Eclipse tomorrow.

Or maybe in IntelliJ; we use that at work, and how hard can it be to use it on KoLmafia? :)
 

Veracity

Developer
Staff member
And the reason that it didn't use my "default" setting the second time was because I had a special section for the caveman frat pledge.

Regardless of that, try out revision 18128, which will initialize FightRequest round variables, even if GenericRequest itself does the redirect. This retains the new way we handle the "ireallymeantit" redirect for the first round of a fight, but also initializes things more like used to happen.
 

ckb

Minion
Staff member
Tried again today with r18129, same results. New DEBUG log attached.

Also, my consult script has a print statement as the first line before returning any actions, and that does not get printed. Not sure if that is helpful.
PHP:
print("ckb-consult: Round "+rnd+": Fighting a "+mon+" at "+loc+" with "+monster_level_adjustment()+" ML","purple");

For kicks, here is my session log (with my own printed script info) from that fight.
Mafia aborted after the first 'Encounter: writing desk', then I loaded the fight in the Relay browser, submitted a macro via a relay link, and the fight completed.

Code:
> ckb-Std: Fighting One Writing Desk

equip hat training helmet

equip off-hand tip jar

equip acc3 gold detective badge
> DressUp easy : training helmet, bass clarinet, tip jar, protonic accelerator pack, astral shirt, swashbuckling pants, your cowboy boots, LOV Earrings, gold detective badge, 

cast 1 Singer's Faithful Ocelot
You acquire an effect: Singer's Faithful Ocelot (10)
> ckb-Std: Attempting to heal

cast 1 Disco Nap
You gain 40 hit points
Source Terminal: educate compress.edu
Source Terminal: educate extract.edu

[177] Chateau Painting
Encounter: writing desk
Encounter: writing desk
Round 0: ckb1 loses initiative!
> ckb-consult: Round 1: Fighting a writing desk at Barrrney's Barrr with 70 ML
> Monster: Atk=97, Def=97, HP=99, Dmg=6, Hit=false
> Disco Bandit: Atk=373 Moxie, Mox=373, HP=369, Hit=true
> ckb-consult macro = abort hppercentbelow 20; abort pastround 27; pickpocket; skill Summon Love Mosquito; skill Summon Love Gnats; use Time-Spinner; skill Cowboy Kick; skill Extract; attack; repeat !pastround 22; skill Stuffed Mortar Shell; skill Cannelloni Cannon; repeat; 
Round 1: ckb1 executes a macro!
Round 1: ckb1 tries to steal an item!
You acquire an item: snifter of thoroughly aged brandy
You gain 20 Meat.
Round 2: ckb1 casts SUMMON LOVE MOSQUITO!
Round 3: writing desk takes 7 damage.
Round 3: You gain 7 hit points
Round 3: ckb1 casts SUMMON LOVE GNATS!
Round 4: ckb1 uses the Time-Spinner!
Round 5: writing desk drops 4 attack power.
Round 5: writing desk drops 4 defense.
Round 5: ckb1 casts COWBOY KICK!
Round 6: writing desk takes 11 damage.
Round 6: ckb1 casts EXTRACT!
You acquire an item: Source essence (3)
Round 7: ckb1 attacks!
Round 8: writing desk takes 234 damage.
Round 8: ckb1 wins the fight!
You acquire an item: disintegrating quill pen
You acquire an item: inkwell
You acquire an item: Lady Spookyraven's necklace
After Battle: You gain 7 Strengthliness
After Battle: You gain 8 Wizardliness
You gain a Mysticality point!
After Battle: You gain 26 Smarm
> Revised monster value: 744.8
> Revised monster value: 768.3
> Revised monster value: 768.3
> Revised monster value: 768.3
> Revised monster value: 768.3
> ckb-consult: Round 2: Fighting a writing desk at Barrrney's Barrr with 70 ML
> Monster: Atk=97, Def=97, HP=98, Dmg=6, Hit=false
> Disco Bandit: Atk=373 Moxie, Mox=373, HP=369, Hit=true
> ckb-consult macro = abort hppercentbelow 20; abort pastround 27; attack; repeat !pastround 22; skill Stuffed Mortar Shell; skill Cannelloni Cannon; repeat;

Also, apologizes if you need more info. My whole setup is a bit convoluted about how I handle combat with my consult script and how it macro-ifies everything.
 

Attachments

  • DEBUG_20170704.txt
    21.2 KB · Views: 92
Last edited:

Veracity

Developer
Staff member
OK. Here is my new runc.ash:

Code:
// buffer page = visit_url( "inv_use.php?whichitem=7204" );
// buffer page = visit_url( "adventure.php?snarfblat=150" );
buffer page = visit_url( "place.php?whichplace=chateau&action=chateau_painting" );
page = run_combat();
I set up my CCS like this:

Code:
[ default ]
consult consult.ash
consult.ash looks like this:

Code:
void main(int initround, monster foe, string page)
{
    print( "initround = " + initround );
    print( "monster = " + foe );
    print( "page length = " + length( page ) );
    use_skill( $skill[Saucegeyser] );
    // attack();
}
I did this in the CLI:

Code:
[color=green]> debug on[/color]

[color=green]> runc.ash[/color]

[957] Chateau Painting
Encounter: Eldritch Tentacle named Sssssblrgblllrrgggh
Round 0: Veracity wins initiative!
Round 1: You lose 1 hit point
Round 1: Veracity executes a macro!
Round 1: Veracity attacks!
Round 2: Eldritch Tentacle takes 77 damage.
Round 2: You lose 8 hit points
Round 2: Veracity attacks!
Round 3: Eldritch Tentacle takes 76 damage.
Round 3: You lose 26 hit points
Round 3: Veracity attacks!
Round 4: Eldritch Tentacle takes 74 damage.
Round 4: You lose 9 hit points
Round 4: Veracity attacks!
Round 5: Eldritch Tentacle takes 96 damage.
Round 5: You lose 28 hit points
Round 5: Veracity attacks!
Round 6: Eldritch Tentacle takes 74 damage.
Round 6: Veracity wins the fight!
You acquire an item: eldritch effluvium
You acquire an item: eldritch effluvium
You acquire an item: eldritch effluvium
After Battle: You gain 20 Fortitude
After Battle: You gain 41 Mysteriousness
After Battle: You gain 66 Smarm
So, yes, it did not call my consult script.

I was running in Eclipse and had a breakpoint at run_combat() and it did stop there. Unfortunately, I stepped over the part which would have let me see why it did not run the consult script, instead choosing to make a macro which was all "attack".

Code:
> runc.ash

Starting ASH script: runc.ash
class net.sourceforge.kolmafia.request.GenericRequest
Connecting to place.php...

Requesting: https://www.kingdomofloathing.com/place.php?whichplace=chateau&action=chateau_painting
Retrieved: https://www.kingdomofloathing.com/place.php?whichplace=chateau&action=chateau_painting
Field: Location = [fight.php?ireallymeanit=1499212832]

[957] Chateau Painting
Connecting to fight.php...

Requesting: https://www.kingdomofloathing.com/fight.php?ireallymeanit=1499212832
Retrieved: https://www.kingdomofloathing.com/fight.php?ireallymeanit=1499212832

Encounter: Eldritch Tentacle named Sssssblrgblllrrgggh
Round 0: Veracity wins initiative!
Parsing result: You lose 1 hit point
Round 1: You lose 1 hit point
Processing result:  HP: -1

Round 1: Veracity executes a macro!
Connecting to fight.php...

Requesting: https://www.kingdomofloathing.com/fight.php?action=macro&macrotext=%0A%0A%0Aif+hasskill+7170%0Askill+7170%0Aendif%0Amark+mafiafinal%0Aattack%0Agoto+mafiafinal
Retrieved: https://www.kingdomofloathing.com/fight.php?action=macro&macrotext=%0A%0A%0Aif+hasskill+7170%0Askill+7170%0Aendif%0Amark+mafiafinal%0Aattack%0Agoto+m

Round 1: Veracity attacks!
...
etc.
I will point out that it did not "abort" on me; it called run_combat() and that did, in fact, finish the combat.

What does your CCS look like when you run your script?
 

ckb

Minion
Staff member
What does your CCS look like when you run your script?

My CCS is this (a lot like your example):
Code:
[ default ]
consult ckb-consult.ash

Also, tricky that this can only be tested once per day with the Chateau.
 
Also, tricky that this can only be tested once per day with the Chateau.

What about lynyrd snares with Eldritch Attunement active? (I have an issue with my CCS not firing as well but I've rolled back all the combat changes to r18096 to get past that).
 

Veracity

Developer
Staff member
I ascended, which meant I could test again today. ;)

The reason it ignored my consult script was because, yet again, my CCS had a section for Eldritch Tentacle, and so the default section (which called the consult script) was not executed. I removed that - and turned on macro debugging - and ran my script.

Code:
[color=green]> runc.ash[/color]

[56] Chateau Painting
Encounter: Eldritch Tentacle named Blrgssssssssshhsssblrgh
Round 0: Veracity wins initiative!
stopping macrofication due to action: consult consult.ash
initround = 1
monster = Eldritch Tentacle
page length = 12124
Round 1: Veracity casts SAUCEGEYSER!
Round 2: Eldritch Tentacle takes 58 damage.
Round 2: Veracity wins the fight!
After Battle: Looking at the snowglobe reminds you of that time at KoL Con VIII, when you managed to successfully coordinate a dinner for a group of like forty people.
After Battle: You gain 3 Enchantedness
You acquire an item: eldritch effluvium
You acquire an item: eldritch effluvium
After Battle: You gain 8 Strongness
After Battle: You gain 5 Mysteriousness
After Battle: You gain 13 Sarcasm
(macro debugging was what printed the "stopping macrofication" line.)
As you can see, it called my consult script which executed and killed the creature as specified.

I'll sleep on it and see if I can come up with a suggestion for something you can do to debug this, but, as you can see, this is working perfectly for me.
 

Veracity

Developer
Staff member
What about lynyrd snares with Eldritch Attunement active? (I have an issue with my CCS not firing as well but I've rolled back all the combat changes to r18096 to get past that).
Eldritch Attunement is a different issue. That forces a multi-fight - and my new(ish) fight code broke automating those.

That was described in the other thread where somebody reported they could not run run_combat() immediately after a fight had finished in order to handle the multifight any more.

I believe I fixed it in r18130.

This script:

Code:
buffer page = visit_url( "adventure.php?snarfblat=150" );
page = run_combat();
if ( have_effect( $effect[ eldritch attunement] ) > 0 ) {
    run_combat();
}
With an appropriate CCS and consult script, now does this:

Code:
[color=green]> runc1.ash[/color]

[499275] The Orcish Frat House (Bombed Back to the Stone Age)
Encounter: caveman frat pledge
Round 0: Tebryn wins initiative!
initround = 1
monster = caveman frat pledge
page length = 28353
Round 1: Tebryn attacks!
Round 2: caveman frat pledge takes 8405 damage.
Round 2: Wingwang shakes loose a considerable quantity of spice. You conjure up a canister and collect it.
You acquire an item: spices
Round 2: Tebryn wins the fight!
After Battle: Stubert sits on your fallen opponent's body, blows a smoke ring, and winks at you.
You gain 230 Meat
After Battle: Wingwang demonstrates a dance of celebration from his native land. Translated into couscous, it's basically incomprehensible.
You acquire an item: stone baseball cap
You acquire an item: chunk of rock salt
After Battle: You gain 11 Muscleboundness
After Battle: You gain 73 Enchantedness
After Battle: You gain 20 Sarcasm

[499276] The Orcish Frat House (Bombed Back to the Stone Age)
Encounter: Eldritch Tentacle
Round 0: Tebryn wins initiative!
initround = 1
monster = Eldritch Tentacle
page length = 28178
Round 1: Tebryn attacks!
Round 2: Eldritch Tentacle takes 114 damage.
Round 2: Wingwang shakes loose a considerable quantity of spice. You conjure up a canister and collect it.
You acquire an item: spices
initround = 2
monster = Eldritch Tentacle
page length = 29077
Round 2: Tebryn attacks!
Round 3: Eldritch Tentacle takes 114 damage.
Round 3: You lose 54 hit points
initround = 3
monster = Eldritch Tentacle
page length = 28702
Round 3: Tebryn attacks!
Round 4: Eldritch Tentacle takes 114 damage.
Round 4: Tebryn wins the fight!
After Battle: Wingwang whirls around picking up items, like a little couscous tornado.
You acquire an item: eldritch effluvium
After Battle: You gain 26 Strengthliness
After Battle: You gain 95 Enchantedness
After Battle: You gain 29 Chutzpah
which seems correct.

I am out of lynyrd snare usages for the day, but I have no reason to think the multifight won't trigger the same way with those.
 

ckb

Minion
Staff member
Tried r18130, and this still aborted with the chateau fight. Debug logs attached for 2 different fights. I will continue to try a few different things to gather data.
 

Attachments

  • DEBUG_20170705.txt
    84.2 KB · Views: 42

Veracity

Developer
Staff member
The problem I am having is that your DEBUG logs do not show "aborts". It shows KoLmafia successfully redirecting to fight.php?ireallymeanit=1499279540 and then nothing. In my examples, the run_combat() actually runs the combat following the corresponding redirect. In your case, nothing.

KoLmafia "aborts". What does it say? Does it abort before or after your script does run_combat()? Can you put in debug prints to determine if it actually tries the run_combat()?
 

ckb

Minion
Staff member
The problem I am having is that your DEBUG logs do not show "aborts". It shows KoLmafia successfully redirecting to fight.php?ireallymeanit=1499279540 and then nothing. In my examples, the run_combat() actually runs the combat following the corresponding redirect. In your case, nothing.

KoLmafia "aborts". What does it say? Does it abort before or after your script does run_combat()? Can you put in debug prints to determine if it actually tries the run_combat()?

Thats the weird thing... it just does nothing. Mafia stops (I think with a red abort background) but no error message or abort message or even a "you're on your own partner".

I get this in the CLI:
Code:
[7] Chateau Painting
Encounter: writing desk

If I enter
> ashq run_combat()
in the CLI, nothing happens.

Clicking or reloading a page in the relay browser will then redirect to the fight, allowing me to finish it, either manually in the relay browser, through a relay link to my macro/consult script, or by then using ashq run_combat() from the CLI.

I'll add some more debug prints. Maybe I should just print(page); to get everything.
 

ckb

Minion
Staff member
More weird stuff, this using r18130:

Here is what my script does now (printing debug info):

Code:
	cli_execute("debug on");
	if (get_property("chateauMonster")=="writing desk") {
		print("BUGGER: visit_url","blue");
		buffer page = visit_url("place.php?whichplace=chateau&action=chateau_painting");
		print(page,"olive");
		page = run_combat();
		print("BUGGER: run_combat","blue");
		print(page,"olive");
	}
	cli_execute("debug off");
then,
Code:
	if (get_property("writingDesksDefeated").to_int()>=4) {
		DigitPawn();
	} else {
		abort("ckb-HCStd: have not defeated enough writing desks to digitize something else");
	}

This code gets executed after I have cleared Barrrney's Barrr, so my last combat before visiting the Chateau is the booty crab.
Now the weird part - the fight does not actually abort, it just gets skipped. Mafia does not record the win against the 5th writing desk, continues then Mafia aborts with the "ckb-HCStd: have not defeated enough writing desks to digitize something else" message.

Session log is this:
Code:
[164] Cap'm Caronch's Map
Encounter: booty crab
Round 0: ckb1 loses initiative!
Round 1: You lose 19 hit points
ckb-consult: Round 1: Fighting a booty crab at none with 120 ML
Monster: Atk=220, Def=210, HP=190, Dmg=6, Hit=false
Disco Bandit: Atk=414 Moxie, Mox=414, HP=537, Hit=true
ckb-consult macro = abort hppercentbelow 20; abort pastround 27; skill Summon Love Mosquito; skill Summon Love Gnats; use Time-Spinner; skill Cowboy Kick; attack; repeat !pastround 22; skill Stuffed Mortar Shell; skill Cannelloni Cannon; repeat; 
Round 1: ckb1 executes a macro!
Round 1: ckb1 casts SUMMON LOVE MOSQUITO!
Round 2: booty crab takes 10 damage.
Round 2: You gain 10 hit points
Round 2: ckb1 casts SUMMON LOVE GNATS!
Round 3: ckb1 uses the Time-Spinner!
Round 4: booty crab drops 11 attack power.
Round 4: booty crab drops 10 defense.
Round 4: ckb1 casts COWBOY KICK!
Round 5: booty crab takes 11 damage.
Round 5: ckb1 attacks!
Round 6: booty crab takes 140 damage.
Round 6: ckb1 attacks!
Round 7: booty crab takes 140 damage.
Round 7: ckb1 wins the fight!
After Battle: A love grub shyly approaches you and hands you some extra Meat.
You gain 1005 Meat
You acquire an item: Cap'm Caronch's nasty booty
After Battle: You gain 17 Strongness
You gain a Muscle point!
After Battle: You gain 20 Mysteriousness
You gain a Mysticality point!
After Battle: You gain 44 Smarm
You gain a Moxie point!
Finished using 1 Cap'm Caronch's Map.


Visit to Island: Barrrney's Barrr in progress...
Encounter: This Adventure Bites
This Adventure Bites
You acquire an item: Orcish Frat House blueprints

Purchasing frilly skirt (1 @ 76)...
You spent 76 Meat
You acquire an item: frilly skirt
Purchases complete.
Putting on frilly skirt...
Equipment changed.

[166] Orcish Frat House blueprints

[166] Frat House
Encounter: The Infiltrationist
Submitting option 3 for choice 188
You acquire an item: Cap'm Caronch's dentures

Visit to Island: Barrrney's Barrr in progress...

[167] Barrrney's Barrr
Encounter: Step Up to the Table, Put the Ball in Play

ckb-Std: Trying Beer Pong

[168] Barrrney's Barrr
Encounter: Arrr You Man Enough?
Found appropriate retort for insult.
Insult: Yer face is as foul as that of a drowned goat!
Retort: I'm not really comfortable being compared to your girlfriend that way.
Found appropriate retort for insult.
Insult: Not a single man has faced me and lived to tell the tale!
Retort: It only seems that way because you haven't learned to count to one.
Found appropriate retort for insult.
Insult: In all my years I've not seen a more loathsome worm than yerself!
Retort: Amazing! How do you manage to shave without using a mirror?
You won a thrilling game of Insult Beer Pong!

ckb-Std: Fighting One Writing Desk
BUGGER: visit_url

[169] Chateau Painting
Encounter: writing desk
<html><head><script language=Javascript><!--if (parent.frames.length == 0) location.href="game.php";top.charpane.location.href="charpane.php";//--></script><script language=Javascript src="https://s3.amazonaws.com/images.kingdomofloathing.com/scripts/keybinds.min.2.js"></script><script language=Javascript src="https://s3.amazonaws.com/images.kingdomofloathing.com/scripts/window.20111231.js"></script><script language=Javascript src="https://s3.amazonaws.com/images.kingdomofloathing.com/scripts/jquery-1.3.1.min.js"></script><link href="https://fonts.googleapis.com/css?family=Shadows+Into+Light" rel="stylesheet"><script language="javascript" src="https://s3.amazonaws.com/images.kingdomofloathing.com/scripts/core.js"></script><script src="https://s3.amazonaws.com/images.kingdomofloathing.com/scripts/fight.js"></script><script>var onturn = 1;</script> <link rel="stylesheet" type="text/css" href="https://s3.amazonaws.com/images.kingdomofloathing.com/styles.20151006.css"><style type='text/css'>.faded { zoom: 1; filter: alpha(opacity=35); opacity: 0.35; -khtml-opacity: 0.35; -moz-opacity: 0.35;}</style></head><body><center><table width=95% cellspacing=0 cellpadding=0><tr><td style="color: white;" align=center bgcolor=blue><b>Combat!</b></td></tr><tr><td style="padding: 5px; border: 1px solid blue;"><center><table><tr><td><center><table><tr><td width=30 valign=top></td><td><div id=monsterpic style='position: relative;'> <img id='monpic' src="https://s3.amazonaws.com/images.kingdomofloathing.com/adventureimages/ravendesk.gif" width=100 height=100></div></td><td valign=center>You're fighting <span id='monname'>a writing desk</span></td></tr></table><br><table><tr><td width=30><img src=https://s3.amazonaws.com/images.kingdomofloathing.com/itemimages/hp.gif width=30 height=30 alt="Enemy's Hit Points" title="Enemy's Hit Points"></td><td width=50 valign=center align=left><b><font size=+2>97</font></b></td><td width=30><img src=https://s3.amazonaws.com/images.kingdomofloathing.com/itemimages/nicesword.gif width=30 height=30 alt="Enemy's Attack Power" title="Enemy's Attack Power"></td><td width=50 valign=center align=left><b><font size=+2>98</font></b></td><td width=30><img src=https://s3.amazonaws.com/images.kingdomofloathing.com/itemimages/whiteshield.gif width=30 height=30 alt="Enemy's Defense" title="Enemy's Defense"></td><td width=50 valign=center align=left><b><font size=+2>98</font></b></td><td><img src=https://s3.amazonaws.com/images.kingdomofloathing.com/itemimages/sprocket.gif alt="This monster is a Construct" title="This monster is a Construct"></td><td><img src=https://s3.amazonaws.com/images.kingdomofloathing.com/itemimages/circle.gif width=30 height=30 alt="This monster has no particular elemental alignment." title="This monster has no particular elemental alignment."></td><td><img src=https://s3.amazonaws.com/images.kingdomofloathing.com/itemimages/watch.gif alt="Initiative +50%" title="Initiative +50%"></td></tr></table><script type="text/javascript">var monsterstats = {"hp":"97","def":"98","off":"98"};</script></center><blockquote>You gaze at the painting, reflecting on the fight. Your vision swims, and the memory intensifies.</blockquote><center><p><p>You get the jump on it.<p><p><center><table><a name="end"><form name=attack action=fight.php method=post><input type=hidden name=action value="attack"><tr><td align=center><input id='tack' picurl=bassclarinet onclick="return killforms(this)" class=button type=submit value="Attack with your bass clarinet"></td></tr></form></a><form name=steal action=fight.php method=post><input type=hidden name=action value="steal"><tr><td align=center><input class=button onclick="return killforms(this);" type=submit value="Pick Its Pocket"></td></tr></form><form name=useitem action=fight.php method=post><input type=hidden name=action value="useitem"><tr><td align=left><select name=whichitem><option value=0>(select an item)</option><option picurl=beer value=2350>beer bomb (1)</option><option picurl=cast value=474>cast (4)</option><option picurl=napkin value=2956>cocktail napkin (5)</option><option picurl=newyoucard1 value=9479>Daily Affirmation: Always be Collecting (1)</option><option picurl=newyoucard7 value=9485>Daily Affirmation: Keep Free Hate in your Heart (1)</option><option picurl=balm value=232>Doc Galaktik's Ailment Ointment (1)</option><option picurl=kgbcigar value=9497>exploding cigar (6)</option><option picurl=ninjastars value=353>frigid ninja stars (1)</option><option picurl=inkwell value=1958>inkwell (3)</option><option picurl=firecrack value=747>Knob Goblin firecracker (1)</option><option picurl=loveboomerang value=9323>LOV Enamorang (2)</option><option picurl=biscuit value=563>sonar-in-a-biscuit (1)</option><option picurl=web value=27>spider web (2)</option><option picurl=stuffingball value=9164>stuffing fluffer (2)</option><option picurl=tennisball value=8650>tennis ball (1)</option><option picurl=book4 value=2947>The Big Book of Pirate Insults (1)</option><option picurl=timespinner selected value=9104>Time-Spinner (1)</option><option picurl=potion5 value=469>wussiness potion (3)</option></select><br><select name=whichitem2><option value=0>(select an item)</option><option value=2350>beer bomb (1)</option><option value=474>cast (4)</option><option value=2956>cocktail napkin (5)</option><option value=9479>Daily Affirmation: Always be Collecting (1)</option><option value=9485>Daily Affirmation: Keep Free Hate in your Heart (1)</option><option value=232>Doc Galaktik's Ailment Ointment (1)</option><option value=9497>exploding cigar (6)</option><option value=353>frigid ninja stars (1)</option><option value=1958>inkwell (3)</option><option value=747>Knob Goblin firecracker (1)</option><option value=9323>LOV Enamorang (2)</option><option value=563>sonar-in-a-biscuit (1)</option><option value=27>spider web (2)</option><option value=9164>stuffing fluffer (2)</option><option value=8650>tennis ball (1)</option><option value=2947>The Big Book of Pirate Insults (1)</option><option value=9104>Time-Spinner (1)</option><option value=469>wussiness potion (3)</option></select> <input class=button type=submit onclick="return killforms(this);" value="Use Item(s)"></td></tr></form><form name=skill action=fight.php method=post><input type=hidden name=action value="skill"><tr><td align=center><select name=whichskill><option value='none'>(select a skill)</option><option value="2" picurl="fireball" >Chronic Indigestion (2 Mojo Points)</option><option value="149" picurl="shatter" >Shattering Punch (27 Mojo Points)</option><option value="15" picurl="commacha" >CLEESH (7 Mojo Points)</option><option value="19" picurl="snout" >Transcendent Olfaction (37 Mojo Points)</option><option value="28" picurl="fire" >Awesome Balls of Fire (117 Mojo Points)</option><option value="29" picurl="campfire" >Conjure Relaxing Campfire (27 Mojo Points)</option><option value="30" picurl="cyclone" >Snowclone (117 Mojo Points)</option><option value="31" picurl="snowflake" >Maximum Chill (27 Mojo Points)</option><option value="37" picurl="wink" >Inappropriate Backrub (27 Mojo Points)</option><option value="36" picurl="greasebolt" >Grease Lightning (117 Mojo Points)</option><option value="32" picurl="egg" >Eggsplosion (117 Mojo Points)</option><option value="33" picurl="blooddrops" >Mudbath (27 Mojo Points)</option><option value="42" picurl="tombstone" >Raise Backup Dancer (117 Mojo Points)</option><option value="43" picurl="creepysleepy" >Creepy Lullaby (27 Mojo Points)</option><option value="117" picurl="rrainbow" >Belch The Rainbow (2 Mojo Points)</option><option value="131" picurl="garbagenova" >Garbage Nova (47 Mojo Points)</option><option value="143" picurl="firefoot" >Firegate (47 Mojo Points)</option><option value="148" picurl="teeth" >Frost Bite (47 Mojo Points)</option><option value="150" picurl="snokebomb" >Snokebomb (47 Mojo Points)</option><option value="163" picurl="nopic" >Gingerbread Mob Hit (27 Mojo Points)</option><option value="92" picurl="upsideturtle" >Club Earth (47 Mojo Points)</option><option value="94" picurl="splattersmash" >Splattersmash (22 Mojo Points)</option><option value="97" picurl="turtleini" >Turtleini (32 Mojo Points)</option><option value="98" picurl="sauceshell" >Sauceshell (27 Mojo Points)</option><option value="102" picurl="shadownoodles" >Shadow Noodles (27 Mojo Points)</option><option value="104" picurl="splashdance" >Splashdance (27 Mojo Points)</option><option value="1022" picurl="clobber" >Clobber (1 Mojo Point)</option><option value="1023" picurl="hookspear" >Harpoon! (27 Mojo Points)</option><option value="1004" picurl="club2" >Lunge Smack (1 Mojo Point)</option><option value="1003" picurl="club" >Thrust-Smack (1 Mojo Point)</option><option value="1033" picurl="clubfoot" >Club Foot (5 Mojo Points)</option><option value="1005" picurl="cudgel" >Lunging Thrust-Smack (5 Mojo Points)</option><option value="1038" picurl="northernexp" >Northern Explosion (13 Mojo Points)</option><option value="2022" picurl="ssnapper" >Spectral Snapper (17 Mojo Points)</option><option value="2023" picurl="toss" >Toss (1 Mojo Point)</option><option value="2024" picurl="leviatuga" >Summon Leviatuga (37 Mojo Points)</option><option value="2003" picurl="headbutt" >Headbutt (1 Mojo Point)</option><option value="2028" picurl="shellup" >Shell Up (3 Mojo Points)</option><option value="2032" picurl="spiritsnap" >Spirit Snap (7 Mojo Points)</option><option value="2015" picurl="kneebutt" >Kneebutt (1 Mojo Point)</option><option value="3019" picurl="fearfulfet" >Fearful Fettucini (29 Mojo Points)</option><option value="3020" picurl="line" >Spaghetti Spear (1 Mojo Point)</option><option value="3003" picurl="ravshurikens" >Ravioli Shurikens (1 Mojo Point)</option><option value="3004" picurl="entnoodles" >Entangling Noodles (1 Mojo Point)</option><option value="3009" picurl="lasbandage" >Lasagna Bandages (3 Mojo Points)</option><option value="3005" picurl="pastacannon" >Cannelloni Cannon (5 Mojo Points)</option><option value="3007" picurl="stuffshell" >Stuffed Mortar Shell (5 Mojo Points)</option><option value="3008" picurl="ironspoon" >Weapon of the Pastalord (29 Mojo Points)</option><option value="4020" picurl="salsaball" >Salsaball (1 Mojo Point)</option><option value="4024" picurl="scurse1" >Curse of Vichyssoise (1 Mojo Point)</option><option value="4003" picurl="saucestream" >Stream of Sauce (1 Mojo Point)</option><option value="4014" picurl="saucysalve" >Saucy Salve (1 Mojo Point)</option><option value="4005" picurl="raincloud" >Saucestorm (3 Mojo Points)</option><option value="4029" picurl="scurse3" >Curse of Marinara (1 Mojo Point)</option><option value="4009" picurl="saucewave" >Wave of Sauce (7 Mojo Points)</option><option value="4031" picurl="scurse2" >Curse of the Thousand Islands (3 Mojo Points)</option><option value="4032" picurl="saucecicle" >Saucecicle (9 Mojo Points)</option><option value="4012" picurl="saucegeyser" >Saucegeyser (21 Mojo Points)</option><option value="4034" picurl="scurse4" >Curse of Weaksauce (5 Mojo Points)</option><option value="5019" picurl="terrortango" >Tango of Terror (5 Mojo Points)</option><option value="5021" picurl="hernia" >Suckerpunch (0 Mojo Points)</option><option value="5003" picurl="eyepoke" >Disco Eye-Poke (1 Mojo Point)</option><option value="5005" picurl="dance1" >Disco Dance of Doom (1 Mojo Point)</option><option value="5008" picurl="dance2" >Disco Dance II: Electric Boogaloo (1 Mojo Point)</option><option value="5012" picurl="facestab" >Disco Face Stab (5 Mojo Points)</option><option value="5033" picurl="knifedark" >Knife in the Dark (7 Mojo Points)</option><option value="5035" picurl="irondagger" >Disco Shank (10 Mojo Points)</option><option value="5036" picurl="dance3" >Disco Dance 3: Back in the Habit (7 Mojo Points)</option><option value="5037" picurl="fire" >Disco Inferno (12 Mojo Points)</option><option value="6025" picurl="breath" >Sing (1 Mojo Point)</option><option value="6029" picurl="brokenflute" >Dissonant Riff (1 Mojo Point)</option><option value="6034" picurl="cdlm" >Concerto de los Muertos (5 Mojo Points)</option><option value="6037" picurl="bawdyrefrain" >Bawdy Refrain (8 Mojo Points)</option><option value="7245" picurl="lb_mosquito" >Summon Love Mosquito (0 Mojo Points)</option><option value="7246" picurl="lb_stink" >Summon Love Stinkbug (0 Mojo Points)</option><option value="7247" picurl="lb_gnats" >Summon Love Gnats (0 Mojo Points)</option><option value="7268" picurl="cowboyboots" selected>Cowboy Kick (0 Mojo Points)</option><option value="7273" picurl="syringe2" >Extract (2 Mojo Points)</option><option value="7275" picurl="acc8" >Compress (2 Mojo Points)</option><option value="17047" picurl="exclam" >Mild Curse (1 Mojo Point)</option></select> <input class=button type=submit onclick="return killforms(this);" value="Use Skill"></td></tr></form><form name=runaway action=fight.php method=post><input type=hidden name=action value="runaway"><tr><td align=center><input class=button onclick="return killforms(this);" type=submit value="Run Away"></td></tr></form></table></center></td></tr></table></center></td></tr><tr><td height=4></td></tr></table></center></body></html>

BUGGER: run_combat
<html><head><script language=Javascript><!--if (parent.frames.length == 0) location.href="game.php";top.charpane.location.href="charpane.php";//--></script><script language=Javascript src="https://s3.amazonaws.com/images.kingdomofloathing.com/scripts/keybinds.min.2.js"></script><script language=Javascript src="https://s3.amazonaws.com/images.kingdomofloathing.com/scripts/window.20111231.js"></script><script language=Javascript src="https://s3.amazonaws.com/images.kingdomofloathing.com/scripts/jquery-1.3.1.min.js"></script><link href="https://fonts.googleapis.com/css?family=Shadows+Into+Light" rel="stylesheet"><script language="javascript" src="https://s3.amazonaws.com/images.kingdomofloathing.com/scripts/core.js"></script><script src="https://s3.amazonaws.com/images.kingdomofloathing.com/scripts/fight.js"></script><script>var onturn = 2;</script> <link rel="stylesheet" type="text/css" href="https://s3.amazonaws.com/images.kingdomofloathing.com/styles.20151006.css"><style type='text/css'>.faded { zoom: 1; filter: alpha(opacity=35); opacity: 0.35; -khtml-opacity: 0.35; -moz-opacity: 0.35;}</style></head><body><center><table width=95% cellspacing=0 cellpadding=0><tr><td style="color: white;" align=center bgcolor=blue><b>Combat!</b></td></tr><tr><td style="padding: 5px; border: 1px solid blue;"><center><table><tr><td><!-- macroaction: skill 7245 --><center><table><tr><td width=30 valign=top></td><td><div id=monsterpic style='position: relative;'> <img id='monpic' src="https://s3.amazonaws.com/images.kingdomofloathing.com/adventureimages/bootycrab.gif" width=100 height=100></div></td><td valign=center>You're fighting <span id='monname'>a booty crab</span></td></tr></table><br><table><tr><td width=30><img src=https://s3.amazonaws.com/images.kingdomofloathing.com/itemimages/hp.gif width=30 height=30 alt="Enemy's Hit Points" title="Enemy's Hit Points"></td><td width=50 valign=center align=left><b><font size=+2>180</font></b></td><td width=30><img src=https://s3.amazonaws.com/images.kingdomofloathing.com/itemimages/nicesword.gif width=30 height=30 alt="Enemy's Attack Power" title="Enemy's Attack Power"></td><td width=50 valign=center align=left><b><font size=+2>220</font></b></td><td width=30><img src=https://s3.amazonaws.com/images.kingdomofloathing.com/itemimages/whiteshield.gif width=30 height=30 alt="Enemy's Defense" title="Enemy's Defense"></td><td width=50 valign=center align=left><b><font size=+2>210</font></b></td><td><img src=https://s3.amazonaws.com/images.kingdomofloathing.com/itemimages/beastflavor.gif alt="This monster is a Beast" title="This monster is a Beast"></td><td><img src=https://s3.amazonaws.com/images.kingdomofloathing.com/itemimages/wink.gif width=30 height=30 alt="This monster is Sleazy. Sleaze is weak against Cold and Spooky." title="This monster is Sleazy. Sleaze is weak against Cold and Spooky."></td><td><img src=https://s3.amazonaws.com/images.kingdomofloathing.com/itemimages/lightningbolt.gif alt="Always wins initiative" title="Always wins initiative"></td></tr></table><script type="text/javascript">var monsterstats = {"hp":"180","def":"210","off":"220"};</script><table><tr><Td><p>A plump love mosquito bites your opponent, draining 10 damage worth of blood and injecting it into you. Luckily, the blood types match!</td></tr></table><center><table><tr><td><img src="https://s3.amazonaws.com/images.kingdomofloathing.com/itemimages/hp.gif" height=30 width=30></td><td valign=center class=effect>You gain 10 hit points.</td></tr></table></center><table><tr><Td></td></tr></table><table><tr><Td></td></tr></table><!-- macroaction: skill 7247 --><hr size="4" style="color: black; background-color: black;"/><script type="text/javascript">var monsterstats = {"hp":"180","def":"210","off":"220"};</script><table><tr><Td>You waft some of your gnat-specific aromas into the air surrounding your opponent. Right on cue, a cloud of gnats converges on it.</td></tr></table><table><tr><Td></td></tr></table><p>Your opponent sighs with relief as the love gnats disperse. <B>(STUN RESISTED!)</b><!-- macroaction: use 9104, 0 --><hr size="4" style="color: black; background-color: black;"/><script type="text/javascript">var monsterstats = {"hp":"180","def":"200","off":"209"};</script><table><tr><td valign=top><img src="https://s3.amazonaws.com/images.kingdomofloathing.com/itemimages/timespinner.gif" width=30 height=30 alt="Time-Spinner" title="Time-Spinner"></td><td valign=center><table><tr><Td>You flick the center of your time-spinner and watch as time runs backwards for your opponent, back to a simpler time when monsters were weaker and adventurers were adventurers.<center><table><tr><td><img src=https://s3.amazonaws.com/images.kingdomofloathing.com/itemimages/nicesword.gif width=30 height=30 alt="Monster Attack" title="Monster Attack"></td><td valign=center>Monster attack power reduced by <b>11</td></tr></table></center><center><table><tr><td><img src=https://s3.amazonaws.com/images.kingdomofloathing.com/itemimages/whiteshield.gif width=30 height=30 alt="Monster Defense" title="Monster Defense"></td><td valign=center>Monster defense reduced by <b>10</td></tr></table></center></td></tr></table></td></tr></table><table><tr><Td></td></tr></table><!-- macroaction: skill 7268 --><hr size="4" style="color: black; background-color: black;"/><script type="text/javascript">var monsterstats = {"hp":"169","def":"200","off":"209"};</script><table><tr><Td><p>You deliver a fierce cowboy kick, dealing 11 damage. Yee haw!</td></tr></table><table><tr><Td></td></tr></table><!-- macroaction: attack --><hr size="4" style="color: black; background-color: black;"/><script type="text/javascript">var monsterstats = {"hp":"29","def":"200","off":"209"};</script><table><tr><Td><p>You hit it for 127 (<font color=red><b>+2</b></font>) (<font color=blue><b>+4</b></font>) (<font color=green><b>+2</b></font>) (<font color=gray><b>+4</b></font>) (<font color=blueviolet><b>+1</b></font>) damage.<b><font color=blue> ZOT! ZAP! BARF! BIFF! BOOF! ZOT! KERBLAM! BARF! WHAM! WHAMMO!</font></b></td></tr></table><table><tr><Td></td></tr></table><p><table><tr><td>It tries to hit you with a pair of ragged claws, but you show it a peach and it gets all nervous and backs off.</td></tr></table><!-- macroaction: attack --><hr size="4" style="color: black; background-color: black;"/><script type="text/javascript">var monsterstats = {"hp":"0","def":"200","off":"209"};</script><table><tr><Td><p>You hit it for 127 (<font color=red><b>+2</b></font>) (<font color=blue><b>+4</b></font>) (<font color=green><b>+2</b></font>) (<font color=gray><b>+4</b></font>) (<font color=blueviolet><b>+1</b></font>) damage.<b><font color=blue> BARF! BAM! SMACK! KERBLAM! BOINK! BIFF! WHACK! SPLAT! BOINK! KERBLAM!</font></b></td></tr></table><table><tr><Td></td></tr></table><p><center>You win the fight!<!--WINWINWIN--><p><!--familiarmessage--><center><table><tr><td align=center valign=center><img src="https://s3.amazonaws.com/images.kingdomofloathing.com/itemimages/lb_grub.gif" width=30 height=30></td><td valign=center>A love grub shyly approaches you and hands you some extra Meat.</td></tr></table></center><center><table><tr><td align=center valign=center><img src="https://s3.amazonaws.com/images.kingdomofloathing.com/itemimages/meat.gif" width=30 height=30></td><td valign=center>You gain 1005 Meat</td></tr></table></center><center><table class="item" style="float: none" rel="id=2999&s=0&q=1&d=0&g=0&t=0&n=1&m=0&p=0&u=."><tr><td><img src="https://s3.amazonaws.com/images.kingdomofloathing.com/itemimages/chest.gif" alt="Cap'm Caronch's nasty booty" title="Cap'm Caronch's nasty booty" class=hand onClick='descitem(912251690)'></td><td valign=center class=effect>You acquire an item: <b>Cap'm Caronch's nasty booty</b></td></tr></table></center><p>You gain 17 Strongness.<bR><b>You gain a Muscle point!</b><br>You gain 20 Mysteriousness.<bR><b>You gain a Mysticality point!</b><br>You gain 44 Smarm.<bR><b>You gain a Moxie point!</b><br><p><a name="end"></a></center><center><a href="cove.php">Go back to the Obligatory Pirate's Cove</a></center><script>parent.charpane.location.href="charpane.php";</script><script language="javascript"> function updateParseItem(iid, field, info) { var tbl = $('#ic'+iid); var data = parseItem(tbl); if (!data) return; data[field] = info; var out = []; for (i in data) { if (!data.hasOwnProperty(i)) continue; out.push(i+'='+data[i]); } tbl.attr('rel', out.join('&')); } function parseItem(tbl) { tbl = $(tbl); var rel = tbl.attr('rel'); var data = {}; if (!rel) return data; var parts = rel.split('&'); for (i in parts) { if (!parts.hasOwnProperty(i)) continue; var kv = parts[i].split('='); tbl.data(kv[0], kv[1]); data[kv[0]] = kv[1]; } return data; }</script><script type="text/javascript" src="https://s3.amazonaws.com/images.kingdomofloathing.com/scripts/pop_query.20130705.js"></script><script type="text/javascript" src="https://s3.amazonaws.com/images.kingdomofloathing.com/scripts/ircm.20161111.js"></script><script type="text/javascript">var tp = top;function pop_ircm_contents(i, some) { var contents = '', shown = 0, da = ' <a href="#" rel="?" class="small dojaxy">[some]</a> <a href="#" rel="', db = '" class="small dojaxy">[all]</a>', dc = '<div style="width:100%; padding-bottom: 3px;" rel="', dd = '<a href="#" rel="1" class="small dojaxy">['; one = 'one'; ss=some;if (i.d==1 && i.s>0) { shown++; contents += dc + 'sellstuff.php?action=sell&ajax=1&type=quant&whichitem%5B%5D=IID&howmany=NUM&pwd=1ed67d145fd458b0a7eb2a5140807914" id="pircm_'+i.id+'"><b>Auto-Sell ('+i.s+' meat):</b> '+dd+one+']</a>';if (ss) { contents += da + i.n + db;}contents += '</div>';}one = 'one'; ss=some;if (i.q==0) { shown++; contents += dc + 'inventory.php?action=closetpush&ajax=1&whichitem=IID&qty=NUM&pwd=1ed67d145fd458b0a7eb2a5140807914" id="pircm_'+i.id+'"><b>Closet:</b> '+dd+one+']</a>';if (ss) { contents += da + i.n + db;}contents += '</div>';}one = 'one'; ss=some;if (i.q==0 && i.g==0 && i.t==1) { shown++; contents += dc + 'managestore.php?action=additem&qty1=NUM&item1=IID&price1=&limit1=&ajax=1&pwd=1ed67d145fd458b0a7eb2a5140807914" id="pircm_'+i.id+'"><b>Stock in Mall:</b> '+dd+one+']</a>';if (ss) { contents += da + i.n + db;}contents += '</div>';}one = 'one'; ss=some;if (i.q==0) { shown++; contents += dc + 'managecollection.php?action=put&ajax=1&whichitem1=IID&howmany1=NUM&pwd=1ed67d145fd458b0a7eb2a5140807914" id="pircm_'+i.id+'"><b>Add to Display Case:</b> '+dd+one+']</a>';if (ss) { contents += da + i.n + db;}contents += '</div>';}one = 'one'; ss=some;if (i.q==0 && i.p==0 && i.u=="q" && i.d==1 && i.t==1) { shown++; contents += dc + 'craft.php?action=pulverize&ajax=1&smashitem=IID&qty=NUM&pwd=1ed67d145fd458b0a7eb2a5140807914" id="pircm_'+i.id+'"><b>Pulverize:</b> '+dd+one+']</a>';if (ss) { contents += da + i.n + db;}contents += '</div>';}one = 'one'; ss=some;if (i.u && i.u != "." && !i.ac) { shown++; contents += dc + 'inv_'+(i.u=="a"?"redir":(lab=(i.u=="u"?"use":(i.u=="e"?"eat":(i.u=="b"?"booze":(i.u=="s"?"spleen":"equip"))))))+'.php?ajax=1&whichitem=IID&itemquantity=NUM&quantity=NUM'+(i.u=="q"?"&action=equip":"")+'&pwd=1ed67d145fd458b0a7eb2a5140807914" id="pircm_'+i.id+'"><b>'+ucfirst(unescape(i.ou ? i.ou.replace(/\+/g," ") : (lab=="booze"?"drink":lab)))+':</b> '+dd+one+']</a>';if (ss && i.u != 'q' && !(i.u=='u' && i.m==0)) { contents += da + i.n + db;}contents += '</div>';}one = 'one'; ss=some;if (i.u && i.u != "." && i.ac) { shown++; contents += dc + 'inv_equip.php?slot=1&ajax=1&whichitem=IID&action=equip&pwd=1ed67d145fd458b0a7eb2a5140807914" id="pircm_'+i.id+'"><b>Equip (slot 1):</b> '+dd+one+']</a>';if (ss && i.u != 'q' && !(i.u=='u' && i.m==0)) { contents += da + i.n + db;}contents += '</div>';}one = 'one'; ss=some;if (i.u && i.u != "." && i.ac) { shown++; contents += dc + 'inv_equip.php?slot=2&ajax=1&whichitem=IID&action=equip&pwd=1ed67d145fd458b0a7eb2a5140807914" id="pircm_'+i.id+'"><b>Equip (slot 2):</b> '+dd+one+']</a>';if (ss && i.u != 'q' && !(i.u=='u' && i.m==0)) { contents += da + i.n + db;}contents += '</div>';}one = 'one'; ss=some;if (i.u && i.u != "." && i.ac) { shown++; contents += dc + 'inv_equip.php?slot=3&ajax=1&whichitem=IID&action=equip&pwd=1ed67d145fd458b0a7eb2a5140807914" id="pircm_'+i.id+'"><b>Equip (slot 3):</b> '+dd+one+']</a>';if (ss && i.u != 'q' && !(i.u=='u' && i.m==0)) { contents += da + i.n + db;}contents += '</div>';} return [contents, shown];}tp=topvar todo = [];function nextAction() { var next_todo = todo.shift(); if (next_todo) { eval(next_todo); }}function dojax(dourl, afterFunc, hoverCaller, failureFunc, method, params) { $.ajax({ type: method || 'GET', url: dourl, cache: false, data: params || null, global: false, success: function (out) { nextAction(); if (out.match(/no\|/)) { var parts = out.split(/\|/); if (failureFunc) failureFunc(parts[1]); else if (window.dojaxFailure) window.dojaxFailure(parts[1]); else if (tp.chatpane.handleMessage) tp.chatpane.handleMessage({type: 'event', msg: 'Oops! Sorry, Dave, you appear to be ' + parts[1]}); else $('#ChatWindow').append('<font color="green">Oops! Sorry, Dave, you appear to be ' + parts[1] + '.</font><br />' + "\n"); return; } if (hoverCaller) { float_results(hoverCaller, out); if (afterFunc) { afterFunc(out); } return; }$(tp.mainpane.document).find("#effdiv").remove(); if(!window.dontscroll || (window.dontscroll && dontscroll==0)) { window.scroll(0,0);} var $eff = $(tp.mainpane.document).find('#effdiv'); if ($eff.length == 0) { var d = tp.mainpane.document.createElement('DIV'); d.id = 'effdiv'; var b = tp.mainpane.document.body; if ($('#content_').length > 0) { b = $('#content_ div:first')[0]; } b.insertBefore(d, b.firstChild); $eff = $(d); } $eff.find('a[name="effdivtop"]').remove().end() .prepend('<a name="effdivtop"></a><center>' + out + '</center>').css('display','block'); if (!window.dontscroll || (window.dontscroll && dontscroll==0)) { tp.mainpane.document.location = tp.mainpane.document.location + "#effdivtop"; } if (afterFunc) { afterFunc(out); } } });}</script></td></tr></table></center></td></tr><tr><td height=4></td></tr></table></center><a href="#end" onclick="this.style.display='none';" style="padding: 3px; border: 1px solid black; background: blue; color: white; font-weight: bold; position:absolute; right: 1; top: 2;" id="jumptobot">(jump to final round)</a></body></html>

ckb-Std: Have not yet defeated 5 writing desks

Note that visit_url() looks as expected, but when Mafia tries to run_combat() it returns the previous fight against the booty crab.

I loaded the fight in the relay browser and completed it and Mafia continued from there.


Hope this helps.
 

Veracity

Developer
Staff member
OK. I see this code in run_combat():

Code:
	public static Value run_combat( Interpreter interpreter )
	{
		RelayRequest relayRequest = interpreter.getRelayRequest();

		if ( FightRequest.currentRound > 0 || FightRequest.inMultiFight )
		{
			RequestThread.postRequest( FightRequest.INSTANCE );
		}
		String response = relayRequest == null ?
			FightRequest.lastResponseText : FightRequest.getNextTrackedRound();

		return new Value( DataTypes.BUFFER_TYPE, "", new StringBuffer( response == null ? "" : response ) );
	}
So, it only submits a new request if one of the following is true:

FightRequest.currentRound > 0

or

FightRequest.inMultiFight

After submitting (or not) it returns the (current) saved fight text.

I wonder if it is, for some reason, not advancing "currentRound" to 0 after starting the chateau painting and seeing what it gave you, in your case?

Something I will look at when I have time again - which might be Saturday.
 

Darzil

Developer
Maybe related, was getting weird behaviour with Ed, where in relay browser, running my combat macro using combat buttons, each fight I'd see a "twiddles thumbs" message as well as the fight.

GCLI was:
Code:
[442] The Lower Chambers (Empty/Empty/Ed's Chamber)
Encounter: Ed the Undying
Round 0: darzil loses initiative!
Round 1: darzil executes a macro!
Round 1: darzil casts SUMMON LOVE GNATS!
Round 2: darzil casts STUFFED MORTAR SHELL!
Round 3: darzil casts CURSE OF WEAKSAUCE!
Round 4: Ed the Undying (1) takes 249 damage.
Round 4: Ed the Undying (1) drops 12 attack power.
Round 4: Ed the Undying (1) drops 9 defense.
Round 4: darzil casts SAUCEGEYSER!
Round 5: Ed the Undying (1) takes 232 damage.
Round 5: Ed the Undying (1) drops 9 attack power.
Round 5: Ed the Undying (1) drops 11 defense.
Round 5: darzil wins the fight!
After Battle: Looking at the snowglobe reminds you of that time at KoL Con 3-D, when you managed to successfully coordinate a dinner for a group of like forty people.
After Battle: You gain 5 Enchantedness
After Battle: You gain 50 Mana Points
After Battle: You gain 18 Muscleboundness
After Battle: You gain 59 Magicalness
After Battle: You gain 31 Sarcasm
You gain 6 Soulsauce

[443] The Lower Chambers
Encounter: Ed the Undying
Round 0: darzil wins initiative!

[443] The Lower Chambers
KoLmafia thinks it is round 2 but KoL thinks it is round 1
Round 1: darzil executes a macro!
Round 1: darzil casts SUMMON LOVE GNATS!
Round 2: darzil casts STUFFED MORTAR SHELL!
Round 3: darzil casts CURSE OF WEAKSAUCE!
Round 4: Ed the Undying (2) takes 238 damage.
Round 4: Ed the Undying (2) drops 9 attack power.
Round 4: Ed the Undying (2) drops 10 defense.
Round 4: darzil casts SAUCEGEYSER!
Round 5: Ed the Undying (2) takes 234 damage.
Round 5: Ed the Undying (2) drops 9 attack power.
Round 5: Ed the Undying (2) drops 9 defense.
Round 5: darzil wins the fight!
After Battle: You gaze into the snowglobe and remember that time at KoL Con IV, when both BearMaiden the Ugly and BoozeNick complimented you on your dancing.
After Battle: You gain 6 Cheek
After Battle: You gain 50 Mana Points
After Battle: You gain 24 Fortitude
After Battle: You gain 54 Magicalness
After Battle: You gain 30 Smarm
You gain 7 Soulsauce

[444] The Lower Chambers
Encounter: Ed the Undying
Round 0: darzil wins initiative!

[444] The Lower Chambers
KoLmafia thinks it is round 2 but KoL thinks it is round 1
Round 1: darzil executes a macro!
Round 1: darzil casts SUMMON LOVE GNATS!
Round 2: darzil casts STUFFED MORTAR SHELL!
Round 3: darzil casts CURSE OF WEAKSAUCE!
Round 4: Ed the Undying (3) takes 234 damage.
Round 4: Ed the Undying (3) drops 12 attack power.
Round 4: Ed the Undying (3) drops 11 defense.
Round 4: darzil wins the fight!
After Battle: You remember a party at KoL Con IX, when you and HunterElephant Seal took turns doing benchpresses with SuperWombat's car. Wait, did that really happen?
After Battle: You gain 6 Muscleboundness
After Battle: You gain 50 Mana Points
After Battle: You gain 23 Strongness
After Battle: You gain 57 Enchantedness
After Battle: You gain 27 Smarm
You gain 6 Soulsauce

[445] The Lower Chambers
Encounter: Ed the Undying
Round 0: darzil wins initiative!

[445] The Lower Chambers
KoLmafia thinks it is round 2 but KoL thinks it is round 1
Round 1: darzil executes a macro!
Round 1: darzil casts SUMMON LOVE GNATS!
Round 2: darzil casts STUFFED MORTAR SHELL!
Round 3: darzil casts CURSE OF WEAKSAUCE!
Round 4: Ed the Undying (4) takes 226 damage.
Round 4: Ed the Undying (4) drops 9 attack power.
Round 4: Ed the Undying (4) drops 8 defense.
Round 4: darzil wins the fight!
After Battle: You gaze into the snowglobe and remember that time at KoL Con VII, when you and SuperZebra and FettuciniDancer won DanBob's trivia contest with your vast stores of useless esoteric knowledge!
After Battle: You gain 7 Magicalness
After Battle: You gain 50 Mana Points
After Battle: A love stag beetle brushes up against your ankle affectionately.
After Battle: You gain 5 Fortitude
After Battle: You gain 24 Muscleboundness
After Battle: You gain 58 Mysteriousness
You gain a Mysticality point!
You gain a Level!
After Battle: You gain 25 Roguishness
You gain a Moxie point!
You gain 6 Soulsauce

[446] The Lower Chambers
Encounter: Ed the Undying
Round 0: darzil wins initiative!

[446] The Lower Chambers
KoLmafia thinks it is round 2 but KoL thinks it is round 1
Round 1: darzil executes a macro!
Round 1: darzil casts SUMMON LOVE GNATS!
Round 2: darzil casts STUFFED MORTAR SHELL!
Round 3: darzil casts CURSE OF WEAKSAUCE!
Round 4: Ed the Undying (5) takes 242 damage.
Round 4: Ed the Undying (5) drops 8 attack power.
Round 4: Ed the Undying (5) drops 9 defense.
Round 4: darzil wins the fight!
After Battle: You pause and think about KoL Con VII, when you and BearTurtle and WolfInsaneSeal won DanBob's trivia contest with your vast stores of useless esoteric knowledge!
After Battle: You gain 8 Magicalness
After Battle: You gain 50 Mana Points
After Battle: You gain 22 Beefiness
After Battle: You gain 56 Enchantedness
After Battle: You gain 30 Sarcasm
You gain 6 Soulsauce

[447] The Lower Chambers
Encounter: Ed the Undying
Round 0: darzil wins initiative!

[447] The Lower Chambers
KoLmafia thinks it is round 2 but KoL thinks it is round 1
Round 1: darzil executes a macro!
Round 1: darzil casts SUMMON LOVE GNATS!
Round 2: darzil casts STUFFED MORTAR SHELL!
Round 3: darzil casts CURSE OF WEAKSAUCE!
Round 4: Ed the Undying (6) takes 247 damage.
Round 4: Ed the Undying (6) drops 9 attack power.
Round 4: Ed the Undying (6) drops 9 defense.
Round 4: darzil wins the fight!
After Battle: You remember that time at KoL Con VI, when you armwrestled Booger Cletus. You lost, but it was a good workout!
After Battle: You gain 4 Strongness
After Battle: You gain 50 Mana Points
After Battle: A love stag beetle brushes up against your ankle affectionately.
After Battle: You gain 4 Strongness
You can now equip a spongy shield (and possibly other things).
After Battle: You gain 30 Muscleboundness
You gain a Muscle point!
After Battle: You gain 49 Magicalness
After Battle: You gain 29 Cheek
You gain 6 Soulsauce

[448] The Lower Chambers
Encounter: Ed the Undying
Round 0: darzil wins initiative!

[448] The Lower Chambers
KoLmafia thinks it is round 2 but KoL thinks it is round 1
Round 1: darzil executes a macro!
Round 1: darzil casts SUMMON LOVE GNATS!
Round 2: darzil casts STUFFED MORTAR SHELL!
Round 3: darzil casts CURSE OF WEAKSAUCE!
Round 4: Ed the Undying (7) takes 229 damage.
Round 4: Ed the Undying (7) drops 10 attack power.
Round 4: Ed the Undying (7) drops 11 defense.
Round 4: darzil wins the fight!
After Battle: You remember a party at KoL Con X, when everybody got really excited about your super-Moxious Disco Bandit costume.
After Battle: You gain 4 Cheek
After Battle: You gain 50 Mana Points
After Battle: You gain 35 Muscleboundness
After Battle: You gain 52 Mysteriousness
After Battle: You gain 21 Cheek
You acquire an item: Holy MacGuffin
You gain 6 Soulsauce
 

Veracity

Developer
Staff member
That probably is related, actually, even if it is in the Relay Browser, since Ed is the classic multifight: after defeating him each time, you are offered a link to fight.php which takes you right to the next stage.

Following that link SHOULD start the next fight and do round zero, leaving you in round one - just like auto-following the fight.php?ireallymeantit link in the Relay Browser does.

I've been focusing on seeing how automating multifights works - and ckb's issue is not a multifight, although it is automated - but I'll try reproducing some multifights in the relay browser and seeing why the "script" button would not work.
 

Veracity

Developer
Staff member
I debugged this yesterday and today using The Gourd, the closest we have to Ed out-of-run, regarding chained multifights.
Revision 18142 should fix it.
 

ckb

Minion
Staff member
I debugged this yesterday and today using The Gourd, the closest we have to Ed out-of-run, regarding chained multifights.
Revision 18142 should fix it.

Success! Glorious success!
Thanks Veracity for tracking this down.
 
Top