1
0

larek 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  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. else
  92. fcolor = rgb(0, 0, 0)
  93. bcolor = rgb(255, 255, 255)
  94. lcolor = rgb(106, 90, 205)
  95. end
  96. act 'Exit Department':gt'larek','start'
  97. if money>=300:
  98. act 'Buy tea biscuits (300 RUB)':
  99. cls
  100. money-=300
  101. pranik+=10
  102. 'You bought a bag of cookies that go well with tea. You figure there''s about ten servings inside.'
  103. act 'Exit Department':gt'larek','food'
  104. end
  105. end
  106. if money>=50 and bottle=0 and bag>0:
  107. act 'Buy a bottle of water (50 RUB)':
  108. cls
  109. money-=50
  110. bottle=1
  111. 'You bought a bottle of water and put it in your purse.'
  112. act 'Exit Department':gt'larek','food'
  113. end
  114. end
  115. if money>=100 and buterbrod=0 and bag>0:
  116. act 'Buy a sandwich (100 RUB)':
  117. cls
  118. money-=100
  119. buterbrod=1
  120. 'You bought a sandwich and put it in your purse.'
  121. act 'Exit Department':gt'larek','food'
  122. end
  123. end
  124. if money>=500 and wine=0 and bag>0:
  125. act 'Buy a bottle of cheap wine (500 RUB)':
  126. cls
  127. money-=500
  128. wine=1
  129. 'You bought a bottle of wine and put it in your purse.'
  130. act 'Exit Department':gt'larek','food'
  131. end
  132. end
  133. end
  134. --- larek ---------------------------------