luizpcastrobr Posted April 25, 2022 Posted April 25, 2022 Hi! Is it possible to implement a seed change every time the nonce hits a specified value? Say I want to reset my seed every time my nonce reaches 600, is that doable as a script? I want to do it on Hash Dice
Skele Posted May 7, 2022 Posted May 7, 2022 async function ResetSeed() { var nextSeedResult = await fetch("https://bc.game/api/single/game/seed/Limbo/next-hash/", { "headers": { "accept": "application/json, text/plain, */*", "accept-language": "en-US,en;q=0.9", "sec-ch-ua": "\" Not A;Brand\";v=\"99\", \"Chromium\";v=\"99\", \"Microsoft Edge\";v=\"99\"", "sec-ch-ua-mobile": "?0", "sec-ch-ua-platform": "\"Windows\"", "sec-fetch-dest": "empty", "sec-fetch-mode": "cors", "sec-fetch-site": "same-origin" }, "referrer": window.location.href, "referrerPolicy": "strict-origin-when-cross-origin", "body": null, "method": "GET", "mode": "cors", "credentials": "include" }).then(res => res.clone().json()); var currentSeed = nextSeedResult.data.currentSeedHash; var nextSeedId = nextSeedResult.data.nextSeedHash; var nounce = nextSeedResult.data.currentSeedHash.maxNonce; if(nounce % 600 == 0) { await DoSeedChange(nextSeedId.clientSeed, "Limbo", nextSeedId.seedId); } } async function DoSeedChange(clientseed, gameName, nextSeedId) { fetch("https://bc.game/api/single/game/seed/change/", { "headers": { "accept": "application/json, text/plain, */*", "accept-language": "en-US,en;q=0.9", "content-type": "application/json", "sec-ch-ua": "\" Not A;Brand\";v=\"99\", \"Chromium\";v=\"99\", \"Microsoft Edge\";v=\"99\"", "sec-ch-ua-mobile": "?0", "sec-ch-ua-platform": "\"Windows\"", "sec-fetch-dest": "empty", "sec-fetch-mode": "cors", "sec-fetch-site": "same-origin" }, "referrer": window.location.href, "referrerPolicy": "strict-origin-when-cross-origin", "body": "{\"clientSeed\":\""+ clientseed +"\",\"gameName\":\""+ gameName +"\",\"nextSeedId\":" + nextSeedId + "}", "method": "POST", "mode": "cors", "credentials": "include" }).then(res => res.clone().json()); } my example was for limbo but i highlighted the additional code i needed to add and it is all game agnostic.
SineC Posted July 30, 2022 Posted July 30, 2022 Hi I'm trying to make a script for Limbo. And at the moment everything is starting to work. But one thing, i add the ResetSeed(). Works 80% of the time, but sometimes i get error: " Uncaught (in promise) Error: Seed in use " And i'm not the best at javascript. So wanted to ask if anyone has a solution to this problem Thank for all the help Edit1: Okey think i found a solution Trying it out but using '.catch' to just go on with script. It doesn't stop script anymore, but seems some times doesn't change to new seed I'm thinking maybe a limite to change seed every X amount time from bc.game... so can't make a loop just new seeds ^^ need more testing
Skele Posted August 2, 2022 Posted August 2, 2022 So that error is caused because a bet is placed while the seed is resetting, or abet was placed before the seed started resetting. To get around this stop firing and forgetting. Call the async function with the await key word and it will block until it is done..
Skele Posted August 2, 2022 Posted August 2, 2022 Also if you take the Url and pull out the host name you can then use the same script on nano, bits, and the mirrored sites. "https://bc.game/api/single/game/seed/change/" so like changed the above to be like below. "https://" + window.location.host + "/api/single/game/seed/change/"
Btxyjyiljwb Posted October 9, 2022 Posted October 9, 2022 On 8/3/2022 at 5:20 AM, Skele said: Also if you take the Url and pull out the host name you can then use the same script on nano, bits, and the mirrored sites. "https://bc.game/api/single/game/seed/change/" so like changed the above to be like below. "https://" + window.location.host + "/api/single/game/seed/change/" iverbor gen: Sorry friends, can this script be fixed?? var config = { baseBet: { label: "base bet", value:currency.minAmount, type: "number" }, basepayout: { label: "base payout", value: 2, type: "number" }, NewPayout: { label: "new payout", value: 1, 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: { labels: "", value: "reset", type:"radio", options: [ { value: "reset", label: "Return to base bet" }, { value: "increase", label: "lncrease bet by (loss multiplier)" }, ], }, lossMultiplier: { label: "loss multiplier", value: 2, type: "number" }, onWinTitle: { label: "On Win", type: "title" }, onWin: { labels: "", value: "reset", type: "radio", options: [ { value: "reset", label: "Return to base bet" }, { value: "increase", label: "increase bet by (winmultiplier)" }, ], }, winMultiplier: { label: "win multiplier", value: 2, type:"number" }, }; var run = false; //var bet = currency.amount/config.divider.value; var bet = config.basePayout.value; var basebet = bet; var startTime = new Date(); var timestring = ""; var roundWins = 0; var roundLosses = 0; var chance = config.NewPayout.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.basePayout.value; game.onBet = function() { chance = config.NewPayout.value; game.bet(currentBet, (45/chance).toFixed(4)).then(function (payout) { if (payout > 1) { balance += currentBet*45/chance-currentBet; profitTotal += currentBet*45/chance-currentBet; }else { balance -= currentBet; profitTotal -= currentBet; } if(balance >= lastbalance) { last balance = balance; } if (payout > 1) { curProf = currentBet*45/chance-currentBet; roundWins++; if (config.onWin.value === "increase") { currentBet = config.baseBet.value; } else { currentBet *= config.winMultiplier.value; } } log.success("We won, so next bet will be " + currentBet + " " + currency.currencyName); } else { curProf = -currentBet; roundLosses++; if (config.onLoss.value === "increase") { currentBet = config.basePayout.value; } else { currentBet *= config.lossMuliplier.value; currentPayout = config.newPayout.value; } } log.error("We lost, so next bet will be " + currentBet + " " + currency.currencyName); } currentProfitt += curProf; if (currentProfitt >= currentProfittt) { currentProfitt = 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) { log.success('Target Profit ' +(profitTotal).toFixed(8) + ' ' + currency.currencyName); game.stop(); } if (balance >= config.targetBalance.value) { log.success('Target Balance ' + balance + ' ' + currency.currencyName); game.stop(); } }); } }
Recommended Posts
Archived
This topic is now archived and is closed to further replies.