Last active
August 17, 2020 06:03
-
-
Save dsetzer/0735c15530a205a9606c975498a8e4b6 to your computer and use it in GitHub Desktop.
Upgrade from climb-v2 script with more customization, compounding, and halving feature for bustadice.
This file contains 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 }, | |
betSpeed: { label: 'Bet Speed', type: 'multiplier', value: 100 } | |
}; | |
Object.entries(config).forEach((c) => window[c[0]] = c[1].value); | |
let currentBet = baseBet, currentPayout = minPayout, lastPayout, baseMulti = 1.005, betMulti = 1.006; | |
let startBal = this.balance, lastBal = startBal, nextBal = startBal * compStep, comp = 0; | |
const sleep = (ms) => { return new Promise(r => setTimeout(r, ms)); } | |
for(;;){ | |
const result = await this.bet(Math.round((currentBet + comp) / 100) * 100, currentPayout); | |
this.log(`Status (BaseBet: ${baseBet / 100} bits, Comp: ${comp / 100}, Rate: ${compRate * 100}%)`); | |
if (result.multiplier < currentPayout){ | |
if(currentPayout >= maxPayout){ | |
lastPayout = currentPayout, currentPayout *= (1 - divPayout); | |
currentBet *= (lastPayout / (currentPayout - 1)); | |
}else{ currentPayout += baseMulti, currentBet *= betMulti; } | |
}else{ | |
currentPayout = minPayout, currentBet = baseBet; | |
if(this.balance >= nextBal){ comp = 0, nextBal = (lastBal * compStep) | |
}else{ comp = (this.balance - lastBal) * compRate, lastBal = this.balance; } | |
} | |
await sleep(betSpeed) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sorry about that, it's fixed now
I would say that 10,000 bits is probably the minimum. There's a version here with a built in simulator you can use to check.