Jump to content

Hashdice Script - Increase Chance.


Jamiekson
 Share

Recommended Posts

This script is pretty simply, but it is one that I'm very proud of, as I had no coding experience until a few months ago.

Starts at minimum bet w/ a 1% chance to win.
On lose - Chance increases by 1%.  Bet is multiplied by "varix".
On win - Returns to base-bet w/ 1% chance.


Full disclosure:
I usually use "runningbalance/100000" or "runningbalance/200000" for my basebet.  Obviously that will be more profitable than betting the minimum, but it is quite a bit riskier and occasionally at this rate it will crash. Betting the minimum hasn't crashed on me yet, with well over 1M rolls. So raise the basebet at your own risk!!




 

var config = {
    baseBet: {
        label: 'Base Bet',
        value: currency.minAmount,
        type: 'number'
    },
    startingChance: {
        label: 'Starting Chance',
        value: 1,
        type: 'number'
    },
}
 
var chance = config.startingChance.value;
var currentPayout = ((1/chance)*99);
 
var losecount = 0;
var betcount = 0;
var varix = 1.25;
 
var previousBet = currentBet;
 
var runningbalance = currency.amount;
var originalbalance = currency.amount;
var baseBet = config.baseBet.value;
var currentBet = baseBet;
 
function main () {
    game.onBet = function () {
        game.bet(currentBet, currentPayout).then(function(payout) {
            runningbalance -= currentBet;
            previousBet = currentBet;
            betcount += (1);
           
            if (payout > 1) {
                var netwin = currentBet * currentPayout;
                runningbalance += netwin;
               
                currentBet = baseBet;
                losecount = 0;
                chance = 1;
                varix = 1.25;
           
            } else {
               
                if (losecount >= 19) {
 
                    losecount += (1);
                    varix = 1.5;
                }
                if (losecount >= 26) {
 
                    losecount += (1);
                    varix = 1.66;
                }
 
                losecount += (1);
                currentBet = (previousBet * varix);
 
                chance += (1);
 
            }
 
            currentPayout = ((1/chance)*99);
           
            if (betcount >= 100) {
                logSummary();
                betcount = 0;
            }
           
            log.info('Betting: ' + currentBet.toFixed(7) + ' ' + ' X ' + ' ' + currentPayout.toFixed(2));
        });
    }
}
 
function logSummary() {
    var netNumber = runningbalance - originalbalance;
    var netPecentage = (netNumber / originalbalance) * 100;
   
    if (originalbalance < runningbalance) {
        log.success('Total Profit: ' + netNumber.toFixed(7) + '(' + netPecentage.toFixed(2) + '%)');
    } else {
        log.error('Total Profit: ' + netNumber.toFixed(7) + '(' + netPecentage.toFixed(2) + '%)');
    }
}
Link to comment
Share on other sites

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.
Link to comment
Share on other sites

So I'm still kind of new to running scripts this one is pretty interesting. But I cannot for the life of me figure out how to change the starting Bet to something different. I.e. if I'm playing with trx and want to bet 0.002 as opposed to the minimum how would I input that?? 🧐🧐😅😅😅

Link to comment
Share on other sites

7 hours ago, Frmrclrripper said:

So I'm still kind of new to running scripts this one is pretty interesting. But I cannot for the life of me figure out how to change the starting Bet to something different. I.e. if I'm playing with trx and want to bet 0.002 as opposed to the minimum how would I input that?? 🧐🧐😅😅😅

You can just edit the baseBet in the config variable, per below.

var config = {
    baseBet: {
        label: 'Base Bet',
        value: 0.002,
        type: 'number'
Edited by shrewdowl
forgot a comma
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

On 3/10/2022 at 9:24 PM, Skele said:

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.

ngl i tried to do that a few times and it kept giving me an error something like invalid coin amound. im not too sure exactly, but after about 5 minuts of just messing with it i figured out how to really mess it up before i figured it out lmfao. i altered the numbers in the code around here

 startingChance: {
        label: 'Starting Chance',
        value: 1,
        type: 'number'
    },
}

 

var chance = config.startingChance.value;
var currentPayout = ((1/chance)*99);

 

var losecount = 0;
var betcount = 0;
var varix = 1.25;
 
 

 to look like this 

 

 

 

 startingChance: {
        label: 'Starting Chance',
        value: 0.02,
        type: 'number'
    },
}

 

var chance = config.startingChance.value;
var currentPayout = ((1/chance)*200);

 

var losecount = 0;
var betcount = 0;
var varix = 2;

 let me tell you what i had it all fucked up

On 3/10/2022 at 9:24 PM, Skele said:

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.

as ive stated before i really have trouble understanding how this whole script coding is actually done. i have one other question that maybe yuou might be able to help with. the way this script is written is starts out at 99x payout and drops from there. how would i get it to start at 990x and make its way down the same way as [revious? or 500x

Link to comment
Share on other sites

wouldn't you just change the 99 to 990 or whatever you want
the equation is 1/n *99 , so since it is starting at 1/1 that is what you would have for your starting bet, then it would go 1/2 1./3 1/4 etc... i am assuming.

 

So following the same logical step with your equation ((1/chance)*200); with starting chance of 0.02 you get  50 x200 = 10000- and then i you added one it would step down but at some weird rate. either way just the 99 to what you want and leave chance at 1

Link to comment
Share on other sites

  • 4 weeks later...
On 3/13/2022 at 12:04 AM, Frmrclrripper said:

as ive stated before i really have trouble understanding how this whole script coding is actually done. i have one other question that maybe yuou might be able to help with. the way this script is written is starts out at 99x payout and drops from there. how would i get it to start at 990x and make its way down the same way as [revious? or 500x

Sorry I haven't been in here for a while. Thanks again to @Skelefor always being so helpful! You've been an invaluable resource to me while I've been learning. 

And @Frmrclrripper If I'm understanding you correctly, then I think I fixed the script to work how you want it to. You DON'T want to change the equation for currentPayout. keep it at var currentPayout = ((1/chance)*99);   the way I have it written, it NEEDS this equation to figure out the correct payout. Chance = 1 means there is a  1% chance to win.

Then to get a payout that starts @ 990x:

- startingChance should be set to 0.1.

-So your balance doesnt drain at the same rate, decrease the multipliers. (labeled  "varix" in the script)  
        - New varix = (((old varix-1)/10)+1). Basically increasing at 1/10th the speed it was before. (1.25 is now 1.025, etc...)

-Increase the "losecount" parameters by 10x (190, 260).

-on lose, our chance increased by 1% everytime, so we have to lower that integer to (0.01).



So I applied all of those changes, I fixed the mistake that was pointed out by Skele and I believe this SHOULD function how you wanted. I ran it for a few mintues and it appears to be working correctly.



 

var config = {
    baseBet: {
        label: 'Base Bet',
        value: currency.minAmount,
        type: 'number'
    },
    startingChance: {
        label: 'Starting Chance',
        value: 0.1,
        type: 'number'
    },
}
 
var chance = config.startingChance.value;
var currentPayout = ((1/chance)*99);
 
var losecount = 0;
var betcount = 0;
var varix = 1.025;
 
var previousBet = currentBet;
 
var runningbalance = currency.amount;
var originalbalance = currency.amount;
var baseBet = config.baseBet.value;
var currentBet = baseBet;
 
function main () {
    game.onBet = function () {
        game.bet(currentBet, currentPayout).then(function(payout) {
            runningbalance -= currentBet;
            previousBet = currentBet;
            betcount += (1);
           
            if (payout > 1) {
                var netwin = currentBet * currentPayout;
                runningbalance += netwin;
               
                currentBet = baseBet;
                losecount = 0;
                chance = 0.1;
                varix = 1.025;
           
            } else {
               
                if (losecount >= 190) {
                    varix = 1.05;
                }
                if (losecount >= 260) {
                    varix = 1.066;
                }
 
                losecount += (1);
                currentBet = (previousBet * varix);
 
                chance += (0.01);
 
            }
 
            currentPayout = ((1/chance)*99);
 
            if (betcount % 100 == 0) {
                logSummary();
            }
           
            log.info('Betting: ' + currentBet.toFixed(7) + ' ' + ' X ' + ' ' + currentPayout.toFixed(2));
        });
    }
}
 
function logSummary() {
    var netNumber = runningbalance - originalbalance;
    var netPecentage = (netNumber / originalbalance) * 100;
   
    if (originalbalance < runningbalance) {
        log.success('Total Profit: ' + netNumber.toFixed(7) + '(' + netPecentage.toFixed(2) + '%)');
    } else {
        log.error('Total Profit: ' + netNumber.toFixed(7) + '(' + netPecentage.toFixed(2) + '%)');
    }
}

 

Link to comment
Share on other sites

I've been messing around with this script a little more today.. I lowered the starting chance and the varix multipliers even more, and after a lose the chance increases by 1% instead of incrementally growing by 0.01 every time.
If you play around with it make sure you use coins you don't care about until you find that sweet spot that works well. Whenever I'm tweaking the math in a script I always anticipate a bad run or two, and I DID have to bust a few times before I was able to get it to run like this..

But for now, THIS SHIT SLAPS!

BC-Game-Crypto-Casino-Games-Casino-Slot-Games-Crypto-Gambling (1).png

Link to comment
Share on other sites

.

On 4/9/2022 at 9:57 PM, Jamiekson said:

I've been messing around with this script a little more today.. I lowered the starting chance and the varix multipliers even more, and after a lose the chance increases by 1% instead of incrementally growing by 0.01 every time.
If you play around with it make sure you use coins you don't care about until you find that sweet spot that works well. Whenever I'm tweaking the math in a script I always anticipate a bad run or two, and I DID have to bust a few times before I was able to get it to run like this..

But for now, THIS SHIT SLAPS!

BC-Game-Crypto-Casino-Games-Casino-Slot-Games-Crypto-Gambling (1).png

Can you please share the updated version of the script, Jamie?

Edited by Money_Magnet
Link to comment
Share on other sites

  • 1 month later...

So I was messing about with the coding also, and increased the chance to 12% each go and 6 times bet, and it was running very smoothly until it hit wrong 9 times, meaning in lost 2 times the profit because the last roll wasn’t valid, I was thinking, Is there a way to code it so when it gets to a certain point, to cap it at a certain percentage (ie when it hits 84% (1.2~x) payout to stop it going further until it wins and then start the process again?

Link to comment
Share on other sites

of course there is, you said you messed with the code to change the increases (i don't know why these weren't exposed as inputs to begin with) so you know know where it is being set.  So all you need to do is check there to see if the percentage is within your exceptable range, then figure out how you want to deal with that.

if(chance > 1.2)
{

     // you could then reset it to the max of your choosing
     chance = 1.2;
     // another option is to reset it back to the original starting value.

     change = config.startingChance.value;

     // or just stop the script and wait for someone to look to see why it stopped

     game.stop();

}

Link to comment
Share on other sites

well lets go down the list of possibilities. Do you have multiple accounts? Do you have 2FA on (so you don't get someone else in your account).  Did you use any autograbber scripts?  Did you bother to ask support their reason for locking you out of your account.  Or did you just not secure it and somebody else got into it.  I don't know the history here but i do not i have not heard of a single case of them locking someone out of their account without a legitimate reason.  (and you are talking locked out as in seized assets and all right?  Because if your just muted that isn't the same thing at all).

Link to comment
Share on other sites

they give me the reason that the fame farm is like running a side acc to make a profit but my acc doesn't have a ref and it's not anyone's ref so what's the reason

i don't violate BC's community policy and i'm a casual player deposit and bet.i have a computer with pretty strong fiber optic network that can pick up packages quickly and thats why

Link to comment
Share on other sites

don't be a moron i just told you i don't know why your banned, i said did you check with support because that would be the logical first step anyone should take.  Second i listed common reason i have heard of them shutting peoples accounts down for.  third i don't work for bc so why would you think i would be able to tell you why your account was banned with literally not information from your aside from the fact you seem to have a hard time reading everything that is written.  Support is the proper place to take up this grievance though, not with a random player who is answering another players question on the forum.  Are you perhaps under 18 because i can see that being a reason just judging from your responses to this situation.  Also if you had laid low you probably could have started another account, you have only according the number under your name wagered 11k, so you could be back up to the same level in a day with depositing 50$.  Again what causual player is going to go on the forum and attack players because they got themselves banned without first talking to support?

Link to comment
Share on other sites

On 4/9/2022 at 8:57 PM, Jamiekson said:

I've been messing around with this script a little more today.. I lowered the starting chance and the varix multipliers even more, and after a lose the chance increases by 1% instead of incrementally growing by 0.01 every time.
If you play around with it make sure you use coins you don't care about until you find that sweet spot that works well. Whenever I'm tweaking the math in a script I always anticipate a bad run or two, and I DID have to bust a few times before I was able to get it to run like this..

But for now, THIS SHIT SLAPS!

BC-Game-Crypto-Casino-Games-Casino-Slot-Games-Crypto-Gambling (1).png

How i can change the chance to 1% ? 

I have No Code experience and tryed a Lot of Things:( 

 

Thanks !:)

Link to comment
Share on other sites

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');

 
Link to comment
Share on other sites

On 4/9/2022 at 12:25 AM, Jamiekson said:

Sorry I haven't been in here for a while. Thanks again to @Skelefor always being so helpful! You've been an invaluable resource to me while I've been learning. 

And @Frmrclrripper If I'm understanding you correctly, then I think I fixed the script to work how you want it to. You DON'T want to change the equation for currentPayout. keep it at var currentPayout = ((1/chance)*99);   the way I have it written, it NEEDS this equation to figure out the correct payout. Chance = 1 means there is a  1% chance to win.

Then to get a payout that starts @ 990x:

- startingChance should be set to 0.1.

-So your balance doesnt drain at the same rate, decrease the multipliers. (labeled  "varix" in the script)  
        - New varix = (((old varix-1)/10)+1). Basically increasing at 1/10th the speed it was before. (1.25 is now 1.025, etc...)

-Increase the "losecount" parameters by 10x (190, 260).

-on lose, our chance increased by 1% everytime, so we have to lower that integer to (0.01).



So I applied all of those changes, I fixed the mistake that was pointed out by Skele and I believe this SHOULD function how you wanted. I ran it for a few mintues and it appears to be working correctly.



 

var config = {
    baseBet: {
        label: 'Base Bet',
        value: currency.minAmount,
        type: 'number'
    },
    startingChance: {
        label: 'Starting Chance',
        value: 0.1,
        type: 'number'
    },
}
 
var chance = config.startingChance.value;
var currentPayout = ((1/chance)*99);
 
var losecount = 0;
var betcount = 0;
var varix = 1.025;
 
var previousBet = currentBet;
 
var runningbalance = currency.amount;
var originalbalance = currency.amount;
var baseBet = config.baseBet.value;
var currentBet = baseBet;
 
function main () {
    game.onBet = function () {
        game.bet(currentBet, currentPayout).then(function(payout) {
            runningbalance -= currentBet;
            previousBet = currentBet;
            betcount += (1);
           
            if (payout > 1) {
                var netwin = currentBet * currentPayout;
                runningbalance += netwin;
               
                currentBet = baseBet;
                losecount = 0;
                chance = 0.1;
                varix = 1.025;
           
            } else {
               
                if (losecount >= 190) {
                    varix = 1.05;
                }
                if (losecount >= 260) {
                    varix = 1.066;
                }
 
                losecount += (1);
                currentBet = (previousBet * varix);
 
                chance += (0.01);
 
            }
 
            currentPayout = ((1/chance)*99);
 
            if (betcount % 100 == 0) {
                logSummary();
            }
           
            log.info('Betting: ' + currentBet.toFixed(7) + ' ' + ' X ' + ' ' + currentPayout.toFixed(2));
        });
    }
}
 
function logSummary() {
    var netNumber = runningbalance - originalbalance;
    var netPecentage = (netNumber / originalbalance) * 100;
   
    if (originalbalance < runningbalance) {
        log.success('Total Profit: ' + netNumber.toFixed(7) + '(' + netPecentage.toFixed(2) + '%)');
    } else {
        log.error('Total Profit: ' + netNumber.toFixed(7) + '(' + netPecentage.toFixed(2) + '%)');
    }
}

 

Hello,

thanks very much goes to @Jamieksonand @Skeleto show + fix the basic code structure here public at bc forum to all of us.

Nice Strategie, realizied into an auto bet script.

Thanks

Link to comment
Share on other sites

  • 4 weeks later...

@Jamiekson, probably the best hashdice script I've come across.

Obvisouly I've edited the values and added a few stages to it but yeah it slaps hard.

image.png.d1da8e5f17504f489eb2707a1e314829.png

 

Still have to change seeds every now and then so looking at adding that.

Weldone though!

Link to comment
Share on other sites

  • 2 weeks later...
On 6/28/2022 at 5:17 AM, ArciteK said:

@Jamiekson, probably the best hashdice script I've come across.

Obvisouly I've edited the values and added a few stages to it but yeah it slaps hard.

image.png.d1da8e5f17504f489eb2707a1e314829.png

 

Still have to change seeds every now and then so looking at adding that.

Weldone though!

Thats Awesome! Thanks for the love everyone and I'm happy I could help.

Link to comment
Share on other sites

On 4/8/2022 at 5:25 PM, Jamiekson said:

Sorry I haven't been in here for a while. Thanks again to @Skelefor always being so helpful! You've been an invaluable resource to me while I've been learning. 

And @Frmrclrripper If I'm understanding you correctly, then I think I fixed the script to work how you want it to. You DON'T want to change the equation for currentPayout. keep it at var currentPayout = ((1/chance)*99);   the way I have it written, it NEEDS this equation to figure out the correct payout. Chance = 1 means there is a  1% chance to win.

Then to get a payout that starts @ 990x:

- startingChance should be set to 0.1.

-So your balance doesnt drain at the same rate, decrease the multipliers. (labeled  "varix" in the script)  
        - New varix = (((old varix-1)/10)+1). Basically increasing at 1/10th the speed it was before. (1.25 is now 1.025, etc...)

-Increase the "losecount" parameters by 10x (190, 260).

-on lose, our chance increased by 1% everytime, so we have to lower that integer to (0.01).



So I applied all of those changes, I fixed the mistake that was pointed out by Skele and I believe this SHOULD function how you wanted. I ran it for a few mintues and it appears to be working correctly.



 

var config = {
    baseBet: {
        label: 'Base Bet',
        value: currency.minAmount,
        type: 'number'
    },
    startingChance: {
        label: 'Starting Chance',
        value: 0.1,
        type: 'number'
    },
}
 
var chance = config.startingChance.value;
var currentPayout = ((1/chance)*99);
 
var losecount = 0;
var betcount = 0;
var varix = 1.025;
 
var previousBet = currentBet;
 
var runningbalance = currency.amount;
var originalbalance = currency.amount;
var baseBet = config.baseBet.value;
var currentBet = baseBet;
 
function main () {
    game.onBet = function () {
        game.bet(currentBet, currentPayout).then(function(payout) {
            runningbalance -= currentBet;
            previousBet = currentBet;
            betcount += (1);
           
            if (payout > 1) {
                var netwin = currentBet * currentPayout;
                runningbalance += netwin;
               
                currentBet = baseBet;
                losecount = 0;
                chance = 0.1;
                varix = 1.025;
           
            } else {
               
                if (losecount >= 190) {
                    varix = 1.05;
                }
                if (losecount >= 260) {
                    varix = 1.066;
                }
 
                losecount += (1);
                currentBet = (previousBet * varix);
 
                chance += (0.01);
 
            }
 
            currentPayout = ((1/chance)*99);
 
            if (betcount % 100 == 0) {
                logSummary();
            }
           
            log.info('Betting: ' + currentBet.toFixed(7) + ' ' + ' X ' + ' ' + currentPayout.toFixed(2));
        });
    }
}
 
function logSummary() {
    var netNumber = runningbalance - originalbalance;
    var netPecentage = (netNumber / originalbalance) * 100;
   
    if (originalbalance < runningbalance) {
        log.success('Total Profit: ' + netNumber.toFixed(7) + '(' + netPecentage.toFixed(2) + '%)');
    } else {
        log.error('Total Profit: ' + netNumber.toFixed(7) + '(' + netPecentage.toFixed(2) + '%)');
    }
}

 

sorry im late seeing this. thank youfor sending the updated version! im going to run it now! 

Link to comment
Share on other sites

You need to be a member in order to leave a comment

Sign up for a new account in our community. It's easy!

Register a new account

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...