Last active
November 5, 2017 21:59
-
-
Save jdleo/8ff9eb8a06014161998e0d1b7c3abc4e to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| const baseBet = 200 //base bet (in sats) | |
| const baseTarget = 1.20 //base target | |
| const maxRolls = 200 //max rolls script will do | |
| const infiniteRolls = true //ignores max rolls | |
| const lossStreakDoubleDown = 200 //bet will double down if hits this many losses | |
| let target = baseTarget //initialize target as base | |
| let currentBet = bet //initialize currentBet as baseBet (only increase on double down) | |
| let betCount = 0 //bet count if using max rolls | |
| let lossStreak = 0 //loss streak | |
| this.log(`Starting script...`) | |
| while (betCount < maxRolls || infiniteRolls) { | |
| //make bet, wait for result | |
| const {multiplier} = await this.bet(currentBet, target) | |
| if (multiplier < target) { | |
| //loss | |
| this.log(`Loss.`) | |
| //increase target by baseTarget | |
| target = target + baseTarget | |
| //increase loss streak | |
| lossStreak++ | |
| if (lossStreak == lossStreakDoubleDown) { | |
| currentBet = currentBet * 2 | |
| lossStreak = 0 | |
| } | |
| } else { | |
| //win | |
| //set target back to baseTarget | |
| target = baseTarget | |
| this.log(`Win.`) | |
| //reset loss streak + currentBet | |
| lossStreak = 0 | |
| currentBet = baseBet | |
| } | |
| betCount++ | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment