Last active
December 18, 2024 16:55
-
-
Save dsetzer/7dc322afeec4e8727718eb8dc7e05c48 to your computer and use it in GitHub Desktop.
Upgrade from climb-v2 script with more customization, compounding, and halving feature for bustabit.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var config = { | |
| baseBet: { label: 'Base Bet', type: 'balance', value: 1000 }, | |
| minPayout: { label: 'Target Min', type: 'multiplier', value: 1.08 }, | |
| maxPayout: { label: 'Target Max', type: 'multiplier', value: 50.00 }, | |
| divPayout: { label: 'Target Div', type: 'multiplier', value: 0.80 }, | |
| compRate: { label: 'Compound %', type: 'multiplier', value: 0.02 }, | |
| compStep: { label: 'Compound At', type: 'multiplier', value: 1.10 }, | |
| }; | |
| let baseBet = config.baseBet.value, basePayout = config.minPayout.value, rate = config.compRate.value; | |
| let currentBet = baseBet, currPayout = basePayout, baseMulti = 1.005, betMulti = 1.006, result = null; | |
| let startBal = userInfo.balance, lastBal = startBal, nextBal = startBal * config.compStep.value, comp = 0; | |
| engine.on('GAME_ENDED', () => { | |
| let lastGame = engine.history.first(); | |
| if(lastGame.wager){ | |
| let result = {value: lastGame.wager, target: lastGame.payout, multiplier: lastGame.bust }; | |
| log(`Status (BaseBet: ${baseBet / 100} bits, Comp: ${comp / 100}, Rate: ${rate * 100}%)`); | |
| if (result.multiplier < currPayout){ | |
| //comp -= (lastBal - userInfo.balance) * rate; | |
| if(currPayout >= config.maxPayout.value){ | |
| let lastPayout = currPayout; | |
| currPayout *= (1 - config.divPayout.value); | |
| currentBet *= (lastPayout / (currPayout - 1)); | |
| }else{ currPayout += baseMulti, currentBet *= betMulti } | |
| }else{ | |
| currPayout = basePayout, currentBet = baseBet; | |
| if(userInfo.balance >= nextBal){ comp = 0, nextBal = (lastBal * config.compStep.value) | |
| }else{ comp = (userInfo.balance - lastBal) * rate, lastBal = userInfo.balance; } | |
| } | |
| } | |
| engine.bet(Math.round((currentBet + comp) / 100) * 100, currPayout); | |
| }); | |
| /* Copyright © 2019 dsetzer All rights reserved. */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment