Forked from dsetzer/1.3x plays, on loss 1.1x 3 rolls and bet multiplier 5.js
Created
August 18, 2019 04:11
-
-
Save BitChop/d50f593ef8d3e91cee41ad2948fc51a6 to your computer and use it in GitHub Desktop.
1.3x plays, on loss 1.1x 3 rolls and bet multiplier 5
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 = 1 | |
| const baseTarget = 1.30 | |
| const betMultiplier = 5 | |
| const stopGameAfterLoss = 2 /* Trigger will lead to drop/stop script */ | |
| const dropInsteadOfStopScript = true /* stop script or drop losses and continue play */ | |
| const changeSeed = 3 /* How much losses obtain, and then change seed to decrease chance of big streak, 0 to disable */ | |
| const lossTarget = 1.1 | |
| const lossRepeatTimes = 3 | |
| let lossCount = 0 | |
| let target = baseTarget | |
| let bet = baseBet | |
| let engine = this | |
| while (true) { | |
| for (let i = 0; i < lossRepeatTimes; i++){ | |
| if (lossCount >= stopGameAfterLoss){ | |
| if (dropInsteadOfStopScript == true){ | |
| lossCount = 0 | |
| } else { | |
| await this.stop() | |
| } | |
| } | |
| if (lossCount > changeSeed && changeSeed != 0) { | |
| await generateSeed() | |
| } | |
| const { multiplier } = await this.bet(bet * 100, target) | |
| if (multiplier < target) { // loss | |
| bet = bet * betMultiplier | |
| target = lossTarget | |
| lossCount++ | |
| } else { | |
| lossCount = 0 | |
| bet = baseBet | |
| target = baseTarget | |
| break; | |
| } | |
| } | |
| } | |
| async function generateSeed(){ | |
| const { server_seed_hash } = await engine.newSeedPair() | |
| engine.log(`Server seed: ${server_seed_hash}`) | |
| try { | |
| const clientSeed = randomSeed() | |
| await engine.setClientSeed(clientSeed) | |
| engine.log(`Your Seed was set to: ${clientSeed}`) | |
| } | |
| catch(e){ | |
| engine.log(`Client seed already was reset and not used`) | |
| } | |
| } | |
| function randomSeed(){ | |
| const words = ['Alegra ','Bravon ','Charlik ','Delago ','Zecho ','Forextromb ','Hotelka ','Gnomus ','Addicted ','Aurelia ','Zigalo ','Wiverma ', | |
| 'Mariner ','Octoberfest ','Nascar ','Papaja ','Alberts ','Gomus ','Fierra ','GTO ','Unicorn ','Vicantus ','Siski ','Xavier ','Poiuplet ','Antutulika '] | |
| return words[Math.floor(words.length * Math.random())] + words[Math.floor(words.length * Math.random())] + words[Math.floor(words.length * Math.random())] | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment