1
0

coats.qsrc 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246
  1. # coats
  2. !!2021/04/15
  3. !!gs 'coats', 'remove'
  4. !!To remove coat and store them
  5. !!gs 'coats', 'wear', 'type', 'number'
  6. !!To wear coat - There is no previous worn stored as this is only specified through cloakroom/wardrobe
  7. menu_off = 1
  8. if $ARGS[0] = 'totals':
  9. if $ARGS[1] = 'gm_coats':
  10. total = 20
  11. elseif $ARGS[1] = 'dolls_coats':
  12. total = 20
  13. elseif $ARGS[1] = 'pussycats_coats':
  14. total = 20
  15. elseif $ARGS[1] = 'bomba_coats':
  16. total = 20
  17. elseif $ARGS[1] = 'danilovich_coats':
  18. total = 20
  19. elseif $ARGS[1] = 'moncheri_coats':
  20. total = 20
  21. end
  22. end
  23. if $ARGS[0] = 'remove':
  24. $coatworntype = 'none'
  25. coatwornnumber = 0
  26. killvar 'PCoatWarm'
  27. killvar 'PCoatQuality'
  28. end
  29. if $ARGS[0] = 'wear':
  30. if $ARGS[1] = 'last_worn':
  31. $coatworntype = $lastworncoattype
  32. coatwornnumber = lastworncoatnumber
  33. else
  34. $coatworntype = $ARGS[1]
  35. coatwornnumber = ARGS[2]
  36. end
  37. gs 'coat_attributes', $ARGS[1], ARGS[2]
  38. PCoatWarm = CoatWarm
  39. PCoatQuality = CoatQuality
  40. dynamic $ARGS[1] + '_w[<<ARGS[2]>>] = 1'
  41. end
  42. if $ARGS[0] = 'view_coat_list':
  43. !! ARGS 0 - view_coat_list
  44. !! ARGS 1 - action type (clean, dirty, store, bathroom, wardrobe)
  45. act 'Return':
  46. if $ARGS[1] = 'wardrobe':
  47. gt 'wardrobe', 'main'
  48. else
  49. gt $loc, $loc_arg
  50. end
  51. end
  52. if $ARGS[1] = 'wardrobe':
  53. coat_loc = 0
  54. end
  55. if $ARGS[1] = 'store':
  56. coat_loc = 1
  57. end
  58. if $ARGS[1] = 'unwanted':
  59. coat_loc = 2
  60. end
  61. '<center><table border=1><TH><a href="exec:gt ''coats'', ''view_coat_list'', ''wardrobe''">Draw</a></TH><TH><a href="exec:gt ''coats'', ''view_coat_list'', ''store''">Storage</a></TH><TH><a href="exec:gt ''coats'', ''view_coat_list'', ''unwanted''">Unwanted</a></TH></center>'
  62. if $coatworntype ! 'none':act 'Remove coat':gs 'coats', 'remove' & gt 'coats', 'view_coat_list', $ARGS[1]
  63. if $ARGS[1] = 'store':
  64. cloc = 1
  65. end
  66. if ARRSIZE('gm_coats') > 0:
  67. '<center><img src="images/locations/city/citycenter/mall/gm.png"></a></center>'
  68. i = 1
  69. :loopgmcoat
  70. if gm_coats_s[i] = coat_loc and gm_coats[i] = 1:*p '<a href="exec:gt ''coats'', ''view_coat_item'', ''<<$ARGS[1]>>'', ''gm'', <<i>>"><img src="images/pc/items/gm/coats/<<i>>.jpg" height="150" /></a>'
  71. i += 1
  72. if i <= ARRSIZE('gm_coats'):jump 'loopgmcoat'
  73. end
  74. if ARRSIZE('cats_coats') > 0:
  75. '<center><img src="images/locations/city/citycenter/mall/pussycat.png"></center>'
  76. i = 1
  77. :loopcatscoat
  78. if cats_coats_s[i] = coat_loc and cats_coats[i] = 1:*p '<a href="exec:gt ''coats'', ''view_coat_item'', ''<<$ARGS[1]>>'', ''cats'', <<i>>"><img src="images/pc/items/cats/coats/<<i>>.jpg" height="150" /></a>'
  79. i += 1
  80. if i <= ARRSIZE('cats_coats'):jump 'loopcatscoat'
  81. end
  82. if ARRSIZE('moncheri_coats') > 0:
  83. '<center><img src="images/locations/city/citycenter/mall/moncheri.png"></center>'
  84. i = 1
  85. :loopmonchericoat
  86. if moncheri_coats_s[i] = coat_loc and moncheri_coats[i] = 1:*p '<a href="exec:gt ''coats'', ''view_coat_item'', ''<<$ARGS[1]>>'', ''moncheri'', <<i>>"><img src="images/pc/items/moncheri/coats/<<i>>.jpg" height="150" /></a>'
  87. i += 1
  88. if i <= ARRSIZE('moncheri_coats'):jump 'loopmonchericoat'
  89. end
  90. if ARRSIZE('dolls_coats') > 0:
  91. '<center><img src="images/locations/city/island/dolls/shop_name.png"></center>'
  92. i = 1
  93. :loopdollscoat
  94. if dolls_coats_s[i] = coat_loc and dolls_coats[i] = 1:*p '<a href="exec:gt ''coats'', ''view_coat_item'', ''<<$ARGS[1]>>'', ''dolls'', <<i>>"><img src="images/pc/items/dolls/coats/<<i>>.jpg" height="150" /></a>'
  95. i += 1
  96. if i <= ARRSIZE('dolls_coats'):jump 'loopdollscoat'
  97. end
  98. if ARRSIZE('bomba_coats') > 0:
  99. '<center><img src="images/locations/pushkin/bomba/shop_name.png"></center>'
  100. i = 1
  101. :loopbombacoat
  102. if bomba_coats_s[i] = coat_loc and bomba_coats[i] = 1:*p '<a href="exec:gt ''coats'', ''view_coat_item'', ''<<$ARGS[1]>>'', ''bomba'', <<i>>"><img src="images/pc/items/bomba/coats/<<i>>.jpg" height="150" /></a>'
  103. i += 1
  104. if i <= ARRSIZE('bomba_coats'):jump 'loopbombacoat'
  105. end
  106. if ARRSIZE('danilovich_coats') > 0:
  107. '<center><img src="images/locations/city/citycenter/mall/sports.png"></center>'
  108. i = 1
  109. :loopdanilovichcoat
  110. if danilovich_coats_s[i] = coat_loc and danilovich_coats[i] = 1:*p '<a href="exec:gt ''coats'', ''view_coat_item'', ''<<$ARGS[1]>>'', ''danilovich'', <<i>>"><img src="images/pc/items/danilovich/coats/<<i>>.jpg" height="150" /></a>'
  111. i += 1
  112. if i <= ARRSIZE('danilovich_coats'):jump 'loopdanilovichcoat'
  113. end
  114. end
  115. if $ARGS[0] = 'view_coat_item':
  116. !! ARGS 0 - view_coat_item
  117. !! ARGS 1 = action type (draw, shop)
  118. !! ARGS 2 - coat type
  119. !! ARGS 3 - coat index
  120. !! ARGS 4 - price for shop
  121. cla
  122. '<center><img src="<<FUNC(''$coat_image'', $ARGS[2], ARGS[3])>>"></center>'
  123. gs 'coat_attributes', $ARGS[2], ARGS[3]
  124. $coat_description
  125. if $ARGS[1] = 'shop':
  126. if dyneval('RESULT = <<$ARGS[2]>>_coats[<<ARGS[3]>>]') = 1:
  127. 'You already own this item.'
  128. act 'Leave': gt $loc, $loc_arg
  129. else
  130. price = ARGS[4]
  131. 'Price: <<ARGS[4]>> <b>₽</b>'
  132. act 'Leave': gt $loc, $loc_arg
  133. if money >= price:
  134. act 'Buy (cash)':
  135. money -= price
  136. dynamic $ARGS[2] + '_coats[<<ARGS[3]>>] = 1'
  137. dynamic $ARGS[2] + '_coats_s[<<ARGS[3]>>] = 0'
  138. dynamic $ARGS[2] + '_coats_h[<<ARGS[3]>>] = 240'
  139. gt $loc, $loc_arg
  140. end
  141. else
  142. 'You do not have enough cash to buy these coat.'
  143. end
  144. if karta >= price:
  145. act 'Buy (card)':
  146. karta -= price
  147. dynamic $ARGS[2] + '_coats[<<ARGS[3]>>] = 1'
  148. dynamic $ARGS[2] + '_coats_s[<<ARGS[3]>>] = 0'
  149. dynamic $ARGS[2] + '_coats_h[<<ARGS[3]>>] = 240'
  150. gt $loc, $loc_arg
  151. end
  152. else
  153. 'You do not have enough money in your bank to buy these coat.'
  154. end
  155. end
  156. else
  157. if $ARGS[1] ! 'bathroom':
  158. if coat_loc ! 1:$RESULT += 'Move these coat to <a href="exec:gt ''coats'', ''dest1'', ''<<$ARGS[1]>>'', ''<<$ARGS[2]>>'', <<ARGS[3]>>">Storage</a><BR>'
  159. if coat_loc ! 0:$RESULT += 'Move these coat to <a href="exec:gt ''coats'', ''dest0'', ''<<$ARGS[1]>>'', ''<<$ARGS[2]>>'', <<ARGS[3]>>">Wardrobe</a><BR>'
  160. if coat_loc ! 2:$RESULT += 'Move these coat to <a href="exec:gt ''coats'', ''dest2'', ''<<$ARGS[1]>>'', ''<<$ARGS[2]>>'', <<ARGS[3]>>">Unwanted</a>'
  161. end
  162. act 'Return':gt 'coats', 'view_coat_list', $ARGS[1]
  163. if $ARGS[1] = 'store':
  164. 'These coat are in storage.'
  165. elseif $ARGS[1] = 'unwanted':
  166. 'These coat are unwanted.'
  167. else
  168. if $coatworntype = $ARGS[2] and coatwornnumber = ARGS[3]:
  169. 'You are wearing this coat.'
  170. else
  171. if coat_loc = 0:
  172. act 'Wear':
  173. gs 'coats', 'wear', $ARGS[2], ARGS[3]
  174. if $ARGS[1] = 'wardrobe':
  175. gt 'wardrobe', 'main'
  176. else
  177. gt $loc, $loc_arg
  178. end
  179. end
  180. end
  181. end
  182. end
  183. if $ARGS[1] ! 'store':
  184. act 'Move to storage': gt 'coats', 'dest1', $ARGS[1], $ARGS[2], ARGS[3]
  185. end
  186. if $ARGS[1] ! 'unwanted':
  187. act 'Move to unwanted': gt 'coats', 'dest2', $ARGS[1], $ARGS[2], ARGS[3]
  188. end
  189. if $ARGS[1] ! 'wardrobe':
  190. act 'Move to wardrobe': gt 'coats', 'dest0', $ARGS[1], $ARGS[2], ARGS[3]
  191. end
  192. end
  193. end
  194. if $ARGS[0] = 'dest0':
  195. *clr
  196. dynamic '<<$ARGS[2]>>_coats_s[<<ARGS[3]>>] = 0'
  197. gt 'coats', 'view_coat_item', $ARGS[1], $ARGS[2], ARGS[3]
  198. end
  199. if $ARGS[0] = 'dest1':
  200. *clr
  201. dynamic '<<$ARGS[2]>>_coats_s[<<ARGS[3]>>] = 1'
  202. gt 'coats', 'view_coat_item', $ARGS[1], $ARGS[2], ARGS[3]
  203. end
  204. if $ARGS[0] = 'dest2':
  205. *clr
  206. dynamic '<<$ARGS[2]>>_coats_s[<<ARGS[3]>>] = 2'
  207. gt 'coats', 'view_coat_item', $ARGS[1], $ARGS[2], ARGS[3]
  208. end
  209. --- coats ---------------------------------