407_igrkart1 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322
  1. # igrkart1
  2. !by Master Set ([email protected])
  3. !НАЧАЛО ИГРЫ
  4. clr
  5. gs 'stat'
  6. set minut += 5
  7. IF turn = 0:
  8. CLA
  9. '<right><img src="images\casino\stavkacw.jpg"></right>'
  10. ' Please give me your bets, gentlemen.'
  11. ACT 'IPod':
  12. deal = input 'Enter the amount'
  13. if money < deal:
  14. msg 'You have enough money'
  15. gt 'igrkart1'
  16. end
  17. if deal < 0:
  18. msg 'Wrong, try again.'
  19. gt 'igrkart1'
  20. end
  21. if deal > 1000:
  22. msg 'The maximum rate of 1000 rubles.'
  23. gt 'igrkart1'
  24. end
  25. set money -= deal
  26. turn = 1
  27. GT 'igrkart1'
  28. END
  29. ACT 'Move away from the table':
  30. GT 'bldzh'
  31. END
  32. END
  33. !РАЗДАЧА КАРТ
  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 = p_points + points[number]
  51. IF p_points = 22: p_points = 21
  52. wait 1000
  53. IF 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. END
  69. IF p_points = 21:
  70. 'Map of dealer:'
  71. '  <<$d_card[1]>>'
  72. '__________________________'
  73. 'Player Maps:'
  74. '  <<$p_card[1]>>'
  75. '  <<$p_card[2]>>'
  76. 'BLACK JACK!'
  77. prise = deal * 3
  78. ACT 'Pick up the win <<prise>> rub.':
  79. set money += prise
  80. turn = 0
  81. GT 'igrkart1'
  82. END
  83. END
  84. END
  85. !ДОПОЛНИТЕЛЬНАЯ КАРТА
  86. IF turn = 2:
  87. CLA
  88. '<right><img src="images\casino\cartbde.jpg"></right>'
  89. 'The dealer deals one more card:'
  90. '...'
  91. suit = RAND(1,4)
  92. number = RAND(1,13)
  93. $p_card[3] = $number[number] + $suit[suit]
  94. p_points = p_points + points[number]
  95. IF p_points <= 21:
  96. 'Map of dealer:'
  97. '  <<$d_card[1]>>'
  98. '__________________________'
  99. 'Player Maps:'
  100. '  <<$p_card[1]>>'
  101. '  <<$p_card[2]>>'
  102. '  <<$p_card[3]>>'
  103. ACT 'Enough':
  104. turn = 3
  105. GT 'igrkart1'
  106. END
  107. ACT 'Another card':
  108. turn = 22
  109. GT 'igrkart1'
  110. END
  111. END
  112. IF p_points > 21:
  113. 'Map of dealer:'
  114. '  <<$d_card[1]>>'
  115. '__________________________'
  116. 'Player Maps:'
  117. '  <<$p_card[1]>>'
  118. '  <<$p_card[2]>>'
  119. '  <<$p_card[3]>>'
  120. 'Bust! You lose.'
  121. ACT '...':
  122. turn = 0
  123. GT 'igrkart1'
  124. END
  125. END
  126. END
  127. IF turn = 22:
  128. CLA
  129. '<right><img src="images\casino\cartbde.jpg"></right>'
  130. 'The dealer deals one more card:'
  131. '...'
  132. suit = RAND(1,4)
  133. number = RAND(1,13)
  134. $p_card[4] = $number[number] + $suit[suit]
  135. p_points = p_points + points[number]
  136. IF p_points <= 21:
  137. 'Map of dealer:'
  138. '  <<$d_card[1]>>'
  139. '__________________________'
  140. 'Player Maps:'
  141. '  <<$p_card[1]>>'
  142. '  <<$p_card[2]>>'
  143. '  <<$p_card[3]>>'
  144. '  <<$p_card[4]>>'
  145. ACT 'Enough':
  146. turn = 3
  147. GT 'igrkart1'
  148. END
  149. ACT 'Another card':
  150. turn = 222
  151. GT 'igrkart1'
  152. END
  153. END
  154. IF p_points > 21:
  155. 'Map of dealer:'
  156. '  <<$d_card[1]>>'
  157. '__________________________'
  158. 'Player Maps:'
  159. '  <<$p_card[1]>>'
  160. '  <<$p_card[2]>>'
  161. '  <<$p_card[3]>>'
  162. '  <<$p_card[4]>>'
  163. 'Bust! You lose.'
  164. ACT '...':
  165. turn = 0
  166. GT 'igrkart1'
  167. END
  168. END
  169. END
  170. IF turn = 222:
  171. CLA
  172. '<right><img src="images\casino\cartbde.jpg"></right>'
  173. 'The dealer deals one more card:'
  174. '...'
  175. suit = RAND(1,4)
  176. number = RAND(1,13)
  177. $p_card[5] = $number[number] + $suit[suit]
  178. p_points = p_points + points[number]
  179. wait 500
  180. IF p_points <= 21:
  181. 'Bank card:'
  182. '  <<$d_card[1]>>'
  183. '__________________________'
  184. 'Player Maps:'
  185. '  <<$p_card[1]>>'
  186. '  <<$p_card[2]>>'
  187. '  <<$p_card[3]>>'
  188. '  <<$p_card[4]>>'
  189. '  <<$p_card[5]>>'
  190. ACT 'Enough':
  191. turn = 3
  192. GT 'igrkart1'
  193. END
  194. END
  195. IF p_points > 21:
  196. 'Map of dealer:'
  197. '  <<$d_card[1]>>'
  198. '__________________________'
  199. 'Player Maps:'
  200. '  <<$p_card[1]>>'
  201. '  <<$p_card[2]>>'
  202. '  <<$p_card[3]>>'
  203. '  <<$p_card[4]>>'
  204. '  <<$p_card[5]>>'
  205. 'Bust! You lose.'
  206. ACT '...':
  207. turn = 0
  208. GT 'igrkart1'
  209. END
  210. END
  211. END
  212. !ДОБОР КАРТ БАНКУЮЩИМ
  213. IF turn = 3:
  214. CLA
  215. '<right><img src="images\casino\cartbde.jpg"></right>'
  216. 'Dealer gets cards:'
  217. '...'
  218. suit = RAND(1,4)
  219. number = RAND(1,13)
  220. $d_card[2] = $number[number] + $suit[suit]
  221. d_points = d_points + points[number]
  222. IF p_points = 22: p_points = 21
  223. wait 500
  224. IF d_points >= 17:
  225. 'Bank cards:'
  226. '  <<$d_card[1]>>'
  227. '  <<$d_card[2]>>'
  228. 'Points dealer: <<d_points>>'
  229. '__________________________'
  230. 'Player Points <<p_points>>'
  231. '__________________________'
  232. IF d_points > p_points:
  233. 'Casinos won'
  234. ACT '...':
  235. turn = 0
  236. GT 'igrkart1'
  237. END
  238. END
  239. IF d_points = p_points:
  240. 'Draw'
  241. ACT 'Take a bet':
  242. set money += deal
  243. turn = 0
  244. GT 'igrkart1'
  245. END
  246. END
  247. IF d_points < p_points:
  248. 'Player won'
  249. prise = deal * 2
  250. ACT 'Pick up the win <<prise>> rub.':
  251. set money += prise
  252. turn = 0
  253. GT 'igrkart1'
  254. END
  255. END
  256. END
  257. IF d_points < 17:
  258. suit = RAND(1,4)
  259. number = RAND(1,13)
  260. $d_card[3] = $number[number] + $suit[suit]
  261. d_points = d_points + points[number]
  262. IF d_points <= 21:
  263. 'The dealer´s cards:'
  264. '  <<$d_card[1]>>'
  265. '  <<$d_card[2]>>'
  266. '  <<$d_card[3]>>'
  267. 'Points dealer: <<d_points>>'
  268. '__________________________'
  269. 'Player Points <<p_points>>'
  270. '__________________________'
  271. IF d_points > p_points:
  272. 'Casinos won'
  273. ACT '...':
  274. turn = 0
  275. GT 'igrkart1'
  276. END
  277. END
  278. IF d_points = p_points:
  279. 'Draw'
  280. ACT 'Take a bet':
  281. set money += deal
  282. turn = 0
  283. GT 'igrkart1'
  284. END
  285. END
  286. IF d_points < p_points:
  287. 'Player won'
  288. prise = deal * 2
  289. ACT 'Pick up the win <<prise>> rub.':
  290. set money += prise
  291. turn = 0
  292. GT 'igrkart1'
  293. END
  294. END
  295. END
  296. IF d_points > 21:
  297. 'The dealer´s cards:'
  298. '  <<$d_card[1]>>'
  299. '  <<$d_card[2]>>'
  300. '  <<$d_card[3]>>'
  301. '__________________________'
  302. 'Busting!'
  303. '__________________________'
  304. 'Player won'
  305. prise = deal * 2
  306. ACT 'Pick up the win <<prise>> rub.':
  307. set money += prise
  308. turn = 0
  309. GT 'igrkart1'
  310. END
  311. END
  312. END
  313. END
  314. --- igrkart1 ---------------------------------