1337H4X0R


SUBMITTED BY: Kryometric

DATE: March 4, 2016, 10:55 p.m.

FORMAT: Racket

SIZE: 3.7 kB

HITS: 2767

  1. // The bot will bet a random number between `smallRangeBet` and `bigRangeBet` on a random cashout point.
  2. var smallRangeBet = 1, // (10 bits) Min bet when not in recovery mode (can't bet less than 1 bit)
  3. bigRangeBet = 10, // (18 bits) Max bet when not in recovery mode (can't be higher than your bankroll)
  4. maxBet = 63, // (900 bits, set to 0 to disable) The bot won't bet higher than this amount
  5. maxCashout = 1.2; // (100x) this is the maximum cashout point the script can go
  6. var Simulation = false; // (true/false) Setting this to true will make the bot to simulate a betting run.
  7. // --- Edit over this line --- \\
  8. var totalLost = 0;
  9. var lastBet = 0, bet = 0, profit = 0, wins = 0, loss = 0, firstgame = true, cashout;
  10. var chilling = false;
  11. engine.on('game_starting', function(info) {
  12. console.log((Simulation?"(SIMULATION) ": "")+"Current Profit: "+(profit/100).toFixed(2)+" bits ("+wins+" Wins | "+loss+" Loses)");
  13. if(chilling) chilling = false;
  14. if(firstgame) firstgame = false;
  15. bet = Math.round(randomInt(smallRangeBet*100,bigRangeBet*100)/100)*100;
  16. //var rand = randomInt(1,100);
  17. for(var i=1;i<maxCashout+1;i+=0.01){
  18. var rand = randomInt(1,100);
  19. var curProb = (9900/(101*((i*100)-1)))*100;
  20. if(rand==1 && i == 1){
  21. console.log(" /!\\ 1% protection... Not betting!");
  22. chilling = true;
  23. break;
  24. }
  25. if(!chilling && rand>curProb){
  26. cashout = i.toFixed(2);
  27. cashout = Math.round(cashout*100);
  28. if(totalLost>0){
  29. var onLossIncrement = Math.round((totalLost * (randomInt(30, 90)/100)/100))*100;
  30. bet += onLossIncrement;
  31. console.log((Simulation?"(SIMULATION) ": "")+"(Recovery mode) adding "+(onLossIncrement/100)+" bits to the bet amount");
  32. }
  33. if(bet > maxBet*100 && maxBet != 0){
  34. console.log(" /!\\ Bet amount higher than the maxBet. For your safty, setting the bet to: "+maxBet+" bits");
  35. bet = maxBet * 100;
  36. }
  37. if(!Simulation){
  38. engine.placeBet(bet, cashout, function(){
  39. console.log("Betting "+(bet/100)+" bits on x"+(cashout/100));
  40. lastBet = bet;
  41. });
  42. }else{
  43. console.log("(SIMULATION) Betting "+(bet/100)+" bits on x"+(cashout/100));
  44. lastBet = bet;
  45. }
  46. break;
  47. }
  48. }
  49. });
  50. engine.on('cashed_out', function(data) {
  51. if(data.username==engine.getUsername()){
  52. console.log("(Win) Cashed out at x"+(data.stopped_at/100));
  53. wins++;
  54. profit += ((lastBet*(data.stopped_at/100))-lastBet);
  55. if(totalLost>0){
  56. totalLost -= ((bet*(data.stopped_at/100))-lastBet);
  57. if(totalLost<0) totalLost = 0;
  58. }
  59. }
  60. });
  61. engine.on('game_crash', function(data) {
  62. if(!chilling && data.game_crash < cashout && !firstgame){
  63. console.log((Simulation?"(SIMULATION) ": "")+"(Lost)");
  64. loss++;
  65. profit -= lastBet;
  66. totalLost += lastBet;
  67. }
  68. if(!chilling && data.game_crash >= cashout && Simulation && !firstgame){
  69. console.log("(SIMULATION) (Win) Cashed out at x"+(cashout/100));
  70. wins++;
  71. profit += ((lastBet*(cashout/100))-lastBet);
  72. if(totalLost>0){
  73. totalLost -= ((bet*(cashout/100))-lastBet);
  74. if(totalLost<0) totalLost = 0;
  75. }
  76. }
  77. if(firstgame) firstgame = false;
  78. });
  79. function randomInt(min,max){
  80. return Math.floor(Math.random()*(max-min+1)+min);
  81. }

comments powered by Disqus