Can interact: Difference between revisions
Jump to navigation
Jump to search
imported>Metraxis New Page |
imported>Metraxis m Spelling Error |
||
Line 7: | Line 7: | ||
<code> | <code> | ||
if([[can_interact()]]) { | if([[can_interact()]]) { | ||
buy(3,$[[item]][hot hi | buy(3,$[[item]][hot hi mein]); | ||
} else { | } else { | ||
adventure(10,$[[location]][Knob Goblin Kitchens]); | adventure(10,$[[location]][Knob Goblin Kitchens]); | ||
} | } | ||
</code> | </code> |
Revision as of 17:35, 18 February 2007
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 mein]);
} else {
adventure(10,$location[Knob Goblin Kitchens]);
}