Jump to content

Super simple Hash Dice Script


Money_Magnet

Recommended Posts

Guys, who can write one super simple Hash Dice Script? 

I want to have a base bet, Bet Martingale after lose, if win reverse the Martingale, and most importantly if bet goes over X, then continue betting with martingale but reverse to base bet on the first win. 

 

So an example will be:

I set my base bet to 1 dollar, my max bet to 100 dollars.

Start

Bet 1 - win - do nothing 

Bet 1 - lose - martingale 

Bet 2 - lose - martingale 

Bet 4 - win - reverse martingale 

Bet 2 - win - reverse martingale

Bet 1 - and so on. 

If bet reaches max bet of 100..

Bet 100

Win - go to base bet and start over 

Lose - continue martingale betting until win

 

Can someone of our smart devs pull this one off? 

EDIT: It should have a hard stop-loss field.

Link to comment
Share on other sites

  • Money_Magnet changed the title to Super simple Hash Dice Script

Reverse Martingale usually refers to a martingale strategy that doubles up on win, and returns to basebet on a loss, but I get what you are are saying..

You could honestly do this in the "Auto" tab of most games.
 - Increase on loss: (100%)
- Increase on win (-50%)

Obviously you wouldn't be able to include the 'return to basebet' feature without an actual script, but you could still set a win limit and lose limit in the mean time.

 

I believe this should work as you would like.

 

var config = {
  baseBet: { label: "base bet", value: 0.00000010, type: "number" },
  payout: { label: "payout", value: 2, type: "number" },
  stop: { label: "stop if next bet >", value: 0.001, type: "number" },
  onLoseTitle: { label: "On Lose", type: "title" },
  onLoss: {
    label: "",
    value: "increase",
    type: "radio",
    options: [
      { value: "reset", label: "Return to base bet" },
      { value: "increase", label: "Increase bet by (loss multiplier)" },
    ],
  },
  lossMultiplier: { label: "loss multiplier", value: 2, type: "number" },
  onWinTitle: { label: "On Win", type: "title" },
  onWin: {
    label: "",
    value: "increase",
    type: "radio",
    options: [
      { value: "reset", label: "Return to base bet" },
      { value: "increase", label: "Increase bet by (win multiplier)" },
    ],
  },
  winMultiplier: { label: "win multiplier", value: 0.5, type: "number" },
};
 
var runningbalance = currency.amount;
var ath = runningbalance;
var baseBet = config.baseBet.value;
 
function main() {
  var currentBet = config.baseBet.value;
  game.onBet = function () {
    game.bet(currentBet, config.payout.value).then(function (payout) {
        runningbalance -= currentBet;
      if (payout > 1) {
          var netwin = (currentBet*config.payout.value);
          runningbalance += netwin;
 
        if (config.onWin.value === "reset") {
          currentBet = config.baseBet.value;
        } else {
            if (currentBet > baseBet*100) {
                currentBet = baseBet;
            } else {
                currentBet *= config.winMultiplier.value;
            }
        }
        log.success(
          "We won, so next bet will be " +
            currentBet +
            " " +
            currency.currencyName
        );
      } else {
        if (config.onLoss.value === "reset") {
          currentBet = config.baseBet.value;
        } else {
          currentBet *= config.lossMultiplier.value;
        }
        log.error(
          "We lost, so next bet will be " +
            currentBet +
            " " +
            currency.currencyName
        );
      }
      if (runningbalance > ath) {
          ath = runningbalance;
      }
      if (currentBet > config.stop.value) {
        log.error(
          "Was about to bet " + currentBet + " which triggers the stop"
        );
        game.stop();
      }
      if (currentBet < currency.minAmount) {
          currentBet = currency.minAmount;
      }
    });
  };
}
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...