Get counters

From Kolmafia
Revision as of 22:18, 21 May 2010 by imported>Bale
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
needs(code_samples);

Function Syntax

string get_counters(string label ,int minTurns ,int maxTurns )

  • label specifies the counters of interest - it is a case-insensitive, substring match. An empty string matches any counter that is capable of triggering an action when it expires: purely informational counters are ignored in this case.
  • minTurns and maxTurns specify the endpoints (inclusive) of the range to be checked. Passing the same value for both checks for an expiration on that specific turn.

Determines if a counter will expire in a specified period of time.

Return value is an empty string if there are no matching counters; the counter name if there is only one; or a tab-delimited list of names if there were multiple matches.

CLI Equivalent

The CLI command "counters" can be used to show, clear, or add to current turn counters.