Javascript - Change Random to 100% - 0.5% = 99.5% go random.
Budget: €30 – €250 EUR
I wanna start a mini and got a open source for it. Now I want that from the bettings 0.5% fixed stay in my cashier and 99.5% go into lets say "pot" and from there the Users wins... right now the Random Code is:
// Function to determine the crash point
function getCrashPoint() {
e = 2 ** 32
h = crypto.getRandomValues(new Uint32Array(1))[0]
// if h % (100 / desired_precentage) is 0 then the game will crash immediately
if (h % 33 == 0) return 1
return Math.floor((100 * e - h) / (e - h)) / 100
}
so it should be take 0.5% away from amount that users are playing in the round and 99.5% are payout random (dont means that every game must pay out 99.5% no,.. it can be every 10.000 game and give 1 user very high win but it should can come with low pot or with middle pot or with high pot.
Need it ASAP!
// Function to determine the crash point
function getCrashPoint() {
e = 2 ** 32
h = crypto.getRandomValues(new Uint32Array(1))[0]
// if h % (100 / desired_precentage) is 0 then the game will crash immediately
if (h % 33 == 0) return 1
return Math.floor((100 * e - h) / (e - h)) / 100
}
so it should be take 0.5% away from amount that users are playing in the round and 99.5% are payout random (dont means that every game must pay out 99.5% no,.. it can be every 10.000 game and give 1 user very high win but it should can come with low pot or with middle pot or with high pot.
Need it ASAP!