Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const baseBet = 1;
- const multiplier = 1.12;
- let gameCounter = 0;
- let currentBet;
- let shouldRun = true;
- engine.on('game_starting', function(info) {
- console.info('Game number: '+ gameCounter +' Starting in ' + info.time_till_start/1000 + 's');
- console.info('calculating bet & bet multiplier...');
- switch(gameCounter) {
- case 0:
- currentBet = baseBet;
- break;
- case 1:
- currentBet = currentBet * 8.5;
- break;
- case 2:
- currentBet = currentBet * 9.6;
- break;
- case 3:
- currentBet = currentBet * 9.6;
- break;
- case 4:
- currentBet = currentBet * 9.6;
- break;
- }
- console.info('betting: ' + currentBet + ' will cash out on: ' + multiplier);
- if(currentBet < engine.getBalance()){
- if (shouldRun) engine.placeBet(Math.floor(currentBet) * 100, Math.round(multiplier * 100));
- } else {
- console.warn('balance limit');
- shouldRun = false
- }
- });
- engine.on('game_started', function(data) {
- gameCounter++;
- });
- engine.on('cashed_out', function(resp) {
- if(resp.username == engine.getUsername()) {
- console.info('cashed out on game: ' + gameCounter + ' restarting cycle...');
- gameCounter = 0;
- }
- });
- engine.on('game_crash', function(data) {
- if(!engine.lastGamePlayed()) gameCounter = 0;
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement