# cloakroom
$coat_list_line = {
!! a single line in a clothing list (wardrobe, etc)
!! ARGS 0 - clothing index
if Enable_clothwidth > 0:
clothing_temp = Enable_clothwidth - 1
else
clothing_temp = 150 & !clothing widdefault to 150
end
if night_mode = 1:
$bgcolor = iif($bgcolor='#0C0B11','#000000','#0C0B11')
elseif night_mode = 2:
$bgcolor = iif($bgcolor='#0C0B11','#141414','#0C0B11')
else
$bgcolor = iif($bgcolor='#f3f4ee','#ffffff','#f3f4ee')
end
$RESULT = '
'
$RESULT +=' | '
$RESULT += 'Coat # <> strength: ' + dyneval '$RESULT += coatH[<>]'+' | '
$RESULT += '' + FUNC('$clothing_name', 'coat', ARGS[0]) + ' | '
$RESULT += 'View | '
if coatH[i] > 0:
$RESULT += 'Wear | '
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] = 'clothwidth':
act 'Set image height for this view':
Enable_clothwidth = input("Enter height in pixels you want for images on this page
(Default 150, min 50, max 500)")
if Enable_clothwidth < 50:
Enable_clothwidth = 50
elseif Enable_clothwidth > 500:
Enable_clothwidth = 500
end
gt 'cloakroom', 'view_coat_list'
end
end
if $ARGS[0] = 'view_coat_list':
'Wardrobe
'
'These are the coats that are currently available for you to wear.'
*nl
if defaultcoat = 0:
'You will not wear a coat when outside in the cold.'
else
'You will wear Coat<> when a coat is required.'
end
*nl
if night_mode = 1:
$bgcolor = iif($bgcolor='#0C0B11','#000000','#0C0B11')
elseif night_mode = 2:
$bgcolor = iif($bgcolor='#0C0B11','#202020','#0C0B11')
else
$bgcolor = iif($bgcolor='#f3f4ee','#ffffff','#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 'Return':gt 'wardrobe', 'start'
if defaultcoat ! 0:
act 'Remove coat':
defaultcoat_warmth = 0
defaultcoat = 0
gt 'cloakroom', 'view_coat_list'
end
end
gs 'cloakroom', 'clothwidth'
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>>'
!! 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
act 'Return':gt 'cloakroom', 'view_coat_list'
if defaultcoat ! '<>':
act 'Wear this coat':
defaultcoat = '<>'
if defaultcoat < 4:
defaultcoat_warmth = 1
elseif defaultcoat = 4 or defaultcoat = 5 or defaultcoat = 8 or defaultcoat = 10 or defaultcoat = 12 or defaultcoat = 13 or defaultcoat = 14 or defaultcoat = 16 or defaultcoat = 17 or defaultcoat = 18 or defaultcoat = 19:
defaultcoat_warmth = 2
elseif defaultcoat = 6 or defaultcoat = 7 or defaultcoat = 9 or defaultcoat = 11 or defaultcoat = 15:
defaultcoat_warmth = 3
end
gt 'wardrobe', 'start'
end
end
end
--- cloakroom ---------------------------------