Have equipped: Difference between revisions
Jump to navigation
Jump to search
imported>Slyz No edit summary |
imported>Heeheehee m "fledges" was spelled wrong. Also, removed the needscode tag. |
||
Line 26: | Line 26: | ||
equip( $slot[acc1], $item[pirate fledges] ); | equip( $slot[acc1], $item[pirate fledges] ); | ||
</syntaxhighlight>}}| | </syntaxhighlight>}}| | ||
see_also={{SeeAlso|can_equip|equip}}| | see_also={{SeeAlso|can_equip|equip}}| | ||
cli_equiv=The CLI commands "equip" and others function similarly, if the parameter "list" or no parameters are given.| | cli_equiv=The CLI commands "equip" and others function similarly, if the parameter "list" or no parameters are given.| | ||
}} | }} |
Revision as of 23:38, 31 March 2010
Function Syntax
boolean have_equipped(item check )
- check is the item to test for
Returns true if you currently have the specified item check equipped, false if you do not. For familiar equipment, it only checks the familiar you currently have with you. Always returns false if check is not an item that can be equipped.
Code Sample
This example will check if you have the Pirate fledges equipped, and equip it if not.
if ( !have_equipped($item[pirate fledges]) )
equip( $slot[acc1], $item[pirate fledges] );
CLI Equivalent
The CLI commands "equip" and others function similarly, if the parameter "list" or no parameters are given.
See Also