Skip to content

Instantly share code, notes, and snippets.

@dsetzer
Last active August 17, 2020 06:03
Show Gist options
  • Save dsetzer/0735c15530a205a9606c975498a8e4b6 to your computer and use it in GitHub Desktop.
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.
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)
}
@XclusiveDigital
Copy link

What balance would you recommend for using this script?

@saibaba786
Copy link

can you add stop bet option in this script. i.e stopbet reached and then restart from basebet.
thank you

@lion1122
Copy link

Is it correct that the "omp" parameter is used here? Or is this an error and there has to be the "comp" parameter in line 25 and 26? Do somebody know that?

@XclusiveDigital
Copy link

Is it correct that the "omp" parameter is used here? Or is this an error and there has to be the "comp" parameter in line 25 and 26? Do somebody know that?

Should be comp

@dsetzer
Copy link
Author

dsetzer commented Aug 17, 2020

Is it correct that the "omp" parameter is used here? Or is this an error and there has to be the "comp" parameter in line 25 and 26? Do somebody know that?

Sorry about that, it's fixed now

What balance would you recommend for using this script?

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment