RedCycloneYT Posted May 3, 2022 Share Posted May 3, 2022 var config = { bet: { label: 'Bet', value: currency.minAmount * 2, type: 'number' }, payout: { label: 'Payout', value: 2.1, type: 'number' }, streak: { label: 'Number of red streaks', value: 5, type: 'number' }, maxStreak: { label: 'Max of red streaks', value: 20, type: 'number' } } function main () { var loseCount = 0; var betCount = 0; var betAmount = config.bet.value; var maxLosecount = 0 ; game.onBet = function () { game.bet(betAmount, config.payout.value).then(function(payout) { betCount++; if (payout > 1) { betAmount = config.bet.value; loseCount = 0; log.success("Won"); } else { log.error("Lost " + betAmount); loseCount++; if(loseCount == config.streak.value){ betAmount *= (config.streak.value * 10); } if (loseCount > config.streak.value){ betAmount *= 2; } if (loseCount == config.maxStreak.value){ betAmount = config.bet.value; } if( maxLosecount < loseCount){ maxLosecount = loseCount; } } console.log( " betCount " + betCount + " betAmount " + betAmount + " loseCount " + loseCount + " maxLosecount " + maxLosecount ); }); } } Link to comment Share on other sites More sharing options...
Skele Posted May 7, 2022 Share Posted May 7, 2022 this should really be like a educational exercise for those who want to learn to use scripts. var config = { bet: { label: 'Bet', value: currency.minAmount * 2, type: 'number' }, payout: { label: 'Payout', value: 2.1, type: 'number' }, streak: { label: 'Number of red streaks', value: 5, type: 'number' }, maxStreak: { label: 'Max of red streaks', value: 20, type: 'number' }, stopOnLose: {label: 'Stop after losing this much', value: currency.amount/2, type:'number'} } function main () { var loseCount = 0; var betCount = 0; var betAmount = config.bet.value; var maxLosecount = 0 ; var netWinLose = 0; game.onBet = function () { game.bet(betAmount, config.payout.value).then(function(payout) { betCount++; if (payout > 1) { netWinLose = (betAmount*payout)-betAmount; betAmount = config.bet.value; loseCount = 0; log.success("Won"); } else { netWinLose -= betAmount; log.error("Lost " + betAmount); loseCount++; if(loseCount == config.streak.value){ betAmount *= (config.streak.value * 10); } if (loseCount > config.streak.value){ betAmount *= 2; } if (loseCount == config.maxStreak.value){ betAmount = config.bet.value; } if( maxLosecount < loseCount){ maxLosecount = loseCount; } } if( (-1*netWinLose) >= stopOnLose ) { game.stop(); } console.log( " betCount " + betCount + " betAmount " + betAmount + " loseCount " + loseCount + " maxLosecount " + maxLosecount ); }); } } Link to comment Share on other sites More sharing options...
Pit-Filler Posted May 27, 2022 Share Posted May 27, 2022 On 5/7/2022 at 11:03 AM, Skele said: this should really be like a educational exercise for those who want to learn to use scripts. var config = { bet: { label: 'Bet', value: currency.minAmount * 2, type: 'number' }, payout: { label: 'Payout', value: 2.1, type: 'number' }, streak: { label: 'Number of red streaks', value: 5, type: 'number' }, maxStreak: { label: 'Max of red streaks', value: 20, type: 'number' }, stopOnLose: {label: 'Stop after losing this much', value: currency.amount/2, type:'number'} } function main () { var loseCount = 0; var betCount = 0; var betAmount = config.bet.value; var maxLosecount = 0 ; var netWinLose = 0; game.onBet = function () { game.bet(betAmount, config.payout.value).then(function(payout) { betCount++; if (payout > 1) { netWinLose = (betAmount*payout)-betAmount; betAmount = config.bet.value; loseCount = 0; log.success("Won"); } else { netWinLose -= betAmount; log.error("Lost " + betAmount); loseCount++; if(loseCount == config.streak.value){ betAmount *= (config.streak.value * 10); } if (loseCount > config.streak.value){ betAmount *= 2; } if (loseCount == config.maxStreak.value){ betAmount = config.bet.value; } if( maxLosecount < loseCount){ maxLosecount = loseCount; } } if( (-1*netWinLose) >= stopOnLose ) { game.stop(); } console.log( " betCount " + betCount + " betAmount " + betAmount + " loseCount " + loseCount + " maxLosecount " + maxLosecount ); }); } } not work Link to comment Share on other sites More sharing options...
GTKPos Posted May 28, 2022 Share Posted May 28, 2022 Hello, so i had fxed the little issue that happens by adding the feature "Stop on losing". Now the script is working fine ----------------------------------------------------------------------------------------------------------------------- var config = { bet: { label: 'Bet', value: currency.minAmount * 2, type: 'number' }, payout: { label: 'Payout', value: 2.1, type: 'number' }, streak: { label: 'Number of red streaks', value: 5, type: 'number' }, maxStreak: { label: 'Max of red streaks', value: 20, type: 'number' }, stopOnLose: {label: 'Stop after losing this much', value: currency.amount/2, type:'number'} } function main () { var loseCount = 0; var betCount = 0; var betAmount = config.bet.value; var maxLosecount = 0 ; var netWinLose = 0; game.onBet = function () { game.bet(betAmount, config.payout.value).then(function(payout) { betCount++; if (payout > 1) { netWinLose = (betAmount*payout)-betAmount; betAmount = config.bet.value; loseCount = 0; log.success("Won"); } else { netWinLose -= betAmount; log.error("Lost " + betAmount); loseCount++; if(loseCount == config.streak.value){ betAmount *= (config.streak.value * 10); } if (loseCount > config.streak.value){ betAmount *= 2; } if (loseCount == config.maxStreak.value){ betAmount = config.bet.value; } if( maxLosecount < loseCount){ maxLosecount = loseCount; } } if( (-1*netWinLose) >= config.stopOnLose.value ) { game.stop(); } console.log( " betCount " + betCount + " betAmount " + betAmount + " loseCount " + loseCount + " maxLosecount " + maxLosecount ); }); } } Link to comment Share on other sites More sharing options...
Pit-Filler Posted May 28, 2022 Share Posted May 28, 2022 3 hours ago, GTKPos said: Hello, so i had fxed the little issue that happens by adding the feature "Stop on losing". Now the script is working fine ----------------------------------------------------------------------------------------------------------------------- var config = { bet: { label: 'Bet', value: currency.minAmount * 2, type: 'number' }, payout: { label: 'Payout', value: 2.1, type: 'number' }, streak: { label: 'Number of red streaks', value: 5, type: 'number' }, maxStreak: { label: 'Max of red streaks', value: 20, type: 'number' }, stopOnLose: {label: 'Stop after losing this much', value: currency.amount/2, type:'number'} } function main () { var loseCount = 0; var betCount = 0; var betAmount = config.bet.value; var maxLosecount = 0 ; var netWinLose = 0; game.onBet = function () { game.bet(betAmount, config.payout.value).then(function(payout) { betCount++; if (payout > 1) { netWinLose = (betAmount*payout)-betAmount; betAmount = config.bet.value; loseCount = 0; log.success("Won"); } else { netWinLose -= betAmount; log.error("Lost " + betAmount); loseCount++; if(loseCount == config.streak.value){ betAmount *= (config.streak.value * 10); } if (loseCount > config.streak.value){ betAmount *= 2; } if (loseCount == config.maxStreak.value){ betAmount = config.bet.value; } if( maxLosecount < loseCount){ maxLosecount = loseCount; } } if( (-1*netWinLose) >= config.stopOnLose.value ) { game.stop(); } console.log( " betCount " + betCount + " betAmount " + betAmount + " loseCount " + loseCount + " maxLosecount " + maxLosecount ); }); } } this too not work i tried, it didn't stop at the amount to put ex, i try to put 0.0001 in stop on lose but it didn't stop after lost 0.0001 but it still going on and then stop after some time Link to comment Share on other sites More sharing options...
GTKPos Posted May 28, 2022 Share Posted May 28, 2022 2 hours ago, KyawHtetNyein said: this too not work i tried, it didn't stop at the amount to put ex, i try to put 0.0001 in stop on lose but it didn't stop after lost 0.0001 but it still going on and then stop after some time It's working at me, i tested it several times... Think your talking about another issue, so have you even played any script in hash-dice or also any automatic in classic-dice, ultimate-dice, limbo or hash-dice and set/tested your stop on lose automatic like you had done now? I think not, because then you had known as faster and longer your automatic is running as more goes the bet over the amount you setup to stop on lose,.I had seen myself so often at the original automatics.. What you can do is set OFF the Turbo betting, your too fast.. and you will se its working.. Link to comment Share on other sites More sharing options...
Irtizaaa11 Posted May 28, 2022 Share Posted May 28, 2022 sure let me see your script Link to comment Share on other sites More sharing options...
Pit-Filler Posted May 28, 2022 Share Posted May 28, 2022 No, the script up stair fixed not work well, it need to add some more to fix. I try to fix and it work well now, with turbo or without turbo. It need to add + to = otherwise it will loop netWinLose. And add config and value to payout else it will take payout from function(payout)netWinLose += (betAmount*config.payout.value)-betAmount; instead of netWinLose = (betAmount*payout)-betAmount; This is script var config = { bet: { label: 'Bet', value: currency.minAmount * 2, type: 'number' }, payout: { label: 'Payout', value: 2.1, type: 'number' }, streak: { label: 'Number of red streaks', value: 5, type: 'number' }, maxStreak: { label: 'Max of red streaks', value: 20, type: 'number' }, stopOnLose: {label: 'Stop after losing this much', value: currency.amount/2, type:'number'} } function main () { var loseCount = 0; var betCount = 0; var betAmount = config.bet.value; var maxLosecount = 0 ; var netWinLose = 0; game.onBet = function () { game.bet(betAmount, config.payout.value).then(function(payout) { betCount++; if (payout > 1) { netWinLose += (betAmount*config.payout.value)-betAmount; betAmount = config.bet.value; loseCount = 0; log.success("Won"); } else { netWinLose -= betAmount; log.error("Lost " + betAmount); loseCount++; if(loseCount == config.streak.value){ betAmount *= (config.streak.value * 10); } if (loseCount > config.streak.value){ betAmount *= 2; } if (loseCount == config.maxStreak.value){ betAmount = config.bet.value; } if( maxLosecount < loseCount){ maxLosecount = loseCount; } } if( (-1*netWinLose) >= config.stopOnLose.value ) { game.stop(); } console.log( " betCount " + betCount + " betAmount " + betAmount + " loseCount " + loseCount + " maxLosecount " + maxLosecount ); }); } } Link to comment Share on other sites More sharing options...
GTKPos Posted May 28, 2022 Share Posted May 28, 2022 1 hour ago, KyawHtetNyein said: No, the script up stair fixed not work well, it need to add some more to fix. I try to fix and it work well now, with turbo or without turbo. It need to add + to = otherwise it will loop netWinLose. And add config and value to payout else it will take payout from function(payout)netWinLose += (betAmount*config.payout.value)-betAmount; instead of netWinLose = (betAmount*payout)-betAmount; This is script var config = { bet: { label: 'Bet', value: currency.minAmount * 2, type: 'number' }, payout: { label: 'Payout', value: 2.1, type: 'number' }, streak: { label: 'Number of red streaks', value: 5, type: 'number' }, maxStreak: { label: 'Max of red streaks', value: 20, type: 'number' }, stopOnLose: {label: 'Stop after losing this much', value: currency.amount/2, type:'number'} } function main () { var loseCount = 0; var betCount = 0; var betAmount = config.bet.value; var maxLosecount = 0 ; var netWinLose = 0; game.onBet = function () { game.bet(betAmount, config.payout.value).then(function(payout) { betCount++; if (payout > 1) { netWinLose += (betAmount*config.payout.value)-betAmount; betAmount = config.bet.value; loseCount = 0; log.success("Won"); } else { netWinLose -= betAmount; log.error("Lost " + betAmount); loseCount++; if(loseCount == config.streak.value){ betAmount *= (config.streak.value * 10); } if (loseCount > config.streak.value){ betAmount *= 2; } if (loseCount == config.maxStreak.value){ betAmount = config.bet.value; } if( maxLosecount < loseCount){ maxLosecount = loseCount; } } if( (-1*netWinLose) >= config.stopOnLose.value ) { game.stop(); } console.log( " betCount " + betCount + " betAmount " + betAmount + " loseCount " + loseCount + " maxLosecount " + maxLosecount ); }); } } Very well, so i must agree your right, there was some more to calculate the correctly lose amount. Stopping perfect with turbo Link to comment Share on other sites More sharing options...
Jjgrginsgwb Posted May 29, 2022 Share Posted May 29, 2022 i I'm trying a script but I think I'm doing something wrong, can you help me? //Bc Game Hash Dice var config = { baseBet: { label: "base bet", value: currency.minAmount, type: "number" }, //payout: { label: "payout", value: 2, type: "number" }, minChange: { label: "min change", value: 1, type: "number" }, maxChance: { label: "max cahge", value:98, type: "number" }, stop: { label: "stop if bet >", value: 1e8, type: "number" }, balanceRisk: { label: "balance risk %", value: 100, type: "number" }, targetProfit: {label:'Target-Profit-Stop; value: 1000, type:'number'}, targetBalance: {label:'Target-Balance-Stop; value: 1000, type:'number'}, onLoseTitle: { label: "On Lose", type: "title" }, onLoss: { label: "", value: "reset", type:"radio", options: { { value: "reset", label: "Return to base bet" }, { value: "increase", label: "lncrease bet by (loss multiplier)" }, }, }, lossStreak: { label: "loss streak", value:2, type: "number" }, 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)" }, }, }, winStreak: { label: "win streak", value: 2, type: "number" }, winMultiplier: { label: "win multiplier", value: 2, type: "number" }, }; var run = false; //var bet = currency.amount/config.divider.value; var bet = config.baseBet.value; var basebet = bet; var startTime = new Date(); var timestring = "; var roundWins = 0; var roundLosses = 0; var chance = Math.random() * (config.maxChance.value - config.minChance.value) + config.minChance.value; var currentProfitt = 0; var currentProfittt = 0; var curProf = 0; var profitTotal = 0; var balance = currency.amount; var lastbalance = balance; function main (){ run = true; var currentBet = config.baseBet.value; game.onBet = function () { //balance = currency.amount; //if(balance >= lastbalance) lastbalance = balance; chance = Math.random() * (config.maxChance.value - config.minChance.value) + config.minChance.value; //game.bet(currentBet; config.payout.value).then(function (payout) { game.bet(currentBet, (99/chance).toFixed(4)).then(function (payout) { /* currentProfit += curProf; if (currentProfitt >= currentProfittt) { currentProfittt = currentProfittt; currentBet = config.baseBet.value; roundWins = 0; roundLosses = 0; } */ if (payout > 1) { balance += currentBet*99/chance-currentBet; profitTotal += currentBet*99/chance- currentBet; }else{ balance -= currentBet; profitTotal -= currentBet; } if(balance >= lastbalance) lastbalance = balance; if (payout > 1) { curProf = currentBet*99/chance-currentBet; roundWins++; if (config.onWin.value === "reset") { currentBet = config.baseBet.value; } else { //currentBet *= config.winMultiplier.value; if (roundWins % config.winStreak.value === 0) { currentBet *= config.winMultiplier.value; } } log.success( "We won, so next bet will be " + currentBet + " " + currency.currencyName ); } else { curProf = -currentBet; roundLosses++; if (config.onLoss.value === "reset") { currentBet = config.baseBet.value; } else { //currentBet *= config.lossMultiplier.value; if (roundLosses % config.lossStreak.value === 0) { currentBet *= config.lossMuliplier.value; } } log.error( "We lost, so next bet will be " + currentBet + " " + currency.currencyName ); } currentProfitt += curProf; if (currentProfitt >= currentProfittt) { currentProfittt = currentProfitt; currentBet = config.baseBet.value; roundWins = 0; roundLosses = 0; } if (currentBet < config.baseBet.value) { currentBet = config.baseBet.value } var stoplevel = (100- config.balanceRisk.value)*lastbalance/100; if(balance - currentBet < stoplevel){ log.error( "Balance Risk " + currentBet + "Stop" ); game.stop(); } if (currentBet > config.stop.value) { log.error( "Was about to bet " + currentBet + " which triggers the stop" ); game.stop(); } if (currentBet > balance) { log.error( "Loss " + balance + "which triggers the stop" ); game stop(); } if (profitTotal >= config.targetProfit.value) { //bet = currency.amount/config.divider.value; log.success('Target Profit ' + (profitTotal).toFixed(8) + ' ' + currency.currencyName); game.stop(); } if (balance >= config.targetBalance.value) { //bet = currency.amount/config.divider.value; log.success('Target Balance ' + balance + ' ' + currency.currencyName); game.stop(); } )); ); } setinterval(function(){ var cur = new Date(); var t = Math.floor((cur - startTime) / 1000); var hour = Math.floor(t / 3600); if (hour < 10) hour = '0' + Math.floor(t / 3600); t = t % 3600; var minutes = Math.floor(t / 60); if (minutes <10) minutes = '0' + t % 60; if(run) timestring = 'PlayTime ' + hour + ':' + minutes + ':' + seconds + ' '; else timestring = "; },'1000'); Reply to this topic... Share Follow0 Go to topic listing Next unread topic Privacy Policy Contact Us © 2021 BC.Game - All Rights Reserved. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.