Post
Topic
Board Reputation
Merits 1 from 1 user
Re: Can you still believe aTriz words? Reopened, too many open questions
by
o_e_l_e_o
on 09/03/2018, 09:26:04 UTC
⭐ Merited by LoyceV (1)
Script
Code:
var config = {
  baseBet: { value: 100, type: 'balance', label: 'base bet' },
  payout: { value: 1.08, type: 'multiplier' },
  stop: { value: 1e2, type: 'balance', label: 'stop if bet >' },
  loss: {
    value: 'increase', type: 'radio', label: 'On Loss',
    options: {
      base: { type: 'noop', label: 'Back to base bet, noob' },
      increase: { value: 2, type: 'multiplier', label: 'Increase bet by' },
    }
  },
  win: {
    value: 'base', type: 'radio', label: 'On Win',
    options: {
      base: { type: 'noop', label: 'Return to base bet' },
      increase: { value: 1.02, type: 'multiplier', label: 'Increase bet by' },
    }
  }
};


log('Script is running..');

var currentBet = config.baseBet.value;

// Always try to bet when script is started
engine.bet(currentBet, config.payout.value);

engine.on('GAME_STARTING', onGameStarted);
engine.on('GAME_ENDED', onGameEnded);

function onGameStarted() {
  engine.bet(currentBet, config.payout.value);
}

function onGameEnded() {
  var lastGame = engine.history.first()

  // If we wagered, it means we played
  if (!lastGame.wager) {
    return;
  }

  // we won..
  if (lastGame.cashedAt) {
    if (config.win.value === 'base') {
      currentBet = config.baseBet.value;
    } else {
      console.assert(config.win.value === 'increase');
      currentBet *= config.win.options.increase.value;
    }
    log('We won, so next bet will be', currentBet/100, 'bits')
  } else {
    // damn, looks like we lost :(

    if (config.loss.value === 'base') {
      currentBet = config.baseBet.value;
    } else {
      console.assert(config.loss.value === 'increase');
      currentBet *= config.loss.options.increase.value;
    }
    log('We lost, so next bet will be', currentBet/100, 'bits')
  }

  if (currentBet > config.stop.value) {
    log('Was about to bet', currentBet, 'which triggers the stop');
    engine.removeListener('GAME_STARTING', onGameStarted);
    engine.removeListener('GAME_ENDED', onGameEnded);
  }
}

For anyone not familiar with the code, what this script does is the following:

Bets 1 bit at x1.08.
If you lose, doubles the bet, still at x1.08.
If you win, returns to the base bet of 1 bit.
Repeat

There are additional options to change the max bet and tweak the multipliers, but the script will run as above unless changed.

It is laughably simple. It is just Martingale, but even worse since you don't even recover your losses after a run of reds (x1.08 multiplier rather than the usual x2). At a 1.08 multiplier, with a success rate of 91.67%, you are making an average profit of (0.9167*0.08)-([1-0.9167]*1)=-1%. Over the long term, you will then run in to the problem of any Martingale with exponentially increasing losses.

In my personal opinion, to claim that this is worth 50BTC is nothing short of delusional. The most impressive thing is the amount of forum activity she has created surrounding a script that could be written by a middle-schooler, and equally proved to be worthless by a middle-schooler.