# larek
*NL
ACT 'Logout':
gt 'dvor'
END
gs 'stat'
'
'
if $ARGS[0]='start':
cla
*clr
set minut = minut + 1
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
$sofood={
if hour >= 8 and hour <= 20:
minut+=3
gt'larek','food'
else
'The department is closed'
end
}
''
'Select Products'
act 'Leave the store':gt $loc
end
if $ARGS[0]='food':
cla
*clr
set minut = minut + 1
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
$buyfood={
if hour >= 8 and hour <= 20:
if money >= 50:
cla
*clr
set minut = minut + 15
''
portion = input ("How many servings you want to buy?")
if portion<=0:portion=1
if portion*50 > money:
'You do not have enough money.'
end
if portion*50 <= money:
set eda = eda + portion
set money = money - portion*50
'You bought food and paid the money in cash.'
end
act 'Move away from the counter':gt'larek','food'
else
'You do not have enough money'
end
else
'The department is closed'
end
}
$buyfood2={
if hour >= 8 and hour <= 20:
if money >= 250:
cla
*clr
set minut = minut + 15
portion = input ("How many servings you want to buy?")
if portion<=0:portion=1
if portion*250 > money:
'You do not have enough money.'
end
if portion*250 <= money:
set edaD = edaD + portion
set money = money - portion*250
''
'You bought food and paid the money in cash.'
end
act 'Move away from the counter':gt'larek','food'
else
'You do not have enough money'
end
else
'The department is closed'
end
}
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
'Grocery department'
''
'One serving food - 50 RUB
One serving of dietary food - 250 RUB'
clr
gs'stat'
fcolor=rgb(0,0,0)
bcolor=rgb(255,255,255)
LCOLOR = rgb(106,90,205)
act 'Exit Department':gt'larek','start'
if money>=300:
act 'Buy tea biscuits (300 r)':
cls
money-=300
pranik+=10
'You bought a bag of cookies that will last you ten times.'
act 'Exit Department':gt'larek','food'
end
end
if money>=50 and bottle=0 and bag>0:
act 'Buy a bottle of water (50 r)':
cls
money-=50
bottle=1
'You bought a bottle of water and put it in her purse.'
act 'Exit Department':gt'larek','food'
end
end
if money>=100 and buterbrod=0 and bag>0:
act 'Buy a sandwich (100 r)':
cls
money-=100
buterbrod=1
'You bought a sandwich and put it in her purse.'
act 'Exit Department':gt'larek','food'
end
end
if money>=500 and wine=0 and bag>0:
act 'Buy a bottle of wine (500 r)':
cls
money-=500
wine=1
'You bought a bottle of wine and put it in her purse.'
act 'Exit Department':gt'larek','food'
end
end
end
--- larek ---------------------------------