123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184 |
- # igrkart2
- clr
- minut += 5
- gs 'stat'
- if turn1 = 0:
- cla
- '<right><img src="images/casino/stavkacw.jpg"></right>'
- ' Place your bets, ladies and gentlemen.'
- act 'Place a bet':
- if money < 1:
- 'You don''t have any money!'
- act 'Leave the table' :gt 'kazvar'
- end
- bet_amount = input 'Enter the amount to bet'
- if money < bet_amount:
- msg 'You don''t have enough money to bet that much'
- elseif bet_amount < 1:
- msg 'You must place a minimum bet of 1 <b>₽</b>.'
- elseif bet_amount > 1000:
- msg 'The maximum bet allowed is 1000 <b>₽</b>.'
- else
- money -= bet_amount
- turn1 = 1
- end
- gt 'igrkart2'
- end
- act 'Leave the table' :gt 'kazvar'
- end
- if turn1 = 1:
- cla
- bet_draw = 0
- '<right><img src="images/casino/stavkacw.jpg"></right>'
- 'Continue with regular bet (payout 2 to 1), or bet on a draw (payout 11 to 1)?'
- if money < bet_amount:
- turn1 = 2
- gt 'igrkart2'
- else
- act 'Continue with regular bet':
- turn1 = 2
- gt 'igrkart2'
- end
- act 'Bet on draw (doubles bet)':
- turn1 = 2
- bet_draw = 1
- money -= bet_amount
- gt 'igrkart2'
- end
- end
- end
- if turn1 = 2:
- cla
- '<right><img src="images/casino/cartcw.jpg"></right>'
- ' The dealer deals the cards:'
- '...'
- suit = rand(1, 4)
- number = rand(1, 13)
- $d_card[1] = $number[number] + 'of ' + $suit[suit]
- d_points = number
- suit = rand(1, 4)
- !! Player draws from cards 2-14 so that they win if both they and the dealer draw an ace
- number = rand(2, 14)
- $p_card[1] = $number[number] + 'of ' + $suit[suit]
- p_points = number
- wait 1000
- 'Dealer''s Card:'
- ' <<$d_card[1]>>'
- '__________________________'
- 'Your Card:'
- ' <<$p_card[1]>>'
- if d_points > p_points:
- ' '
- 'Casino won'
- act 'You lost':
- turn1 = 0
- gt 'igrkart2'
- end
- elseif d_points < p_points:
- ' '
- 'You won'
- act 'Take money (<<2 * bet_amount>> <b>₽</b>)':
- money += 2 * bet_amount
- turn1 = 0
- gt 'igrkart2'
- end
- else
- if bet_draw = 1:
- ' '
- 'You won'
- act 'Take money (<<11 * bet_amount>> <b>₽</b>)':
- money += 11 * bet_amount
- turn1 = 0
- gt 'igrkart2'
- end
- else
- turn1 = 3
- gt 'igrkart2'
- end
- end
- end
- if turn1 = 3:
- '<right><img src="images/casino/cartcw.jpg"></right>'
- ' '
- 'Draw'
- if money >= bet_amount:
- act 'Continue (bet another <<bet_amount>> <b>₽</b>)':
- cla
- money -= bet_amount
- ' The dealer deals the cards:'
- '...'
- suit = rand(1, 4)
- number = rand(1, 13)
- $d_card[2] = $number[number] + 'of ' + $suit[suit]
- d_points = number
- suit = rand(1, 4)
- number = rand(2, 14)
- $p_card[2] = $number[number] + 'of ' + $suit[suit]
- p_points = number
- 'Dealer''s Cards:'
- ' <<$d_card[1]>>'
- ' <<$d_card[2]>>'
- '__________________________'
- 'Your Cards:'
- ' <<$p_card[1]>>'
- ' <<$p_card[2]>>'
- if d_points > p_points:
- ' '
- 'Casino won'
- act 'You lost':
- turn1 = 0
- gt 'igrkart2'
- end
- elseif d_points < p_points:
- ' '
- 'You won'
- act 'Take money (<<4 * bet_amount>> <b>₽</b>)':
- money += 4 * bet_amount
- turn1 = 0
- gt 'igrkart2'
- end
- elseif d_points = p_points:
- ' '
- 'Draw'
- act 'Take money (<<3 * bet_amount>> <b>₽</b>)':
- money += 3 * bet_amount
- turn1 = 0
- gt 'igrkart2'
- end
- end
- end
- else
- ' '
- 'You don''t have enough money to continue'
- end
- act 'Take original bet (<<bet_amount>> <b>₽</b>)':
- money += bet_amount
- turn1 = 0
- gt 'igrkart2'
- end
- end
- --- igrkart2 ---------------------------------
|