You are on page 1of 1

var config = {

bet: { label: 'Apuesta', value: currency.minAmount, type: 'number' },


payout: {label: 'Retirada', type: 'radio', value: 2.0, options: [{value: 2.00,
label: '2x'}, {value: 2.02, label: '2.02x'}, {value: 2.15, label: '2.15x'}, {value:
2.30, label: '2.3x'}]},
}

function main () {
var current = config.bet.value;
engine.on('GAME_STARTING', function () {
var latest = engine.getHistory()[0];
if(latest.crash > 199) { // verde
engine.bet(current, config.payout.value);
}
});

engine.on('GAME_ENDED', function () {
var latest = engine.getHistory()[0];
// If we wagered, it means we played
if (!latest.wager) {
return;
}

// perdimos
if (!latest.cashedAt) {
log.info('Perdimos :( ' + current + currency.currencyName);
current = current * 2;
} else {
current = config.bet.value;
}
});
}

function main () {
log.info(config.colors.value)

You might also like