Get goals

From Kolmafia
Jump to navigation Jump to search

Function Syntax

string [int] get_goals()

This function returns an integer indexed map of all active adventuring goals that have not yet been met.

CodeSample

Version of is_goal() that accepts a stat and return true if it is a goal.

boolean is_goal( stat gstat ) {
   matcher stat_goal = create_matcher( "\\d+ " + to_lower_case(gstat), g );
   foreach i,g in get_goals() 
      if( stat_goal.find() )
         return true;
   return false;
}

See Also

adventure() | add_item_condition() | goal_exists() | is_goal()