Can drink: Difference between revisions
Jump to navigation
Jump to search
imported>Efilnikufecin No edit summary |
imported>Taltamir plumber also returns false |
||
(5 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
{{ | |||
#vardefine:name|can_drink}}{{ | |||
#vardefine:return_type|boolean}}{{ | |||
FunctionPage| | |||
name={{#var:name}}| | |||
function1={{Function| | |||
name={{#var:name}}| | |||
aggregate={{#var:aggregate}}| | |||
return_type={{#var:return_type}}| | |||
return_also={{#var:return_also}} | |||
}}| | |||
< | function_description=This function returns true if the logged-in character is not subject to dietary restrictions that completely forbid drinking. Those being Plumber, Teetotaler, or Oxygenarian path. If the character is subject to those restrictions this function returns false.| | ||
code1={{CodeSample| | |||
drink(3,$ | title=Code Samples| | ||
description=If the character is able to drink, this code will make them drink 3 bottles of gin.| | |||
</ | code= | ||
<syntaxhighlight> | |||
[[Category: | if(can_drink()) { | ||
drink(3 , $item[bottle of gin]); | |||
} | |||
</syntaxhighlight> | |||
}}| | |||
see_also={{SeeAlso|can_eat|drink}}| | |||
special=When not logged in, this function returns true. | |||
}} | |||
[[Category:Your Character]] |
Latest revision as of 07:08, 5 April 2020
Function Syntax
boolean can_drink()
This function returns true if the logged-in character is not subject to dietary restrictions that completely forbid drinking. Those being Plumber, Teetotaler, or Oxygenarian path. If the character is subject to those restrictions this function returns false.
Code Samples
If the character is able to drink, this code will make them drink 3 bottles of gin.
if(can_drink()) {
drink(3 , $item[bottle of gin]);
}
See Also
Special
When not logged in, this function returns true.