Jump to content

Help


YAZDIRAN
 Share

Recommended Posts

 

Is it possible to change the settings of this script to run on hashdice?
(It should be noted that this script is executed on crash)

 

 

 

 

 

 

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: 1.5, label: '1.5x'}, {value: 2.20, label: '2.2x'}, {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  > 150) {  // 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.3,4;
    } else {
       current = config.bet.value;
    }
  });
}

Link to comment
Share on other sites

You need to be a member in order to leave a comment

Sign up for a new account in our community. It's easy!

Register a new account

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...