1
0

changingroom 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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. $normalclothingworntype = $clothingworntype
  6. normalclothingwornno = clothingwornnumber
  7. end
  8. i = 1
  9. h = 0
  10. :loopswimwear
  11. 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>'
  12. i += 1
  13. if i <= 30:jump 'loopswimwear'
  14. if h = 0:'<center>You do not own any swimwear.</center>'
  15. else
  16. '<center>You cannot go swimming or sunbathing now, so there is no point in getting changed.</center>'
  17. end
  18. if $clothingworntype = 'swimwear':
  19. act 'Put your regular clothes back on':
  20. gs 'clothing', 'wear', $normalclothingworntype, normalclothingwornno
  21. gt 'changingroom', 'view_swim_list'
  22. end
  23. end
  24. act 'Leave':gt $loc, $metka
  25. end
  26. if $ARGS[0] = 'view_swim_item':
  27. !! ARGS 0 - view_clothing_item
  28. !! ARGS 1 - clothing type
  29. !! ARGS 2 - clothing index
  30. cla
  31. '<center><img src="<<FUNC(''$clothing_image'', $ARGS[1], ARGS[2])>>"></center>'
  32. '<<$ARGS[1]>> no.<<ARGS[2]>>'
  33. FUNC('$attributes_swimwear', $ARGS[1], ARGS[2])
  34. FUNC('$clothing_name', $ARGS[1], ARGS[2])
  35. $RESULT = '(strength '
  36. dynamic '$RESULT += <<$ARGS[1]>>H[<<ARGS[2]>>]'
  37. $RESULT += ')'
  38. '<<$RESULT>>'
  39. act 'Return':gt 'changingroom', 'view_swim_list'
  40. !! if the clothing is worn out
  41. if dyneval('RESULT = <<$ARGS[1]>>H[<<ARGS[2]>>]') <= 0:
  42. 'This item is worn and is not suitable for further wear.'
  43. act 'Throw it away':
  44. dynamic '<<$ARGS[1]>>[<<ARGS[2]>>] = 0'
  45. gt 'changingroom', 'view_swim_list'
  46. end
  47. else
  48. act 'Wear':
  49. gs 'clothing', 'wear', $ARGS[1], ARGS[2]
  50. gt 'changingroom', 'view_swim_list'
  51. end
  52. end
  53. end
  54. --- changingroom ---------------------------------