larek.qsrc 3.4 KB

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