My adventures

From Kolmafia
Revision as of 07:48, 19 January 2007 by imported>Metraxis (Grammar)
Jump to navigation Jump to search

int my_adventures()

This function returns the logged-in character's current number of remaining adventures as an int. Use of this function is essential in any kind of goal-seeking loop, lest it run on forever trying to adventure with no way to do so.

An example:

while(my_adventures() >= 4) {
  if(use(1,$item[dance card])) {
    adventure(3,$location[Haunted Gallery]);
    adventure(3,$location[Haunted Ballroom]);
  }
}