Can drink: Difference between revisions

From Kolmafia
Jump to navigation Jump to search
imported>Efilnikufecin
No edit summary
 
imported>Zarqon
m more links, consistent formatting
Line 1: Line 1:
[[boolean]] can_drink()
[[boolean]] [[can_drink()]]


This function returns <i>true</i> if the logged-in character is not subject to the dietary restrictions of a Teetotaler or Oxygenarian path. If the character is subject to those restrictions this function returns false.
This function returns ''true'' if the logged-in character is not subject to the dietary restrictions of a Teetotaler or Oxygenarian path. If the character is subject to those restrictions this function returns ''false''.
 
An example:


<code>
<code>
if(can_drink())  
  if ([[can_drink()]])  
  {
    [[drink()|drink]](3,$[[item]][bottle of gin]);
  drink(3,$[[item]][bottle of gin]);
  }
</code>
</code>
[[Category:Your Character | Can drink()]]
[[Category:Your Character | Can drink()]]
[[Category:Ash Functions |Can drink()]]
[[Category:Ash Functions |Can drink()]]
When not logged in, this function returns ''true''.

Revision as of 07:00, 29 January 2009

boolean can_drink()

This function returns true if the logged-in character is not subject to the dietary restrictions of a Teetotaler or Oxygenarian path. If the character is subject to those restrictions this function returns false.

 if (can_drink()) 
   drink(3,$item[bottle of gin]);

When not logged in, this function returns true.