123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115 |
- # 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 = '<TR bgcolor='+$bgcolor+'>'
- $RESULT +='<TD><a href="exec:gt ''clothing'', ''view_clothing_item'', ''wardrobe'', ''coat'', <<ARGS[0]>>"><img <<$set_imgh>> src="<<FUNC(''$clothing_image'', ''coat'', ARGS[0])>>" width="75"></a></TD>'
- $RESULT += '<TD>coat no.<<ARGS[0]>> (strength ' + dyneval '$RESULT += coatH[<<ARGS[0]>>]'+')</TD>'
- $RESULT += '<TD>' + FUNC('$clothing_name', 'coat', ARGS[0]) + '</TD>'
- $RESULT += '<TD><a href="exec:gt ''cloakroom'', ''view_coat_item'', <<ARGS[0]>>">View</a></TD>'
- if coatH[i] > 0:
- $RESULT += '<TD><a href="exec:defaultcoat = ''<<i>>'' & gt ''cloakroom'', ''view_coat_list''">Select</a></TD>'
- end
- $RESULT += '<TD>'
- if i = defaultcoat:
- $RESULT += '<font color="navy">Yes</font>'
- end
- $RESULT += '</TD>'
- $RESULT += '<TD>'
- if dyneval('RESULT = coatS[<<ARGS[0]>>]') = 0:$RESULT += ' <a href="exec:gt ''cloakroom'', ''dest'', <<ARGS[0]>>">Keep</a>'
- if dyneval('RESULT = coatS[<<ARGS[0]>>]') = 2:$RESULT += ' <a href="exec:gt ''cloakroom'', ''dest1'', <<ARGS[0]>>">Unwanted</a>'
- $RESULT += '</TD>'}
- if $ARGS[0] = 'dest':
- *clr
- dynamic 'coatS[<<ARGS[1]>>] = 2'
- gt 'cloakroom', 'view_coat_list'
- end
- if $ARGS[0] = 'dest1':
- *clr
- dynamic 'coatS[<<ARGS[1]>>] = 0'
- gt 'cloakroom', 'view_coat_list'
- end
- if $ARGS[0] = 'view_coat_list':
- '<center><table border=1><TH>Cloakroom</TH></table></center>'
- if defaultcoat = 0:
- '<center>You have not chosen a coat to wear.</center>'
- else
- '<center>You will wear Coat<<defaultcoat>> when a coat is required.</center>'
- end
- if night_mode = 1:
- $bgcolor = '#0C0B11'
- else
- $bgcolor='#f3f4ee'
- end
-
- '<table><table border=0 cellspacing=0 cellpadding=5><TH></TH><TH>Item no.</TH><TH>Description</TH><TH>Large image</TH><TH>Set as default</TH><TH>Default</TH><TH>Set for sale</TH>'
- 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
- '</table>'
- act 'Leave':gt $loc, $metka
- end
- if $ARGS[0] = 'view_coat_item':
- !! ARGS 0 - view_clothing_item
- !! ARGS 1 - clothing index
- cla
- '<center><img <<$set_imgh>> src="<<FUNC(''$clothing_image'', ''coat'', ARGS[1])>>"></center>'
- 'coat no.<<ARGS[1]>>'
- FUNC('$attributes_coat', coat, ARGS[1])
- FUNC('$clothing_name', coat, ARGS[1])
- $RESULT = '(strength '
- dynamic '$RESULT += coatH[<<ARGS[1]>>]'
- $RESULT += ')'
- '<<$RESULT>>'
- act 'Return':gt 'cloakroom', 'view_coat_list'
- !! if the clothing is worn out
- if dyneval('RESULT = coatH[<<ARGS[1]>>]') <= 0:
- 'This item is worn and is not suitable for further wear.'
- act 'Throw it away':
- dynamic 'coat[<<ARGS[1]>>] = 0'
- gt 'cloakroom', 'view_coat_list', 'coat'
- end
- end
- if defaultcoat ! '<<ARGS[1]>>':
- act 'Set as default':
- defaultcoat = '<<ARGS[1]>>'
- end
- end
- end
- --- cloakroom ---------------------------------
|