Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const baseMultiplier = 1.08;
- const lossMultiplier = 1.25;
- const difference = 391000;
- const maxStreak = 9;
- const divisionToBackup = 1;
- let lossStreak = 0;
- let currentBet = 0;
- let currentMultiplier = 0;
- this.log('= ScriptStartsHere =');
- let self = this;
- while (true) {
- await calculateBet(this.balance);
- const { multiplier } = await this.bet(currentBet, currentMultiplier);
- if ((lossStreak === 0 && multiplier < baseMultiplier) || (lossStreak > 0 && multiplier < lossMultiplier)) { // loss
- lossStreak++;
- } else { // win
- lossStreak = 0;
- }
- }
- async function calculateBet(balance) {
- if (lossStreak >= maxStreak) {
- self.log('reset because of 6 lose in a row');
- lossStreak = 0;
- }
- if (lossStreak > 1) {
- await refreshSeed();
- }
- if (lossStreak === 0) {
- currentBet = Math.floor(balance / difference / divisionToBackup / 100) * 100;
- currentMultiplier = baseMultiplier;
- } else if (lossStreak === 1) {
- currentBet *= 4;
- currentMultiplier = lossMultiplier;
- } else {
- currentBet *= 5;
- currentMultiplier = lossMultiplier;
- }
- }
- async function refreshSeed() {
- const clientSeed = await generateClientSeed();
- // request a new server seed using a random client seed
- const { server_seed_hash } = await self.newSeedPair();
- // set the client seed
- await self.setClientSeed(clientSeed);
- }
- async function generateClientSeed() {
- let text = "";
- const possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
- for (let i = 0; i < 16; i++)
- text += possible.charAt(Math.floor(Math.random() * possible.length));
- return text;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement