Get counters: Difference between revisions
Jump to navigation
Jump to search
imported>Bale Created page with '{{ #vardefine:name|get_counters}}{{ #vardefine:return_type|boolean}}{{ FunctionPage| name={{#var:name}}| function_category=Adventuring| function1={{Function| name={{#var:name}}…' |
imported>StDoodle m get_counters() returns string |
||
Line 1: | Line 1: | ||
{{ | {{ | ||
#vardefine:name|get_counters}}{{ | #vardefine:name|get_counters}}{{ | ||
#vardefine:return_type| | #vardefine:return_type|string}}{{ | ||
FunctionPage| | FunctionPage| |
Revision as of 18:57, 6 May 2010
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.