Skip to content

Instantly share code, notes, and snippets.

@dsetzer
Last active August 18, 2019 04:11
Show Gist options
  • Save dsetzer/2eb7ca988897e71ea46658eaf34df3a8 to your computer and use it in GitHub Desktop.
Save dsetzer/2eb7ca988897e71ea46658eaf34df3a8 to your computer and use it in GitHub Desktop.
var config = {};
var sB = userInfo.balance, bB = sB / 100, bP = 127 / 100, cB = 0;
engine.on('GAME_STARTING', () => {
let lG = engine.history.first();
if (lG.wager) {
if (lG.cashedAt) {
if (userInfo.balance > sB * 1.1) {
sB = userInfo.balance, bB = sB / 100, cB = bB;
} else cB *= 0.87;
} else cB *= 2;
} else cB = bB;
cB = Math.round(cB / 100) * 100;
engine.bet(cB, bP);
log(`Bet placed for ${cB/100} bits @ ${bP}x`);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment