Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Get Stats more comprehensive
- // to guess PayOut coming
- var config = {
- mainTitle: { label: '*** Nubs27\'s NubsScript for Dice ***', type: 'title' },
- bet: { label: 'Base Bet', value: currency.minAmount, type: 'number' },
- lossTitle: { label: 'Stop When ', type: 'title' },
- stop: { label: 'Coins Lost >', value: currency.minAmount, type: 'number' },
- };
- function main () {
- const MultiplierArray = [1.5,2,3,4,5,6,7,8,9,10];
- var PayOutConfidence = [];
- var PayOutPercents = [];
- var IndexMax = 0;
- var GetNumber = 0;
- var MaxIndex = 0;
- var GamesPlayed = 0;
- var CurrentMultiplier = 1.5;
- var LastMultiplier = 1.5;
- var CurrentState = 0;
- var BaseBet = config.bet.value;
- var MinimumBet = BaseBet;
- var CurrentBet = BaseBet;
- var MaxBet = config.stop.value / 10;
- var LargestBet = 0;
- var Recovery = "False";
- var RecoveryAmt = 0;
- var PauseForRolls = 0;
- var Profit = 0;
- var RollProfit = 0;
- var LastBet = BaseBet;
- var LastResult = "Won";
- var CoinLost = 0;
- var Losses = 0;
- var BiggestStreak = 0;
- var StartTime = new Date();
- var EndTime = new Date();
- var TimeDiff = (EndTime - StartTime);
- var StartBalance = currency.amount;
- var EndBalance = 0;
- var ProfPerMin = 0;
- var HiLo = "High";
- var LastRoll = 1000;
- var ScriptHistory = [];
- var FindThisMultiplier = 1;
- var HistorySlice = 25;
- var Array2Filter = [];
- var FilteredArray = [];
- var FindShouldHave = 2;
- var ThisAverage = 1;
- // Welcome the Player to the Script
- console.clear();
- log.info(' Nubs27s NubsScript for Dice');
- log.info(" ****************");
- log.info("See Web Console for more Information");
- console.log('%c~~~~~~~~~~~~~~~~~ Nubs27\'s NubsScript for Dice ~~~~~~~~~~~~~~~~~','color:Purple; font-weight:bold');
- console.log('%cScript Start Time: ' + StartTime,'color:Purple; font-weight:200');
- console.log(' %cWelcome ' + userInfo.name, 'color:Purple; font-weight:bold');
- console.log(' %cYour Starting Balance is: ' + StartBalance + ' ' + currency.currencyName, 'color:Purple; font-weight:bold');
- console.log('%c~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~','color:Purple; font-weight:bold');
- engine.on('GAME_STARTING', function () {
- console.log(' ----------------------------');
- strategy();
- if ((CoinLost + CurrentBet) > config.stop.value) {
- log.info("Stopping Due to User Parameters");
- console.log("Stopping Due to User Parameters");
- engine.stop();
- }else{
- console.log("[Bet] " + CurrentBet + " at " + CurrentMultiplier + "x");
- engine.bet(CurrentBet, CurrentMultiplier);
- }
- });
- function strategy() {
- findconfidence();
- findlargestindex();
- // console.log('[Index] ' + '(' + MaxIndex + ')' + ' PayOut: ' + FindPayOuts[MaxIndex] + ' [Largest Confidence] ' + PayOutConfidence[MaxIndex]);
- // console.log(' PayOut ' + MultiplierArray[MaxIndex] + '; Confidence Level ' + PayOutConfidence[MaxIndex] + ' %');
- GetNumber = MultiplierArray[MaxIndex];
- randompayout();
- CurrentBet = BaseBet;
- MaxIndex = Math.floor(Math.random() * MaxIndex);
- CurrentMultiplier = GetNumber;
- if (Losses < 5) {
- CurrentBet = ((CoinLost + (BaseBet * Losses)) / (CurrentMultiplier - 1));
- }else{
- CurrentBet = ((CoinLost + (BaseBet * (Losses / 2))) / (CurrentMultiplier - 1));
- }
- checkbet();
- }
- function findconfidence() {
- PayOutConfidence = [];
- for (i = 0; i < PayOutPercents.length; i++) {
- if (PayOutPercents[i] < 100) {
- PayOutConfidence[i] = (100 - PayOutPercents[i]);
- PayOutConfidence[i] = Math.abs(PayOutConfidence[i]);
- PayOutConfidence[i] = (PayOutConfidence[i] + 25);
- }else if (PayOutPercents[i] == 100) {
- PayOutConfidence[i] = 25;
- }else{
- PayOutConfidence[i] = 0;
- }
- if (i > 3) {
- PayOutConfidence[i] = (PayOutConfidence[i] - 25);
- }
- if (i > 5) {
- PayOutConfidence[i] = (PayOutConfidence[i] - 25);
- }
- if (PayOutConfidence[i] < 0) {
- PayOutConfidence[i] = 0;
- }
- }
- }
- function findlargestindex() {
- IndexMax = PayOutConfidence[0];
- MaxIndex = 0;
- for (var i = 1; i < PayOutConfidence.length; i++) {
- if (PayOutConfidence[i] >= IndexMax) {
- MaxIndex = i;
- IndexMax = PayOutConfidence[i];
- }
- }
- }
- function randompayout() {
- GetNumber = GetNumber * 100;
- if (Losses < 3) {
- GetNumber = Math.floor(Math.random() * GetNumber) + 115;
- }else{
- GetNumber = Math.floor(Math.random() * GetNumber) + 133;
- }
- GetNumber = GetNumber / 100;
- if (isNaN(GetNumber)) {
- GetNumber = Math.floor(Math.random() * 198) + 151;
- GetNumber = GetNumber / 100;
- }
- }
- function checkbet() {
- MinimumBet = currency.minAmount;
- if (CurrentBet < BaseBet) {
- CurrentBet = BaseBet;
- }
- if (CurrentBet < MinimumBet) {
- CurrentBet = MinimumBet;
- }
- if (CurrentBet > MaxBet) {
- CurrentBet = MaxBet;
- CurrentMultiplier = ((CoinLost + CurrentBet) / CurrentBet);
- console.log('Maximum Bet is engaged. PayOut updated ' + CurrentMultiplier);
- log.info('Maximum Bet is engaged. PayOut updated ' + CurrentMultiplier);
- }
- if (CurrentBet > LargestBet) {
- LargestBet = CurrentBet;
- }
- }
- engine.on('GAME_ENDED', function (data) {
- GamesPlayed++;
- LastRoll = data.roll;
- RollProfit = data.profitAmount;
- if (HiLo == "High") {
- converthigh();
- }else{
- convertlow();
- }
- if (ScriptHistory.unshift(LastRoll) > 9999) ScriptHistory.shift();
- winorlose();
- if (Recovery == "True" && Losses == 2 && PauseForRolls <= 0) {
- RecoveryAmt = RecoveryAmt + CurrentBet;
- PauseForRolls = Math.floor(Math.random() * 7) + 2;
- console.log('[Strategy] Script will pause Martingale betting for: ' + PauseForRolls + ' rolls');
- CurrentState = 2;
- CurrentMultiplier = MultiplierArray[2];
- CurrentBet = currency.minAmount * 1.02;
- }
- if (Recovery == "True" && LastResult == "Won" && PauseForRolls <= 0) {
- Recovery = "False";
- }
- LastMultiplier = CurrentMultiplier;
- LastBet = CurrentBet;
- GamesPlayed = GamesPlayed.toString();
- if (GamesPlayed.endsWith('25') || GamesPlayed.endsWith('50') || GamesPlayed.endsWith('75') || GamesPlayed.endsWith('00')) {
- EndTime = new Date();
- TimeDiff = ((EndTime - StartTime) / 1000 )/ 60;
- EndBalance = currency.amount;
- Profit = EndBalance - StartBalance;
- ProfPerMin = (Profit / TimeDiff);
- UpdatePlayer();
- updatescript();
- console.log('%c~~~~~~~~~~~~~~~~~ Update Completed ~~~~~~~~~~~~~~~~~','color:blue;');
- }
- function converthigh() {
- if (LastRoll > 90099) {
- LastRoll = 10;
- }else if (LastRoll > 88999) {
- LastRoll = 9;
- }else if (LastRoll > 87625) {
- LastRoll = 8;
- }else if (LastRoll > 85857) {
- LastRoll = 7;
- }else if (LastRoll > 83499) {
- LastRoll = 6;
- }else if (LastRoll > 80199) {
- LastRoll = 5;
- }else if (LastRoll > 75249) {
- LastRoll = 4;
- }else if (LastRoll > 66999) {
- LastRoll = 3;
- }else if (LastRoll > 50499) {
- LastRoll = 2;
- }else if (LastRoll <= 50499) {
- LastRoll = 1;
- }
- }
- function convertlow() {
- if (data.roll >= 50499) {
- LastRoll = 1;
- }else if (data.roll < 50499) {
- LastRoll = 2;
- }else if (data.roll < 33000) {
- LastRoll = 3;
- }else if (data.roll < 24750) {
- LastRoll = 4;
- }else if (data.roll < 19800) {
- LastRoll = 5;
- }else if (data.roll < 16500) {
- LastRoll = 6;
- }else if (data.roll < 14142) {
- LastRoll = 7;
- }else if (data.roll < 12375) {
- LastRoll = 8;
- }else if (data.roll <= 11000) {
- LastRoll = 9;
- }else if (data.roll > 9900) {
- LastRoll = 10;
- }
- }
- });
- function winorlose() {
- if (RollProfit > 0) {
- LastResult = "Won";
- Losses = 0;
- Profit = (RollProfit - CoinLost);
- log.info('Roll was Won! Profit of ' + Profit);
- console.log('%cRoll was Won! Profit of ' + Profit,'color:Green;font-weight:bold');
- CoinLost = 0;
- }else{
- LastResult = "Lost";
- CoinLost = CoinLost + CurrentBet;
- Losses++;
- }
- if (LastResult == "Lost" && Losses > 10) {
- log.info('Roll was Lost. Accumulated Losses = ' + CoinLost.toFixed(5));
- }else if (LastResult == "Lost") {
- log.info('Roll was Lost');
- }
- if (Losses > BiggestStreak) {
- BiggestStreak = Losses;
- }
- }
- function UpdatePlayer() {
- console.log('%c~~~~~~~~~~~~~~~~~ Statistics Update ~~~~~~~~~~~~~~~~~','color:blue;font-weight:bold');
- console.log("Dice Rolled " + GamesPlayed + " Times in " + TimeDiff.toFixed(2) + " minutes ");
- console.log("Profit Per Minute " + ProfPerMin.toFixed(5) + ' ' + currency.currencyName);
- console.log("Session Net Profit " + Profit.toFixed(5) + ' ' + currency.currencyName);
- console.log("Longest Stretch Without a Win is " + BiggestStreak + " Rolls");
- console.log("Biggest Bet Placed " + LargestBet + " " + currency.currencyName);
- if (GamesPlayed < 50) {
- HistorySlice = 25;
- }else{
- HistorySlice = 50;
- }
- }
- function updatescript() {
- for (i = 0; i < MultiplierArray.length; i++) {
- FindThisMultiplier = MultiplierArray[i];
- FindMultiplierHistory();
- PayOutPercents[i] = ThisAverage;
- }
- }
- 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);
- 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);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement