Advertisement
Guest User

Dexon's Random Bustabit script (Custom for MrStean)

a guest
Dec 12th, 2015
314
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*  Dexon's Random Bustabit script.
  2.  *   Current status: Random :D
  3.  *  Version 2.2.7-custom
  4.  *  + When editing the variables, be careful to not remove any ';' or ',' character.
  5.  */
  6.  
  7.  // The bot will bet a random number between `smallRangeBet` and `bigRangeBet` on a random cashout point.
  8. var smallRangeBet = 10, // (10 bits) can't bet less than 1 bit
  9.     bigRangeBet = 18, // (18 bits) cant bet more than your bankroll
  10.     maxBet = 900, // (900 bits, set to 0 to disable) The bot won't bet higher than this amount
  11.     maxCashout = 100; // (100x) this is the maximum cashout point the script can go
  12.  
  13. var Simulation = false; // (true/false) Setting this to true will make the bot to simulate a betting run.
  14.  
  15. // --- Edit over this line --- \\
  16.  
  17.  var totalLost = 0;
  18.  var lastBet = 0, bet = 0, profit = 0, wins = 0, loss = 0, firstgame = true, cashout;
  19.  var chilling = false;
  20. engine.on('game_starting', function(info) {
  21.     console.log((Simulation?"(SIMULATION) ": "")+"Current Profit: "+(profit/100).toFixed(2)+" bits ("+wins+" Wins | "+loss+" Loses)");
  22.     if(chilling) chilling = false;
  23.     if(firstgame) firstgame = false;
  24.     bet = Math.round(randomInt(smallRangeBet*100,bigRangeBet*100)/100)*100;
  25.     var rand = randomInt(1,100);
  26.     for(var i=1;i<maxCashout+1;i+=0.01){
  27.         var curProb = (9900/(101*((i*100)-1)))*100;
  28.         if(rand==1 && i == 1){
  29.             console.log(" /!\\ 1% protection... Not betting!");
  30.             chilling = true;
  31.             break;
  32.         }
  33.         if(!chilling && rand>curProb){
  34.             cashout = i.toFixed(2);
  35.             cashout = Math.round(cashout*100);
  36.             if(totalLost>0){
  37.                 var onLossIncrement = Math.round((totalLost * (randomInt(30, 90)/100)/100))*100;
  38.                 bet += onLossIncrement;
  39.                 console.log((Simulation?"(SIMULATION) ": "")+"(Recovery mode) adding "+(onLossIncrement/100)+" bits to the bet amount");
  40.             }
  41.             if(bet > maxBet*100 && maxBet != 0){
  42.                 console.log(" /!\\ Bet amount higher than the maxBet. For your safty, setting the bet to: "+maxBet+" bits");
  43.                 bet = maxBet * 100;
  44.             }
  45.             if(!Simulation){
  46.                 engine.placeBet(bet, cashout, function(){
  47.                     console.log("Betting "+(bet/100)+" bits on x"+(cashout/100));
  48.                     lastBet = bet;
  49.                 });
  50.             }else{
  51.                 console.log("(SIMULATION) Betting "+(bet/100)+" bits on x"+(cashout/100));
  52.                 lastBet = bet;
  53.             }
  54.             break;
  55.         }
  56.     }
  57. });
  58.  
  59. engine.on('cashed_out', function(data) {
  60.     if(data.username==engine.getUsername()){
  61.         console.log("(Win) Cashed out at x"+(data.stopped_at/100));
  62.         wins++;
  63.         profit += ((lastBet*(data.stopped_at/100))-lastBet);
  64.         if(totalLost>0){
  65.             totalLost -= ((bet*(data.stopped_at/100))-lastBet);
  66.             if(totalLost<0) totalLost = 0;
  67.         }
  68.     }
  69. });
  70.  
  71. engine.on('game_crash', function(data) {
  72.     if(!chilling && data.game_crash < cashout && !firstgame){
  73.         console.log((Simulation?"(SIMULATION) ": "")+"(Lost)");
  74.         loss++;
  75.         profit -= lastBet;
  76.         totalLost += lastBet;
  77.     }
  78.     if(!chilling && data.game_crash >= cashout && Simulation && !firstgame){
  79.         console.log("(SIMULATION) (Win) Cashed out at x"+(cashout/100));
  80.         wins++;
  81.         profit += ((lastBet*(cashout/100))-lastBet);
  82.         if(totalLost>0){
  83.             totalLost -= ((bet*(cashout/100))-lastBet);
  84.             if(totalLost<0) totalLost = 0;
  85.         }
  86.     }
  87.     if(firstgame) firstgame = false;
  88. });
  89.  
  90. function randomInt(min,max){
  91.     return Math.floor(Math.random()*(max-min+1)+min);
  92. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement