Can interact

From Kolmafia
Revision as of 14:15, 1 March 2010 by imported>Grotfang (moved Can interact() to Can interact)
Jump to navigation Jump to search

boolean can_interact()

This function returns true if the logged-in character is subject to neither Hardcore nor Ronin restrictions. If the character has not spent the requisite turns and/or has not freed the King (for Hardcore characters), the function returns false.

This is commonly used to determine whether a player can access the mall:

 if (can_interact()) {
   buy(3,$item[hot hi mein]);
 } else {
   adventure(10,$location[Knob Goblin Kitchens]);
 }

When not logged in, this function returns false.