Have outfit: Difference between revisions
Jump to navigation
Jump to search
imported>Bale r11112 added custom outfit support |
imported>Bale see also is_wearing_outfit |
||
Line 32: | Line 32: | ||
}}| | }}| | ||
see_also={{SeeAlso|outfit|outfit_pieces}}| | see_also={{SeeAlso|outfit|outfit_pieces|is_wearing_outfit}}| | ||
cli_equiv=The CLI command command "outfit" with the parameter "list" gives information on the in-game outfits you have available (but does not list custom outfits or check for whether the outfit can be equipped).| | cli_equiv=The CLI command command "outfit" with the parameter "list" gives information on the in-game outfits you have available (but does not list custom outfits or check for whether the outfit can be equipped).| | ||
special=Note that this function does not check for miscellaneous requirements such as Torso Awaregness.| | special=Note that this function does not check for miscellaneous requirements such as Torso Awaregness.| |
Revision as of 06:14, 5 November 2014
Function Syntax
boolean have_outfit(string name )
- name is an outfit to check for
This function returns true if you have all parts of the outfit name and meet all of the stat requirements to equip it. name can be a default outfit or a custom outfit.
Code Sample
The following code will attempt to buy herbs from the The Hippy Store.
if ( have_outfit( "Filthy Hippy Disguise" ) )
{
outfit( "Filthy Hippy Disguise" );
buy( 1 , $item[ herbs ] );
}
else
print( "Cannot purchase herbs from the Hippy Store, you junkie." );
CLI Equivalent
The CLI command command "outfit" with the parameter "list" gives information on the in-game outfits you have available (but does not list custom outfits or check for whether the outfit can be equipped).
See Also
Special
Note that this function does not check for miscellaneous requirements such as Torso Awaregness.