igrkart1 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343
  1. # igrkart1
  2. !!by Master Set ([email protected])
  3. !!HOME GAMES
  4. clr
  5. minut += 5
  6. gs 'stat'
  7. if turn = 0:
  8. cla
  9. '<right><img src="images/casino/stavkacw.jpg"></right>'
  10. ' Please give me your bets, gentlemen.'
  11. act 'Make a bet':
  12. if money <= 0:
  13. 'You don''t have enough money to place a bet.'
  14. act 'Move away from the table':gt 'bldzh'
  15. end
  16. turn = 1
  17. deal = input 'Enter the amount'
  18. if money >= deal:
  19. msg 'You have enough money'
  20. money -= deal
  21. gt 'igrkart1'
  22. elseif deal < 0:
  23. msg 'Wrong, try again.'
  24. gt 'igrkart1'
  25. elseif deal > 1000:
  26. msg 'The maximum rate of 1000 <b>₽</b>.'
  27. gt 'igrkart1'
  28. end
  29. gt 'igrkart1'
  30. end
  31. act 'Move away from the table':gt 'bldzh'
  32. end
  33. !!the cards are dealt
  34. if turn = 1:
  35. cla
  36. '<right><img src="images/casino/cartbd.jpg"></right>'
  37. ' The dealer deals the cards:'
  38. '...'
  39. suit = rand(1, 4)
  40. number = rand(1, 13)
  41. $d_card[1] = $number[number] + $suit[suit]
  42. d_points = points[number]
  43. suit = rand(1, 4)
  44. number = rand(1, 13)
  45. $p_card[1] = $number[number] + $suit[suit]
  46. p_points = points[number]
  47. suit = rand(1, 4)
  48. number = rand(1, 13)
  49. $p_card[2] = $number[number] + $suit[suit]
  50. p_points += points[number]
  51. if p_points = 22:
  52. p_points = 21
  53. elseif p_points < 21:
  54. 'Map of dealer:'
  55. '  <<$d_card[1]>>'
  56. '__________________________'
  57. 'Player Maps:'
  58. '  <<$p_card[1]>>'
  59. '  <<$p_card[2]>>'
  60. act 'Enough':
  61. turn = 3
  62. gt 'igrkart1'
  63. end
  64. act 'Another card':
  65. turn = 2
  66. gt 'igrkart1'
  67. end
  68. elseif p_points = 21:
  69. prise = deal * 3
  70. 'Map of dealer:'
  71. '  <<$d_card[1]>>'
  72. '__________________________'
  73. 'Player Maps:'
  74. '  <<$p_card[1]>>'
  75. '  <<$p_card[2]>>'
  76. 'BLACK JACK!'
  77. act 'Pick up the win (<<prise>> <b>₽</b>)':
  78. money += prise
  79. turn = 0
  80. gt 'igrkart1'
  81. end
  82. end
  83. end
  84. !!Additional cards
  85. if turn = 2:
  86. cla
  87. '<right><img src="images/casino/cartbde.jpg"></right>'
  88. 'The dealer deals one more card:'
  89. '...'
  90. suit = rand(1, 4)
  91. number = rand(1, 13)
  92. $p_card[3] = $number[number] + $suit[suit]
  93. p_points += points[number]
  94. if p_points <= 21:
  95. 'Map of dealer:'
  96. '  <<$d_card[1]>>'
  97. '__________________________'
  98. 'Player Maps:'
  99. '  <<$p_card[1]>>'
  100. '  <<$p_card[2]>>'
  101. '  <<$p_card[3]>>'
  102. act 'Enough':
  103. turn = 3
  104. gt 'igrkart1'
  105. end
  106. act 'Another card':
  107. turn = 22
  108. gt 'igrkart1'
  109. end
  110. elseif p_points > 21:
  111. 'Map of dealer:'
  112. '  <<$d_card[1]>>'
  113. '__________________________'
  114. 'Player Maps:'
  115. '  <<$p_card[1]>>'
  116. '  <<$p_card[2]>>'
  117. '  <<$p_card[3]>>'
  118. 'Bust! You lose.'
  119. act '...':
  120. turn = 0
  121. gt 'igrkart1'
  122. end
  123. end
  124. end
  125. if turn = 22:
  126. cla
  127. '<right><img src="images/casino/cartbde.jpg"></right>'
  128. 'The dealer deals one more card:'
  129. '...'
  130. suit = rand(1, 4)
  131. number = rand(1, 13)
  132. $p_card[4] = $number[number] + $suit[suit]
  133. p_points += points[number]
  134. if p_points <= 21:
  135. 'Map of dealer:'
  136. '  <<$d_card[1]>>'
  137. '__________________________'
  138. 'Player Maps:'
  139. '  <<$p_card[1]>>'
  140. '  <<$p_card[2]>>'
  141. '  <<$p_card[3]>>'
  142. '  <<$p_card[4]>>'
  143. act 'Enough':
  144. turn = 3
  145. gt 'igrkart1'
  146. end
  147. act 'Another card':
  148. turn = 222
  149. gt 'igrkart1'
  150. end
  151. elseif p_points > 21:
  152. 'Map of dealer:'
  153. '  <<$d_card[1]>>'
  154. '__________________________'
  155. 'Player Maps:'
  156. '  <<$p_card[1]>>'
  157. '  <<$p_card[2]>>'
  158. '  <<$p_card[3]>>'
  159. '  <<$p_card[4]>>'
  160. 'Bust! You lose.'
  161. act '...':
  162. turn = 0
  163. gt 'igrkart1'
  164. end
  165. end
  166. end
  167. if turn = 222:
  168. cla
  169. '<right><img src="images/casino/cartbde.jpg"></right>'
  170. 'The dealer deals one more card:'
  171. '...'
  172. suit = rand(1, 4)
  173. number = rand(1, 13)
  174. $p_card[5] = $number[number] + $suit[suit]
  175. p_points += points[number]
  176. if p_points <= 21:
  177. 'Bank card:'
  178. '  <<$d_card[1]>>'
  179. '__________________________'
  180. 'Player Maps:'
  181. '  <<$p_card[1]>>'
  182. '  <<$p_card[2]>>'
  183. '  <<$p_card[3]>>'
  184. '  <<$p_card[4]>>'
  185. '  <<$p_card[5]>>'
  186. act 'Enough':
  187. turn = 3
  188. gt 'igrkart1'
  189. end
  190. elseif p_points > 21:
  191. 'Map of dealer:'
  192. '  <<$d_card[1]>>'
  193. '__________________________'
  194. 'Player Maps:'
  195. '  <<$p_card[1]>>'
  196. '  <<$p_card[2]>>'
  197. '  <<$p_card[3]>>'
  198. '  <<$p_card[4]>>'
  199. '  <<$p_card[5]>>'
  200. 'Bust! You lose.'
  201. act '...':
  202. turn = 0
  203. gt 'igrkart1'
  204. end
  205. end
  206. end
  207. !!Transoms Bank''s cards
  208. if turn = 3:
  209. cla
  210. '<right><img src="images/casino/cartbde.jpg"></right>'
  211. 'Dealer gets cards:'
  212. '...'
  213. suit = rand(1, 4)
  214. number = rand(1, 13)
  215. $d_card[2] = $number[number] + $suit[suit]
  216. d_points += points[number]
  217. if p_points = 22:
  218. p_points = 21
  219. elseif d_points >= 17:
  220. 'Bank cards:'
  221. '  <<$d_card[1]>>'
  222. '  <<$d_card[2]>>'
  223. 'Points dealer:<<d_points>>'
  224. '__________________________'
  225. 'Player Points <<p_points>>'
  226. '__________________________'
  227. if d_points > p_points:
  228. 'Casinos won'
  229. act '...':
  230. turn = 0
  231. gt 'igrkart1'
  232. end
  233. elseif d_points = p_points:
  234. 'Draw'
  235. act 'Take a bet':
  236. money += deal
  237. turn = 0
  238. gt 'igrkart1'
  239. end
  240. elseif d_points < p_points:
  241. 'Player won'
  242. prise = deal * 2
  243. act 'Pick up the win (<<prise>> <b>₽</b>).':
  244. money += prise
  245. turn = 0
  246. gt 'igrkart1'
  247. end
  248. end
  249. elseif d_points < 17:
  250. suit = rand(1, 4)
  251. number = rand(1, 13)
  252. $d_card[3] = $number[number] + $suit[suit]
  253. d_points += points[number]
  254. if d_points <= 21:
  255. 'The dealer''s cards:'
  256. '  <<$d_card[1]>>'
  257. '  <<$d_card[2]>>'
  258. '  <<$d_card[3]>>'
  259. 'Points dealer:<<d_points>>'
  260. '__________________________'
  261. 'Player Points <<p_points>>'
  262. '__________________________'
  263. if d_points > p_points:
  264. 'Casinos won'
  265. act '...':
  266. turn = 0
  267. gt 'igrkart1'
  268. end
  269. elseif d_points = p_points:
  270. 'Draw'
  271. act 'Take a bet':
  272. money += deal
  273. turn = 0
  274. gt 'igrkart1'
  275. end
  276. elseif d_points < p_points:
  277. 'Player won'
  278. prise = deal * 2
  279. act 'Pick up the win (<<prise>> <b>₽</b>).':
  280. money += prise
  281. turn = 0
  282. gt 'igrkart1'
  283. end
  284. end
  285. elseif d_points > 21:
  286. prise = deal * 2
  287. 'The dealer''s cards:'
  288. '  <<$d_card[1]>>'
  289. '  <<$d_card[2]>>'
  290. '  <<$d_card[3]>>'
  291. '__________________________'
  292. 'Busting!'
  293. '__________________________'
  294. 'Player won'
  295. act 'Pick up the win (<<prise>> <b>₽</b>)':
  296. money += prise
  297. turn = 0
  298. gt 'igrkart1'
  299. end
  300. end
  301. end
  302. end
  303. --- igrkart1 ---------------------------------