lipshac

Random -->

Feb 28th, 2016
239
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.79 KB | None | 0 0
  1. /* Dexon's Random Bustabit script.
  2. * Current status: Random :D
  3. * Version 2.2.8
  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) Min bet when not in recovery mode (can't bet less than 1 bit)
  9. bigRangeBet = 18, // (18 bits) Max bet when not in recovery mode (can't be higher 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 rand = randomInt(1,100);
  28. var curProb = (9900/(101*((i*100)-1)))*100;
  29. if(rand==1 && i == 1){
  30. console.log(" /!\\ 1% protection... Not betting!");
  31. chilling = true;
  32. break;
  33. }
  34. if(!chilling && rand>curProb){
  35. cashout = i.toFixed(2);
  36. cashout = Math.round(cashout*100);
  37. if(totalLost>0){
  38. var onLossIncrement = Math.round((totalLost * (randomInt(30, 90)/100)/100))*100;
  39. bet += onLossIncrement;
  40. console.log((Simulation?"(SIMULATION) ": "")+"(Recovery mode) adding "+(onLossIncrement/100)+" bits to the bet amount");
  41. }
  42. if(bet > maxBet*100 && maxBet != 0){
  43. console.log(" /!\\ Bet amount higher than the maxBet. For your safty, setting the bet to: "+maxBet+" bits");
  44. bet = maxBet * 100;
  45. }
  46. if(!Simulation){
  47. engine.placeBet(bet, cashout, function(){
  48. console.log("Betting "+(bet/100)+" bits on x"+(cashout/100));
  49. lastBet = bet;
  50. });
  51. }else{
  52. console.log("(SIMULATION) Betting "+(bet/100)+" bits on x"+(cashout/100));
  53. lastBet = bet;
  54. }
  55. break;
  56. }
  57. }
  58. });
  59.  
  60. engine.on('cashed_out', function(data) {
  61. if(data.username==engine.getUsername()){
  62. console.log("(Win) Cashed out at x"+(data.stopped_at/100));
  63. wins++;
  64. profit += ((lastBet*(data.stopped_at/100))-lastBet);
  65. if(totalLost>0){
  66. totalLost -= ((bet*(data.stopped_at/100))-lastBet);
  67. if(totalLost<0) totalLost = 0;
  68. }
  69. }
  70. });
  71.  
  72. engine.on('game_crash', function(data) {
  73. if(!chilling && data.game_crash < cashout && !firstgame){
  74. console.log((Simulation?"(SIMULATION) ": "")+"(Lost)");
  75. loss++;
  76. profit -= lastBet;
  77. totalLost += lastBet;
  78. }
  79. if(!chilling && data.game_crash >= cashout && Simulation && !firstgame){
  80. console.log("(SIMULATION) (Win) Cashed out at x"+(cashout/100));
  81. wins++;
  82. profit += ((lastBet*(cashout/100))-lastBet);
  83. if(totalLost>0){
  84. totalLost -= ((bet*(cashout/100))-lastBet);
  85. if(totalLost<0) totalLost = 0;
  86. }
  87. }
  88. if(firstgame) firstgame = false;
  89. });
  90.  
  91. function randomInt(min,max){
  92. return Math.floor(Math.random()*(max-min+1)+min);
  93. }
Add Comment
Please, Sign In to add comment