Have servant: Difference between revisions
Jump to navigation
Jump to search
imported>Relyk Created page with "{{ #vardefine:name|have_servant}}{{ #vardefine:return_type|boolean}}{{ FunctionPage| name={{#var:name}}| function1={{Function| name={{#var:name}}| aggregate={{#var:aggregate..." |
imported>Relyk No edit summary |
||
Line 19: | Line 19: | ||
code1={{CodeSample| | code1={{CodeSample| | ||
title=Code Samples| | title=Code Samples| | ||
description=Lists out all the | description=Lists out all the servants you currently have.| | ||
code= | code= | ||
<syntaxhighlight> | <syntaxhighlight> | ||
foreach it in $servants[] { | |||
foreach it in $ | if (have_servant(it)) { | ||
print("You have the servant "+it+"!", "blue"); | |||
if ( | |||
print("You have the | |||
} | } | ||
} | } | ||
</syntaxhighlight>| | </syntaxhighlight>| | ||
}}| | }}| | ||
see_also={{SeeAlso| | see_also={{SeeAlso|use_servant}}| | ||
cli_equiv=The CLI command " | cli_equiv=The CLI command "servant"|| | ||
}} | }} | ||
[[Category:Equipment]] | [[Category:Equipment]] |
Latest revision as of 07:00, 19 October 2015
Function Syntax
boolean have_servant(servant check_me )
- check_me is the servant to check for
Returns true if you have the specified servant check_me, and false otherwise. Returns false if you are not Ed the Undying.
Code Samples
Lists out all the servants you currently have.
foreach it in $servants[] {
if (have_servant(it)) {
print("You have the servant "+it+"!", "blue");
}
}
CLI Equivalent
The CLI command "servant"