View difference between Paste ID: 6e8DiQVW and LkSmBHAg
SHOW: | | - or go back to the newest paste.
1
/*¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯|
2
//  Bustabit Intelligent Martingal bot -  By Dexon                   |
3
//___________________________________________________________________|
4
//
5
//      Simple bot the bet using the martingal method.
6
//      Use this: https://jsfiddle.net/9rea8gv9/embedded/result/
7
//       To help you calculate your options.
8
//      (Bustabit Martingal calculator)
9
//
10
//      My address: 16gj85L3364SGdcUG5tb2wJkhG8UVF5r6j
11
*/
12
 
13
var     BaseBet = 1000, // Base bet in bits. 1000 = 1000 bits.
14
        AutoCashout = 2, // Cashout. 2 means x2.0
15
        IncreaseOnLoss = 2; // Increase on loss. 2 means +200% bits of the previous loss. (first bet will be 1k, second one 2k)
16
        secureStreak = 5; // Numbers of red streaks to wait before starting to bet.
17
 
18
// Edit ^over^ this line --------------------
19
 
20
var streaks = 0;
21
var bet = 0;
22
var lastBet = 0;
23
engine.on('game_starting', function(info) {
24
    if(engine.lastGamePlay() == "LOST") bet = lastBet * IncreaseOnLoss;
25
    else bet = BaseBet;
26
    if(streaks>=secureStreak) engine.placeBet(Math.round(bet)*100, Math.round(AutoCashout*100), function(){ });
27
    lastBet = bet;
28
});
29
 
30
engine.on('game_crash', function(data) {
31
        if(data.game_crash/100>=AutoCashout){
32
                streaks = 0;
33
        }else{
34
                streaks++;
35
        }
36
 
37
        console.log("Crashed at x"+(data.game_crash/100)+", "+(secureStreak-(streaks>secureStreak?secureStreak:streaks))+" streaks left");
38
});