disorderlyNY Posted July 2, 2020 Share Posted July 2, 2020 I'm trying to combine the functions of the regular Martingale script and the Payout Martingale script. So what I want to achieve On Lose, is to multiply the bet by a set amount AND increase the payout by a set amount. On win it would reset both 'base bet' and 'base payout'. I've combine the 2 scripts already but it is not functioning properly. Currently, on Win, the log is reporting both a "Win" and "Loss" and increasing the bet and payout. Also currently, On Lose, the log does not report anything and continues the existing bet and payout. The current combined script and and screenshot of the log is attached. Does anyone know how to fix this and make it function properly? Willing to tip anyone who can find the solution!!! var config = { baseBet: { label: 'base bet', value: currency.minAmount * 1.2, type: 'number' }, basePayout: { label: 'base 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 by (loss multiplier)' }, { value: 'increase', label: 'Increase payout by (loss payout)' } ] }, lossMultiplier: { label: 'loss multiplier', value: 2, type: 'number' }, lossAdd: { label: 'loss payout +/-', value: 1, 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 payout' }, { value: 'increase', label: 'Increase payout by (win payout)' } ] }, winMultiplier: { label: 'win multiplier', value: 2, type: 'number' }, winAdd: { label: 'win payout +/-', value: 1, type: 'number' }, } function main () { var currentBet = config.baseBet.value; var currentPayout = config.basePayout.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; } else { currentBet *= config.winMultiplier.value; } if (config.onWin.value === 'reset') { currentPayout = config.basePayout.value; } else { currentPayout += config.winAdd.value; } log.success('We won, so next bet will be ' + currentBet + ' ' + currency.currencyName + ' at payout ' + currentPayout + ' x'); if (config.onLoss.value === 'reset') { currentBet = config.baseBet.value; } else { currentBet *= config.lossMultiplier.value; } if (config.onLoss.value === 'reset') { currentPayout = config.basePayout.value; } else { currentPayout += config.lossAdd.value; } log.error('We lost, so next bet will be ' + currentBet + ' ' + currency.currencyName + ' at payout ' + currentPayout + ' x'); } if (currentBet > config.stop.value) { log.error('Was about to bet' + currentBet + 'which triggers the stop'); engine.stop(); } }) } The screenshot of the log below is only 3 bets. First is the initial bet which won. The log says the bet both won and lost. The second bet was increased even though it should have stayed. The second bet lost, but nothing was changed or mentioned in the log. Instead, the third bet was placed at the existing bet and payout which makes so sense to me, because it should have either reset or increased. Please help!!!! Link to comment Share on other sites More sharing options...
][NT3L][G3NC][ Posted July 7, 2020 Share Posted July 7, 2020 https://forum.bc.game/topic/1778-crash-script-help-tipping-for-solution/?do=findComment&comment=8626 Link to comment Share on other sites More sharing options...
Matt Lautsch Posted July 7, 2020 Share Posted July 7, 2020 Does it work? Link to comment Share on other sites More sharing options...
putra_osairis Posted July 27, 2020 Share Posted July 27, 2020 harus sering melihat grafik..... dan instingmu...... Link to comment Share on other sites More sharing options...
whonosewut Posted August 8, 2020 Share Posted August 8, 2020 How do we create our own scripts? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.