Trying to keep track of Bag O' Tricks charges in combat using combat filters is a pain. Not every combat is guaranteed to have a filter, and not every response is sent to the combat filter (or at least I think the end of combat page is excluded). It would be nice if it kept track of charges automatically.
Charges are kept across rollover, range from 0 to 3, and reduce to 0 when you activate the buff. Buffs are limited to 3 times a day.
I think the code to support it is pretty simple. I added this to my local copy, FightRequest.java function updateRoundData:
Charges are kept across rollover, range from 0 to 3, and reduce to 0 when you activate the buff. Buffs are limited to 3 times a day.
I think the code to support it is pretty simple. I added this to my local copy, FightRequest.java function updateRoundData:
Code:
if ( KoLCharacter.hasEquipped( ItemPool.get( ItemPool.BAG_O_TRICKS, 1 ), EquipmentManager.OFFHAND ) )
{
if ( responseText.contains( "You reach into the bag and pull out " ) )
{
Preferences.increment( "_bagOTricksBuffs" );
Preferences.setInteger( "bagOTricksCharges", 0 );
}
else if ( responseText.contains( "The Bag o' Tricks" ) )
{
if ( responseText.contains( "The Bag o' Tricks suddenly feels a little heavier." ) )
{
Preferences.setInteger( "bagOTricksCharges", 1 );
}
else if ( responseText.contains( "The Bag o' Tricks begins to wriggle around in your hand." ) )
{
Preferences.setInteger( "bagOTricksCharges", 2 );
}
else if ( responseText.contains( "The Bag o' Tricks begins squirming around more urgently." ) ||
responseText.contains( "The Bag o' Tricks continues to wriggle around in your hand." ) )
{
Preferences.setInteger( "bagOTricksCharges", 3 );
}
}
}