1
0

restaurant 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. # restaurant
  2. if $ARGS[0] = 'start':
  3. $metka = $ARGS[0]
  4. $loc = $CURLOC
  5. cla
  6. *clr
  7. set minut += 5
  8. '<center><b><font color="maroon">Bank</font></b></center>'
  9. '<center><img src="images/etogame/bank.jpg"></center>'
  10. clr
  11. gs 'stat'
  12. fcolor = rgb(0, 0, 0)
  13. bcolor = rgb(255, 255, 255)
  14. lcolor = rgb(106, 90, 205)
  15. 'Working hours are from 9 to 21.'
  16. act 'Leave':
  17. cla
  18. set 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. set minut += 5
  29. '<center><b><font color="maroon">Bank</font></b></center>'
  30. '<center><img src="images/etogame/bank1.jpg"></center>'
  31. clr
  32. gs 'stat'
  33. fcolor = rgb(0, 0, 0)
  34. bcolor = rgb(255, 255, 255)
  35. lcolor = rgb(106, 90, 205)
  36. if bankfond > 0:'Personal account <<bankfond>> rubles'
  37. act 'Leave':
  38. cla
  39. set minut += 5
  40. gt 'restaurant', 'start'
  41. end
  42. if bankfond >= 0:
  43. act 'Put your money on personal account':
  44. cla
  45. set 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. set bankfond += kartaIN
  51. set 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. set 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. set bankfond -= kartaOUT
  64. set 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 ---------------------------------