Last active
January 6, 2019 20:08
-
-
Save ruzli/703afb9ab3d9b1ad89a45b901778f0ca 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 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.1 | |
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.3 | |
const lossRepeatTimes = 3 | |
let lossCount = 0 | |
let target = baseTarget | |
let bet = baseBet | |
let engine = this | |
while (true) { | |
if (lossCount >= stopGameAfterLoss){ | |
if (dropInsteadOfStopScript == true){ | |
lossCount = 0 | |
} else { | |
await this.stop() | |
} | |
} | |
if (lossCount > changeSeed && changeSeed != 0) { | |
await generateSeed() | |
} | |
for (let i = 0; i < lossRepeatTimes; i++){ | |
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