Results 1 to 3 of 3

Thread: Bag O' Tricks charges

  1. #1

    Default Bag O' Tricks charges

    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, function updateRoundData:

    			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 );

  2. #2
    Senior Member zarqon's Avatar
    Join Date
    Nov 2007
    Seoul, Korea


    BatBrain tracks this for you if you're using a BatBrain-powered script such as SmartStasis or WHAM. If you're not, though, very tricky to track presently.

    I'd be pleased as well if BatBrain could use a more reliable built-in property.
    Sig by JakAtk
    My scripts: Prefref Plus | Skillref Plus | One-Click Wossnam | Om*****st (??) | Psychose-a-Matic | RandBot
    Combat suite: Best Between Battle | Mercenary Mood | SmartStasis | BatMan | BatMan RE
    For script authors: ASH Wiki | ZLib | BatBrain | CLI Links | CanAdv | Script Registry | Map Manager | About Bats
    If you appreciate my work, help me become BAT KING OF THE WORLD! Thanks to all donators!

  3. #3


    I tweaked the code slightly, and the setting needed to go a few other places, but this is added in 18213.

Posting Permissions

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