Advertisement
curly4

BaB Oscillator Bot

Nov 15th, 2021
911
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /***************
  2.  
  3.     BaB Oscillator Bot
  4.     By MartinG
  5.     Version 2.0
  6.  
  7.     base_bet: Bets will range from 1 bit to base_bet * 2 bits
  8.     oscillation_length: The number of bets to make in one cycle
  9.     cashout: Where to cashout
  10.              
  11. ****************/
  12.  
  13.     var base_bet = 100;
  14.     var oscillation_length = 50;
  15.  
  16.     var cashout = 1.03;
  17.    
  18. /***************/
  19.  
  20. cashout = Math.round(cashout * 100);
  21.  
  22. var i = 0;
  23. var counter = 0;
  24. var increase = Math.PI * 2 / oscillation_length;
  25.  
  26. function next() {
  27.     i++;
  28.     if(i > oscillation_length) i=0;
  29.    
  30.     var y = Math.sin(counter) * base_bet + base_bet + 1;
  31.     counter += increase;       
  32.     return Math.floor(y) * 100;
  33. }
  34.  
  35. engine.on('game_starting', function(info) {
  36.     var bet = next();
  37.     console.log("Betting " + bet/100);
  38.     engine.placeBet(bet, cashout);
  39. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement