changingroom 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. # changingroom
  2. if $ARGS[0] = 'view_swim_list':
  3. if $loc = 'bass' or ($loc = 'etoexhib' and temper >= 20) or (temper >= 20 and month >= 5 and month <= 9):
  4. if $clothingworntype ! 'swimwear':
  5. if $clothingworntype = 'nude':
  6. if $lastwornclothingtype ! 'swimwear':
  7. $normalclothingworntype = $lastwornclothingtype
  8. normalclothingwornno = lastwornclothingnumber
  9. end
  10. else
  11. $normalclothingworntype = $clothingworntype
  12. normalclothingwornno = clothingwornnumber
  13. end
  14. end
  15. i = 1
  16. h = 0
  17. :loopswimwear
  18. if swimwear[i] = 1 and ($clothingworntype ! 'swimwear' or clothingwornnumber ! i):h += 1 & *p '<a href="exec:gt ''changingroom'', ''view_swim_item'', ''swimwear'', <<i>>"><div style="width:100%; max-width:250px; max-height:250px;"><img src="images/Clothing/12swimwear/Swimwear<<i>>.jpg" height="250" /></div></a>'
  19. i += 1
  20. if i <= 30:jump 'loopswimwear'
  21. if h = 0:'<center>You do not own any swimwear.</center>'
  22. else
  23. '<center>You cannot go swimming or sunbathing now, so there is no point in getting changed.</center>'
  24. end
  25. if $clothingworntype = 'swimwear':
  26. act 'Put your regular clothes back on':
  27. gs 'clothing', 'wear', $normalclothingworntype, normalclothingwornno
  28. gt 'changingroom', 'view_swim_list'
  29. end
  30. end
  31. act 'Leave':gt $loc, $metka
  32. end
  33. if $ARGS[0] = 'view_swim_item':
  34. !! ARGS 0 - view_clothing_item
  35. !! ARGS 1 - clothing type
  36. !! ARGS 2 - clothing index
  37. cla
  38. '<center><img src="<<FUNC(''$clothing_image'', $ARGS[1], ARGS[2])>>"></center>'
  39. '<<$ARGS[1]>> no.<<ARGS[2]>>'
  40. FUNC('$attributes_swimwear', $ARGS[1], ARGS[2])
  41. FUNC('$clothing_name', $ARGS[1], ARGS[2])
  42. $RESULT = '(strength '
  43. dynamic '$RESULT += <<$ARGS[1]>>H[<<ARGS[2]>>]'
  44. $RESULT += ')'
  45. '<<$RESULT>>'
  46. act 'Return':gt 'changingroom', 'view_swim_list'
  47. !! if the clothing is worn out
  48. if dyneval('RESULT = <<$ARGS[1]>>H[<<ARGS[2]>>]') <= 0:
  49. 'This item is worn and is not suitable for further wear.'
  50. act 'Throw it away':
  51. dynamic '<<$ARGS[1]>>[<<ARGS[2]>>] = 0'
  52. gt 'changingroom', 'view_swim_list'
  53. end
  54. else
  55. act 'Wear':
  56. gs 'clothing', 'wear', $ARGS[1], ARGS[2]
  57. gt 'changingroom', 'view_swim_list'
  58. end
  59. end
  60. end
  61. --- changingroom ---------------------------------