cloakroom.qsrc 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. # cloakroom
  2. menu_off = 1
  3. $coat_list_line = {
  4. !! a single line in a coat list (wardrobe, etc)
  5. !! ARGS 0 - coat index
  6. if Enable_clothwidth > 0:
  7. clothing_temp = Enable_clothwidth - 1
  8. else
  9. clothing_temp = 150 & !clothing widdefault to 150
  10. end
  11. gs 'themes', 'clothing', 1
  12. $RESULT = '<TR bgcolor='+$bgcolor+'>'
  13. $RESULT +='<TD><a href="exec:gt ''cloakroom'', ''view_coat_item'', <<ARGS[2]>>"><img src="<<FUNC(''$coat_image'', $ARGS[1], ARGS[2])>>"></center>'
  14. 'coat no.<<ARGS[1]>>" width="<<clothing_temp>>"></a></TD>'
  15. $RESULT += '<TD>Coat # <<ARGS[2]>><br>strength: ' + dyneval '$RESULT += <<$ARGS[1]>>_h[<<ARGS[2]>>]'+'</TD>'
  16. $RESULT += '<TD>$coat_description</TD>'
  17. $RESULT += '<TD><a href="exec:gt ''cloakroom'', ''view_coat_item'', $ARGS[1], ARGS[2]">View</a></TD>'
  18. if coat_h[i] > 0:
  19. $RESULT += '<TD><a href="exec:defaultcoat = ''<<i>>'' & gt ''cloakroom'', ''view_coat_list''">Wear</a></TD>'
  20. end
  21. $RESULT += '<TD>'
  22. if i = defaultcoat:
  23. $RESULT += 'Yes'
  24. end
  25. $RESULT += '</TD>'
  26. $RESULT += '<TD>'
  27. if dyneval('RESULT = coat_s[<<ARGS[2]>>]') = 0:$RESULT += ' <a href="exec:gt ''cloakroom'', ''dest'', $ARGS[1], ARGS[2]">Keep</a>'
  28. if dyneval('RESULT = coat_s[<<ARGS[2]>>]') = 2:$RESULT += ' <a href="exec:gt ''cloakroom'', ''dest1'', $ARGS[1], ARGS[2]">Unwanted</a>'
  29. $RESULT += '</TD>'}
  30. if $ARGS[0] = 'dest':
  31. *clr
  32. dynamic '<<$ARGS[1]>>_s[<<ARGS[2]>>] = 2'
  33. gt 'cloakroom', 'view_coat_list'
  34. end
  35. if $ARGS[0] = 'dest1':
  36. *clr
  37. dynamic '<<$ARGS[1]>>_s[<<ARGS[2]>>] = 0'
  38. gt 'cloakroom', 'view_coat_list'
  39. end
  40. if $ARGS[0] = 'clothwidth':
  41. act 'Set image height for this view':
  42. Enable_clothwidth = input("Enter height in pixels you want for images on this page <br>(Default 150, min 50, max 500)")
  43. if Enable_clothwidth < 50:
  44. Enable_clothwidth = 50
  45. elseif Enable_clothwidth > 500:
  46. Enable_clothwidth = 500
  47. end
  48. gt 'cloakroom', 'view_coat_list'
  49. end
  50. end
  51. if $ARGS[0] = 'view_coat_list':
  52. '<h3><center><b><font color="maroon">Wardrobe</font></b></center></h3>'
  53. '<center>These are the coats that are currently available for you to wear.</center>'
  54. *nl
  55. if defaultcoat = 0:
  56. '<center>You will not wear a coat when outside in the cold.</center>'
  57. else
  58. '<center>You will wear Coat<<defaultcoat>> when a coat is required.</center>'
  59. end
  60. *nl
  61. gs 'themes', 'clothing', 2
  62. '<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>'
  63. i = 1
  64. :loopcoat
  65. if coat[i] = 1:*p dyneval($coat_list_line, i)
  66. i += 1
  67. if i <= ARRSIZE('coat'):jump 'loopcoat'
  68. i = 1
  69. :loop_bomba_coats
  70. if bomba_coats[i] = 1 and bomba_coats_s[i] = ploc:*p '<a href="exec:gt ''coats'', ''view_coat_item'', ''<<$ARGS[1]>>'', ''bomba'', <<i>>"><img src="images/pc/items/bomba/coats/<<i>>.jpg" height="300" /></a>'
  71. i += 1
  72. if i <= ARRSIZE('bomba_coats'):jump 'loop_bomba_coats'
  73. '<center><img src="images/locations/city/island/flamingos/shop_name.png"></center>'
  74. '</table>'
  75. act 'Return':gt 'wardrobe', 'start'
  76. if defaultcoat ! 0:
  77. act 'Remove coat':
  78. defaultcoat_warmth = 0
  79. defaultcoat_quality = 0
  80. defaultcoat = 0
  81. gt 'cloakroom', 'view_coat_list'
  82. end
  83. end
  84. gs 'cloakroom', 'clothwidth'
  85. end
  86. if $ARGS[0] = 'view_coat_item':
  87. !! ARGS 0 - view_clothing_item
  88. !! ARGS 1 - clothing index
  89. cla
  90. '<center><img src="<<FUNC(''$coat_image'', $ARGS[2], ARGS[3])>>"></center>'
  91. 'coat no.<<ARGS[1]>>'
  92. FUNC('$attributes_coat', 'coat', ARGS[1])
  93. $coat_description
  94. $RESULT = '(strength '
  95. dynamic '$RESULT += coat_h[<<ARGS[1]>>]'
  96. $RESULT += ')'
  97. '<<$RESULT>>'
  98. !! if the coat is worn out
  99. if dyneval('RESULT = coat_h[<<ARGS[1]>>]') <= 0:
  100. 'This item is worn and is not suitable for further wear.'
  101. act 'Throw it away':
  102. dynamic 'coat[<<ARGS[1]>>] = 0'
  103. gt 'cloakroom', 'view_coat_list', 'coat'
  104. end
  105. end
  106. act 'Return':gt 'cloakroom', 'view_coat_list'
  107. if defaultcoat ! '<<ARGS[1]>>':
  108. act 'Wear this coat':
  109. defaultcoat = '<<ARGS[1]>>'
  110. defaultcoat_warmth = CoatWarm
  111. defaultcoat_quality = CloQuality
  112. gt 'wardrobe', 'start'
  113. end
  114. end
  115. end
  116. --- cloakroom ---------------------------------