Can interact: Difference between revisions

From Kolmafia
Jump to navigation Jump to search
imported>Metraxis
m Spelling Error
imported>Metraxis
m Spelling Error
Line 1: Line 1:
[[boolean]] [[can_interact()]]
[[boolean]] [[can_interact()]]


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


An example:
An example:

Revision as of 17:36, 18 February 2007

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 character 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 mein]);
} else {
  adventure(10,$location[Knob Goblin Kitchens]);
}