Can interact

From Kolmafia
Revision as of 08:21, 20 January 2007 by imported>Metraxis (New Page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

boolean can_interact()

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

An example:

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