Jump to content

Crash: Follow User Script


Recommended Posts

let config = {
    printMode: {
        label: '', value: 'off', type: 'radio',
        options: [
            { value: 'off', label: 'Bet Mode' },
            { value: 'on', label: 'Print Mode' }
        ]
    },
    followUser: {label: 'User to follow', value: '', type: 'text'},
    followCoin: {label: "Coin to follow", value: '', type: 'text'},
    maxBetTitle: {
        label:
        "Min Bet | Max Bet",
        type: 'title'
    },
    minBet: {label: 'Min Bet ', value: currency.minAmount * 1.2, type: 'number'},
    maxBet: {label: 'Max Bet ', value: currency.maxAmount, type: 'number'},
    percentTitle: {label: 'Set The Percent Of Users Bet To Make ', type: 'title'},
    percentBet: {label: 'Percent ', value: 100, type: 'number' },
    maxPayout: {
        label: 'Max payout',
        value: 100,
        type: 'number'
    },
    balanceBetTitle: {label: 'Stop Profit | Stop Loss ', type: 'title'},
    autoAdjust: {
        label: '', value: 'reset', type: 'radio',
        options: [
            { value: 'reset', label: 'Dont Auto Adjust' },
            { value: 'increase', label: 'Auto Adjust Stop Loss' }
        ]
    },
    profitStop: {label: 'Balance Over ', value: parseFloat(currency.amount) * 2 , type: 'number'},
    lossStop: {label: 'Balance Under ', value: 0, type: 'number'}

}

function main() {
    const followUser = config.followUser.value.toLowerCase()
    const maxPayout = config.maxPayout.value
    const maxBet = config.maxBet.value
    const minBet = config.minBet.value
    const profitStop = config.profitStop.value
    var lossStop = config.lossStop.value
    const percentBet = config.percentBet.value / 100
    const lossAmount = currency.amount - config.lossStop.value

    let isPlaying = false
    engine.on('GAME_STARTING', function() {
        if (isPlaying) {
            log.info(`Following ${config.followUser.value.toLowerCase()}`)
        }
    })
    engine.on('GAME_ENDED', function() {
        isPlaying = false
        const lastGame = engine.getHistory()[0]
        if (!lastGame.wager) {
            return
        }
        if (lastGame.cashedAt) {
            log.info(
                `Cashed Out: ${lastGame.cashedAt/100}x , profit: ${
					parseFloat((lastGame.wager * (lastGame.cashedAt/100)) - lastGame.wager).toFixed(8)
                }`
			)
        } else {
            log.info(`Lost: ${lastGame.wager}`)
        }
        log.info('\n')
        if (config.autoAdjust.value === 'increase') {
            if (currency.amount - lossStop >= lossAmount * 2) {
                log.info('*--------------------------------------------------------------------------*')
                log.info("					  Adjusting Stop Loss")
                while(currency.amount - lossStop >= lossAmount * 2) {
                    lossStop += lossAmount
                }
                log.info("					  Stop Loss Changed: "+lossStop)
                log.info('*--------------------------------------------------------------------------*')
            }

        }
    })
    engine.on('GAME_BET', function(player) {
        if(config.printMode.value === 'on') {
            if(player.name.toLowerCase().includes(config.followUser.value.toLowerCase())) {
                log.info(player.name +" : "+player.userId+" : "+player.bet+" "+player.currencyName);
                //console.log(player);
            }
        }
        if (player.userId != config.followUser.value) {
            return
        }
        if (player.currencyName.toLowerCase() != config.followCoin.value.toLowerCase()) {
            log.error("Player Has Switched Coins: "+player.bet+" "+player.currencyName);
            return;
        }
        let theBet = player.bet * percentBet
        if (theBet < minBet) {
            let theBet = minBet
            }
        if (maxBet < theBet) {
            log.info('Damn Hit Max Bet')
            return;
        }
        if (currency.amount - theBet < lossStop) {
            log.error('Sorry You Hit Stop Loss')
            engine.stop();
        }
        if (currency.amount > profitStop) {
            log.info('Congrats You Hit Profit Stop!')
            engine.stop();
        }
        isPlaying = true
        engine.bet(parseFloat(theBet).toFixed(8), maxPayout)

    })
    engine.on('GAME_CASHED', function(player) {
        if (player.userId == config.followUser.value) {
            engine.cashOut()
        }
    })
}

 

 

The script uses "userId" instead of "userName" . So the first step is to set it to "Print Mode". When print mode is enabled you can type a part of a "userName" in the "User to follow" Box & It will print out the needed info for any user betting that has  whatever is in the user to follow box in their userName.

 

It will print out [ userName : userId : betAmount  currencyName ]

image.thumb.png.cdb680e06147c8512389d87456557828.png
 

 

From there switch it to bet mode and enter  the userId  in the "User to follow" box  and  in "Coin to follow " you enter the coin they are betting with "TRX" . If the user switches coins  the script wont make any bets until/unless they go back to TRX. Okay well seems like Upbeat stopped betting so different user in this image but i put DOGE and they are betting LTC.

 

 

image.thumb.png.aa73fc22e6d6e6d2df162c733f578257.png

 

Outside of that its self explanatory. oOo The auto adjust Stop Loss when enabled will take  ( Bankroll - Balance Under)  And whenever it doubles that amount it will adjust your balance under up.

so you have 1000 doge and you sent balance under to 200. 1000 - 200 = 800. If you profit  to where you have 1800 Doge it will auto adjust your balance under to  1000.   or something like that.

i Guess its tested, I Guess It works? If it kills your cat i'm not responsible because its Coco's fault

 

Intelligenci_logo_on_transparent.thumb.png.a0b4eeba91c8fb82b7749ebf5bcb9246.png

Link to comment
Share on other sites

  • 2 weeks later...

Archived

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

×
×
  • Create New...