larek 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. # larek
  2. *NL
  3. ACT 'Logout':
  4. gt 'dvor'
  5. END
  6. gs 'stat'
  7. '<center><img src="images/pic/larek.jpg" ></center>'
  8. if $ARGS[0]='start':
  9. cla
  10. *clr
  11. set minut = minut + 1
  12. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  13. $sofood={
  14. if hour >= 8 and hour <= 20:
  15. minut+=3
  16. gt'larek','food'
  17. else
  18. 'The department is closed'
  19. end
  20. }
  21. '<center><img src="images/pic/larek.jpg" ></center>'
  22. '<a href="exec: dynamic $sofood ">Select Products</a>'
  23. act 'Leave the store':gt $loc
  24. end
  25. if $ARGS[0]='food':
  26. cla
  27. *clr
  28. set minut = minut + 1
  29. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  30. $buyfood={
  31. if hour >= 8 and hour <= 20:
  32. if money >= 50:
  33. cla
  34. *clr
  35. set minut = minut + 15
  36. '<center><img src="images/pic/larek.jpg" ></center>'
  37. portion = input ("How many servings you want to buy?")
  38. if portion<=0:portion=1
  39. if portion*50 > money:
  40. 'You do not have enough money.'
  41. end
  42. if portion*50 <= money:
  43. set eda = eda + portion
  44. set money = money - portion*50
  45. 'You bought food and paid the money in cash.'
  46. end
  47. act 'Move away from the counter':gt'larek','food'
  48. else
  49. 'You do not have enough money'
  50. end
  51. else
  52. 'The department is closed'
  53. end
  54. }
  55. $buyfood2={
  56. if hour >= 8 and hour <= 20:
  57. if money >= 250:
  58. cla
  59. *clr
  60. set minut = minut + 15
  61. portion = input ("How many servings you want to buy?")
  62. if portion<=0:portion=1
  63. if portion*250 > money:
  64. 'You do not have enough money.'
  65. end
  66. if portion*250 <= money:
  67. set edaD = edaD + portion
  68. set money = money - portion*250
  69. '<center><img src="images/pic/larek.jpg" ></center>'
  70. 'You bought food and paid the money in cash.'
  71. end
  72. act 'Move away from the counter':gt'larek','food'
  73. else
  74. 'You do not have enough money'
  75. end
  76. else
  77. 'The department is closed'
  78. end
  79. }
  80. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  81. '<center><B><font color=maroon>Grocery department</font></B></center>'
  82. '<center><img src="images/pic/larek.jpg" ></center>'
  83. '<a href="exec: dynamic $buyfood ">One serving food - 50 RUB</a>
  84. <a href="exec: dynamic $buyfood2 ">One serving of dietary food - 250 RUB</a>'
  85. clr
  86. gs'stat'
  87. fcolor=rgb(0,0,0)
  88. bcolor=rgb(255,255,255)
  89. LCOLOR = rgb(106,90,205)
  90. act 'Exit Department':gt'larek','start'
  91. if money>=300:
  92. act 'Buy tea biscuits (300 r)':
  93. cls
  94. money-=300
  95. pranik+=10
  96. 'You bought a bag of cookies that will last you ten times.'
  97. act 'Exit Department':gt'larek','food'
  98. end
  99. end
  100. if money>=50 and bottle=0 and bag>0:
  101. act 'Buy a bottle of water (50 r)':
  102. cls
  103. money-=50
  104. bottle=1
  105. 'You bought a bottle of water and put it in her purse.'
  106. act 'Exit Department':gt'larek','food'
  107. end
  108. end
  109. if money>=100 and buterbrod=0 and bag>0:
  110. act 'Buy a sandwich (100 r)':
  111. cls
  112. money-=100
  113. buterbrod=1
  114. 'You bought a sandwich and put it in her purse.'
  115. act 'Exit Department':gt'larek','food'
  116. end
  117. end
  118. if money>=500 and wine=0 and bag>0:
  119. act 'Buy a bottle of wine (500 r)':
  120. cls
  121. money-=500
  122. wine=1
  123. 'You bought a bottle of wine and put it in her purse.'
  124. act 'Exit Department':gt'larek','food'
  125. end
  126. end
  127. end
  128. --- larek ---------------------------------