Difference between revisions of "My adventures"

From Kolmafia
Jump to navigation Jump to search
imported>Metraxis
m (typo)
imported>Efilnikufecin
Line 11: Line 11:
 
   }
 
   }
 
  }</code>
 
  }</code>
 +
[[Category:Your Character | My adventures()]]
 +
[[Category:Ash Functions |My adventures()]]

Revision as of 13:02, 26 June 2007

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(1,$location[Haunted Ballroom]);
  }
}