cloakroom.qsrc 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  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. :loop_gm_coats
  65. if gm_coats[i] = 1 and gm_coats_s[i] = ploc:*p '<a href="exec:gt ''coats'', ''view_coat_item'', ''<<$ARGS[1]>>'', ''gm'', <<i>>"><img src="images/pc/items/gm/coats/<<i>>.jpg" height="300" /></a>'
  66. i += 1
  67. if i <= ARRSIZE('gm_coats'):jump 'loop_gm_coats'
  68. i = 1
  69. :loop_cats_coats
  70. if cats_coats[i] = 1 and cats_coats_s[i] = ploc:*p '<a href="exec:gt ''coats'', ''view_coat_item'', ''<<$ARGS[1]>>'', ''cats'', <<i>>"><img src="images/pc/items/cats/coats/<<i>>.jpg" height="300" /></a>'
  71. i += 1
  72. if i <= ARRSIZE('cats_coats'):jump 'loop_cats_coats'
  73. i = 1
  74. :loop_moncheri_coats
  75. if moncheri_coats[i] = 1 and moncheri_coats_s[i] = ploc:*p '<a href="exec:gt ''coats'', ''view_coat_item'', ''<<$ARGS[1]>>'', ''moncheri'', <<i>>"><img src="images/pc/items/moncheri/coats/<<i>>.jpg" height="300" /></a>'
  76. i += 1
  77. if i <= ARRSIZE('moncheri_coats'):jump 'loop_moncheri_coats'
  78. i = 1
  79. :loop_bomba_coats
  80. 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>'
  81. i += 1
  82. if i <= ARRSIZE('bomba_coats'):jump 'loop_bomba_coats'
  83. i = 1
  84. :loop_dolls_coats
  85. if dolls_coats[i] = 1 and dolls_coats_s[i] = ploc:*p '<a href="exec:gt ''coats'', ''view_coat_item'', ''<<$ARGS[1]>>'', ''dolls'', <<i>>"><img src="images/pc/items/dolls/coats/<<i>>.jpg" height="300" /></a>'
  86. i += 1
  87. if i <= ARRSIZE('dolls_coats'):jump 'loop_dolls_coats'
  88. i = 1
  89. :loop_danilovich_coats
  90. if danilovich_coats[i] = 1 and danilovich_coats_s[i] = ploc:*p '<a href="exec:gt ''coats'', ''view_coat_item'', ''<<$ARGS[1]>>'', ''danilovich'', <<i>>"><img src="images/pc/items/danilovich/coats/<<i>>.jpg" height="300" /></a>'
  91. i += 1
  92. if i <= ARRSIZE('danilovich_coats'):jump 'loop_danilovich_coats'
  93. '<center><img src="images/locations/city/island/flamingos/shop_name.png"></center>'
  94. '</table>'
  95. act 'Return':gt 'wardrobe', 'start'
  96. if defaultcoat ! 0:
  97. act 'Remove coat':
  98. $coatworntype = 'none'
  99. $coatwornnumber = 0
  100. PCoatWarm = 0
  101. PCoatQuality = 0
  102. gt 'cloakroom', 'view_coat_list'
  103. end
  104. end
  105. gs 'cloakroom', 'clothwidth'
  106. end
  107. if $ARGS[0] = 'view_coat_item':
  108. !! ARGS 0 - view_clothing_item
  109. !! ARGS 1 - clothing index
  110. cla
  111. '<center><img src="<<FUNC(''$coat_image'', $ARGS[2], ARGS[3])>>"></center>'
  112. '<<$ARGS[2]>> coat no.<<ARGS[3]>>'
  113. FUNC('$coat_attributes', $ARGS[2], ARGS[3])
  114. $coat_description
  115. $RESULT = '(strength '
  116. dynamic '$RESULT += <<$ARGS[2]>>_h[<<ARGS[3]>>]'
  117. $RESULT += ')'
  118. '<<$RESULT>>'
  119. !! if the coat is worn out
  120. if dyneval('RESULT = <<$ARGS[2]>>_h[<<ARGS[3]>>]') <= 0:
  121. 'This item is worn and is not suitable for further wear.'
  122. act 'Throw it away':
  123. dynamic '<<$ARGS[2]>>[<<ARGS[3]>>] = 0'
  124. gt 'cloakroom', 'view_coat_list'
  125. end
  126. else
  127. act 'Wear this coat':
  128. $coatworntype = $ARGS[2]
  129. $coatwornnumber = ARGS[3]
  130. PCoatWarm = CoatWarm
  131. PCoatQuality = CoatQuality
  132. gt 'wardrobe', 'start'
  133. end
  134. end
  135. act 'Return':gt 'cloakroom', 'view_coat_list'
  136. end
  137. --- cloakroom ---------------------------------