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]);
}
}