-
Posts
298 -
Joined
-
Last visited
-
Days Won
8
Everything posted by Skele
-
You could also just edit the text box labeled "Base bet" that shows up before you start the script. That is what they are for. Modifying the value in the config declaration is only going to change the default value. This would actually be something good to play around with, because since he isn't assigning the value inside of the main method i am unsure if modifying the input field will be picked up ever by the script or if the values that are there by default on load will stay since those are being assigned to the variables but only at the initial start. I will have to play around and report back on that timing.
-
couple of pointers here. First are you meaning to increment your lose count by multiples? so below is the else statement in your result handler which handles the losses. If you lose count is < 19 all is well and it increments one. Are you aware that once it hits 19 it will go up by 2, every game and then once it hits 26 it goes up by 3 per game? I am not sure if that is what you intended or not but seems like maybe not which is why i point that out. { if (losecount >= 19) { losecount += (1); varix = 1.5; } if (losecount >= 26) { losecount += (1); varix = 1.66; } losecount += (1); currentBet = (previousBet * varix); chance += (1); } The second little tip has to do with when you write out your logs. I am assuming you want to write it like every 100 bets. But the way the condition is currently written it will write the first log at bet 100 and then you reset the bet number which is actually pretty useful to have. In almost all programming languages there is an operator called modulus. This operator returns to you the remainder of the function so in your case in stead of this: if (betcount >= 100) { logSummary(); betcount = 0; } you can achieve the same thing while keeping betcount accurrate by doing this instead: if (betcount % 100 == 0) { logSummary(); } its saying every time betcount/100 has a remainder of 0 then log, then you can display the actual bet count or use it for other things as well. Other than that looks pretty good.
-
i did test it out and the answer is, its not available from the scripting sandbox they give you. But if you do all the automation just through simulating clicks and what not on the page said of things there is a handy method for toggling high and low
-
If it was something other than crash i might agree with you, but since all we ever get to see is the hashed server seed, well i tend to believe what i have witnessed and the probably of some of the trends and the frequencies of occurrences someone make one wonder. But since every is server said and if you were given all to prove that it was hashing then you would be able to predict the results everytime. There are many statements though that while technically aren't lies they certainly aren't necessarily truths. Its funny though how person after person has encountered the exact same experience.
-
Just so you know if you want the longer history of the game results, if you inject javascript into the main page you can get that no problem, it will only give you the last 2000 games though. You can also get what everyone else is betting that way if you want to write a script that owuld place bets following a particular user. In this same way it would not be hard to rewrite the scripts to play all from the front end like that as they do expose a way to place bests from here as well. Useing the scripting framework i imagine had two different goals in mind. First to make it easier for people who don't know how to auomate web tech in general. And second to be able to control how long and what kind of scripts are ran. I stopped sharing mine widely after realizing that they first will change the beahvior of the games after about 24-48 hours to start matching and defeating your specific strategy, etc... I saw people asking for this script to skip games or do safety rolls. The most successful scripts i have found is the first one i grab configurable random numbers in a range for (number of losses before i skip games because of a loosing streak (generally 2 or 3 games though). how many winning game to see before i bet again (i had to make this more than 1 like i originally had it because i would see after about 24 hours all of a sudden there were very long streaks of LLWLLWLLW just enough losses to get me to sit out on a game that was a win which would trigger me to start betting again. the other script that has actually done nicely for me is just betting a single game with a large bit and low payout like 25% of my bank roll at 1.1x, and doing so an random intervals, like 1 game then skip 0-10 games depending on the random roll. This last approach was the closest i would really get to ensure there was no real pattern for the system to grab and start using against me. if you want crash history you can use this command in the dev console window you can use crash.history. History in this case is a 2000 element array. If you want information on other players and their betting you can get that here crash.playersDict which is a dictionary keyed on playerid with their betting status for the upcoming game. The game or engine object that you have access to in the normal scripts, is just a subset of what is in the crash object in this case, or lbg for limbo, or hdg for hashdice.
-
Ok finally i have the answer to the burning question on high to set the high and low from the script for hashdice. The answer happens to be we are all complete morons apparently. game.priceLevel is the high or log so game.priceLevel = 'high'; game.priceLevel='low'; or to toggle it game.priceLevel=(game.priceLevel != null && game.priceLevel == 'high') ? 'low' : 'high'; and i haven't tested this but since the game and engine object both appear to be the same as the hdg object i am betting this will also work to toggle it. game.changeToggleWin(); I have not tested the last one though everything else has been tested and confirmed.
-
good job describing the Martingale strategy that believe it or not BC already gives you a script that implements it. they also give you one for the Martingale strategy only with payouts instead of bet increases. Simalar strategies include Labouchere, fibonacci, d'Alembert, just to name a few other famous mathematically strategies trying to minimize the risk of losing everything. There are many other minor variations from these.
-
loads fine for me //******************* Nubs27's Smart Script for Crash ******************* // // // // If you find this script helpful please consider donating to Nubs27 or tipping on NanoGames.io: // Referral Link: https://n-luzqe.nanogames.io/ // // Donations accepted in many coin/token types. List & Addresses: // https://sites.google.com/view/nanogamescrashscripts/home/donation-addresses // // // var config = { mainTitle: { label: '*** Nubs27\'s Smart Script for Crash ***', type: 'title' }, auto: { label: '', value: 'Script', type: 'radio', options: [ { value: 'Script', label: 'Script chooses Base Bet'}, { value: 'Player', label: 'Player chooses Base Bet'} ]}, bet: { label: 'Base Bet', value: currency.minAmount, type: 'number' }, lossTitle: { label: 'Stop When ', type: 'title' }, stop: { label: 'Coins Lost >', value: 1, type: 'number' }, end: { label: 'Minutes >', value: 250, type: 'number' }, profit: { label: 'Profit >', value: 100, type: 'number' }, }; function main () { //PayOuts checked in the Stats Update const MultiplierArray = [2.5, 3.00, 5.00, 6.00, 7.00]; const LMultiplierArray = [10.00, 20.00, 50.00, 100.00]; var version = "v2.3"; var PayOutPercents = []; var PayOutConfidence = []; var Array2Filter = []; var FilteredArray = []; var ScriptHistory = []; var Trains = []; // Red Train IDs - finding gaps between & correlation between gap & duration var History = []; var RoundsPlayed = 0; var RoundsViewed = 0; var LastGameID = 1; var CurrentGameID = LastGameID + 1; var MinimumBet = currency.minAmount; var MaxBet = (currency.amount / 10); var TotalBets = 0; var CurrentMultiplier = MultiplierArray[1]; var LastMultiplier = MultiplierArray[1]; var MaxLossesEncountered = 3; var MostLost = 0; var LargestMulitplier = 2; var BaseBet = config.bet.value; var CurrentBet = BaseBet; var LastBet = BaseBet; var LastShrek = CurrentGameID; var LastTrain = 0; var Gap = 0; var AverageGap = 0; var LargestBet = [0,0]; var Enable100ID = 1000000; var LastResult = "Won"; var CoinLost = 0; var StopLossCoin = config.stop.value; var Losses = 0; var Wins = 0; var Red = 0; var Green = 0; var StartTime = new Date(); var EndTime = new Date(); var TimeDiff = (EndTime - StartTime); var StartBalance = currency.amount; var EndBalance = 0; var Profit = 0; var ATHProfit = 0; var ProfPerMin = 0; var NetProfit = 0; var DisplayGreeting = "False"; var GotHistory = "False"; var BetYet = "False"; var LoggedBetData = "False"; var GameInfoLogged = "False"; var StrategyFound = "False"; var IsPlaying = "False"; var UpdateBets = "False"; var Enable100 = "False"; var LastCrash = 0; var PrevCashOut = 0; var WonAmount = 0; var FindThisMultiplier = 1; var FindShouldHave = 2; var ThisAverage = 1; var HistorySlice = 50; var Paused = "True"; var IndexMax = PayOutConfidence[0]; var MaxIndex = 0; var GetNumber = 0; // Welcome the Player to the Script console.clear(); if (DisplayGreeting == "False") { log.info(' Nubs27s Smart Script for Crash'); log.info(" ****************"); log.info("See Web Console for more Information (Press F12)"); console.log('%c~~~~~~~~~~~~~~~~~ Nubs27\'s Smart Script for Crash ~~~~~~~~~~~~~~~~~','color:Purple; font-weight:bold'); console.log('%cScript Start Time: ' + StartTime,'color:Purple; font-weight:200'); console.log(' %cWelcome ' , 'color:Purple; font-weight:bold'); console.log(' %cYour Starting Balance is: ' + StartBalance + ' ' + currency.currencyName, 'color:Purple; font-weight:bold'); if (config.auto.value == 'Player') { if (config.stop.value > currency.amount) { MaxBet = (currency.amount / 10); config.stop.value = currency.amount * 0.98; console.log('%c[WARNING]: Stop Loss is above your Bankroll','color:Orange; font-weight:bold'); console.log('%c[WARNING]: Stop Loss Updated to ' + config.stop.value, 'color:Orange; font-weight:bold'); } if (config.bet.value > (config.stop.value / 15000)) { log.info('[WARNING]: Script Recommends a bankroll of at least ' + (BaseBet * 15000) + '' + currency.currencyName + ' for the Base Bet you provided'); log.info('[WARNING]: Script Recommends a bankroll of at least ' + (BaseBet * 20000) + '' + currency.currencyName + ' for the Base Bet you provided'); log.info('[WARNING]: Script Recommends a bankroll of at least ' + (BaseBet * 25000) + '' + currency.currencyName + ' for the Base Bet you provided'); } console.log(' %cYou Input: ' + BaseBet + ' ' + currency.currencyName + ' as the Base Bet', 'color:Purple; font-weight:bold'); }else{ betupdate(); console.log(' %cYour Starting Base Bet is: ' + BaseBet + ' ' + currency.currencyName, 'color:Purple; font-weight:bold'); } console.log(' %cYour Stoppers are: Coin Lost > ' + config.stop.value + '; Minutes > ' + config.end.value + '; Profit > ' + config.profit.value, 'color:Purple; font-weight:bold'); console.log('%c~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~','color:Purple; font-weight:bold'); if (config.stop.value > currency.amount) { MaxBet = (currency.amount / 10); config.stop.value = currency.amount * 0.95; console.log('%c[WARNING]: Stop Loss Updated to ' + config.stop.value, 'color:Orange; font-weight:bold'); } } DisplayGreeting = "True"; if (GotHistory == "False") { getnanohistory(); GotHistory = "True"; console.log(ScriptHistory); LastShrek = []; LastTrain = []; } // // // //Everything above here only runs 1 time game.onBet = function () { console.log(' ----------------------------'); CurrentGameID = (LastGameID + 1); console.log('[Round ID]: ' + CurrentGameID); if (StrategyFound == "False") { strategy(); } //Checks User Parameters for Stopping Script checkstoppers(); CurrentBet = BaseBet; MaxIndex = Math.floor(Math.random() * MaxIndex); CurrentMultiplier = GetNumber; CurrentBet = ((CoinLost + BaseBet) / CurrentMultiplier - 1); checkbet(); if (BetYet == "False") { console.log("[Betting] " + CurrentBet.toFixed(7) + " at " + CurrentMultiplier + "x"); log.info("[Betting] " + CurrentBet.toFixed(7) + " at " + CurrentMultiplier + "x"); game.bet(CurrentBet, CurrentMultiplier).then(function (payout) { console.log(payout); RoundsViewed++; LastCrash = game.history[0].crash; PrevCashOut = LastCrash; LastGameID = game.history[0].gameId; if (GameInfoLogged == "False") { loglastcrash(game.history[0]); } updateplayer(); updatestats(); CurrentGameID = CurrentGameID.toString(); if (CurrentGameID.endsWith('0')) { console.log(version); console.log('%c~~Nov~~~~ Update Completed ~~~~2019~~','color:blue;font-weight:bold'); log.info('~~Nov~~~~ Update Completed ~~~~2019~~'); log.info(version); } if (UpdateBets == "True" && LastResult == "Won") { betupdate(); UpdateBets = "False"; } BetYet = "False"; StrategyFound = "False"; LoggedBetData = "False"; Paused = "False"; }); } BetYet = "True"; }; function getnanohistory() { History = engine.getHistory(); for (i = 0; i < History.length; i++) { ScriptHistory.push(History.crash / 100); RoundsViewed++; } } function strategy() { // Is there a Payout with a 80% Confidence or Higher? If not, pause. findconfidence(); // Which Payout has highest confidence based upon history & math? findlargestindex(); // console.log('[Index] ' + '(' + MaxIndex + ')' + ' PayOut: ' + MultiplierArray[MaxIndex] + ' [Largest Confidence] ' + PayOutConfidence[MaxIndex]); // console.log(' PayOut ' + MultiplierArray[MaxIndex] + '; Confidence Level ' + PayOutConfidence[MaxIndex] + ' %'); GetNumber = MultiplierArray[MaxIndex]; // Randomize the PayOut randompayout(); // console.log('[Get Number] is: ' + GetNumber); checkforstreaks(); CurrentMultiplier = GetNumber; StrategyFound = "True"; // Which Payout has highest confidence based upon streakiness of rounds? } function randompayout() { if (LastResult == "Lost" && CurrentMultiplier > 1.98) { GetNumber = (CurrentMultiplier * 0.95); }else if (LastResult =="Lost") { GetNumber = (CurrentMultiplier * 1.25); } GetNumber = GetNumber * 100; GetNumber = Math.floor(Math.random() * GetNumber) + 211; GetNumber = GetNumber / 100; if (isNaN(GetNumber)) { GetNumber = Math.floor(Math.random() * 311) + 251; GetNumber = GetNumber / 100; } } function checkforstreaks() { threeafterthree(); minitrains(); prevpayouts(); htrains(); tens(); // hundred(); HistorySlice = 50; } function tens() { FindThisMultiplier = 9.99; HistorySlice = 10; historyfilter(); if (FilteredArray.length > 2) { CurrentBet = BaseBet; CurrentMultiplier = 3.11; console.log('[Bet Adjustment] PayOut +10x = ' + FilteredArray.length); } } function hundred() { FindThisMultiplier = 69; HistorySlice = 100; historyfilter(); if (Enable100 == "True" && (CurrentGameID - Enable100ID) > 25) { Enable100 = "False"; } if (Enable100 == "True" && LastResult == "Won") { Enable100 = "False"; } if (FilteredArray.length === 0) { if (Enable100 == "True") { CurrentMultiplier = 88.00; CurrentBet = ((CoinLost + (BaseBet * Losses)) / (CurrentMultiplier - 1)); console.log('Manadory run at 100x'); } } } function historyfilter() { Array2Filter = ScriptHistory.slice(0,[HistorySlice]); FilteredArray = Array2Filter.filter(function (e) { return e > FindThisMultiplier; }); } function htrains() { if (Red > 5) { CurrentMultiplier = Math.floor(Math.random() * 311) + 199; CurrentMultiplier = CurrentMultiplier / 100; CurrentBet = ((CoinLost + BaseBet) / (CurrentMultiplier - 1)); GetNumber = CurrentMultiplier; console.log('[Bet Adjustment] Reds > 5'); } if (Red > 9) { CurrentMultiplier = Math.floor(Math.random() * 488) + 235; CurrentMultiplier = CurrentMultiplier / 100; CurrentBet = ((CoinLost + BaseBet) / (CurrentMultiplier - 1)); GetNumber = CurrentMultiplier; console.log('[Bet Adjustment] Reds > 5'); } } function prevpayouts() { if (ScriptHistory[0] > 5.00 || ScriptHistory[1] > 5.00 || ScriptHistory[2] > 5.00) { CurrentMultiplier = Math.floor(Math.random() * 299) + 233; CurrentMultiplier = CurrentMultiplier / 100; GetNumber = CurrentMultiplier; console.log('[Bet Adjustment] 5x in last 3 rounds'); } if (LastResult == "Won") { CurrentMultiplier = Math.floor(Math.random() * 311) + 215; CurrentMultiplier = CurrentMultiplier / 100; GetNumber = CurrentMultiplier; CurrentBet = ((CoinLost + (BaseBet * Losses)) / (CurrentMultiplier - 1)); } } function minitrains() { if (Green > 3 && LastResult == "Lost") { CurrentBet = ((CoinLost + (BaseBet * Losses)) / (CurrentMultiplier - 1)); CurrentMultiplier = 2.14; GetNumber = CurrentMultiplier; console.log('[Bet Adjustment] Green x3 & Loss'); } if (Green > 3 && LastResult == "Won") { CurrentBet = BaseBet; CurrentMultiplier = 3.11; GetNumber = CurrentMultiplier; console.log('[Bet Adjustment] Green x3 & Won'); } if (Red > 3 || Green > 3) { CurrentMultiplier = Math.floor(Math.random() * 311) + 199; CurrentMultiplier = CurrentMultiplier / 100; CurrentBet = ((CoinLost + (BaseBet * Losses)) / (CurrentMultiplier - 1)); GetNumber = CurrentMultiplier; console.log('[Bet Adjustment] Red/Green x3'); } } function threeafterthree () { if (ScriptHistory[0] > 2.99 && ScriptHistory[1] > 2.99 && ScriptHistory[2] > 2.99) { if ((CurrentGameID - LastTrain) > 15 && (CurrentGameID - LastShrek > 10)) { if (LastResult == "Won") { CurrentBet = BaseBet * 2; CurrentMultiplier = 2.14; GetNumber = CurrentMultiplier; console.log('[Bet Adjustment] 3x after 3 rounds & Won'); } if (LastResult == "Lost") { CurrentMultiplier = Math.floor(Math.random() * 288) + 211; CurrentMultiplier = CurrentMultiplier / 100; CurrentBet = ((CoinLost + (BaseBet * Losses)) / (CurrentMultiplier - 1)); GetNumber = CurrentMultiplier; console.log('[Bet Adjustment] 3x after 3 rounds & Lost'); } } } } function findconfidence() { PayOutConfidence = []; for (i = 0; i < PayOutPercents.length; i++) { if (PayOutPercents < 100) { PayOutConfidence = (100 - PayOutPercents); PayOutConfidence = Math.abs(PayOutConfidence); PayOutConfidence = (PayOutConfidence + 25); }else if (PayOutPercents == 100) { PayOutConfidence = 25; }else{ PayOutConfidence = 0; } if (i > 3) { PayOutConfidence = (PayOutConfidence - 25); } if (i > 5) { PayOutConfidence = (PayOutConfidence - 25); } if (PayOutConfidence < 0) { PayOutConfidence = 0; } } } function findlargestindex() { IndexMax = PayOutConfidence[0]; MaxIndex = 0; for (var i = 1; i < PayOutConfidence.length; i++) { if (PayOutConfidence >= IndexMax) { MaxIndex = i; IndexMax = PayOutConfidence; } } } function checkbet() { MinimumBet = currency.minAmount; BaseBet = config.bet.value; //Check bet against player bankroll --- For what parameters??? //Check bet against site bankroll - is there enough to win all we want? if (CurrentBet < BaseBet) { CurrentBet = BaseBet; } if (CurrentBet < MinimumBet) { CurrentBet = MinimumBet; } if (CurrentBet > MaxBet) { CurrentBet = MaxBet; console.log('[Bet Adjustment] Survive Losses'); } if (CurrentBet > currency.maxAmount) { CurrentBet = currency.maxAmount; MaxBet = currency.maxAmount / 5; console.log('[Bet Adjustment] Maximum Bet allowed by platform'); } if (CurrentBet > LargestBet[0]) { LargestBet[0] = CurrentBet; LargestBet[1] = CurrentMultiplier; } } function loglastcrash(data) { if (PrevCashOut > LargestMulitplier) { LargestMulitplier = PrevCashOut; } if (PrevCashOut < 2.01) { Red++; Green = 0; if (Red == 6) { if (LastTrain === 0) { Trains = []; } Trains.unshift(CurrentGameID); Gap = CurrentGameID - LastTrain; AverageGap = (AverageGap + Gap) / Trains.length; console.log('Logging Round ' + CurrentGameID + ' as H Train'); console.log('Average Gap ' + AverageGap + ' between H Trains'); log.info('Logging Round ' + CurrentGameID + ' as H Train'); console.log('Gap from last H Train ' + Gap + ' rounds'); log.info('Gap from last H Train ' + Gap + ' rounds'); LastTrain = CurrentGameID; } }else{ Green++; Red = 0; if (Green == 6) { LastShrek = CurrentGameID; console.log('Logging Round ' + CurrentGameID + ' as Shrek'); log.info('Logging Round ' + CurrentGameID + ' as Shrek'); } } if (CoinLost > MostLost) { MostLost = CoinLost; } if (ScriptHistory.unshift(PrevCashOut) > 999) ScriptHistory.pop(); //Check for if round was played if (data.wager > 0) { TotalBets = TotalBets + CurrentBet; data.wager = CurrentBet; IsPlaying = "True"; winorlose(data); RoundsPlayed++; LastBet = CurrentBet; LastMultiplier = CurrentMultiplier; }else{ LastResult = "Not Played"; } } function winorlose (data) { if (data.cashedAt) { WonAmount = ((CurrentBet * CurrentMultiplier) - CoinLost - CurrentBet); Profit = Profit + WonAmount; LastResult = "Won"; Wins++; Losses = 0; if (Profit > ATHProfit) { ATHProfit = Profit; CoinLost = 0; }else{ CoinLost = ATHProfit - Profit; } log.info("[Profit] " + WonAmount); console.log('%c[Result] Round Won. ' + 'Net Profit of ' + WonAmount.toFixed(7),'color:green'); }else{ LastResult = "Lost"; Losses++; Wins = 0; CoinLost = CoinLost + CurrentBet; console.log('%c[Result] Round ' + LastResult,'color:red'); log.info('Round Lost'); } if (Losses > MaxLossesEncountered) { MaxLossesEncountered = Losses; console.log("Encountered Streak of " + Losses + " Losses Before Win"); log.info("Encountered Streak of " + Losses + " Losses Before Win"); } if (Losses > 3) { console.log('%c[Coin Lost] Cumulative Since Last Win: ' + CoinLost.toFixed(7),'color:red'); log.info('%c[Coin Lost] Cumulative Since Last Win: ' + CoinLost.toFixed(7)); } } function updatestats() { //Lists PayOuts under 10x for last 50 rounds for (i = 0; i < MultiplierArray.length; i++) { FindThisMultiplier = MultiplierArray; FindMultiplierHistory(); PayOutPercents = ThisAverage; } //Lists PayOuts 10x and over for last 100 rounds if (RoundsViewed > 100) { HistorySlice = 100; CurrentGameID = CurrentGameID.toString(); if (CurrentGameID.endsWith('0')) { console.log("In the last " + HistorySlice + " rounds there was: "); } for (i = 0; i < LMultiplierArray.length; i++) { FindThisMultiplier = LMultiplierArray; FindMultiplierHistory(); } } // console.log(PayOutPercents); } function FindMultiplierHistory() { FindThisMultiplier = (FindThisMultiplier - 0.01); Array2Filter = ScriptHistory.slice(0,[HistorySlice]); FilteredArray = Array2Filter.filter(function (e) { return e > FindThisMultiplier; }); FindThisMultiplier = (FindThisMultiplier + 0.01); DisplayTimesSeen(); findpercents(); } function DisplayTimesSeen() { FindShouldHave = (Array2Filter.length / FindThisMultiplier); FindShouldHave = (FindShouldHave * 100); FindShouldHave = Math.round(FindShouldHave); FindShouldHave = (FindShouldHave / 100); CurrentGameID = CurrentGameID.toString(); if (CurrentGameID.endsWith('0')) { console.log("PayOuts " + FindThisMultiplier + "x & Higher " + Math.round(FindShouldHave) + " times. There were " + FilteredArray.length); } } function findpercents() { ThisAverage = FilteredArray.length / Math.round(FindShouldHave); ThisAverage = (ThisAverage * 100); ThisAverage = Math.round(ThisAverage); } function updateplayer() { EndBalance = currency.amount; NetProfit = EndBalance - StartBalance; var ProfitPercent = (NetProfit / StartBalance) * 100; EndTime = new Date(); TimeDiff = ((EndTime - StartTime) / 1000 )/ 60; ProfPerMin = (Profit / TimeDiff); CurrentGameID = CurrentGameID.toString(); if (CurrentGameID.endsWith('0')) { console.log(" "); log.info(" "); console.log('%c~~~~~~~~~~ NubsScript Update ~~~~~~~~~~','color:blue;font-weight:bold'); log.info('~~~~~ NubsScript Update ~~~~~'); figuretime(); console.log("Begining Bank " + StartBalance.toFixed(7) + " Current Bank " + currency.amount.toFixed(7) + " " + currency.currencyName); log.info("Begining Bank " + StartBalance.toFixed(7) + " Current Bank " + currency.amount.toFixed(7) + " " + currency.currencyName); console.log("Current Base Bet: " + config.auto.value + " "+ BaseBet + " " + currency.currencyName); log.info("Current Base Bet: " + BaseBet + " " + currency.currencyName); console.log("Session Net Profit " + NetProfit.toFixed(7) + ' ' + currency.currencyName + " or " + ProfitPercent.toFixed(2) + "% "); log.info("Session Net Profit " + NetProfit.toFixed(7) + ' ' + currency.currencyName + " or " + ProfitPercent.toFixed(2) + "% "); console.log("Profit Per Minute " + ProfPerMin.toFixed(7) + ' ' + currency.currencyName); log.info("Profit Per Minute " + ProfPerMin.toFixed(7) + ' ' + currency.currencyName); console.log("Highest PayOut Seen: " + LargestMulitplier + "x"); log.info("Highest PayOut Seen: " + LargestMulitplier + "x"); console.log("Cumulative Amount Bet: " + TotalBets.toFixed(7) + " " + currency.currencyName); log.info("Cumulative Amount Bet: " + TotalBets.toFixed(7) + " " + currency.currencyName); console.log("Biggest Bet Placed " + LargestBet[0] + " at " + LargestBet[1] + "x"); log.info("Biggest Bet Placed " + LargestBet[0] + " at " + LargestBet[1] + "x"); console.log("Largest Loss: " + MostLost.toFixed(7) + " " + currency.currencyName + " on " + MaxLossesEncountered + " consecutive losses"); log.info("Largest Loss: " + MostLost.toFixed(7) + " " + currency.currencyName + " on " + MaxLossesEncountered + " consecutive losses"); if (Trains.length > 2) { console.log("Hilarious Train IDs:"); console.log(Trains); } console.log("In the last " + HistorySlice + " rounds there was: "); } RoundsViewed = RoundsViewed.toString(); if (RoundsViewed.endsWith('00') && config.auto.value == "Script") { UpdateBets = "True"; } } function figuretime() { // get total seconds between the times var delta = Math.abs(StartTime - EndTime) / 1000; // calculate (and subtract) whole days var days = Math.floor(delta / 86400); delta -= days * 86400; // calculate (and subtract) whole hours var hours = Math.floor(delta / 3600) % 24; delta -= hours * 3600; // calculate (and subtract) whole minutes var minutes = Math.floor(delta / 60) % 60; delta -= minutes * 60; // what's left is seconds var seconds = delta % 60; // in theory the modulus is not required if (days > 0) { console.log("Viewed " + RoundsViewed + " Rounds in " + days + " days " + hours + " hours " + minutes + " minutes"); log.info("Viewed " + RoundsViewed + " Rounds in " + days + " days " + hours + " hours " + minutes + " minutes"); }else if (hours > 0) { console.log("Viewed " + RoundsViewed + " Rounds in " + hours + " hours " + minutes + " minutes"); log.info("Viewed " + RoundsViewed + " Rounds in " + hours + " hours " + minutes + " minutes"); }else{ console.log("Viewed " + RoundsViewed + " Rounds in " + minutes + " minutes"); log.info("Viewed " + RoundsViewed + " Rounds in " + minutes + " minutes"); } } function checkstoppers() { if (TimeDiff > config.end.value && LastResult == "Won") { log.info("Stopped Due to User Parameters (Minutes)"); console.log("Stopped Due to User Parameters (Minutes)"); engine.stop(); } if (Profit > config.profit.value && LastResult == "Won") { log.info("Stopped Due to User Parameters (Profit)"); console.log("Stopped Due to User Parameters (Profit)"); engine.stop(); } if (CoinLost > StopLossCoin) { log.info("Stopping Due to User Parameters"); console.log("Stopping Due to User Parameters (Coin Lost)"); engine.stop(); } } function betupdate() { BaseBet = currency.amount / 15000; if (BaseBet < currency.minAmount) { BaseBet = currency.minAmount; console.log("Bankroll too small. Attempting script by user's command"); } config.bet.value = BaseBet; MaxBet = (currency.amount / 10); config.stop.value = currency.amount * 0.98; console.log('%c[WARNING]: Stop Loss Updated to ' + config.stop.value, 'color:Orange; font-weight:bold'); console.log('%c[WARNING]: Base Bet Updated to ' + BaseBet, 'color:Orange; font-weight:bold'); } }
-
Thats why i shared the diff so people could try to figure some of this out on their own. The error message is literally saying the the argument list of one of the methods is missing the closing parentheses. Looking at the changes I did which are highlighted it shouldn't be hard to figure out where I deleted you much There it should be fixed it was missing from line 161. But really people should have at least a little understanding of what these scripts are doing before using them or else you run the risk pf people doing some messed up things in them.
-
i can why don't you look at how i am doing in the script above it. Essentually they switched from using an event broadcast style to just having you declare a delegate. So here is a quick and dirty refactor of the two methods that were important. I left most everything as is. Things i am sure are going to break. The getting of the history. They not longer give you back more than 10 games and the script uses 200 to look for trends. It has some good concept but needs some refactoring for readability and maintainability, but i love things like using the random numbers for multipliers. I swear they are using machine learning for pattern recognition so that helps., I like the idea of limiting max bet to 10% of your bank roll. I don't play trendball so i can't really speak to the actual strategy at all because i don't know. Before i post the script with fixes so it uses the newer api and events that they still support here is a quick diff of the two scripts. The changes look like more than they actually are essentially all that happened was the game ended event's contents was moved to the then delegate of the onbet method. and i fixed some other minor things that would have throw exceptions like how to get the last games history since that has changed is isn't based back after the crash. Also just fair warning this method i don't believe is going to work because engine.getHistory() if it doesn't throw an exception it will just return null from what i have seen or you may get the last 10 games only along with a warning saying this method of accessing history is deprecated and you need to start saving your own historical results or something like that. ************************************************************************** Script Starting *********************************************************************************************** //******************* Nubs27's Smart Script for Crash ******************* // // // // If you find this script helpful please consider donating to Nubs27 or tipping on NanoGames.io: // Referral Link: https://n-luzqe.nanogames.io/ // // Donations accepted in many coin/token types. List & Addresses: // https://sites.google.com/view/nanogamescrashscripts/home/donation-addresses // // // var config = { mainTitle: { label: '*** Nubs27\'s Smart Script for Crash ***', type: 'title' }, auto: { label: '', value: 'Script', type: 'radio', options: [ { value: 'Script', label: 'Script chooses Base Bet'}, { value: 'Player', label: 'Player chooses Base Bet'} ]}, bet: { label: 'Base Bet', value: currency.minAmount, type: 'number' }, lossTitle: { label: 'Stop When ', type: 'title' }, stop: { label: 'Coins Lost >', value: 1, type: 'number' }, end: { label: 'Minutes >', value: 250, type: 'number' }, profit: { label: 'Profit >', value: 100, type: 'number' }, }; function main () { //PayOuts checked in the Stats Update const MultiplierArray = [2.5, 3.00, 5.00, 6.00, 7.00]; const LMultiplierArray = [10.00, 20.00, 50.00, 100.00]; var version = "v2.3"; var PayOutPercents = []; var PayOutConfidence = []; var Array2Filter = []; var FilteredArray = []; var ScriptHistory = []; var Trains = []; // Red Train IDs - finding gaps between & correlation between gap & duration var History = []; var RoundsPlayed = 0; var RoundsViewed = 0; var LastGameID = 1; var CurrentGameID = LastGameID + 1; var MinimumBet = currency.minAmount; var MaxBet = (currency.amount / 10); var TotalBets = 0; var CurrentMultiplier = MultiplierArray[1]; var LastMultiplier = MultiplierArray[1]; var MaxLossesEncountered = 3; var MostLost = 0; var LargestMulitplier = 2; var BaseBet = config.bet.value; var CurrentBet = BaseBet; var LastBet = BaseBet; var LastShrek = CurrentGameID; var LastTrain = 0; var Gap = 0; var AverageGap = 0; var LargestBet = [0,0]; var Enable100ID = 1000000; var LastResult = "Won"; var CoinLost = 0; var StopLossCoin = config.stop.value; var Losses = 0; var Wins = 0; var Red = 0; var Green = 0; var StartTime = new Date(); var EndTime = new Date(); var TimeDiff = (EndTime - StartTime); var StartBalance = currency.amount; var EndBalance = 0; var Profit = 0; var ATHProfit = 0; var ProfPerMin = 0; var NetProfit = 0; var DisplayGreeting = "False"; var GotHistory = "False"; var BetYet = "False"; var LoggedBetData = "False"; var GameInfoLogged = "False"; var StrategyFound = "False"; var IsPlaying = "False"; var UpdateBets = "False"; var Enable100 = "False"; var LastCrash = 0; var PrevCashOut = 0; var WonAmount = 0; var FindThisMultiplier = 1; var FindShouldHave = 2; var ThisAverage = 1; var HistorySlice = 50; var Paused = "True"; var IndexMax = PayOutConfidence[0]; var MaxIndex = 0; var GetNumber = 0; // Welcome the Player to the Script console.clear(); if (DisplayGreeting == "False") { log.info(' Nubs27s Smart Script for Crash'); log.info(" ****************"); log.info("See Web Console for more Information (Press F12)"); console.log('%c~~~~~~~~~~~~~~~~~ Nubs27\'s Smart Script for Crash ~~~~~~~~~~~~~~~~~','color:Purple; font-weight:bold'); console.log('%cScript Start Time: ' + StartTime,'color:Purple; font-weight:200'); console.log(' %cWelcome ' , 'color:Purple; font-weight:bold'); console.log(' %cYour Starting Balance is: ' + StartBalance + ' ' + currency.currencyName, 'color:Purple; font-weight:bold'); if (config.auto.value == 'Player') { if (config.stop.value > currency.amount) { MaxBet = (currency.amount / 10); config.stop.value = currency.amount * 0.98; console.log('%c[WARNING]: Stop Loss is above your Bankroll','color:Orange; font-weight:bold'); console.log('%c[WARNING]: Stop Loss Updated to ' + config.stop.value, 'color:Orange; font-weight:bold'); } if (config.bet.value > (config.stop.value / 15000)) { log.info('[WARNING]: Script Recommends a bankroll of at least ' + (BaseBet * 15000) + '' + currency.currencyName + ' for the Base Bet you provided'); log.info('[WARNING]: Script Recommends a bankroll of at least ' + (BaseBet * 20000) + '' + currency.currencyName + ' for the Base Bet you provided'); log.info('[WARNING]: Script Recommends a bankroll of at least ' + (BaseBet * 25000) + '' + currency.currencyName + ' for the Base Bet you provided'); } console.log(' %cYou Input: ' + BaseBet + ' ' + currency.currencyName + ' as the Base Bet', 'color:Purple; font-weight:bold'); }else{ betupdate(); console.log(' %cYour Starting Base Bet is: ' + BaseBet + ' ' + currency.currencyName, 'color:Purple; font-weight:bold'); } console.log(' %cYour Stoppers are: Coin Lost > ' + config.stop.value + '; Minutes > ' + config.end.value + '; Profit > ' + config.profit.value, 'color:Purple; font-weight:bold'); console.log('%c~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~','color:Purple; font-weight:bold'); if (config.stop.value > currency.amount) { MaxBet = (currency.amount / 10); config.stop.value = currency.amount * 0.95; console.log('%c[WARNING]: Stop Loss Updated to ' + config.stop.value, 'color:Orange; font-weight:bold'); } } DisplayGreeting = "True"; if (GotHistory == "False") { getnanohistory(); GotHistory = "True"; console.log(ScriptHistory); LastShrek = []; LastTrain = []; } // // // //Everything above here only runs 1 time game.onBet = function () { console.log(' ----------------------------'); CurrentGameID = (LastGameID + 1); console.log('[Round ID]: ' + CurrentGameID); if (StrategyFound == "False") { strategy(); } //Checks User Parameters for Stopping Script checkstoppers(); CurrentBet = BaseBet; MaxIndex = Math.floor(Math.random() * MaxIndex); CurrentMultiplier = GetNumber; CurrentBet = ((CoinLost + BaseBet) / CurrentMultiplier - 1); checkbet(); if (BetYet == "False") { console.log("[Betting] " + CurrentBet.toFixed(7) + " at " + CurrentMultiplier + "x"); log.info("[Betting] " + CurrentBet.toFixed(7) + " at " + CurrentMultiplier + "x"); game.bet(CurrentBet, CurrentMultiplier).then(function (payout) ) { console.log(payout); RoundsViewed++; LastCrash = game.history[0].crash; PrevCashOut = LastCrash; LastGameID = game.history[0].gameId; if (GameInfoLogged == "False") { loglastcrash(game.history[0]); } updateplayer(); updatestats(); CurrentGameID = CurrentGameID.toString(); if (CurrentGameID.endsWith('0')) { console.log(version); console.log('%c~~Nov~~~~ Update Completed ~~~~2019~~','color:blue;font-weight:bold'); log.info('~~Nov~~~~ Update Completed ~~~~2019~~'); log.info(version); } if (UpdateBets == "True" && LastResult == "Won") { betupdate(); UpdateBets = "False"; } BetYet = "False"; StrategyFound = "False"; LoggedBetData = "False"; Paused = "False"; }; } BetYet = "True"; }); function getnanohistory() { History = engine.getHistory(); for (i = 0; i < History.length; i++) { ScriptHistory.push(History.crash / 100); RoundsViewed++; } } function strategy() { // Is there a Payout with a 80% Confidence or Higher? If not, pause. findconfidence(); // Which Payout has highest confidence based upon history & math? findlargestindex(); // console.log('[Index] ' + '(' + MaxIndex + ')' + ' PayOut: ' + MultiplierArray[MaxIndex] + ' [Largest Confidence] ' + PayOutConfidence[MaxIndex]); // console.log(' PayOut ' + MultiplierArray[MaxIndex] + '; Confidence Level ' + PayOutConfidence[MaxIndex] + ' %'); GetNumber = MultiplierArray[MaxIndex]; // Randomize the PayOut randompayout(); // console.log('[Get Number] is: ' + GetNumber); checkforstreaks(); CurrentMultiplier = GetNumber; StrategyFound = "True"; // Which Payout has highest confidence based upon streakiness of rounds? } function randompayout() { if (LastResult == "Lost" && CurrentMultiplier > 1.98) { GetNumber = (CurrentMultiplier * 0.95); }else if (LastResult =="Lost") { GetNumber = (CurrentMultiplier * 1.25); } GetNumber = GetNumber * 100; GetNumber = Math.floor(Math.random() * GetNumber) + 211; GetNumber = GetNumber / 100; if (isNaN(GetNumber)) { GetNumber = Math.floor(Math.random() * 311) + 251; GetNumber = GetNumber / 100; } } function checkforstreaks() { threeafterthree(); minitrains(); prevpayouts(); htrains(); tens(); // hundred(); HistorySlice = 50; } function tens() { FindThisMultiplier = 9.99; HistorySlice = 10; historyfilter(); if (FilteredArray.length > 2) { CurrentBet = BaseBet; CurrentMultiplier = 3.11; console.log('[Bet Adjustment] PayOut +10x = ' + FilteredArray.length); } } function hundred() { FindThisMultiplier = 69; HistorySlice = 100; historyfilter(); if (Enable100 == "True" && (CurrentGameID - Enable100ID) > 25) { Enable100 = "False"; } if (Enable100 == "True" && LastResult == "Won") { Enable100 = "False"; } if (FilteredArray.length === 0) { if (Enable100 == "True") { CurrentMultiplier = 88.00; CurrentBet = ((CoinLost + (BaseBet * Losses)) / (CurrentMultiplier - 1)); console.log('Manadory run at 100x'); } } } function historyfilter() { Array2Filter = ScriptHistory.slice(0,[HistorySlice]); FilteredArray = Array2Filter.filter(function (e) { return e > FindThisMultiplier; }); } function htrains() { if (Red > 5) { CurrentMultiplier = Math.floor(Math.random() * 311) + 199; CurrentMultiplier = CurrentMultiplier / 100; CurrentBet = ((CoinLost + BaseBet) / (CurrentMultiplier - 1)); GetNumber = CurrentMultiplier; console.log('[Bet Adjustment] Reds > 5'); } if (Red > 9) { CurrentMultiplier = Math.floor(Math.random() * 488) + 235; CurrentMultiplier = CurrentMultiplier / 100; CurrentBet = ((CoinLost + BaseBet) / (CurrentMultiplier - 1)); GetNumber = CurrentMultiplier; console.log('[Bet Adjustment] Reds > 5'); } } function prevpayouts() { if (ScriptHistory[0] > 5.00 || ScriptHistory[1] > 5.00 || ScriptHistory[2] > 5.00) { CurrentMultiplier = Math.floor(Math.random() * 299) + 233; CurrentMultiplier = CurrentMultiplier / 100; GetNumber = CurrentMultiplier; console.log('[Bet Adjustment] 5x in last 3 rounds'); } if (LastResult == "Won") { CurrentMultiplier = Math.floor(Math.random() * 311) + 215; CurrentMultiplier = CurrentMultiplier / 100; GetNumber = CurrentMultiplier; CurrentBet = ((CoinLost + (BaseBet * Losses)) / (CurrentMultiplier - 1)); } } function minitrains() { if (Green > 3 && LastResult == "Lost") { CurrentBet = ((CoinLost + (BaseBet * Losses)) / (CurrentMultiplier - 1)); CurrentMultiplier = 2.14; GetNumber = CurrentMultiplier; console.log('[Bet Adjustment] Green x3 & Loss'); } if (Green > 3 && LastResult == "Won") { CurrentBet = BaseBet; CurrentMultiplier = 3.11; GetNumber = CurrentMultiplier; console.log('[Bet Adjustment] Green x3 & Won'); } if (Red > 3 || Green > 3) { CurrentMultiplier = Math.floor(Math.random() * 311) + 199; CurrentMultiplier = CurrentMultiplier / 100; CurrentBet = ((CoinLost + (BaseBet * Losses)) / (CurrentMultiplier - 1)); GetNumber = CurrentMultiplier; console.log('[Bet Adjustment] Red/Green x3'); } } function threeafterthree () { if (ScriptHistory[0] > 2.99 && ScriptHistory[1] > 2.99 && ScriptHistory[2] > 2.99) { if ((CurrentGameID - LastTrain) > 15 && (CurrentGameID - LastShrek > 10)) { if (LastResult == "Won") { CurrentBet = BaseBet * 2; CurrentMultiplier = 2.14; GetNumber = CurrentMultiplier; console.log('[Bet Adjustment] 3x after 3 rounds & Won'); } if (LastResult == "Lost") { CurrentMultiplier = Math.floor(Math.random() * 288) + 211; CurrentMultiplier = CurrentMultiplier / 100; CurrentBet = ((CoinLost + (BaseBet * Losses)) / (CurrentMultiplier - 1)); GetNumber = CurrentMultiplier; console.log('[Bet Adjustment] 3x after 3 rounds & Lost'); } } } } function findconfidence() { PayOutConfidence = []; for (i = 0; i < PayOutPercents.length; i++) { if (PayOutPercents < 100) { PayOutConfidence = (100 - PayOutPercents); PayOutConfidence = Math.abs(PayOutConfidence); PayOutConfidence = (PayOutConfidence + 25); }else if (PayOutPercents == 100) { PayOutConfidence = 25; }else{ PayOutConfidence = 0; } if (i > 3) { PayOutConfidence = (PayOutConfidence - 25); } if (i > 5) { PayOutConfidence = (PayOutConfidence - 25); } if (PayOutConfidence < 0) { PayOutConfidence = 0; } } } function findlargestindex() { IndexMax = PayOutConfidence[0]; MaxIndex = 0; for (var i = 1; i < PayOutConfidence.length; i++) { if (PayOutConfidence >= IndexMax) { MaxIndex = i; IndexMax = PayOutConfidence; } } } function checkbet() { MinimumBet = currency.minAmount; BaseBet = config.bet.value; //Check bet against player bankroll --- For what parameters??? //Check bet against site bankroll - is there enough to win all we want? if (CurrentBet < BaseBet) { CurrentBet = BaseBet; } if (CurrentBet < MinimumBet) { CurrentBet = MinimumBet; } if (CurrentBet > MaxBet) { CurrentBet = MaxBet; console.log('[Bet Adjustment] Survive Losses'); } if (CurrentBet > currency.maxAmount) { CurrentBet = currency.maxAmount; MaxBet = currency.maxAmount / 5; console.log('[Bet Adjustment] Maximum Bet allowed by platform'); } if (CurrentBet > LargestBet[0]) { LargestBet[0] = CurrentBet; LargestBet[1] = CurrentMultiplier; } } function loglastcrash(data) { if (PrevCashOut > LargestMulitplier) { LargestMulitplier = PrevCashOut; } if (PrevCashOut < 2.01) { Red++; Green = 0; if (Red == 6) { if (LastTrain === 0) { Trains = []; } Trains.unshift(CurrentGameID); Gap = CurrentGameID - LastTrain; AverageGap = (AverageGap + Gap) / Trains.length; console.log('Logging Round ' + CurrentGameID + ' as H Train'); console.log('Average Gap ' + AverageGap + ' between H Trains'); log.info('Logging Round ' + CurrentGameID + ' as H Train'); console.log('Gap from last H Train ' + Gap + ' rounds'); log.info('Gap from last H Train ' + Gap + ' rounds'); LastTrain = CurrentGameID; } }else{ Green++; Red = 0; if (Green == 6) { LastShrek = CurrentGameID; console.log('Logging Round ' + CurrentGameID + ' as Shrek'); log.info('Logging Round ' + CurrentGameID + ' as Shrek'); } } if (CoinLost > MostLost) { MostLost = CoinLost; } if (ScriptHistory.unshift(PrevCashOut) > 999) ScriptHistory.pop(); //Check for if round was played if (data.wager > 0) { TotalBets = TotalBets + CurrentBet; data.wager = CurrentBet; IsPlaying = "True"; winorlose(data); RoundsPlayed++; LastBet = CurrentBet; LastMultiplier = CurrentMultiplier; }else{ LastResult = "Not Played"; } } function winorlose (data) { if (data.cashedAt) { WonAmount = ((CurrentBet * CurrentMultiplier) - CoinLost - CurrentBet); Profit = Profit + WonAmount; LastResult = "Won"; Wins++; Losses = 0; if (Profit > ATHProfit) { ATHProfit = Profit; CoinLost = 0; }else{ CoinLost = ATHProfit - Profit; } log.info("[Profit] " + WonAmount); console.log('%c[Result] Round Won. ' + 'Net Profit of ' + WonAmount.toFixed(7),'color:green'); }else{ LastResult = "Lost"; Losses++; Wins = 0; CoinLost = CoinLost + CurrentBet; console.log('%c[Result] Round ' + LastResult,'color:red'); log.info('Round Lost'); } if (Losses > MaxLossesEncountered) { MaxLossesEncountered = Losses; console.log("Encountered Streak of " + Losses + " Losses Before Win"); log.info("Encountered Streak of " + Losses + " Losses Before Win"); } if (Losses > 3) { console.log('%c[Coin Lost] Cumulative Since Last Win: ' + CoinLost.toFixed(7),'color:red'); log.info('%c[Coin Lost] Cumulative Since Last Win: ' + CoinLost.toFixed(7)); } } function updatestats() { //Lists PayOuts under 10x for last 50 rounds for (i = 0; i < MultiplierArray.length; i++) { FindThisMultiplier = MultiplierArray; FindMultiplierHistory(); PayOutPercents = ThisAverage; } //Lists PayOuts 10x and over for last 100 rounds if (RoundsViewed > 100) { HistorySlice = 100; CurrentGameID = CurrentGameID.toString(); if (CurrentGameID.endsWith('0')) { console.log("In the last " + HistorySlice + " rounds there was: "); } for (i = 0; i < LMultiplierArray.length; i++) { FindThisMultiplier = LMultiplierArray; FindMultiplierHistory(); } } // console.log(PayOutPercents); } function FindMultiplierHistory() { FindThisMultiplier = (FindThisMultiplier - 0.01); Array2Filter = ScriptHistory.slice(0,[HistorySlice]); FilteredArray = Array2Filter.filter(function (e) { return e > FindThisMultiplier; }); FindThisMultiplier = (FindThisMultiplier + 0.01); DisplayTimesSeen(); findpercents(); } function DisplayTimesSeen() { FindShouldHave = (Array2Filter.length / FindThisMultiplier); FindShouldHave = (FindShouldHave * 100); FindShouldHave = Math.round(FindShouldHave); FindShouldHave = (FindShouldHave / 100); CurrentGameID = CurrentGameID.toString(); if (CurrentGameID.endsWith('0')) { console.log("PayOuts " + FindThisMultiplier + "x & Higher " + Math.round(FindShouldHave) + " times. There were " + FilteredArray.length); } } function findpercents() { ThisAverage = FilteredArray.length / Math.round(FindShouldHave); ThisAverage = (ThisAverage * 100); ThisAverage = Math.round(ThisAverage); } function updateplayer() { EndBalance = currency.amount; NetProfit = EndBalance - StartBalance; var ProfitPercent = (NetProfit / StartBalance) * 100; EndTime = new Date(); TimeDiff = ((EndTime - StartTime) / 1000 )/ 60; ProfPerMin = (Profit / TimeDiff); CurrentGameID = CurrentGameID.toString(); if (CurrentGameID.endsWith('0')) { console.log(" "); log.info(" "); console.log('%c~~~~~~~~~~ NubsScript Update ~~~~~~~~~~','color:blue;font-weight:bold'); log.info('~~~~~ NubsScript Update ~~~~~'); figuretime(); console.log("Begining Bank " + StartBalance.toFixed(7) + " Current Bank " + currency.amount.toFixed(7) + " " + currency.currencyName); log.info("Begining Bank " + StartBalance.toFixed(7) + " Current Bank " + currency.amount.toFixed(7) + " " + currency.currencyName); console.log("Current Base Bet: " + config.auto.value + " "+ BaseBet + " " + currency.currencyName); log.info("Current Base Bet: " + BaseBet + " " + currency.currencyName); console.log("Session Net Profit " + NetProfit.toFixed(7) + ' ' + currency.currencyName + " or " + ProfitPercent.toFixed(2) + "% "); log.info("Session Net Profit " + NetProfit.toFixed(7) + ' ' + currency.currencyName + " or " + ProfitPercent.toFixed(2) + "% "); console.log("Profit Per Minute " + ProfPerMin.toFixed(7) + ' ' + currency.currencyName); log.info("Profit Per Minute " + ProfPerMin.toFixed(7) + ' ' + currency.currencyName); console.log("Highest PayOut Seen: " + LargestMulitplier + "x"); log.info("Highest PayOut Seen: " + LargestMulitplier + "x"); console.log("Cumulative Amount Bet: " + TotalBets.toFixed(7) + " " + currency.currencyName); log.info("Cumulative Amount Bet: " + TotalBets.toFixed(7) + " " + currency.currencyName); console.log("Biggest Bet Placed " + LargestBet[0] + " at " + LargestBet[1] + "x"); log.info("Biggest Bet Placed " + LargestBet[0] + " at " + LargestBet[1] + "x"); console.log("Largest Loss: " + MostLost.toFixed(7) + " " + currency.currencyName + " on " + MaxLossesEncountered + " consecutive losses"); log.info("Largest Loss: " + MostLost.toFixed(7) + " " + currency.currencyName + " on " + MaxLossesEncountered + " consecutive losses"); if (Trains.length > 2) { console.log("Hilarious Train IDs:"); console.log(Trains); } console.log("In the last " + HistorySlice + " rounds there was: "); } RoundsViewed = RoundsViewed.toString(); if (RoundsViewed.endsWith('00') && config.auto.value == "Script") { UpdateBets = "True"; } } function figuretime() { // get total seconds between the times var delta = Math.abs(StartTime - EndTime) / 1000; // calculate (and subtract) whole days var days = Math.floor(delta / 86400); delta -= days * 86400; // calculate (and subtract) whole hours var hours = Math.floor(delta / 3600) % 24; delta -= hours * 3600; // calculate (and subtract) whole minutes var minutes = Math.floor(delta / 60) % 60; delta -= minutes * 60; // what's left is seconds var seconds = delta % 60; // in theory the modulus is not required if (days > 0) { console.log("Viewed " + RoundsViewed + " Rounds in " + days + " days " + hours + " hours " + minutes + " minutes"); log.info("Viewed " + RoundsViewed + " Rounds in " + days + " days " + hours + " hours " + minutes + " minutes"); }else if (hours > 0) { console.log("Viewed " + RoundsViewed + " Rounds in " + hours + " hours " + minutes + " minutes"); log.info("Viewed " + RoundsViewed + " Rounds in " + hours + " hours " + minutes + " minutes"); }else{ console.log("Viewed " + RoundsViewed + " Rounds in " + minutes + " minutes"); log.info("Viewed " + RoundsViewed + " Rounds in " + minutes + " minutes"); } } function checkstoppers() { if (TimeDiff > config.end.value && LastResult == "Won") { log.info("Stopped Due to User Parameters (Minutes)"); console.log("Stopped Due to User Parameters (Minutes)"); engine.stop(); } if (Profit > config.profit.value && LastResult == "Won") { log.info("Stopped Due to User Parameters (Profit)"); console.log("Stopped Due to User Parameters (Profit)"); engine.stop(); } if (CoinLost > StopLossCoin) { log.info("Stopping Due to User Parameters"); console.log("Stopping Due to User Parameters (Coin Lost)"); engine.stop(); } } function betupdate() { BaseBet = currency.amount / 15000; if (BaseBet < currency.minAmount) { BaseBet = currency.minAmount; console.log("Bankroll too small. Attempting script by user's command"); } config.bet.value = BaseBet; MaxBet = (currency.amount / 10); config.stop.value = currency.amount * 0.98; console.log('%c[WARNING]: Stop Loss Updated to ' + config.stop.value, 'color:Orange; font-weight:bold'); console.log('%c[WARNING]: Base Bet Updated to ' + BaseBet, 'color:Orange; font-weight:bold'); } } ********************************************************************* Script end ********************************************************************************************
-
I can help you make it. because i haven't actually played hash dice that much and was looking for some sort of strategy to implement with. i will take a look and see if i can't crank it out tonight, however from looking at the API in the past i don't remember it being immediately obvious how to switch from low to high without actually having to change the value in the form before it was submitted, which since the scripts who web workers means the script doesn't have access to the UI directly. For both 1 and 2 just based on my experience with my crash scripts. You want to avoid patterns because i am fairly sure there is some sort of machine learning looking for patterns and then breaking them. If i can figure out how to switch from high to low, i would recommend that you go with like a range for high then low then back something like 1-4 then everytime it switches it will just grab a random number (you may want that range bigger) and does that many of low or high before switching. number 3 is easy to to i already do that in all my crash scripts the only problem is you pretty much have to keep a running total as the balance value doesn't get updated while the script is running except the initial when it starts. At least for crash and i don't know why but i just copied it and had a running total which worked out just fine. Also what kind of logging are you going to want.
-
exactly with the pandemic some of us have hosted services to scale for all those working and learning remotely haha.
- 135 replies
-
- verification
- fairness
-
(and 3 more)
Tagged with:
-
Did that there are a few typos in the description like exciting is on there as exiting. And i vote for some sort of electronic or down tempo or something. It says message in the comments but you can't comment on the live stream so i am doing it here. like maybe some SynthWave or something that has a good 80s vibe haha.
-
if your internet is out there is no way for you to get to host server and if the server is at your house then it too would have the internet be out. Well webservices would be the cleanest way and it wouldn't interfere with your logging output of the game. That is assuming you can even make an httpost from the game script which i don't see why you wouldn't be able to. And webservices are no harder than throwing up a page as far as setup goes. In fact it can even be a page of a site with a rest endpoint. It really just depends how involved you want to get with it all. And if you want to talk about typos. I just redid one of my scripts and was testing it out. And i have it now so that if you put in a exact amount it will use that for the base bet otherwise it will use the percentage of your bankroll. Well i just copied and pasted and the first bet out of the case it bet 0.25 light coin instead of the .0033 I wanted it to. Luckily i won because i had a payout amount X1.2 but i damn near had a heart attack thinking i might loose my play money before i even get started.
-
putting it into the actual script. But then you need to open the developer pain in the browser or you won't see the console output.
-
well if you are going to live stream do you have a server somewhere? Because really the easiest way would be to host a webservice on a server and just call the webservice after each crash. Then you could just host a site that reads the information from the webservice however you want to store it there, sql on disk hell even in memory at that point except iis refreshes regularly so you would loose the data then.
-
Yes you can easily export the data as a CSV normally. Unfortunately here they seem to be running the script as a web worker and so it doesn't have access to the DOM since only 1 thread has access to the dom. If i spent enough time digging into it i may be able to figure out how to register my own worker or what messages it is listening for and try to intercept it on the way back out. But to be honest I would probably just write the data out to the log window in a csv type of format, then use a browser extension like "Code Injector" to read and parse the html to return a csv that way. Here is the basic code from returning a CSV that most people use. Note that with Code Injector you can inject your own button that you can click manually so you won't need the hack to create and then click a hidden hyper link. Here is my test script which works up until it trys to return the csv then it complains because the javascript doesn't have access to the DOM on this thread. var config = {} var arrayHeader = ["Date", "Cashed At", "Crash", "GameId", "Hash", "Odds", "Wager"]; var arrayData = []; arrayData.push(arrayHeader); function main () { console.log(engine); let gameCount = 0; console.log(game); game.onBet = function () { console.log('starting game'); console.log(game.history); log.info('Last game information') log.info('cashedat: ' + game.history[0].cashedat) log.info('crash:' + game.history[0].crash) log.info('gameid: ' + game.history[0].gameId) log.info('hash: ' + game.history[0].hash) log.info('odds: ' + game.history[0].odds) log.info('wager: ' + game.history[0].wager) console.log(game.history[0]); LogForCSV(game.history[0].cashedat, game.history[0].crash, game.history[0].gameId, game.history[0].hash, game.history[0].odds, game.history[0].wager); gameCount++; console.log(gameCount); if(gameCount % 5 == 0) { ExportToCsv(); //Reset the data so you don't get duplicates arrayData = arrayHeader; } let today = new Date(); let fileName = 'CrashResults_' + today.month + '.' + today.day + '.' + today.year + ".csv"; ExportToCsv(arrayHeader, arrayData, ',', fileName); } } function ExportToCsv(){ let csv = ''; arrayData.forEach( array => { csv += array.join(',') + "\n"; }); let csvUrl = 'data:text/csv;charset=utf-8,' + encodeURI(csv); let hiddenElement = document.createElement('a'); hiddenElement.href = csvUrl; hiddenElement.target = '_blank'; hiddenElement.download = fileName + '.csv'; hiddenElement.click(); } function LogForCSV(cashedAt, crash, gameid, hash, odds, wager) { let current_datetime = new Date(); let formatted_date = current_datetime.getFullYear() + "-" + (current_datetime.getMonth() + 1) + "-" + current_datetime.getDate() + " " + current_datetime.getHours() + ":" + current_datetime.getMinutes() + ":" + current_datetime.getSeconds(); let entry = [formatted_date, cashedAt, crash, gameid, hash, odds, wager]; arrayData.push(entry); } so what you can do is just change the ExportToCsv to return the CSV string. Then with CodeInjector you can have it create and return the CSV, either by looking for known markers that start the data like ~~~ or whatever, or you can just take the entire contents of the div return it as a csv and then clear the window which is probably the best option so that way every time you export you only get new stuff. The history object only contains like the last 20 games i believe so it isn't really good for long term history they tell you to store your own. Let me know if you get Code Injector for your browser and i will write you something to look for messages and then pull the data into there actually for export. Message me actually to set that up.
-
kind of lack luster. I have several scripts but one of main things i did was add better logging I also added a feature that after two losses in a row, it will pause until it sees at least 1 win. You sometimes miss a win on the 3rd game true. But i no longer have to deal with 13 game losing streaks. It will take two and then just wait it out for green pastures. I need to change my script back to straight amounts for better, currently i use a percentage of my bank roll for the bet and then this one is the typical double it on loss. I will post it in its own message 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; } } } } I on average double up every few hours with this, but there are times where it goes into a run away nose dive so i don't leave it unattended without a stop loss amount set. But that stop loss is calculated from the last win and not from the session so it will stop before it eats all of the profits away.
-
The best i have been able to do is console.log(game) and then look at that object, you can also dump engine the same way.
-
I was really hoping this would have gotten some traction because i wanted to know if there was a way to reread the properties from the form, and or interact with the dom from the script. I mean its javascript so i don't see why not, but i imagine there might be some sort of isolation stuff going on to make it think its cross site scripting or what not.
-
I am going to pile on here. So far i have been lucky in my guessing of properties and such based on the other scripts, but that only goes so far.