1
0

restaurant 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. # restaurant
  2. if $ARGS[0] = 'start':
  3. $metka = $ARGS[0]
  4. $loc = $CURLOC
  5. cla
  6. clr
  7. *clr
  8. minut += 5
  9. gs 'stat'
  10. fcolor = rgb(0, 0, 0)
  11. bcolor = rgb(255, 255, 255)
  12. lcolor = rgb(106, 90, 205)
  13. '<center><b><font color="maroon">Bank</font></b></center>'
  14. '<center><img src="images/etogame/bank.jpg"></center>'
  15. 'Working hours are from 9 to 21.'
  16. act 'Leave':
  17. cla
  18. minut += 5
  19. gt 'hall'
  20. end
  21. if hour >= 9 and hour <= 21:act 'Go to the bank':gt 'bank', '1'
  22. end
  23. if $ARGS[0] = '1':
  24. $metka = $ARGS[0]
  25. $loc = $CURLOC
  26. cla
  27. clr
  28. *clr
  29. minut += 5
  30. gs 'stat'
  31. fcolor = rgb(0, 0, 0)
  32. bcolor = rgb(255, 255, 255)
  33. lcolor = rgb(106, 90, 205)
  34. '<center><b><font color="maroon">Bank</font></b></center>'
  35. '<center><img src="images/etogame/bank.jpg"></center>'
  36. if bankfond > 0:'Personal account <<bankfond>> <b>₽</b>'
  37. act 'Leave':
  38. cla
  39. minut += 5
  40. gt 'restaurant', 'start'
  41. end
  42. if bankfond >= 0:
  43. act 'Put money on your personal account':
  44. cla
  45. minut += 5
  46. kartaIN = input ("How much money do you want to deposit into the account?")
  47. if kartaIN <= 0 or kartaIN > money:
  48. 'Invalid operation.'
  49. else
  50. bankfond += kartaIN
  51. money -= kartaIN
  52. 'You put <<kartaIN>> <b>₽</b> into the account. You now have <<bankfond>> <b>₽</b> on your account.'
  53. end
  54. act 'Move away':gt 'restaurant', '1'
  55. end
  56. act 'Withdraw money from your personal account':
  57. cla
  58. minut += 5
  59. kartaOUT = input ("How much money do you want to withdraw from the account?")
  60. if kartaOUT <= 0 or kartaOUT > bankfond:
  61. 'Invalid operation.'
  62. else
  63. bankfond -= kartaOUT
  64. money += kartaOUT
  65. 'You debited <<kartaOUT>> <b>₽</b>. You now have <<bankfond>> <b>₽</b> on your account.'
  66. end
  67. act 'Move away':gt 'restaurant', '1'
  68. end
  69. end
  70. end
  71. --- restaurant ---------------------------------