123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130 |
- # 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 ''cloakroom'', ''view_coat_item'', <<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 will not wear a coat when outside in the cold.</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_warmth = 0 & defaultcoat = 0
- '</table>'
- act 'Return to overview':gt 'wardrobe', 'start'
-
- 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>>'
- !! 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 'Wear this coat when outdoors in the cold':
- defaultcoat = '<<ARGS[1]>>'
- 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
- act 'Return to coats':gt 'cloakroom', 'view_coat_list'
- act 'Return to overview':gt 'wardrobe', 'start'
- act 'Leave': gt $loc, $metka
- end
- --- cloakroom ---------------------------------
|