SHARE
TWEET

Untitled

a guest May 19th, 2019 88 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var config = {
  2.   baseWager: { label: "Base Wager", type: "balance", value: 100 },
  3.   twoByTwo: { label: "Bet 2 by 2 at ", type: "balance", value: 50000 },
  4.   resetAt: { label: "Maximum loose allowed", type: "balance", value: 300000 },
  5.   target: { label: "Target", type: "multiplier", value: 1.37 },
  6.   numPlays: { label: "Number of plays rolls", type: "multiplier", value: 8 }
  7. };
  8. const plays = []
  9. for (let k = 0; k < config.numPlays.value; k++) {
  10.   plays.push({
  11.     loss: 0,
  12.     wager: config.baseWager.value,
  13.   })
  14. }
  15.  
  16. while(true) {
  17.   for(let i = 0; i < plays.length; i++) {
  18.     const resetBet = async () => {
  19.       plays[i].wager = config.baseWager.value;
  20.       plays[i].loss = 0;
  21.       await this.newSeedPair()
  22.     }
  23.  
  24.     const promises = [
  25.       this.bet(plays[i].wager, config.target.value),
  26.       this.bet(plays[i].wager, config.target.value),
  27.     ]
  28.     if (plays[i].wager < config.twoByTwo.value)
  29.       promises.push(this.bet(plays[i].wager, config.target.value))
  30.     else {
  31.       console.log(`Warning - play ${i} wagers ${plays[i].wager}`);
  32.     }
  33.     if (promises.length * plays[i].wager + plays[i].loss >= config.resetAt.value) {
  34.       await resetBet();
  35.       continue;
  36.     }
  37.     const values = await Promise.all(promises);
  38.  
  39.     for (let j = 0; j < promises.length; j++) {
  40.       if (values[j].multiplier >= config.target.value) {
  41.         plays[i].loss -= plays[i].wager * (config.target.value - 1);
  42.       } else {
  43.         plays[i].loss += plays[i].wager;
  44.       }
  45.     }
  46.     if (plays[i].loss <= 0) {
  47.       await resetBet();
  48.     } else {
  49.       plays[i].wager = Math.max(Math.round(plays[i].loss / 100) * 100, config.baseWager.value);
  50.     }
  51.   }
  52. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top