Advertisement
Guest User

Untitled

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