# cloakroom
$coat_list_line = {
!! a single line in a clothing list (wardrobe, etc)
!! ARGS 0 - clothing index
if night_mode = 1:
$bgcolor = iif($bgcolor='#0C0B11','#000000','#0C0B11')
else
$bgcolor = iif($bgcolor='#f3f4ee','#ffffff','#f3f4ee')
end
$RESULT = '
'
$RESULT +='> src="<>" width="75"> | '
$RESULT += 'coat no.<> (strength ' + dyneval '$RESULT += coatH[<>]'+') | '
$RESULT += '' + FUNC('$clothing_name', 'coat', ARGS[0]) + ' | '
$RESULT += 'View | '
if coatH[i] > 0:
$RESULT += 'Select | '
end
$RESULT += ''
if i = defaultcoat:
$RESULT += 'Yes'
end
$RESULT += ' | '
$RESULT += ''
if dyneval('RESULT = coatS[<>]') = 0:$RESULT += ' Keep'
if dyneval('RESULT = coatS[<>]') = 2:$RESULT += ' Unwanted'
$RESULT += ' | '}
if $ARGS[0] = 'dest':
*clr
dynamic 'coatS[<>] = 2'
gt 'cloakroom', 'view_coat_list'
end
if $ARGS[0] = 'dest1':
*clr
dynamic 'coatS[<>] = 0'
gt 'cloakroom', 'view_coat_list'
end
if $ARGS[0] = 'view_coat_list':
''
if defaultcoat = 0:
'You have not chosen a coat to wear.'
else
'You will wear Coat<> when a coat is required.'
end
if night_mode = 1:
$bgcolor = '#0C0B11'
else
$bgcolor='#f3f4ee'
end
' | Item no. | Description | Large image | Set as default | Default | Set for sale | '
i = 1
:loopcoat
if coat[i] = 1:*p dyneval($coat_list_line, i)
i += 1
if i <= ARRSIZE('coat'):jump 'loopcoat'
act 'Don''t wear a coat':defaultcoat = 0
'
'
act 'Leave':gt $loc, $metka
end
if $ARGS[0] = 'view_coat_item':
!! ARGS 0 - view_clothing_item
!! ARGS 1 - clothing index
cla
'> src="<>">'
'coat no.<>'
FUNC('$attributes_coat', coat, ARGS[1])
FUNC('$clothing_name', coat, ARGS[1])
$RESULT = '(strength '
dynamic '$RESULT += coatH[<>]'
$RESULT += ')'
'<<$RESULT>>'
act 'Return':gt 'cloakroom', 'view_coat_list'
!! if the clothing is worn out
if dyneval('RESULT = coatH[<>]') <= 0:
'This item is worn and is not suitable for further wear.'
act 'Throw it away':
dynamic 'coat[<>] = 0'
gt 'cloakroom', 'view_coat_list', 'coat'
end
end
if defaultcoat ! '<>':
act 'Set as default':
defaultcoat = '<>'
end
end
end
--- cloakroom ---------------------------------