Jump to content

Can anyone add "Stop on win" like in AUTO to my script for me?


Pit-Filler

Recommended Posts

I want to make my scirpt stop if profit reach a certaon amount

var config = {
  baseBet: { label: "base bet", value: currency.minAmount, type: "number" },
  payout: { label: "payout", value: 1.65, type: "number" },
  stop: { label: "stop if next bet >", value: 1e8, type: "number" },
  lossMultiplier: { label: "loss multiplier", value: 1.10, type: "number" },
  winMultiplier: { label: "win multiplier", value: 1.05, type: "number" },
};
function main() {
  var currentBet = config.baseBet.value;
  game.onBet = function () {
    game.bet(currentBet, config.payout.value).then(function (payout) {
      if (payout > 1) {
        currentBet *= config.winMultiplier.value;
        log.success(
          "We won"
        );
      } else {
        currentBet *= config.lossMultiplier.value;
        log.error(
          "We lost"
        );
      }
    });
  };
}

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...