Can interact: Difference between revisions

From Kolmafia
Jump to navigation Jump to search
imported>Zarqon
m more links, fixed grammar, logged out info
imported>Zarqon
m fixed logged-out info
Line 15: Line 15:
[[Category:Ash Functions |Can interact()]]
[[Category:Ash Functions |Can interact()]]


When not logged in, this function returns ''true''.
When not logged in, this function returns ''false''.

Revision as of 07:36, 29 January 2009

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.