Last active
July 31, 2020 20:42
-
-
Save ruzli/572e28c68390b24fff290d78ccd22b54 to your computer and use it in GitHub Desktop.
playAfterCatch
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: { label: "Base Bet", type: "balance", value: 100 }, | |
catchBet: { label: "Catch Bet", type: "balance", value: 3000 }, | |
normalTarget: { label: "Base Target", type: "multiplier", value: 40 }, | |
catchTarget: { label: "Catch Target", type: "multiplier", value: 100 }, | |
catchRolls: { label: "Catch Rolls [-1 = OFF]", type: "number", value: 15 }, | |
}; | |
var basebet = config.basebet.value, catchBet = config.catchBet.value; | |
var normalTarget = config.normalTarget.value, catchTarget = config.catchTarget.value, catchRolls = config.catchRolls.value; | |
var currentbet = basebet, currentPayout = normalTarget, won = 0, rolls = 0, catchroll = 0, hits = 0; | |
while(true){ | |
rolls++; | |
const{multiplier} = await this.bet(currentbet, currentPayout) | |
this.clearLog() | |
this.log(`Roll ${rolls}, Hits ${hits}`) | |
if (currentPayout == catchTarget && multiplier >= catchTarget){ | |
catchroll = 0; | |
currentbet = basebet; | |
currentPayout = normalTarget; | |
hits++; | |
} | |
if (multiplier >= normalTarget){ | |
currentPayout = catchTarget; | |
currentbet = catchBet; | |
catchroll = catchRolls; | |
} | |
if (catchRolls != -1 && catchroll > 0){ | |
catchroll--; | |
if (catchroll <= 0){ | |
currentbet = basebet; | |
currentPayout = normalTarget; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment