bustabit best stategy


SUBMITTED BY: madhu15

DATE: Oct. 9, 2016, 8:22 a.m.

FORMAT: JavaScript

SIZE: 5.9 kB

HITS: 481

  1. var baseBet = 1, // 10 bits
  2. baseCashout = 10, // Cashout at x1.28
  3. maxLoss = 50; // Amount of loss the bot will keep betting.
  4. var Simulation = false; // (true/false) Setting this to true will make the bot to simulate a betting run.
  5. //// ^EDIT OVER THIS LINE^ \\\\
  6. var bet = baseBet;
  7. var cashout = baseCashout;
  8. var lastBet = bet;
  9. var lossStreak = 0;
  10. var firstGame = true;
  11. var profit = 0;
  12. var chill = false;
  13. var wins = 0;
  14. var loss = 0;
  15. engine.on('game_starting', function(){
  16. if(lossStreak<maxLoss){
  17. console.log("Betting "+bet+" Bits on x"+cashout);
  18. if(Simulation){
  19. lastBet = bet;
  20. }else{
  21. engine.placeBet(bet*100, (cashout*100), function(){
  22. lastBet = bet;
  23. });
  24. }
  25. }else{
  26. console.log("Max loss reached! Passing one game then resetarting.");
  27. chill = true;
  28. bet = baseBet;
  29. cashout = baseCashout;
  30. lossStreak = 0;
  31. }
  32. });
  33. engine.on('game_crash', function(data){
  34. if(data.game_crash/100<cashout && !firstGame && !chill){
  35. loss++;
  36. console.log("Game crashed under x"+cashout+" :( ("+wins+" Wins | "+loss+" Loses)");
  37. profit -= lastBet;
  38. console.log("Current Profit: "+profit.toFixed(2));
  39. lossStreak++;
  40. if(lossStreak==1){
  41. cashout = 10;
  42. bet = 1;
  43. }
  44. if(lossStreak>2){
  45. cashout = 10;
  46. bet = 1;
  47. }if(lossStreak>3){
  48. cashout = 10;
  49. bet = 1;
  50. }if(lossStreak>4){
  51. cashout = 10;
  52. bet = 2;
  53. }if(lossStreak>5){
  54. cashout = 10;
  55. bet = 2;
  56. }if(lossStreak>6){
  57. cashout = 10;
  58. bet = 3;
  59. }if(lossStreak>7){
  60. cashout = 10;
  61. bet = 4;
  62. }if(lossStreak>8){
  63. cashout = 10;
  64. bet = 5;
  65. }if(lossStreak>9){
  66. cashout = 10;
  67. bet = 6;
  68. }if(lossStreak>10){
  69. cashout = 10;
  70. bet = 7;
  71. }
  72. if(lossStreak>11){
  73. cashout = 10;
  74. bet = 8;
  75. }if(lossStreak>12){
  76. cashout = 10;
  77. bet = 10;
  78. }if(lossStreak>13){
  79. cashout = 10;
  80. bet = 12;
  81. }if(lossStreak>14){
  82. cashout = 10;
  83. bet = 14;
  84. }if(lossStreak>15){
  85. cashout = 10;
  86. bet = 16;
  87. }if(lossStreak>16){
  88. cashout = 10;
  89. bet = 18;
  90. }if(lossStreak>17){
  91. cashout = 10;
  92. bet = 21;
  93. }if(lossStreak>18){
  94. cashout = 10;
  95. bet = 24;
  96. }if(lossStreak>19){
  97. cashout = 10;
  98. bet = 27;
  99. }if(lossStreak>20){
  100. cashout = 10;
  101. bet = 31;
  102. }if(lossStreak>21){
  103. cashout = 10;
  104. bet = 35;
  105. }if(lossStreak>22){
  106. cashout = 10;
  107. bet = 40;
  108. }if(lossStreak>23){
  109. cashout = 10;
  110. bet = 45;
  111. }if(lossStreak>24){
  112. cashout = 9;
  113. bet = 51;
  114. }if(lossStreak>25){
  115. cashout = 9;
  116. bet = 58;
  117. }if(lossStreak>26){
  118. cashout = 9;
  119. bet = 66;
  120. }if(lossStreak>27){
  121. cashout = 9;
  122. bet = 75;
  123. }if(lossStreak>28){
  124. cashout = 9;
  125. bet = 85;
  126. }if(lossStreak>29){
  127. cashout = 9;
  128. bet = 96;
  129. }if(lossStreak>30){
  130. cashout = 9;
  131. bet = 110;
  132. }if(lossStreak>31){
  133. cashout = 9;
  134. bet = 125;
  135. }if(lossStreak>32){
  136. cashout = 9;
  137. bet = 142;
  138. }if(lossStreak>33){
  139. cashout = 9;
  140. bet = 162;
  141. }if(lossStreak>34){
  142. cashout = 9;
  143. bet = 185;
  144. }if(lossStreak>35){
  145. cashout = 9;
  146. bet = 210;
  147. }if(lossStreak>36){
  148. cashout = 9;
  149. bet = 240;
  150. }if(lossStreak>37){
  151. cashout = 9;
  152. bet = 272;
  153. }if(lossStreak>38){
  154. cashout = 9;
  155. bet = 310;
  156. }if(lossStreak>39){
  157. cashout = 9;
  158. bet = 350;
  159. }if(lossStreak>40){
  160. cashout = 9;
  161. bet = 400;
  162. }if(lossStreak>41){
  163. cashout = 9;
  164. bet = 452;
  165. }if(lossStreak>42){
  166. cashout = 9;
  167. bet = 520;
  168. }if(lossStreak>43){
  169. cashout = 9;
  170. bet = 600;
  171. }if(lossStreak>44){
  172. cashout = 9;
  173. bet = 680;
  174. }if(lossStreak>45){
  175. cashout = 9;
  176. bet = 770;
  177. }if(lossStreak>46){
  178. cashout = 9;
  179. bet = 880;
  180. }if(lossStreak>47){
  181. cashout = 9;
  182. bet = 1000;
  183. }if(lossStreak>48){
  184. cashout = 9;
  185. bet = 1120;
  186. }if(lossStreak>49){
  187. cashout = 9;
  188. bet = 1260;
  189. }if(lossStreak>50){
  190. cashout = 9;
  191. bet = 1425;
  192. }if(lossStreak>51){
  193. cashout = 9;
  194. bet = 1625;
  195. }
  196. }else{
  197. if(!firstGame && !chill){
  198. wins++;
  199. console.log("Successful bet! :) ("+wins+" Wins | "+loss+" Loses)");
  200. profit += ((lastBet*cashout)-lastBet);
  201. console.log("Current Profit: "+profit.toFixed(2));
  202. bet = baseBet;
  203. cashout = baseCashout;
  204. lossStreak = 0;
  205. }
  206. }
  207. firstGame = false;
  208. if(chill) chill = false;
  209. });
  210. function roundToTwo(num) {
  211. return +(Math.round(num + "e+2") + "e-2");
  212. }

comments powered by Disqus