Jump to content

Hashdice Script - Increase Chance.


Jamiekson
 Share

Recommended Posts

The code looks good but now how to change seed through that code only without having to install external extensions ?

Link to comment
Share on other sites

  • 5 months later...
On 5/22/2022 at 10:03 AM, Skele said:

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

}

Hi skele, I tried plugging your lines in the code but it doesn't seem to work. I want it to stop at a specific chance when it doesnt hit a win and then restart. Like this:

if(chance > 1.2)
{
     chance = 1;

}

(my starting chance is 1)

I dont have any experience in coding so it would be really helpful if you could put it altogher and make it work. I'll be happy to tip.

Thanks in advance!

Link to comment
Share on other sites

@JamieksonI can't thank you enough for this script. Not even paid strategies comes close to what this script can do. I'm running it 24 hours a day since the night of last December's 27th, and I'm getting consistent earnings of 90-130 tokens per day with the minimum bet, already doubled the amount of coins I had

Link to comment
Share on other sites

On 1/5/2023 at 9:56 AM, Xaushkxuhwb said:

@JamieksonI can't thank you enough for this script. Not even paid strategies comes close to what this script can do. I'm running it 24 hours a day since the night of last December's 27th, and I'm getting consistent earnings of 90-130 tokens per day with the minimum bet, already doubled the amount of coins I had

Can you tell me which token are you using? I'm trying to create a backtest with this code I'll share my results soon

Link to comment
Share on other sites

  • 1 month later...
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) + '%)');
    }
}

 

Hi @Jamiekson Anyway to take this and instead of basebet being a fixed value it increases by a percentage of your runningbalance after a win? 

Edited by Skaro
Link to comment
Share on other sites

  • 1 month later...
On 07/07/2022 at 17:32, Jamiekson said:

Fantástico! Obrigado pelo carinho de todos e fico feliz em poder ajudar.

 

On 07/07/2022 at 17:32, Jamiekson said:

Fantástico! Obrigado pelo carinho de todos e fico feliz em poder ajudar.

olá. tudo bem? estou acompanhando as partes, estou tentando entender e configurar. gostaria de compartilhar o script atual?

att

Link to comment
Share on other sites

  • 2 weeks later...

Hi 

I had a question. I would appreciate it if you could help me. Can this script be adjusted so that it does not play after 19 stages, and then starts the game again with 2 times the original amount when it wins?

Hi @Skele

I had a question. I would appreciate it if you could help me. Can this script be adjusted so that it does not play after 19 stages, and then starts the game again with 2 times the original amount when it wins?

Hi @Jamiekson

I had a question. I would appreciate it if you could help me. Can this script be adjusted so that it does not play after 19 stages, and then starts the game again with 2 times the original amount when it wins?

Link to comment
Share on other sites

  • 3 weeks later...

const config = {
  baseBet: {
    label: 'Base Bet',
    value: currency.minAmount,
    type: 'number',
  },
  startingChance: {
    label: 'Starting Chance',
    value: 0.1,
    type: 'number',
  },
};

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

let loseCount = 0;
let betCount = 0;
let variance = 1.025;

let previousBet = 0;
let runningBalance = currency.amount;
let originalBalance = currency.amount;
let currentBet = config.baseBet.value;

function main() {
  game.onBet = () => {
    game.bet(currentBet, currentPayout).then((payout) => {
      runningBalance -= currentBet;
      previousBet = currentBet;
      betCount++;

      if (payout > 1) {
        const netWin = currentBet * currentPayout;
        runningBalance += netWin;

        currentBet = config.baseBet.value;
        loseCount = 0;
        chance = config.startingChance.value;
        variance = 1.025;
      } else {
        if (loseCount >= 190) {
          variance = 1.05;
        }
        if (loseCount >= 260) {
          variance = 1.066;
        }

        loseCount++;
        currentBet = previousBet * variance;
        chance += 0.01;
      }

      currentPayout = (1 / chance) * 99;

      if (betCount % 100 === 0) {
        logSummary();
      }

      log.info(`Betting: ${currentBet.toFixed(7)} X ${currentPayout.toFixed(2)}`);
    });
  };
}

function logSummary() {
  const netNumber = runningBalance - originalBalance;
  const netPercentage = (netNumber / originalBalance) * 100;

  if (originalBalance < runningBalance) {
    log.success(`Total Profit: ${netNumber.toFixed(7)} (${netPercentage.toFixed(2)}%)`);
  } else {
    log.error(`Total Profit: ${netNumber.toFixed(7)} (${netPercentage.toFixed(2)}%)`);
  }
}
 

Edited by V35
Link to comment
Share on other sites

  • 5 weeks later...
  • 4 weeks later...
  • 2 weeks later...

@Piano

The answer is not really as i don't know what you mean about stops after 19 stages, but for hash dice, the best you can do is min bet.

Link to comment
Share on other sites

  • 1 month later...
  • 1 month later...

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...