12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- # restaurant
- if $ARGS[0] = 'start':
- $metka = $ARGS[0]
- $loc = $CURLOC
- cla
- clr
- *clr
- minut += 5
- gs 'stat'
- fcolor = rgb(0, 0, 0)
- bcolor = rgb(255, 255, 255)
- lcolor = rgb(106, 90, 205)
- '<center><b><font color="maroon">Bank</font></b></center>'
- '<center><img src="images/etogame/bank.jpg"></center>'
- 'Working hours are from 9 to 21.'
- act 'Leave':
- cla
- minut += 5
- gt 'hall'
- end
- if hour >= 9 and hour <= 21:act 'Go to the bank':gt 'bank', '1'
- end
- if $ARGS[0] = '1':
- $metka = $ARGS[0]
- $loc = $CURLOC
- cla
- clr
- *clr
- minut += 5
- gs 'stat'
- fcolor = rgb(0, 0, 0)
- bcolor = rgb(255, 255, 255)
- lcolor = rgb(106, 90, 205)
- '<center><b><font color="maroon">Bank</font></b></center>'
- '<center><img src="images/etogame/bank.jpg"></center>'
- if bankfond > 0:'Personal account <<bankfond>> <b>₽</b>'
- act 'Leave':
- cla
- minut += 5
- gt 'restaurant', 'start'
- end
- if bankfond >= 0:
- act 'Put your money on personal account':
- cla
- minut += 5
- kartaIN = input ("How much money you want to deposit into the account?")
- if kartaIN <= 0 or kartaIN > money:
- 'Invalid operation.'
- else
- bankfond += kartaIN
- money -= kartaIN
- 'You put into the account <<kartaIN>> <b>₽</b>, now on your account <<bankfond>> <b>₽</b>.'
- end
- act 'Move away':gt 'restaurant', '1'
- end
- act 'Withdraw money from the personal account':
- cla
- minut += 5
- kartaOUT = input ("How much money you want to withdraw from the account?")
- if kartaOUT <= 0 or kartaOUT > bankfond:
- 'Not correct operation.'
- else
- bankfond -= kartaOUT
- money += kartaOUT
- 'You debited <<kartaOUT>> <b>₽</b>, now on your account <<bankfond>> <b>₽</b>.'
- end
- act 'Move away':gt 'restaurant', '1'
- end
- end
- end
- --- restaurant ---------------------------------
|