findyou Posted December 18, 2021 Share Posted December 18, 2021 My hashdice Script var config = { donateTitle: { label: "Donate (TRX - USDT - BTT)", type: "title" }, donateValue: { label: 'My TRC20 address', value: "TWRgsFmDoDs5tim55YeuTSkuhJXhCDgZBM", type: 'number' }, settingTitle: { label: "Setting", type: "title" }, bet: { label: 'Bet', value: 0.000001, type: 'number' }, numBet: { label: 'Number of Bet array', value: 10, type: 'number' }, payout: { label: 'Payout', value: 1.35, type: 'number' }, betMax: { label: 'Bet Max', value: 1000000, type: 'number' }, stopLost: { label: 'Stop Lost', value: 999, type: 'number' }, takeProfit: { label: 'Take Profit', value: 999, type: 'number' } } function main() { log.info("Start"); var bet = config.bet.value; var numBet = config.numBet.value; var listBet=[] for(var i=0; i<numBet; i++){ listBet.push(bet) } var mainPayout = config.payout.value; var payout = config.payout.value; var betMax = config.betMax.value; var stopLost = config.stopLost.value; var takeProfit = config.takeProfit.value; var mainB = bet; var loseS = 0; var winS = 0; var Bbet = 0; var profit = 0; var winP = 0; var randomNum = 0 game.onBet = function () { randomNum = Math.floor(Math.random() * numBet); bet = listBet[randomNum]; log.info("Bet: " + bet + " - Payout: " + payout); game.bet(bet, payout).then(function (payout) { if (payout > 1) { winP = Math.round((bet * (config.payout.value - 1)) * 1000000) / 1000000; profit += winP; log.success("We won " + winP + ", payout " + payout + "X! " + "Profit: " + Math.round(profit * 1000000) / 1000000); loseS = 0; winS += 1; if (bet + winP < mainB * 2) { bet = bet + winP; } else{ bet = mainB; winS = 0; } listBet[randomNum] = bet; log.info("Win streak: " + winS + " time!"); } else { lostP = Math.round(bet * 1000000) / 1000000; profit -= lostP; winS = 0; loseS += 1; log.error("We lost " + lostP + ", payout " + payout + "X! " + "Profit: " + Math.round(profit * 1000000) / 1000000); log.info("Lose streak: " + loseS + " time!"); if(payout > 2){ bet = bet * (1 + 1/(mainPayout-1)); } else{ bet = bet * (1/(mainPayout-1)+1); } listBet[randomNum] = bet; } }); if (profit <= stopLost*(-1) || profit >= takeProfit || bet >= betMax) { game.stop(); } } } Link to comment Share on other sites More sharing options...
Dr_Sali Posted February 13, 2022 Share Posted February 13, 2022 Thank you for sharing this Interesting Script. Link to comment Share on other sites More sharing options...
scrawnyy Posted June 18, 2022 Share Posted June 18, 2022 On 12/18/2021 at 3:27 PM, findyou said: My hashdice Script var config = { donateTitle: { label: "Donate (TRX - USDT - BTT)", type: "title" }, donateValue: { label: 'My TRC20 address', value: "TWRgsFmDoDs5tim55YeuTSkuhJXhCDgZBM", type: 'number' }, settingTitle: { label: "Setting", type: "title" }, bet: { label: 'Bet', value: 0.000001, type: 'number' }, numBet: { label: 'Number of Bet array', value: 10, type: 'number' }, payout: { label: 'Payout', value: 1.35, type: 'number' }, betMax: { label: 'Bet Max', value: 1000000, type: 'number' }, stopLost: { label: 'Stop Lost', value: 999, type: 'number' }, takeProfit: { label: 'Take Profit', value: 999, type: 'number' } } function main() { log.info("Start"); var bet = config.bet.value; var numBet = config.numBet.value; var listBet=[] for(var i=0; i<numBet; i++){ listBet.push(bet) } var mainPayout = config.payout.value; var payout = config.payout.value; var betMax = config.betMax.value; var stopLost = config.stopLost.value; var takeProfit = config.takeProfit.value; var mainB = bet; var loseS = 0; var winS = 0; var Bbet = 0; var profit = 0; var winP = 0; var randomNum = 0 game.onBet = function () { randomNum = Math.floor(Math.random() * numBet); bet = listBet[randomNum]; log.info("Bet: " + bet + " - Payout: " + payout); game.bet(bet, payout).then(function (payout) { if (payout > 1) { winP = Math.round((bet * (config.payout.value - 1)) * 1000000) / 1000000; profit += winP; log.success("We won " + winP + ", payout " + payout + "X! " + "Profit: " + Math.round(profit * 1000000) / 1000000); loseS = 0; winS += 1; if (bet + winP < mainB * 2) { bet = bet + winP; } else{ bet = mainB; winS = 0; } listBet[randomNum] = bet; log.info("Win streak: " + winS + " time!"); } else { lostP = Math.round(bet * 1000000) / 1000000; profit -= lostP; winS = 0; loseS += 1; log.error("We lost " + lostP + ", payout " + payout + "X! " + "Profit: " + Math.round(profit * 1000000) / 1000000); log.info("Lose streak: " + loseS + " time!"); if(payout > 2){ bet = bet * (1 + 1/(mainPayout-1)); } else{ bet = bet * (1/(mainPayout-1)+1); } listBet[randomNum] = bet; } }); if (profit <= stopLost*(-1) || profit >= takeProfit || bet >= betMax) { game.stop(); } } } Nice Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.