1
0

igrkart1 6.0 KB

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