Jump to content

Create a function "Take profit=return to basebet"


Amarfun

Recommended Posts

Hello everybody

i've find very nice script on crashbet.com, it is working well on hash dice too.

i only have a problem : i want to had on function that allow to "take profit" (exactly like the vanilla function "stop on win" on other games) but i want this function return to base bet (and continue to play) instead of stopping the script.

do you think you can help me please ?

thanks a lot

Link to comment
Share on other sites

yes Send to me Pm

Link to comment
Share on other sites

  • 3 weeks later...

Please send me the function as well. I would like to try it!

Link to comment
Share on other sites

Me three

Link to comment
Share on other sites

  • 2 weeks later...
  • 1 month later...

omg guys how hard is it to write a function like that
 

game.bet(currentBet, config.payout.value).then(function (payout) {
                runningbalance -= currentBet;
                totalWagers += currentBet;
                totalNumberOfGames += 1;
                amountToTakeProfit = config.TakeProfit.value;

                if (payout > 1) {
                    var netwin = currentBet * config.payout.value - currentBet;
                    
                    LogMessage('We won a net profit of: ' + netwin.toFixed(8), 'success');

                    netProfit += netwin;
                    
                    if(netProfit > amountToTakeProfit)
                    {
                        currentBet = config.BaseBet.value;
                    }
                } else {
                        log.error('We lost a net amount of: ' + currentBet.toFixed(8));
                        netProfit -= currentBet;
                }
                }
            );

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...