Skip to content

Instantly share code, notes, and snippets.

@ruzli
Last active September 28, 2019 22:14
Show Gist options
  • Save ruzli/4f55ab47b71eae0d468f80479dcbd415 to your computer and use it in GitHub Desktop.
Save ruzli/4f55ab47b71eae0d468f80479dcbd415 to your computer and use it in GitHub Desktop.
simple shifter
var config = {
wager: { label: "Wager", type: "balance", value: 500 },
max_pay: { label: "Max payout", type: "multiplier", value: 87 },
min_pay: { label: "Min payout", type: "multiplier", value: 7 },
max_loss: { label: "Max lose", type: "balance", value: -100000 },
bets_prog: { label: "Progression betting", type: "checkbox", value: false },
};
let target = 1.01;
let turns = 0;
let profit = 0;
while (true) {
let { multiplier } = await this.bet(100, 1.01)
if(multiplier > config.max_pay.value || multiplier < config.min_pay.value) {
if (profit < config.max_loss.value) await this.stop()
continue;
}
while(true) {
let bet_amount;
if (config.bets_prog.value){
bet_amount = config.wager.value + (turns) * 100
} else {
bet_amount = config.wager.value
}
let result = (await this.bet(bet_amount, multiplier+0.01))['multiplier'];
this.clearLog()
this.log(`Profit: ${Math.round(profit/100)}`)
if (profit < config.max_loss.value) await this.stop()
if(result < multiplier + 0.01 && turns+2 < multiplier) {
profit -=bet_amount
turns++;
} else {
profit += bet_amount * (multiplier + 0.01 - 1)
turns = 0;
break;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment