Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

My Limbo Script #2

Open
SiT1991 opened this issue Jun 9, 2024 · 5 comments
Open

My Limbo Script #2

SiT1991 opened this issue Jun 9, 2024 · 5 comments

Comments

@SiT1991
Copy link

SiT1991 commented Jun 9, 2024

Hey, I noticed nobody has started yet, so I'll do it now. Hereby, I present to you my versatile customizable script for Limbo.

var chance = getRandomNumber();
var nextbet = 0.001; // TRX min: 0.00017002;
var basebet = nextbet;
var betCount = 0; // Zähler für die Anzahl der Wetten

function getRandomNumber() {
    const randomNumber = Math.random();
    const lowProbability = 0.3;
    const mediumProbability = 0.3;
    const highProbability = 0.4;

    if (randomNumber < lowProbability) {
        return Math.random() * (45.0 - 34.1) + 0.0001;
    } else if (randomNumber < lowProbability + mediumProbability) {
        return Math.random() * (25.01980198 - 0.01980198) + 0.1;
    } else {
        return Math.random() * (0.10019900 - 0.00109900) + 0.001;
    }
}

// Beispiel für die Definition der win-Bedingung
var win = false; // Dies ist nur ein Platzhalter.

function resetSeed() {
    log("Resetting seed...");
    resetseed('clientseed'); // Hier wird der Seed zurückgesetzt
}

function dobet() {
  betCount++;
  if (betCount >= 10000) {
    resetSeed();
    betCount = 0; // Zurücksetzen des Zählers nach dem Seed-Reset
  }
  
  if (win) {
    nextbet = basebet;
  } else {
    // Setze die chance auf eine neue zufällige Zahl
    chance = getRandomNumber();
  }
  log("Betting " + nextbet + " on " + chance + " chance. Bet count: [" + betCount +"]");
}

// Beispiel für einen Aufruf der dobet-Funktion
dobet();

This script serves as a foundation for an automated betting procedure within a gambling system. It generates random betting chances, periodically resets the seed, and adjusts the betting amount based on the results. The script is flexible and can be further customized to implement specific win conditions or other betting strategies.

Customizable Parameters and Their Functions

This script contains several parameters that can be adjusted to influence the betting strategy and system behavior. Here are the key parameters and an explanation of their functions:

nextbet

  • Description: This is the amount of the next bet.
  • Default Value: 0.001 TRX
  • Function: Determines the initial and base amount for each bet. This amount is doubled after each loss or reset to the base value when a bet is won.

basebet

  • Description: This is the base betting amount.
  • Default Value: nextbet
  • Function: Stores the original betting amount to which nextbet is reset when a bet is won.

betCount

  • Description: Counter for the number of placed bets.
  • Default Value: 0
  • Function: Tracks the number of placed bets. After 1000 bets, the seed is reset, and the counter is reset to 0.

lowProbability, mediumProbability, highProbability

  • Description: These probabilities determine the distribution of the random numbers generated by the getRandomNumber function.
  • Default Values: 0.3, 0.3, 0.4
  • Function: Determine how often certain ranges of random numbers are selected. For example, lowProbability = 0.3 means there is a 30% chance that a random number will be generated in the low range.

Random Number Ranges in getRandomNumber

  • Description: These ranges determine the possible values generated by the getRandomNumber function.
    • Low Range: 34.1 to 45.0
    • Medium Range: 0.01980198 to 25.01980198
    • High Range: 0.00109900 to 0.10019900
  • Function: Determine the specific ranges of random numbers generated depending on the probability. These ranges can be adjusted to alter the betting odds.

win

  • Description: A placeholder for the win logic.
  • Default Value: false
  • Function: Used to determine whether the last bet was won. This variable should be updated based on the actual win logic of the game.

resetseed('clientseed')

  • Description: This function resets the seed.
  • Function: Resets the seed of the random number generator to reinitialize the random number distribution after a certain number of bets. This is called after 1000 bets.

Summary

By adjusting these parameters, various aspects of the betting strategy can be modified, including the bet amounts, the frequency of seed resets, and the distribution of random numbers. This allows for flexible customization of the script to different gaming scenarios and betting strategies.

@poky1084
Copy link
Owner

poky1084 commented Jun 9, 2024

Thank you for sharing your work, Hope it will make more greens for everyone!

@SiT1991
Copy link
Author

SiT1991 commented Jun 10, 2024

Here an edit with the resetseed funktion:
Its resets the seed after 1000 Rolls you can change it by editing if (betCount >= 1000) {

var chance = getRandomNumber();
var nextbet = 0.001911; // TRX min: 0.00017002;
var basebet = nextbet;
var betCount = 0; // Zähler für die Anzahl der Wetten

function getRandomNumber() {
    const randomNumber = Math.random();
    const lowProbability = 0.1;
    const mediumProbability = 0.3;
    const highProbability = 0.5;

    if (randomNumber < lowProbability) {
        return Math.random() * (5.0 - 1.1) + 1.1;
    } else if (randomNumber < lowProbability + mediumProbability) {
        return Math.random() * (1.01980198 - 0.01219900) +  1.1098019;
    } else {
        return Math.random() * (0.00119900 - 0.00009900) + 0.00009900;
    }
}

// Beispiel für die Definition der win-Bedingung
var win = false;

function generateRandomSeed(length) {
    const characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*()';
    let result = '';
    for (let i = 0; i < length; i++) {
        const randomIndex = Math.floor(Math.random() * characters.length);
        result += characters[randomIndex];
    }
    return result;
}

function resetSeed() {
    const newSeed = generateRandomSeed(10);
    log("Resetting seed to " + newSeed + "...");
    resetseed(newSeed); // Hier wird der Seed zurückgesetzt
}

function dobet() {
  betCount++;
  if (betCount >= 1000) {
    resetSeed();
    betCount = 0; // Zurücksetzen des Zählers nach dem Seed-Reset
  }
  
  if (win) {
    nextbet = basebet;
  } else {
    chance = getRandomNumber();
  }
  log("Betting " + nextbet + " on " + chance + " chance. Bet count: [" + betCount +"]");
}

// Beispiel für einen Aufruf der dobet-Funktion
dobet();

@SiT1991
Copy link
Author

SiT1991 commented Jun 10, 2024

Here a Preview of a 10 Hours run on min bet size ;)
Desktop Screenshot 2024 06 10 - 23 43 29 36

@SiT1991
Copy link
Author

SiT1991 commented Jun 14, 2024

Here is an update details comming sone:

/**
 * Berechnet die Chance basierend auf dem Multiplikator.
 * @param {number} multiplier - Der Multiplikator.
 * @returns {number} - Die berechnete Chance.
 */
function calculateChanceFromMultiplier(multiplier) {
    return (1 / multiplier) * 100;
}

var nextbet = 0.001345212; // Startbetrag der Wette (TRX min: 0.00017002)
var basebet = nextbet; // Basiswette, auf die nach einem Gewinn zurückgesetzt wird
var betCount = 0; // Zähler für die Anzahl der Wetten
var rseedcounter = 1000; // Zähler für das Zurücksetzen des Seeds

// Wahrscheinlichkeitskonstanten
LOW_PROBABILITY = 0.5;
MEDIUM_PROBABILITY = 0.3;
HIGH_PROBABILITY = 0.2; // big hits: 0.5

// Multiplikatoren
var chlow = 999.0; // Multiplikator für niedrige Wahrscheinlichkeit
var chlow_b = 9100.0; // Oberer Bereich des niedrigen Multiplikators
var chmed = 1000.0; // Multiplikator für mittlere Wahrscheinlichkeit
var chmed_b = 100000.0; // Oberer Bereich des mittleren Multiplikators
var chhigh = 100000.0; // Multiplikator für hohe Wahrscheinlichkeit
var chhigh_b = 1000000.0; // Oberer Bereich des hohen Multiplikators

/**
 * Generiert eine zufällige Zahl basierend auf definierten Wahrscheinlichkeiten.
 * @returns {number} - Die berechnete Chance.
 */
function getRandomNumber() {
    const randomNumber = Math.random();

    let multiplier;

    if (randomNumber < LOW_PROBABILITY) {
        // Zufälliger Multiplikator im Bereich niedriger Wahrscheinlichkeit
        multiplier = Math.random() * (chlow - chlow_b) + chlow_b;
    } else if (randomNumber < LOW_PROBABILITY + MEDIUM_PROBABILITY) {
        // Zufälliger Multiplikator im Bereich mittlerer Wahrscheinlichkeit
        multiplier = Math.random() * (chmed - chmed_b) + chmed_b;
    } else {
        // Zufälliger Multiplikator im Bereich hoher Wahrscheinlichkeit
        multiplier = Math.random() * (chhigh - chhigh_b) + chhigh_b;
    }

    return calculateChanceFromMultiplier(multiplier);
}

// Platzhalter für die Definition der Gewinnbedingung
var win = false; // Dies ist nur ein Platzhalter. In deinem Kontext solltest du die tatsächliche Gewinnlogik implementieren.

/**
 * Generiert eine kryptographisch sichere zufällige Zeichenkette.
 * @returns {string} - Die generierte Zeichenkette.
 */
function generateRandomSeed() {
    const characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*()';
    const length = Math.floor(Math.random() * 11) + 10; // Zufällige Länge zwischen 10 und 20
    let array = new Uint32Array(length);
    window.crypto.getRandomValues(array);
    let result = '';
    for (let i = 0; i < length; i++) {
        result += characters[array[i] % characters.length];
    }
    return result;
}

/**
 * Setzt den Seed auf eine neue zufällige Zeichenkette zurück.
 */
function resetSeed() {
    const newSeed = generateRandomSeed();
    log("Resetting seed to " + newSeed + "...");
    resetseed(newSeed); // Hier wird der Seed zurückgesetzt
}

/**
 * Führt eine Wette durch und aktualisiert den Zustand basierend auf dem Ergebnis.
 */
function dobet() {
    betCount++;
    if (betCount >= rseedcounter) {
        // Seed zurücksetzen, wenn der Zähler den Schwellenwert erreicht
        resetSeed();
        betCount = 0; // Zurücksetzen des Zählers nach dem Seed-Reset
    }
  
    if (win) {
        // Bei Gewinn wird der nächste Wetteinsatz auf die Basiswette zurückgesetzt
        nextbet = basebet;
    } else {
        // Bei Verlust wird eine neue zufällige Chance generiert
        chance = getRandomNumber();
    }
    log("Betting " + nextbet + " on " + chance + " chance. Bet count: [" + betCount + "]");
}

// Beispiel für einen Aufruf der dobet-Funktion
dobet();

@Peeter-droid
Copy link

Peeter-droid commented Oct 18, 2024

Here a Preview of a 10 Hours run on min bet size ;) Desktop Screenshot 2024 06 10 - 23 43 29 36

Bro can u please provide the exact script, the one you are using in this screenshot because im not able to understand what values should i put for different probabilities and the codes you provided has different values than the one you are using in this screenshot, so it would have been a great help if you could have provided the exact script and your own values where you tested it for 10 hours

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants