All normal outfits: Difference between revisions
Jump to navigation
Jump to search
imported>Relyk Created page with "{{ #vardefine:name|get_custom_outfits}}{{ #vardefine:return_type|string [int]}}{{ #vardefine:aggregate|yes}}{{ FunctionPage| name={{#var:name}}| function1={{Function| name={..." |
imported>Relyk No edit summary |
||
Line 1: | Line 1: | ||
{{ | {{ | ||
#vardefine:name| | #vardefine:name|all_normal_outfits}}{{ | ||
#vardefine:return_type|string [int]}}{{ | #vardefine:return_type|string [int]}}{{ | ||
#vardefine:aggregate|yes}}{{ | #vardefine:aggregate|yes}}{{ | ||
Line 18: | Line 18: | ||
code1={{CodeSample| | code1={{CodeSample| | ||
title=Code Sample| | title=Code Sample| | ||
description=The following code will print the list of available outfits.| | description=The following code will print the list of available outfits you own.| | ||
code=<syntaxhighlight> | code=<syntaxhighlight> | ||
foreach x,outfit_name in all_normal_outfits() | foreach x,outfit_name in all_normal_outfits() | ||
{ | |||
if( have_outfit(outfit_name) ) | |||
{ | { | ||
foreach x,piece in outfit_pieces(outfit_name) | foreach x,piece in outfit_pieces(outfit_name) | ||
print("=> " + piece); | print("=> " + piece); | ||
} | } | ||
} | |||
</syntaxhighlight> | </syntaxhighlight> | ||
}}| | }}| |
Revision as of 01:14, 24 September 2015
Function Syntax
string [int] all_normal_outfits()
This function returns a list of all available in-game outfits.
Code Sample
The following code will print the list of available outfits you own.
foreach x,outfit_name in all_normal_outfits()
{
if( have_outfit(outfit_name) )
{
foreach x,piece in outfit_pieces(outfit_name)
print("=> " + piece);
}
}
CLI Equivalent
The CLI command outfit list
will print a list of official KoL outfits to the CLI.