Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var config = {
- betFewGames: { value: 10, type: 'multiplier' },
- condition: { value: 1.5, type: 'multiplier' },
- target: { value: 50000, type: 'multiplier' },
- };
- log('Script is running..');
- var betUnlock = false;
- var bustStorage = [];
- var initialCounter = 0;
- var counter = 0;
- var result = 0;
- // ========================== CHANGE THESE ====================================
- var betAmount = [5,10,20,40,80,160,320,640];
- var betPayout = [2.4,2.4,2.4,2.4,2.4,2.4,2.4,2.4];
- // ========================== CHANGE THESE ====================================
- engine.on('GAME_STARTING', function() {
- if (userInfo.balance/100 > config.target.value) {
- stop('-- TARGET BALANCE REACHED --')
- }
- if (counter == 2 && initialCounter <= config.betFewGames.value) {
- initialCounter = 100;
- }
- initialCounter = initialCounter+1;
- if (initialCounter <= config.betFewGames.value ) {
- engine.bet(parseInt(betAmount[counter]*100), parseFloat(betPayout[counter]));
- }
- var count = 0;
- var sum = 0;
- var med10 = [];
- var med20 = [];
- var med30 = [];
- var med40 = [];
- var med50 = [];
- var med_history = engine.history.toArray();
- med_history.forEach(function(game){
- count++
- if(count <= 10){
- med10.push(game.bust);
- }
- if(count <= 20){
- med20.push(game.bust);
- }
- if(count <= 30){
- med30.push(game.bust);
- }
- if(count <= 40){
- med40.push(game.bust);
- }
- if(count <= 50){
- med50.push(game.bust);
- }
- });
- med10.sort(function(a, b){return a - b});
- med20.sort(function(a, b){return a - b});
- med30.sort(function(a, b){return a - b});
- med40.sort(function(a, b){return a - b});
- med50.sort(function(a, b){return a - b});
- med10 = (med10[4]+ med10[5])/2;
- log('med10',med10);
- med20 = (med20[9]+ med20[10])/2;
- log('med20',med20);
- med30 = (med30[14]+ med30[15])/2;
- log('med30',med30);
- med40 = (med40[19]+ med40[20])/2;
- log('med40',med40);
- med50 = (med50[24]+ med50[25])/2;
- log('med50',med50);
- if (med10 > config.condition.value && med20 > config.condition.value && med30 > config.condition.value && med40 > config.condition.value) {
- log('TRUE');
- result = 1;
- log('Condition Result:',result);
- } else {
- result = 0;
- }
- if (result == 1){
- engine.bet(parseInt(betAmount[counter]*100), parseFloat(betPayout[counter]));
- log('You are ready to play! ');
- log('A bet will be placed:- Bet Size: '+betAmount[counter]+' Multiplier: '+betPayout[counter]);
- }
- });
- engine.on('GAME_STARTED', function() {
- if (engine.getCurrentBet()){
- var cbet = engine.getCurrentBet();
- log('Game Started with '+ (cbet.wager/100) + ' * ' + cbet.payout+ 'x');
- } else {
- log('A bet was not placed!');
- }
- });
- engine.on('GAME_ENDED', function() {
- var lastGame = engine.history.first();
- log('Game crashed at '+ lastGame.bust);
- log('Last Game wagered at '+ (lastGame.wager)/100);
- // we won..
- if (lastGame.cashedAt > 0 && lastGame.wager > 0) {
- counter = 0;
- } else if (lastGame.wager > 0) {
- counter = counter+1;
- }
- log('Counter:',counter);
- log('--------------------------------');
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement