igrkart2 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. # igrkart2
  2. clr
  3. minut += 5
  4. gs 'stat'
  5. if turn1 = 0:
  6. cla
  7. '<right><img <<$set_imgh>> src="images/locations/city/industrial/casino/stavkacw.jpg"></right>'
  8. ' Place your bets, ladies and gentlemen.'
  9. act 'Place a bet':
  10. if money < 1:
  11. 'You don''t have any money!'
  12. act 'Leave the table' :gt 'kazvar'
  13. end
  14. bet_amount = input 'Enter the amount to bet'
  15. if money < bet_amount:
  16. msg 'You don''t have enough money to bet that much'
  17. elseif bet_amount < 1:
  18. msg 'You must place a minimum bet of 1 <b>₽</b>.'
  19. elseif bet_amount > 1000:
  20. msg 'The maximum bet allowed is 1000 <b>₽</b>.'
  21. else
  22. money -= bet_amount
  23. turn1 = 1
  24. end
  25. gt 'igrkart2'
  26. end
  27. act 'Leave the table' :gt 'kazvar'
  28. end
  29. if turn1 = 1:
  30. cla
  31. bet_draw = 0
  32. '<right><img <<$set_imgh>> src="images/locations/city/industrial/casino/stavkacw.jpg"></right>'
  33. 'Continue with regular bet (payout 2 to 1), or bet on a draw (payout 11 to 1)?'
  34. if money < bet_amount:
  35. turn1 = 2
  36. gt 'igrkart2'
  37. else
  38. act 'Continue with regular bet':
  39. turn1 = 2
  40. gt 'igrkart2'
  41. end
  42. act 'Bet on draw (doubles bet)':
  43. turn1 = 2
  44. bet_draw = 1
  45. money -= bet_amount
  46. gt 'igrkart2'
  47. end
  48. end
  49. end
  50. if turn1 = 2:
  51. cla
  52. '<right><img <<$set_imgh>> src="images/locations/city/industrial/casino/cartcw.jpg"></right>'
  53. ' The dealer deals the cards:'
  54. '...'
  55. suit = rand(1, 4)
  56. number = rand(1, 13)
  57. $d_card[1] = $number[number] + 'of ' + $suit[suit]
  58. d_points = number
  59. suit = rand(1, 4)
  60. !! Player draws from cards 2-14 so that they win if both they and the dealer draw an ace
  61. number = rand(2, 14)
  62. $p_card[1] = $number[number] + 'of ' + $suit[suit]
  63. p_points = number
  64. wait 1000
  65. 'Dealer''s Card:'
  66. '  <<$d_card[1]>>'
  67. '__________________________'
  68. 'Your Card:'
  69. '  <<$p_card[1]>>'
  70. if d_points > p_points:
  71. ' '
  72. 'Casino won'
  73. act 'You lost':
  74. turn1 = 0
  75. gt 'igrkart2'
  76. end
  77. elseif d_points < p_points:
  78. ' '
  79. 'You won'
  80. act 'Take money (<<2 * bet_amount>> <b>₽</b>)':
  81. money += 2 * bet_amount
  82. turn1 = 0
  83. gt 'igrkart2'
  84. end
  85. else
  86. if bet_draw = 1:
  87. ' '
  88. 'You won'
  89. act 'Take money (<<11 * bet_amount>> <b>₽</b>)':
  90. money += 11 * bet_amount
  91. turn1 = 0
  92. gt 'igrkart2'
  93. end
  94. else
  95. turn1 = 3
  96. gt 'igrkart2'
  97. end
  98. end
  99. end
  100. if turn1 = 3:
  101. '<right><img <<$set_imgh>> src="images/locations/city/industrial/casino/cartcw.jpg"></right>'
  102. ' '
  103. 'Draw'
  104. if money >= bet_amount:
  105. act 'Continue (bet another <<bet_amount>> <b>₽</b>)':
  106. cla
  107. money -= bet_amount
  108. ' The dealer deals the cards:'
  109. '...'
  110. suit = rand(1, 4)
  111. number = rand(1, 13)
  112. $d_card[2] = $number[number] + 'of ' + $suit[suit]
  113. d_points = number
  114. suit = rand(1, 4)
  115. number = rand(2, 14)
  116. $p_card[2] = $number[number] + 'of ' + $suit[suit]
  117. p_points = number
  118. 'Dealer''s Cards:'
  119. '  <<$d_card[1]>>'
  120. '  <<$d_card[2]>>'
  121. '__________________________'
  122. 'Your Cards:'
  123. '  <<$p_card[1]>>'
  124. '  <<$p_card[2]>>'
  125. if d_points > p_points:
  126. ' '
  127. 'Casino won'
  128. act 'You lost':
  129. turn1 = 0
  130. gt 'igrkart2'
  131. end
  132. elseif d_points < p_points:
  133. ' '
  134. 'You won'
  135. act 'Take money (<<4 * bet_amount>> <b>₽</b>)':
  136. money += 4 * bet_amount
  137. turn1 = 0
  138. gt 'igrkart2'
  139. end
  140. elseif d_points = p_points:
  141. ' '
  142. 'Draw'
  143. act 'Take money (<<3 * bet_amount>> <b>₽</b>)':
  144. money += 3 * bet_amount
  145. turn1 = 0
  146. gt 'igrkart2'
  147. end
  148. end
  149. end
  150. else
  151. ' '
  152. 'You don''t have enough money to continue'
  153. end
  154. act 'Take original bet (<<bet_amount>> <b>₽</b>)':
  155. money += bet_amount
  156. turn1 = 0
  157. gt 'igrkart2'
  158. end
  159. end
  160. --- igrkart2 ---------------------------------