Skip to content

Instantly share code, notes, and snippets.

@dsetzer
Last active November 15, 2019 22:14
Show Gist options
  • Save dsetzer/2d14ce8862d6014d8210f2876637d648 to your computer and use it in GitHub Desktop.
Save dsetzer/2d14ce8862d6014d8210f2876637d648 to your computer and use it in GitHub Desktop.
bustadice script
var config = {
b: { type: 'balance', label: 'Base Bet', value: 50 },
t: { type: 'multiplier', label: 'Base Payout', value: 5 },
m: { type: 'multiplier', label: 'Bet Multi', value: 1.2 },
p: { type: 'number', label: 'Add Bets', value: 1 },
s: { type: 'number', label: 'Bet Speed', value: 100 }
};
const b = config.b.value, t = config.t.value, m = config.m.value;
const p = config.p.value, d = config.s.value;
const s = (t) => { return new Promise((r) => { setTimeout(r, t); }); }
let w = b, sb = this.balance, pb = sb, r = null;
for (;;){
r = await this.bet(Math.max(100, Math.round(w/100)*100), t);
(r.multiplier<t)&&(sb-=(w*p),w*=m,sb+=(w*p));
(r.balance>=sb&&pb<sb)&&(w=b,sb=r.balance);
pb = r.balance;
await s(d);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment