Jump to content

Recommended Posts

Posted

This should be what you want, added the same functionality of the bet multiplier for the payout amount. 

var config = {
  baseBet: { label: 'base bet', value: currency.minAmount * 1.2, type: 'number' },
  payout: { label: 'payout', value: 2, type: 'number' },
  stop: { label: 'stop if bet >', value: 1e8, type: 'number' },
  onLoseTitle: { label: 'On Lose', type: 'title' },
  onLoss: { 
    label: '', value: 'increase', type: 'radio',
    options: [
      { value: 'reset', label: 'Return to base bet' },
      { value: 'increase', label: 'Increase bet and/or multiplier by (loss multiplier)' },
    ]
  },
  lossMultiplier: { label: 'bet loss multiplier ', value: 2, type: 'number' },
  lossMultiplier2: { label: 'multiplier loss multiplier', value: 2, type: 'number' },
  onWinTitle: { label: 'On Win', type: 'title' },
  onWin: { 
    label: '', value: 'reset', type: 'radio',
    options: [
      { value: 'reset', label: 'Return to base bet' },
      { value: 'increase', label: 'Increase bet and/or multiplier by (win multiplier)' },
    ]
  },
  winMultiplier: { label: 'bet win multiplier', value: 2, type: 'number' },
  winMultiplier2: { label: 'multiplier loss multiplier', value: 2, type: 'number' },
}

function main () {
  var currentBet = config.baseBet.value;
  var currentPayout = config.payout.value;
  engine.on('GAME_STARTING', function () {
    engine.bet(currentBet, currentPayout);
  })

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

    // we won..
    if (lastGame.cashedAt) {
      if (config.onWin.value === 'reset') {
        currentBet = config.baseBet.value;
		currentPayout = config.payout.value;
      } else {
        currentBet *= config.winMultiplier.value;
		currentPayout *= config.winMultiplier2.value;
      }
      log.success('We won, so next bet will be ' + currentBet + ' ' + currency.currencyName);
    } else {
      if (config.onLoss.value === 'reset') {
        currentBet = config.baseBet.value;
		currentPayout = config.payout.value;
      } else {
        currentBet *= config.lossMultiplier.value;
		currentPayout *= config.lossMultiplier2.value;
      }
      log.error('We lost, so next bet will be ' + currentBet + ' ' + currency.currencyName);
    }

    if (currentBet > config.stop.value) {
      log.error('Was about to bet' + currentBet + 'which triggers the stop');
      engine.stop();
    }
  })
}

 

Posted
1 hour ago, DrGgg said:

the script is fine, only once lost / won it doesn't start over from 0 but picks up where I left off and it's not good

Hm, works for me like it should. Make sure you're selecting "return to base bet" option in the On Win section if you want it to go back to the original values when you win. If it keeps happening post a screenshot of the script settings and the output log so I can look into it more.

Posted

So, maybe and me someone help? With the same, but I don't know, how use scripts, etc. If someone can help - please PM ☺️

  • 2 weeks later...
Posted
On 3/19/2021 at 7:58 AM, ScarletBlack said:

So, maybe and me someone help? With the same, but I don't know, how use scripts, etc. If someone can help - please PM ☺️

maybe you can post it here and let the public help instead?

  • 5 years later...
  • Admin
Posted

Thank you for your support. Currently, the platform does not support the use of automated betting scripts. Using scripts will result in your account being suspended. We recommend following the platform's standard features to place bets and enjoy the games.

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
×
×
  • Create New...