1
0

restaurant 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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/bank1.jpg"></center>'
  36. if bankfond > 0:'Personal account <<bankfond>> rubles'
  37. act 'Leave':
  38. cla
  39. minut += 5
  40. gt 'restaurant', 'start'
  41. end
  42. if bankfond >= 0:
  43. act 'Put your money on personal account':
  44. cla
  45. minut += 5
  46. kartaIN = input ("How much money 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 into the account <<kartaIN>> rubles, now on your account <<bankfond>> rubles.'
  53. end
  54. act 'Move away':gt 'restaurant', '1'
  55. end
  56. act 'Withdraw money from the personal account':
  57. cla
  58. minut += 5
  59. kartaOUT = input ("How much money you want to withdraw from the account?")
  60. if kartaOUT <= 0 or kartaOUT > bankfond:
  61. 'Not correct operation.'
  62. else
  63. bankfond -= kartaOUT
  64. money += kartaOUT
  65. 'You debited <<kartaOUT>> rubles, now on your account <<bankfond>> rubles.'
  66. end
  67. act 'Move away':gt 'restaurant', '1'
  68. end
  69. end
  70. end
  71. --- restaurant ---------------------------------