Jump to content

@skele Custom request for Crash Script


SatyamTheBoss
 Share

Recommended Posts

Brother this script was way too good for start but at the end house won, still i researched more and found 2 of your scripts 

-----------------------------SCRIPT 1 ( Red Train Pauser )---------------------------------------------

var config = {
    betPercentage: {
        label: 'percentage of total coins to bet',
        value: 0.25,
        type: 'number'
    },
    payout: {
        label: 'payout',
        value: 2,
        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: 'reset',
        type: 'radio',
        options: [{
                value: 'reset',
                label: 'Return to base bet'
            }, {
                value: 'increase',
                label: 'Increase bet by (win multiplier)'
            }
        ]
    },
    winMultiplier: {
        label: 'win multiplier',
        value: 1,
        type: 'number'
    },
    otherConditionsTitle: {
        label: 'Other Stopping Conditions',
        type: 'title'
    },    
    winGoalAmount: {
        label: 'Stop once you have made this much',
        value: currency.amount * 2,
        type: 'number'
    },
    lossStopAmount: {
        label: 'Stop betting after losing this much without a win.',
        value: 0,
        type: 'number'
    },    
    otherConditionsTitle: {
        label: 'Experimentle Please Ignore',
        type: 'title'
    },
    loggingLevel: {
        label: 'logging level',
        value: 'compact',
        type: 'radio',
        options: [{
                value: 'info',
                label: 'info'
            }, {
                value: 'compact',
                label: 'compact'
            }, {
                value: 'verbose',
                label: 'verbose'
            }
        ]
    }
};
// deleted input parameters
var stop = 0;
var lossesForBreak = 0;
var roundsToBreakFor = 0;

// end deleted parameters
var totalWagers = 0;
var netProfit = 0;
var totalWins = 0;
var totalLoses = 0;
var longestWinStreak = 0;
var longestLoseStreak = 0;
var currentStreak = 0;
var loseStreak = 0;
var numberOfRoundsToSkip = 0;
var currentBet = GetNewBaseBet();
var totalNumberOfGames = 0;
var originalbalance = currency.amount;
var runningbalance = currency.amount;
var consequetiveLostBets = 0;
var lossStopAmountVar = config.lossStopAmount.value;

function main() {

    game.onBet = function () {

        // if we are set to skip rounds then do so.
        if (numberOfRoundsToSkip > 0) {
            numberOfRoundsToSkip -= 1;
            log.info('Skipping round to relax, and the next ' + numberOfRoundsToSkip + ' rounds.');
            return;
        } else {
        
                if(totalNumberOfGames == 0)
                {
                    // this is so we account for the first round.
                    currentBet = GetNewBaseBet();
                }
                
                if(loseStreak >= 2)
                {
                    if(game.history[0].crash > 200)
                    {
                        loseStreak = 0;
                    }
                    else
                    {
                        log.info('Not betting until current loseStreak is over.');
                        return;
                    }                    
                }

            log.info('Placed bet for the amount of ' + currentBet);
            game.bet(currentBet, config.payout.value).then(function (payout) {
                runningbalance -= currentBet;
                totalWagers += currentBet;
                totalNumberOfGames += 1;

                if (payout > 1) {
                    var netwin = currentBet * config.payout.value - currentBet;
                    consequetiveLostBets = 0;
                    if(config.loggingLevel.value != 'compact')
                    {
                        LogMessage('We won a net profit of: ' + netwin.toFixed(8), 'success');
                    }
                    netProfit += netwin;
                    runningbalance += netwin + currentBet;

                    if (loseStreak > 0) {
                        loseStreak = 0;
                    }

                    currentStreak += 1;
                    totalWins += 1;

                    LogSummary('true', currentBet);

                    if (config.onWin.value === 'reset') {
                        currentBet = GetNewBaseBet();
                    } else {
                        currentBet *= config.winMultiplier.value;
                    }

                    LogMessage('We won, so next bet will be ' + currentBet.toFixed(8) + ' ' + currency.currencyName, 'success');
                } else {
                        log.error('We lost a net amount of: ' + currentBet.toFixed(8));
                        netProfit -= currentBet;
                        loseStreak += 1;
                        currentStreak = 0;
                        totalLoses += 1;
                        consequetiveLostBets += currentBet;

                        LogSummary('false', currentBet);

                        if (config.onLoss.value == 'reset') {
                            currentBet = GetNewBaseBet();
                        } else {
                            currentBet *= config.lossMultiplier.value;
                        }
                            LogMessage('We lost, so next bet will be ' + currentBet.toFixed(8) + ' ' + currency.currencyName, 'failure');            
                    }

                    if (currentStreak > longestWinStreak) {
                        longestWinStreak = currentStreak;
                    }
                    if (loseStreak > longestLoseStreak) {
                        longestLoseStreak = loseStreak;
                    }

                    recordStats();

                    if (config.winGoalAmount.value != 0 && netProfit > config.winGoalAmount.value) {
                        // we have earned enough stop and quit.
                        log.success('The net profits ' + netProfit.toFixed(8) + ' which triggers stop the for making enough.');
                        game.stop();
                    }
                    if (lossStopAmountVar != 0 && consequetiveLostBets > (lossStopAmountVar)) {
                        // the point of this is to limit the bleed so you don't loose too much.
                        log.error('The net profits ' + netProfit.toFixed(8) + ' which triggers stop for losing enough. The next bet would be ' + currentBet.toFixed(8) + '.');
                        game.stop();
                    }
                }
            );
        }
    };
    }

    function recordStats() {
        if (config.loggingLevel.value != 'compact') {
            LogMessage('total wagers: ' + totalWagers.toFixed(8), 'info');
            LogMessage('Net Profit: ' + netProfit.toFixed(8), 'info');
            LogMessage('Current win streak: ' + currentStreak, 'info');
            LogMessage('Current Lose streak: ' + loseStreak, 'info');
            LogMessage('Total wins: ' + totalWins, 'info');
            LogMessage('Total Losses: ' + totalLoses, 'info');
            LogMessage('Longest win streak: ' + longestWinStreak, 'info');
            LogMessage('Longest lose streak: ' + longestLoseStreak, 'info');
        }
    }

    function GetNewBaseBet() {
        var returnValue = 0;
        returnValue = runningbalance * (config.betPercentage.value / 100);

        if(returnValue > currency.minAmount)
        {
            LogMessage('Recalculating base bet to ' + returnValue.toFixed(8) + ' which is ' + config.betPercentage.value + ' percent of ' + runningbalance.toFixed(8), 'info');
        }
        else
        {
            LogMessage('The recalculated bet amount ' + returnValue.toFixed(8) + ' is lower than the minimum allowed bet.  Setting bet to the minimum allowable amount of ' + currency.minAmount, 'info');
            returnValue = currency.minAmount;
        }

        return returnValue;
    }

    function LogSummary(wasWinner, betAmount) {
        if (config.loggingLevel.value == 'compact') {
            if (wasWinner == 'true') {
                var winAmount = (betAmount * config.payout.value) - betAmount;
                log.success('Winner!! You won ' + winAmount.toFixed(8));
            } else {
                log.error('Loser!! You lost ' + betAmount.toFixed(8));
            }
            var winPercentage = (totalWins / totalNumberOfGames) * 100;
            var losePercentage = (totalLoses / totalNumberOfGames) * 100;

            log.info('Total Games: ' + totalNumberOfGames);
            log.info('Wins: ' + totalWins + '(' + winPercentage.toFixed(2) + ' % )');
            log.info('Loses: ' + totalLoses + '(' + losePercentage.toFixed(2) + ' % )');

            var netNumber = runningbalance - originalbalance;
            var netPecentage = (netNumber / originalbalance) * 100;

            if (originalbalance < runningbalance) {
                log.success('Total Profit: ' + netNumber.toFixed(8) + '(' + netPecentage.toFixed(2) + '%)');
            } else {
                log.error('Total Profit: ' + netNumber.toFixed(8) + '(' + netPecentage.toFixed(2) + '%)');
            }
        }

    }

    /// Determines whether or not to log an event or not to make it easier later
    function LogMessage(message, loggingLevel) {
        if (message) {

            if (config.loggingLevel.value != 'compact') {
                switch (loggingLevel) {
                case 'success':
                    log.success(message);
                    break;
                case 'failure':
                    log.error(message);
                    break;
                case 'info':
                    log.info(message);
                    break;
                case 'compact':
                    break;
                case 'verbose':
                    if (isVerbose)
                        log.info(message);
                    break;
                }
            } else {
                switch (loggingLevel) {
                case 'success':
                    log.success(message);
                    break;
                case 'failure':
                    log.error(message);
                    break;
                case 'compact':
                    log.info(message);
                    break;
                case 'info':
                    break;
                case 'verbose':
                    break;
                }
            }
        }
    }

 

---------------------------Script 2 (Custom LossBreak set)-------------------------------------

var config = {
    betPercentage: {
        label: 'percentage of total coins to bet',
        value: 0.25,
        type: 'number'
    },
    payout: {
        label: 'payout',
        value: 2,
        type: 'number'
    },
    stop: {
        label: 'stop if bet >',
        value: currency.amount * (0.25 / 100) * (2^7),
        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: 'reset',
        type: 'radio',
        options: [{
                value: 'reset',
                label: 'Return to base bet'
            }, {
                value: 'increase',
                label: 'Increase bet by (win multiplier)'
            }
        ]
    },
    winMultiplier: {
        label: 'win multiplier',
        value: 1,
        type: 'number'
    },
    otherConditionsTitle: {
        label: 'Other Stopping Conditions',
        type: 'title'
    },    
    winGoalAmount: {
        label: 'Stop once you have made this much',
        value: currency.amount * 2,
        type: 'number'
    },
    lossStopAmount: {
        label: 'Stop betting after losing this much without a win.',
        value: currency.amount * 0.10,
        type: 'number'
    },    
    otherConditionsTitle: {
        label: 'Experimentle Please Ignore',
        type: 'title'
    },
    loggingLevel: {
        label: 'logging level',
        value: 'compact',
        type: 'radio',
        options: [{
                value: 'info',
                label: 'info'
            }, {
                value: 'compact',
                label: 'compact'
            }, {
                value: 'verbose',
                label: 'verbose'
            }
        ]
    },
    lossesForBreak: {
        label: '# losses before break',
        value: 5,
        type: 'number'
    },
    roundsToBreakFor: {
        label: '# of games to skip for break',
        value: 0,
        type: 'number'
    }
};

var totalWagers = 0;
var netProfit = 0;
var totalWins = 0;
var totalLoses = 0;
var longestWinStreak = 0;
var longestLoseStreak = 0;
var currentStreak = 0;
var loseStreak = 0;
var numberOfRoundsToSkip = 0;
var currentBet = GetNewBaseBet();
var totalNumberOfGames = 0;
var originalbalance = currency.amount;
var runningbalance = currency.amount;
var consequetiveLostBets = 0;
var stopBetVar = config.stop.value;
var lossStopAmountVar = config.lossStopAmount.value;

function main() {

    game.onBet = function () {

        // if we are set to skip rounds then do so.
        if (numberOfRoundsToSkip > 0) {
            numberOfRoundsToSkip -= 1;
            log.info('Skipping round to relax, and the next ' + numberOfRoundsToSkip + ' rounds.');
            return;
        } else {
        
                if(totalNumberOfGames == 0)
                {
                    // this is so we account for the first round.
                    currentBet = GetNewBaseBet();
                }

            log.info('Placed bet for the amount of ' + currentBet);
            game.bet(currentBet, config.payout.value).then(function (payout) {
                runningbalance -= currentBet;
                totalWagers += currentBet;
                totalNumberOfGames += 1;

                if (payout > 1) {
                    var netwin = currentBet * config.payout.value - currentBet;
                    consequetiveLostBets = 0;
                    if(config.loggingLevel.value != 'compact')
                    {
                        LogMessage('We won a net profit of: ' + netwin.toFixed(8), 'success');
                    }
                    netProfit += netwin;
                    runningbalance += netwin + currentBet;

                    if (loseStreak > 0) {
                        loseStreak = 0;
                    }

                    currentStreak += 1;
                    totalWins += 1;

                    LogSummary('true', currentBet);
                    
                    // Update the stop conditions because if we are winning we don't care about them and want them to reflect the 
                    // levels based on the nest egg.
                    stopBetVar = runningbalance * (0.25 / 100) * (2^7);
                    
                    // This is reseting to the new 10% of the nut.
                    if(config.lossStopAmount.value > 0)
                    {
                        lossStopAmountVar = runningbalance * 0.10;
                    }

                    if (config.onWin.value === 'reset') {
                        currentBet = GetNewBaseBet();
                    } else {
                        currentBet *= config.winMultiplier.value;
                    }

                    LogMessage('We won, so next bet will be ' + currentBet.toFixed(8) + ' ' + currency.currencyName, 'success');
                } else {
                        log.error('We lost a net amount of: ' + currentBet.toFixed(8));
                        netProfit -= currentBet;
                        loseStreak += 1;
                        currentStreak = 0;
                        totalLoses += 1;
                        consequetiveLostBets += currentBet;

                        LogSummary('false', currentBet);

                        if (config.lossesForBreak.value > 0) {
                            if (loseStreak % config.lossesForBreak.value == 0) {
                                numberOfRoundsToSkip = config.roundsToBreakFor.value;
                                
                                // Update the current bet with the loss and multiplier so that we don't start back out in the red.
                                currentBet *= config.lossMultiplier.value;

                                // at this point we have lost enough to take a break for the specified number of games and reset our bet.
                                LogMessage('We lost ' + loseStreak + ' games in a row. Taking a break for ' + numberOfRoundsToSkip + ' more rounds.', 'failure');
                                return;
                            }
                        }

                        if (config.onLoss.value == 'reset') {
                            currentBet = GetNewBaseBet();
                        } else {
                            currentBet *= config.lossMultiplier.value;
                        }

                        LogMessage('1. We lost, so next bet will be ' + currentBet.toFixed(8) + ' ' + currency.currencyName, 'failure');
                    }

                    if (currentStreak > longestWinStreak) {
                        longestWinStreak = currentStreak;
                    }
                    if (loseStreak > longestLoseStreak) {
                        longestLoseStreak = loseStreak;
                    }

                    recordStats();

                    if (config.winGoalAmount.value != 0 && netProfit > config.winGoalAmount.value) {
                        // we have earned enough stop and quit.
                        log.success('The net profits ' + netProfit.toFixed(8) + ' which triggers stop the for making enough.');
                        game.stop();
                    }
                    if (lossStopAmountVar != 0 && consequetiveLostBets > (lossStopAmountVar)) {
                        // the point of this is to limit the bleed so you don't loose too much.
                        log.error('The net profits ' + netProfit.toFixed(8) + ' which triggers stop for losing enough. The next bet would be ' + currentBet.toFixed(8) + '.');
                        game.stop();
                    }
                    // only bother with this last code path if  there isn't a valid number in the first condition.
                    if (stopBetVar != 0 && currentBet > stopBetVar) {
                        log.error('Was about to bet' + currentBet.toFixed(8) + ' which triggers the stop');
                        game.stop();
                    }
                }
            );
        }
    };
    }

    function recordStats() {
        if (config.loggingLevel.value != 'compact') {
            LogMessage('total wagers: ' + totalWagers.toFixed(8), 'info');
            LogMessage('Net Profit: ' + netProfit.toFixed(8), 'info');
            LogMessage('Current win streak: ' + currentStreak, 'info');
            LogMessage('Current Lose streak: ' + loseStreak, 'info');
            LogMessage('Total wins: ' + totalWins, 'info');
            LogMessage('Total Losses: ' + totalLoses, 'info');
            LogMessage('Longest win streak: ' + longestWinStreak, 'info');
            LogMessage('Longest lose streak: ' + longestLoseStreak, 'info');
        }
    }

    function GetNewBaseBet() {
        var returnValue = 0;
        returnValue = runningbalance * (config.betPercentage.value / 100);

        if(returnValue > currency.minAmount)
        {
            LogMessage('Recalculating base bet to ' + returnValue.toFixed(8) + ' which is ' + config.betPercentage.value + ' percent of ' + runningbalance.toFixed(8), 'info');
        }
        else
        {
            LogMessage('The recalculated bet amount ' + returnValue + ' is lower than the minimum allowed bet.  Setting bet to the minimum allowable amount of ' + currency.minAmount, 'info');
            returnValue = currency.minAmount;
        }

        return returnValue;
    }

    function LogSummary(wasWinner, betAmount) {
        if (config.loggingLevel.value == 'compact') {
            if (wasWinner == 'true') {
                var winAmount = (betAmount * config.payout.value) - betAmount;
                log.success('Winner!! You won ' + winAmount.toFixed(8));
            } else {
                log.error('Loser!! You lost ' + betAmount.toFixed(8));
            }
            var winPercentage = (totalWins / totalNumberOfGames) * 100;
            var losePercentage = (totalLoses / totalNumberOfGames) * 100;

            log.info('Total Games: ' + totalNumberOfGames);
            log.info('Wins: ' + totalWins + '(' + winPercentage.toFixed(2) + ' % )');
            log.info('Loses: ' + totalLoses + '(' + losePercentage.toFixed(2) + ' % )');

            var netNumber = runningbalance - originalbalance;
            var netPecentage = (netNumber / originalbalance) * 100;

            if (originalbalance < runningbalance) {
                log.success('Total Profit: ' + netNumber.toFixed(8) + '(' + netPecentage.toFixed(2) + '%)');
            } else {
                log.error('Total Profit: ' + netNumber.toFixed(8) + '(' + netPecentage.toFixed(2) + '%)');
            }
        }

    }

    /// Determines whether or not to log an event or not to make it easier later
    function LogMessage(message, loggingLevel) {
        if (message) {

            if (config.loggingLevel.value != 'compact') {
                switch (loggingLevel) {
                case 'success':
                    log.success(message);
                    break;
                case 'failure':
                    log.error(message);
                    break;
                case 'info':
                    log.info(message);
                    break;
                case 'compact':
                    break;
                case 'verbose':
                    if (isVerbose)
                        log.info(message);
                    break;
                }
            } else {
                switch (loggingLevel) {
                case 'success':
                    log.success(message);
                    break;
                case 'failure':
                    log.error(message);
                    break;
                case 'compact':
                    log.info(message);
                    break;
                case 'info':
                    break;
                case 'verbose':
                    break;
                }
            }
        }
    }

 

--------------------------------------------My Request--------------------------------------------------

Brother i really tried hard to combine them but no success in the end, i want that can you combine them

--------------------------------------------FOR EXAMPLE----------------------------------------------

After getting a streak of 4 losses in your Read Train stoppper script it will skip 10rounds and after skipping 10rounds it will again wait for a green signal before placing the bet.

Hoping you will accept my request

Link to comment
Share on other sites

  • 8 months later...
On 2/11/2023 at 10:13 PM, Zltkqtdujyb said:

hey brother i am new to this script writing and also new to this bc games can you please tell me which coding language this is ,where i can learn how to write script for gaming stretegy.

is javascript the coding language you just need the basics to be able to code your own strategy, like conditional statements, loops, functions, and of course variables and asignments. And a little bit about objects.

5 minutes ago, Bivodudqeub said:

is javascript the coding language you just need the basics to be able to code your own strategy, like conditional statements, loops, functions, and of course variables and asignments. And a little bit about objects.

oh forgot to mention you need to be good with algorithms too, usually takes a little bit or a lot of practice depending of your problem solving skills 

Edited by Bivodudqeub
Link to comment
Share on other sites

Don't worry man i know C programming ,i can learn java script.

Ya the other thing is that Skele algorithms when 2 red comes then stop and green come then start betting that script i used i make profit but i found that in that algorithms also a lossing streak comes 3 red 1 green 3 red 1 green 3 red 1 green

Link to comment
Share on other sites

  • 1 month later...

yes i actually wrote another script that takes ranges and then will pick randomly how many losses before it stops betting, and also how many greens before it starts again.  Then i went a completely different route and just had it stop for a random amount of time. like 5-10 minutes.  It just picks it randomly at the start of the losing streak.

Link to comment
Share on other sites

  • 2 weeks later...
On 3/19/2023 at 1:20 PM, Skele said:

yes i actually wrote another script that takes ranges and then will pick randomly how many losses before it stops betting, and also how many greens before it starts again.  Then i went a completely different route and just had it stop for a random amount of time. like 5-10 minutes.  It just picks it randomly at the start of the losing streak.

@Skeleif you don't mind pls share it with the community 
 

Link to comment
Share on other sites

  • 5 months later...

You need to be a member in order to leave a comment

Sign up for a new account in our community. It's easy!

Register a new account

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...