Created
February 2, 2020 04:40
-
-
Save ruzli/8e0ba152bb9d7f2a5fd5ac039a98a1c7 to your computer and use it in GitHub Desktop.
HongKongCruse - Betting system
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: { value: 100, type: 'balance', label: 'base bet' }, | |
payout: { value: 2, type: 'multiplier', label: 'target' }, | |
multiply: { value: 2, type: 'multiplier', label: 'multiply wins' }, | |
multiplyLoss: { value: 1, type: 'number', label: 'multiply loss' }, | |
stops: { value: 10, type: 'number', label: 'stop bet levels' }, | |
doubles: { value: 1, type: 'number', label: 'How much attempts to double' }, | |
}; | |
const baseBet = config.baseBet.value; | |
var currentBet = baseBet; | |
var previusBet = currentBet; | |
function roundBit(bet) { return Math.max(100, Math.round(bet / 100) * 100); }; | |
var bet_levels = 0; | |
var cruising = false; | |
var trying_cruise = false; | |
var cruise_failed = false; | |
var loss_seen = false; | |
while (true) { | |
this.log(`Bet level [${bet_levels}], stop at [${config.stops.value}] level`) | |
if (bet_levels >= config.stops.value) { await this.stop(); this.log(`Bet level stop triggered`)} | |
const { multiplier } = await this.bet(roundBit(currentBet), config.payout.value); | |
bet_levels++; | |
if (multiplier >= config.payout.value) { // WINS | |
if (trying_cruise){ | |
trying_cruise = false; | |
cruise_failed = false; | |
}; | |
if(cruising == false && !loss_seen){ | |
currentBet = baseBet * config.multiply.value; | |
} else { | |
cruise(); | |
}; | |
} else { // LOSS | |
loss_seen = true; | |
if (trying_cruise == true){ | |
cruise_failed = true; | |
cruising = true; | |
if (config.multiplyLoss.value == 1){ | |
currentBet = previusBet + config.multiplyLoss.value * 100; | |
} else { | |
currentBet = previusBet * config.multiplyLoss.value; | |
} | |
previusBet = baseBet; | |
trying_cruise = false; | |
} else { | |
if (config.multiplyLoss.value == 1){ | |
currentBet += config.multiplyLoss.value * 100; | |
} else { | |
currentBet *= config.multiplyLoss.value; | |
} | |
cruising = true; | |
}; | |
}; | |
} | |
function cruise(){ | |
if (cruising){ | |
previusBet = currentBet; | |
currentBet *= config.multiply.value; | |
trying_cruise = true | |
cruising = false | |
} else { | |
if (cruise_failed == true){ | |
} else { | |
bet_levels = 1; | |
currentBet = baseBet | |
previusBet = baseBet | |
} | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment