Voting booth initiatives: Difference between revisions

From Kolmafia
Jump to navigation Jump to search
Gausie (talk | contribs)
No edit summary
Updated the syntax of my_path().id and for the error "Function 'voting_booth_initiative( class, int, int )' undefined."
 
Line 2: Line 2:
#vardefine:name|voting_booth_initiatives}}{{
#vardefine:name|voting_booth_initiatives}}{{
#vardefine:return_type|boolean [string]}}{{
#vardefine:return_type|boolean [string]}}{{
#vardefine:aggregate|yes}}{{
#vardefine:aggregate|yes}}{{FunctionPage|
 
FunctionPage|
name={{#var:name}}|
name={{#var:name}}|


Line 38: Line 36:
code=
code=
<syntaxhighlight>
<syntaxhighlight>
string [string] initiatives = voting_booth_initiative( my_class(), my_path_id(), my_daycount() );
boolean [string] initiatives = voting_booth_initiatives( my_class(), my_path().id, my_daycount() );
dump( initiatives );
dump( initiatives );
</syntaxhighlight>}}|
</syntaxhighlight>}}|
}}
}}

Latest revision as of 16:17, 17 January 2025

Function Syntax

boolean [string] voting_booth_initiatives(class class ,int path ,int daycount )

  • class is the class for the seed
  • path is the path id for the seed
  • daycount is the daycount for the seed

boolean [string] voting_booth_initiatives(int class ,int path ,int daycount )

  • class is the class id for the seed

Returns a list of voting initiatives that are available for a given class on a given day of an ascension in a given path

Code Sample

The following will tell you the initiatives available to you today without you ever having to visit the booth.

boolean [string] initiatives = voting_booth_initiatives( my_class(), my_path().id, my_daycount() );
dump( initiatives );