Can drink: Difference between revisions
Jump to navigation
Jump to search
imported>StDoodle mNo edit summary |
imported>Taltamir plumber also returns false |
||
(One intermediate revision by one other user not shown) | |||
Line 5: | Line 5: | ||
FunctionPage| | FunctionPage| | ||
name={{#var:name}}| | name={{#var:name}}| | ||
function1={{Function| | function1={{Function| | ||
Line 14: | Line 13: | ||
}}| | }}| | ||
function_description=This function returns true if the logged-in character is not subject to | 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| | code1={{CodeSample| | ||
Line 30: | Line 29: | ||
special=When not logged in, this function returns true. | 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.