Jump to content

easy script , if you can help me@@@@


DrGgg

Recommended Posts

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();
    }
  })
}

 

Link to comment
Share on other sites

  On 3/17/2021 at 12:17 AM, 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

Expand  

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.

Link to comment
Share on other sites

  • 2 weeks later...
  • 5 months later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...