igrkart2.qsrc 3.6 KB

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