My adventures

From Kolmafia
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Function Syntax

int my_adventures()

Returns the logged-in character's number of adventures remaining.

Code Samples

Using this function to spend all of your adventures farming the Castle:

adventure(my_adventures() , $location[giant's castle]);

Checking to see if you have adventures left before doing something:

if (my_adventures() == 0) abort("You can't run this script without adventures.");

Making sure you have enough adventures to perform a set of actions:

location farming_location = $location[giant's castle];
while (my_adventures() >= 4) {
   if (use(1 , $item[dance card])) {
      adventure(3 , farming_location);
      adventure(1 , $location[Haunted Ballroom]);
   } else break;
}

See Also

adventure() | use()

Special

When not logged in, this function returns 0.