larek.qsrc 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. # larek
  2. *NL
  3. ACT 'Logout':
  4. gt 'dvor'
  5. END
  6. gs 'stat'
  7. '<center><img <<$set_imgh>> src="images/locations/oldtown/cafe/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 grocery department is closed'
  19. end
  20. }
  21. '<center><img <<$set_imgh>> src="images/locations/oldtown/cafe/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 <<$set_imgh>> src="images/locations/oldtown/cafe/larek.jpg" ></center>'
  37. portion = input ("How many servings would you like to buy?")
  38. if portion<=0:portion=1
  39. if portion*50 > money:
  40. 'You don''t have enough money.'
  41. end
  42. if portion*50 <= money:
  43. set eda = eda + portion
  44. set money = money - portion*50
  45. 'You paid cash for the food.'
  46. end
  47. act 'Move away from the counter':gt'larek','food'
  48. else
  49. 'You don''t have enough money'
  50. end
  51. else
  52. 'The grocery 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 would you like to buy?")
  62. if portion<=0:portion=1
  63. if portion*250 > money:
  64. 'You don''t have enough money.'
  65. end
  66. if portion*250 <= money:
  67. set edaD = edaD + portion
  68. set money = money - portion*250
  69. '<center><img <<$set_imgh>> src="images/locations/oldtown/cafe/larek.jpg" ></center>'
  70. 'You paid cash for the food.'
  71. end
  72. act 'Move away from the counter':gt'larek','food'
  73. else
  74. 'You don''t have enough money'
  75. end
  76. else
  77. 'The grocery department is closed'
  78. end
  79. }
  80. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  81. '<center><B><font color=maroon>Grocery department</font></B></center>'
  82. '<center><img <<$set_imgh>> src="images/locations/oldtown/cafe/larek.jpg" ></center>'
  83. '<a href="exec: dynamic $buyfood ">One serving food - 50 RUB</a>
  84. <a href="exec: dynamic $buyfood2 ">One serving of diet friendly food - 250 RUB</a>'
  85. clr
  86. gs'stat'
  87. if night_mode = 1:
  88. fcolor = rgb(255, 255, 255)
  89. bcolor = rgb(0, 0, 0)
  90. lcolor = rgb(106, 90, 205)
  91. elseif night_mode = 2:
  92. fcolor = rgb(255, 255, 255)
  93. bcolor = rgb(20, 20, 20)
  94. lcolor = rgb(106, 90, 205)
  95. else
  96. fcolor = rgb(0, 0, 0)
  97. bcolor = rgb(255, 255, 255)
  98. lcolor = rgb(106, 90, 205)
  99. end
  100. act 'Exit Department':gt'larek','start'
  101. if money>=300:
  102. act 'Buy tea biscuits (300 RUB)':
  103. cls
  104. money-=300
  105. pranik+=10
  106. 'You bought a bag of biscuits that go well with tea. You figure there''s about ten servings inside.'
  107. act 'Exit Department':gt'larek','food'
  108. end
  109. end
  110. if money>=50 and bottle=0 and bag>0:
  111. act 'Buy a bottle of water (50 RUB)':
  112. cls
  113. money-=50
  114. bottle=1
  115. 'You bought a bottle of water and put it in your purse.'
  116. act 'Exit Department':gt'larek','food'
  117. end
  118. end
  119. if money>=100 and buterbrod=0 and bag>0:
  120. act 'Buy a sandwich (100 RUB)':
  121. cls
  122. money-=100
  123. buterbrod=1
  124. 'You bought a sandwich and put it in your purse.'
  125. act 'Exit Department':gt'larek','food'
  126. end
  127. end
  128. if money>=500 and wine=0 and bag>0:
  129. act 'Buy a bottle of cheap wine (500 RUB)':
  130. cls
  131. money-=500
  132. wine=1
  133. 'You bought a bottle of wine and put it in your purse.'
  134. act 'Exit Department':gt'larek','food'
  135. end
  136. end
  137. end
  138. --- larek ---------------------------------