Use: Difference between revisions
Jump to navigation
Jump to search
imported>Bale No edit summary |
imported>Bale mNo edit summary |
||
Line 5: | Line 5: | ||
FunctionPage| | FunctionPage| | ||
name={{#var:name}}| | name={{#var:name}}| | ||
function1={{Function| | function1={{Function| | ||
Line 26: | Line 25: | ||
more_info=If {{pspan|qty}} is 0 or negative, no item will be used and the function will return true.| | more_info=If {{pspan|qty}} is 0 or negative, no item will be used and the function will return true.| | ||
}} | }} | ||
[[Category:Item Management]] |
Revision as of 22:05, 21 May 2010
needs(code_samples);
Function Syntax
boolean use(int qty ,item it )
- qty is the quantity to use
- it is the item to use
Attempts to use qty amount of item it. Returns true if the item is used or false if it fails to do so. Note that food must be "used" via eat() & drinks via drink(); attempting to use this function will result in an error message and a return value of false. Using this function for equipment will function the same as equip() would without the optional slot parameter. If this function is called with a non-usable item, a message saying so will print to the CLI and the function will return true.
CLI Equivalent
The CLI command "use" functions similarly.
See Also
More Information
If qty is 0 or negative, no item will be used and the function will return true.