aptek 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221
  1. # aptek
  2. !!!0.2.6 addition: Optimized flow of the code, updated descriptions - now lists everything the drugstore has to sell
  3. $regular_items = {
  4. if money >= 200:
  5. act 'Buy a pregnancy test (200 rubles)':
  6. cla
  7. *clr
  8. set money -= 200
  9. pregtest += 2
  10. '<center><img src="images/pic/kassa.jpg"></center>'
  11. 'You bought a test and get paid in cash.'
  12. act 'Move away from the counter':gt 'aptek', 'start'
  13. end
  14. end
  15. if money >= 500:
  16. act 'Buy birth control pills (500 rubles)':
  17. portion = input ("How many packages you want to buy?")
  18. if portion * 500 > money:'You do not have enough money.'
  19. if portion * 500 <= money:
  20. set tabletki += portion * 28
  21. set money -= portion * 500
  22. '<center><img src="images/pic/kassa.jpg"></center>'
  23. 'You bought the pills and paid the money to the cashier.'
  24. end
  25. act 'Move away from the counter':gt 'aptek', 'start'
  26. end
  27. if klisma = 0:
  28. act 'Buy enema (500 rubles)':
  29. cla
  30. *clr
  31. set klisma = 1
  32. set money -= 500
  33. '<center><img src="images/pic/kassa.jpg"></center>'
  34. 'You bought an enema and paid the money to the cashier.'
  35. act 'Move away from the counter':gt 'aptek', 'start'
  36. end
  37. end
  38. act 'Buy <b>medicine</b> (500 rubles) <<iif(lekarstvo > 0, ''[left:<b>'' + lekarstvo + ''</b>]'', '''')>>':
  39. cla
  40. *clr
  41. portion = input ("How many packages you want to buy?")
  42. if portion * 500 <= money:
  43. set lekarstvo += portion * 10
  44. set money -= portion * 500
  45. '<center><img src="images/pic/kassa.jpg"></center>'
  46. 'You bought drugs and paid the money to the cashier.'
  47. else
  48. 'You do not have enough money.'
  49. end
  50. act 'Move away from the counter':gt 'aptek', 'start'
  51. end
  52. act 'Buy <b>vitamins</b> (500 rubles) <<iif(vitamin > 0, ''[left:<b>'' + vitamin + ''</b>]'', '''')>>':
  53. cla
  54. *clr
  55. portion = input ("How many packages you want to buy?")
  56. if portion * 500 <= money:
  57. set vitamin += portion * 20
  58. set money -= portion * 500
  59. '<center><img src="images/etogame/kassa.jpg"></center>'
  60. 'You bought vitamins and paid the money to the cashier.'
  61. else
  62. 'You do not have enough money.'
  63. end
  64. act 'Move away from the counter':gt 'aptek', 'start'
  65. end
  66. end
  67. if money >= 600:
  68. act 'Buy <b>ointment for corns</b> (600 rubles) <<iif(mosolmaz > 0, ''[left:<b>'' + mosolmaz + ''</b>]'', '''')>>':
  69. cla
  70. *clr
  71. set money -= 600
  72. mosolmaz += 10
  73. '<center><img src="images/etogame/kassa.jpg"></center>'
  74. 'You bought tablets and paid the money to the cashier.'
  75. act 'Move away from the counter':gt 'aptek', 'start'
  76. end
  77. end
  78. if money >= 1000:
  79. act 'Buy <b>moisturizing lip balm</b> (1,000 rubles) <<iif(lipbalm > 0, ''[left:<b>'' + lipbalm + ''</b>]'', '''')>>':
  80. cla
  81. *clr
  82. set lipbalm += 25
  83. set money -= 1000
  84. '<center><img src="images/etogame/kassa.jpg"></center>'
  85. 'You bought some lip balm and paid the money to the cashier.'
  86. act 'Move away from the counter':gt 'aptek', 'start'
  87. end
  88. end
  89. if money >= 1500:
  90. act '<b>Buy fat burners</b> (1,500 rubles) <<iif(fatdel > 0, ''[left:<b>'' + fatdel + ''</b>]'', '''')>>':
  91. cla
  92. *clr
  93. set fatdel += 1
  94. set money -= 1500
  95. '<center><img src="images/etogame/kassa.jpg"></center>'
  96. 'You bought a fat burning capsule and paid the money to the cashier.'
  97. act 'Move away from the counter':gt 'aptek', 'start'
  98. end
  99. if KandidNapr = 1:
  100. act 'Buy cure pills for yeast infection (1,500 rubles)':
  101. cla
  102. *clr
  103. set money -= 1500
  104. Kandidoz = 0
  105. '<center><img src="images/pic/kassa.jpg"></center>'
  106. 'You bought tablets and paid the money to the cashier.'
  107. 'Immediately about cash you drink tablet.'
  108. act 'Move away from the counter':gt 'aptek', 'start'
  109. end
  110. end
  111. end
  112. }
  113. if $ARGS[0] = 'start':
  114. cla
  115. *clr
  116. set minut += 5
  117. '<center><b><font color="maroon">Pharmacy</font></b></center>'
  118. *nl
  119. '<center><img src="images/community/pharmacy.jpg"></center>'
  120. 'Condoms - 100 rubles' & nl
  121. 'Pregnancy test - 200 rubles' & nl
  122. 'Birth control pills - 500 rubles' & nl
  123. 'Enema - 500 rubles' & nl
  124. 'Medicine - 500 rubles' & nl
  125. 'Vitamins - 500 rubles' & nl
  126. 'Ointment from corns - 600 rubles' & nl
  127. 'Moisturizing Lip Balm 1,000 rubles' & nl
  128. 'Fat burners - 1,500 rubles' & nl
  129. 'Cure pills for yeast infection - 1,500 rubles'
  130. clr
  131. gs 'stat'
  132. gs 'time'
  133. if money >= 100:
  134. act 'Buy <b>condoms</b> (100 rubles) <<iif(prezik > 0, ''[left:<b>'' + prezik + ''</b>]'', '''')>>':
  135. portion = input ("How many packages you want to buy?")
  136. if portion * 100 <= money:
  137. set prezik += portion * 5
  138. set money -= portion * 100
  139. '<center><img src="images/etogame/kassa.jpg"></center>'
  140. 'You bought condoms and paid the money to the cashier.'
  141. else
  142. 'You do not have enough money.'
  143. end
  144. act 'Move away from the counter':gt 'aptek', 'start'
  145. end
  146. end
  147. if money >= 200:
  148. act 'Buy a <b>pregnancy test</b> (200 rubles) <<iif(pregtest > 0, ''[left:<b>'' + pregtest + ''</b>]'', '''')>>':
  149. cla
  150. *clr
  151. set money -= 200
  152. pregtest += 2
  153. '<center><img src="images/pic/kassa.jpg"></center>'
  154. 'You bought two pregnancy tests and paid the money to the cashier.'
  155. act 'Move away from the counter':gt 'aptek', 'start'
  156. end
  157. end
  158. if money >= 500:
  159. act 'Buy birth control pills (500 rubles) <<iif(tabletki > 0, ''[left:<b>'' + tabletki + ''</b>]'', '''')>>':
  160. portion = input ("How many packages you want to buy?")
  161. if portion * 500 <= money:
  162. set tabletki += portion * 28
  163. set money -= portion * 500
  164. '<center><img src="images/etogame/kassa.jpg"></center>'
  165. 'You bought the pills and paid the money to the cashier.'
  166. else
  167. 'You do not have enough money.'
  168. end
  169. act 'Move away from the counter':gt 'aptek', 'start'
  170. end
  171. if klisma = 0:
  172. act 'Buy <b>enema</b> (500 rubles)':
  173. cla
  174. *clr
  175. set klisma = 1
  176. set money -= 500
  177. '<center><img src="images/etogame/kassa.jpg"></center>'
  178. 'You bought an enema and paid the money to the cashier.'
  179. act 'Move away from the counter':gt 'aptek', 'start'
  180. end
  181. end
  182. end
  183. dynamic $regular_items
  184. end
  185. act 'Leave':gt $loc
  186. --- aptek ---------------------------------