Bug - Not A Bug Auto-Pickpocket doesn't work with Tiny Black hole equiped

Yvain

Member
The tiny black hole allows pickpocketing as a non-moxie class. Mafia will currently only autopickpocket as a moxie class.

Or maybe this should be a feature request.
 
Last edited:

Veracity

Developer
Staff member
What does the button for pickpocketing on the fight page say when you have a tiny black hole equipped?
 

slyz

Developer
I still haven't discovered the recipe for the Tiny Black Hole, but I can give this a shot. Veracity added the Tiny Black Hole to Fightrequest.canStillSteal() in r9261, but this function isn't used in macrofied combat.

I don't see anything that will prevent non-Moxie classes from stealing if the autoSteal property is set to true, although Mafia will only auto-steal:
1) if the player has an acceptable dodge rate and the monster drops at least one pickpocketable non-guaranteed item
2) if the monster drops a goal

Could you:

1) equip the Tiny Black Hole (as a non-Moxie class of course)
2) create this simple CCS:
Code:
[default]
"pickpocket"
abort
3) type "set debugMacro = true" in the gCLI
4) enter a combat (try to fight a low level monster - so you get initiative - that has at least one pickpocketable item)

This is to make sure that KoL's "pickpocket" macro command does know about the Tiny Black Hole.

Next, try to set autoSteal to true, choose "attack with weapon" as your combat action, and fight another low level monster (with macroDebug still true).

Another thing we could check is if the Tiny Black Hole gives you a pickpocket "skill" with a different name than the regular one, like Birdform does. Could you equip the Tiny Black Hole, enter combat, and save the HTML of the page? Beforehand, make sure KoL gives you the option to steal. Mafia checks the page for this pattern to determine whether it can steal or not:
Code:
"value=\"(Pick (?:His|Her|Their|Its) Pocket(?: Again)?|Look for Shiny Objects)\""
 

slyz

Developer
Marking this as Not A Bug then. I'm not really sure how people how people can get around this, but the best bet would be to prevent Mafia from macrofying the combat by adding a simple consult script, like this:
Code:
[ default ]
consult pickpocket.ash
attack with weapon
where pickpocket.ash would be something like this:
PHP:
void main( int initround, monster foe, string page )
{
     if ( !get_property( "autoSteal" ).to_boolean() ) return;

     create_matcher( "value=\"(Pick (?:His|Her|Their|Its) Pocket(?: Again)?|Look for Shiny Objects)\"", page );
     if ( !matcher.find() ) return;

      visit_url( "fight.php?action=steal" );
}
 

Yvain

Member
What does the button for pickpocketing on the fight page say when you have a tiny black hole equipped?
It says "Pick Pocket" and has the same icon as normal.

Another thing we could check is if the Tiny Black Hole gives you a pickpocket "skill" with a different name than the regular one, like Birdform does.
As best I can tell its the same skill. I had a pickpocket button left over from a previous moxie run and I can click it to pickpocket with the tiny black hole equiped.

When running the CCS - [default] "pickpocket" abort - I get:
[7632] Haunted Pantry
Encounter: overdone flame-broiled meat blob
Strategy: C:\new usb\kol\ccs\pickpocket.ccs [default]
Round 0: yvain wins initiative!
Round 1: Slurms McKenzie is just skin and bones. Well, slime and slime, technically, but still -- you should feed him!
Round 1: yvain executes a macro!
KoLmafia thinks it is round 2 but KoL thinks it is round 1
You're on your own, partner.
Click here to continue in the relay browser.

When using Attack with Weapon and AutoSteal on:
[7633] Haunted Pantry
Encounter: possessed can of tomatoes
Strategy: attack with weapon
Round 0: yvain wins initiative!
Round 1: Slurms McKenzie is just skin and bones. Well, slime and slime, technically, but still -- you should feed him!
Round 1: yvain executes a macro!
Round 1: yvain attacks!
Round 2: possessed can of tomatoes takes 318 damage.
Round 2: yvain wins the fight!
You gain 7 Meat
After Battle: Slurms McKenzie hops around, dancing a jig accompanied by wet squelching noises.
You acquire an item: razor-sharp can lid
You acquire an item: tomato
You gain 2 Enchantedness
 

slyz

Developer
If you could do the same after typing "set macroDebug = true" in the gCLI, we could make sure that it isn't Mafia preventing you from pickpocketing.
 
Top