Is wearing outfit

From Kolmafia
Jump to navigation Jump to search

Function Syntax

boolean is_wearing_outfit(string name )

  • name is an outfit to check for

This function returns true if you are wearing all parts of the outfit name.

Code Sample

The following function returns the name of the currently equipped outfit.

string current_outfit() {
   foreach i,o in get_outfits()
      if( is_wearing_outfit(o) )
         return o;
   foreach i,o in get_custom_outfits()
      if( is_wearing_outfit(o) )
         return o;
   return "";

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

outfit() | outfit_pieces() | have_outfit() | get_outfits() | get_custom_outfits()