Last active
April 18, 2019 01:41
-
-
Save ruzli/47a5e48b4fc496ea0b82926cda332c54 to your computer and use it in GitHub Desktop.
One of the safest scripts made, with simple logic [SAFE][1500 bits+]
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.5 | |
const maximumBet = 500 | |
const multiplierBet = 3 | |
const minimalToRunScript = 300 | |
let losses = 1 | |
let bet = 1 | |
let engine = this | |
let tbet = bet | |
while(true){ | |
if (this.balance / 100 < minimalToRunScript){ | |
this.log('Minimal balance is reached, stopping script') | |
break | |
} | |
if (bet * losses >= maximumBet){losses = 1} | |
tbet = Math.floor(toSatoshi(bet)) | |
const { multiplier} = await this.bet(toSatoshi(toBits(tbet) * Math.floor(toSatoshi(toBits(losses)))), baseTarget) | |
this.log(`Current balance ${toBits(this.balance)}`) | |
if (multiplier < baseTarget){ /* [LOSS] */ | |
gong() | |
await generateSeed() | |
//bet = (losses * baseBet) | |
if (baseBet * losses >= maximumBet){ | |
//losses-- | |
}else{ | |
losses = losses * multiplierBet +Math.floor(multiplierBet/0.7) | |
} | |
}else{ /* [WIN] */ | |
collectSound() | |
losses = Math.round(losses / multiplierBet) | |
if (losses <= baseBet){ | |
losses = 1 | |
} | |
// bet = baseBet - bet | |
} | |
} | |
function gong() { | |
const audio = new Audio("https://bustadice.com/5bb187b7ef764e76fb519939f77288c1.mp3") | |
audio.play() | |
return new Promise(resolve => audio.onended = resolve) | |
} | |
function collectSound(){ | |
let pathStr = "http://kz-developer.ru/sounds/chipsHandle" + getRandomInt(6,7) + ".wav" | |
const audio = new Audio (pathStr) | |
audio.play() | |
return new Promise(resolve => audio.onended = resolve) | |
} | |
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(`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())] | |
} | |
function getRandomInt(min, max){ | |
return Math.floor(Math.random() * (max - min)) + min; | |
} | |
function toBits(satoshi){ | |
return satoshi / 100 | |
} | |
function toSatoshi(bits){ | |
return bits * 100 | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment