igrkart2 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  1. # igrkart2
  2. clr
  3. minut += 5
  4. gs 'stat'
  5. if turn1 = 0:
  6. cla
  7. '<right><img src="images/casino/stavkacw.jpg"></right>'
  8. ' Please give me your bets, gentlemen.'
  9. act 'Make a bet':
  10. money -= deal
  11. turn1 = 1
  12. deal = input 'Enter the amount'
  13. if money < deal:
  14. msg 'You have enough money'
  15. gt 'igrkart2'
  16. elseif deal < 0:
  17. msg 'Wrong, try again.'
  18. gt 'igrkart1'
  19. elseif deal > 1000:
  20. msg 'The maximum rate of 1000 rubles.'
  21. gt 'igrkart1'
  22. end
  23. gt 'igrkart2'
  24. end
  25. act 'Move away from the table':gt 'kazvar'
  26. end
  27. if turn1 = 1:
  28. cla
  29. nich = 0
  30. '<right><img src="images/casino/stavkacw.jpg"></right>'
  31. act 'Put another draw':
  32. turn1 = 2
  33. nich = 1
  34. if money < deal:
  35. msg 'You have enough money'
  36. turn1 = 2
  37. nich = 0
  38. gt 'igrkart2'
  39. else
  40. money -= deal
  41. end
  42. gt 'igrkart2'
  43. end
  44. act 'Continue without an additional rate':
  45. turn1 = 2
  46. nich = 0
  47. gt 'igrkart2'
  48. end
  49. end
  50. if turn1 = 2:
  51. cla
  52. '<right><img src="images/casino/cartcw.jpg"></right>'
  53. ' The dealer deals the cards:'
  54. '...'
  55. suit = rand(1, 4)
  56. number = rand(1, 13)
  57. $di_card[1] = $number[number] + $suit[suit]
  58. di_points = points[number]
  59. di_poi = number
  60. suit = rand(1, 4)
  61. number = rand(2, 14)
  62. $pl_card[1] = $number[number] + $suit[suit]
  63. pl_points = points[number]
  64. pl_poi = number
  65. wait 1000
  66. 'Map of dealer:'
  67. '  <<$di_card[1]>>'
  68. '__________________________'
  69. 'Player Maps:'
  70. '  <<$pl_card[1]>>'
  71. if di_poi > pl_poi:
  72. ' '
  73. 'Casinos won'
  74. act 'You lost':
  75. turn1 = 0
  76. gt 'igrkart2'
  77. end
  78. elseif di_poi < pl_poi:
  79. ' '
  80. 'You won'
  81. act 'You have won (<<2 * deal>> rubles)':
  82. money += 2 * deal
  83. turn1 = 0
  84. gt 'igrkart2'
  85. end
  86. elseif di_poi = pl_poi:
  87. if nich = 1:
  88. ' '
  89. 'You won'
  90. act 'You have won (<<11 * deal>> rubles)':
  91. money += 11 * deal
  92. turn1 = 0
  93. gt 'igrkart2'
  94. end
  95. else
  96. turn1 = 3
  97. gt 'igrkart2'
  98. end
  99. end
  100. end
  101. if turn1 = 3:
  102. act 'Continue to play':
  103. cla
  104. if money < deal:
  105. msg 'You have enough money'
  106. gt 'igrkart2'
  107. else
  108. money -= deal
  109. end
  110. '<right><img src="images/casino/cartcw.jpg"></right>'
  111. ' The dealer deals the cards:'
  112. '...'
  113. suit = rand(1, 4)
  114. number = rand(1, 13)
  115. $di_card[2] = $number[number] + $suit[suit]
  116. di_points = points[number]
  117. di_poi = number
  118. suit = rand(1, 4)
  119. number = rand(2, 14)
  120. $pl_card[2] = $number[number] + $suit[suit]
  121. pl_points = points[number]
  122. pl_poi = number
  123. 'Map of dealer:'
  124. '  <<$di_card[1]>>'
  125. '  <<$di_card[2]>>'
  126. '__________________________'
  127. 'Player Maps:'
  128. '  <<$pl_card[1]>>'
  129. '  <<$pl_card[2]>>'
  130. if di_poi > pl_poi:
  131. ' '
  132. 'Casinos won'
  133. act 'You lost':
  134. turn1 = 0
  135. gt 'igrkart2'
  136. end
  137. elseif di_poi < pl_poi:
  138. ' '
  139. 'You won'
  140. act 'You have won (<<4 * deal>> rubles)':
  141. money += 4 * deal
  142. turn1 = 0
  143. gt 'igrkart2'
  144. end
  145. elseif di_poi = pl_poi:
  146. ' '
  147. 'Again draw'
  148. act 'Pick up (<<3 * deal>> rubles)':
  149. money += 3 * deal
  150. turn1 = 0
  151. gt 'igrkart2'
  152. end
  153. end
  154. end
  155. act 'Pick up half your bet':
  156. if deal mod 2 = 1:deal += 1
  157. money += deal / 2
  158. gt 'igrkart2'
  159. end
  160. end
  161. --- igrkart2 ---------------------------------