Saltar al contenido
Bits antidisturbios

Bits antidisturbios

  • Hogar
  • Noticias
  • Guías
  • Videoguías
  • Notas del parche
  • Reportar abuso
  • Alternar formulario de búsqueda
Quemador de bits

Quemador de bits – Hacknet Manager for All Upgrades (Automatización completa)

Publicado el 01/01/2022 Por Laingsta No hay comentarios en Quemador de bits – Hacknet Manager for All Upgrades (Automatización completa)
  • Título: Quemador de bits
  • Fecha de lanzamiento:
  • Revelador:
  • Editor:
Information about Bitburner is still incomplete. Por favor ayúdanos a completar los detalles del juego usando esto formulario de contacto.

This script will fully automate the purchase of all Hacknet upgrades in the fastest method possible. The fastest method is exponential returns awarded through selecting the cheapest upgrade at all times, therefore making your money work for you faster. Determine the cheapest upgrade, wait for funds, compra, enjuagar y repetir.

Nota: RAM Usage is 5.7GB

Create ES5 Script

This script utilizes ES5 JavaScript interpreter, otherwise referenced as Netscript 1.0 meaning a file extension of .script is required.

While inside the Bitburner Terminal create a new script by typing the following:

nano nameOfYourFile.script

Ejemplo: nano hacknet_infinite.script

Nota: This script requires 5.7GB of memory available

Script Code

Copy the contents of the script and save them into the new script file you just created.

//  Create Function to Return Balance
function myMoney() {
    return getServerMoneyAvailable("hogar");
}

//  Disable Logging for the Following Commands Below (We Dont Want To See Them While we Wait for Our Balance to Grow)
disableLog("getServerMoneyAvailable");
disableLog("dormir");

//  Create Function to Purchase Upgrade Based on 3 Flags for Node, Artículo, Cantidad 
//  # Note Qty is not utilised but the Framework is in Place to Future Proof
function purchase(nodo, artículo, qty){
    var node = node, item = item, qty = qty;
    
    si (item == "New Node"){
        hacknet.purchaseNode();
        imprimir("Purchasing New Node")
    }
    si (item == "LVL"){
        hacknet.upgradeLevel(nodo , qty)
        imprimir("Purchasing LVL Upgrade for Node: " + nodo)
    }
    si (item == "RAM"){
        hacknet.upgradeRam(nodo , qty)
        imprimir("Purchasing RAM Upgrade for Node: " + nodo)
    }
    si (item == "UPC"){
        hacknet.upgradeCore(nodo , qty)
        imprimir("Purchasing CPU Upgrade for Node: " + nodo)
    }
}

//  Create Function to Find the Cheapest Upgrade and Set Flags to be Used by the Purchase Function
//  We will set the Default Flags to Purchase a New Node, Only to be Overwritten if a Cheaper Option is Available
function check_cheapest() {
    var new_node_cost = hacknet.getPurchaseNodeCost();
    var node = "Por defecto";
    var item = "New Node";
    var qty = 1;
    var cheapest = new_node_cost;
    var node_qty = hacknet.numNodes();
    
    //  Iterate Through all Node Upgrade Options, Overwrite Flags if Cheaper Upgrade is Found
    for (var i = 0; i < node_qty; i ++) {
        var node_lvl = hacknet.getLevelUpgradeCost(i, 1);
        var node_ram = hacknet.getRamUpgradeCost(i, 1);
        var node_cpu = hacknet.getCoreUpgradeCost(i, 1);

        si (node_lvl < cheapest) {
               cheapest = node_lvl;
               node = i;
               item = "LVL";
        }
        si (node_ram < cheapest) {
              cheapest = node_ram;
               node = i;
               item = "RAM";
        }
        si (node_cpu < cheapest) {
               cheapest = node_cpu;
               node = i;
               item = "UPC";
        }
}

    //  I am not a JavaScript Programmer so I am not Adept at String Manipulation in this Language
    //  Print a Summary Log of Cheapest Upgrade Found
    print("")
    imprimir("Cheapest Hacknet Upgrade Available;")
    imprimir("Nodo             : " + nodo);
    imprimir("Artículo             : " + artículo);
    imprimir("Cantidad              : " + qty);
    imprimir("")
    imprimir("Current Balance  : $" + myMoney());
    imprimir("Upgrade Cost     : $" + cheapest);
    imprimir("")

    //  After Determining the Cheapest Upgrade we will wait for Balance to Increase Enough to Purchase (This is why we turned off logging)
    mientras (myMoney() < cheapest) {
        imprimir("Waiting for funds to increase")
        dormir(3000);
    }
    
    //  Call the Purchase Function
    purchase(nodo, artículo, qty);
}

//  Run the Cheapest Upgrade Function in an Infinite Loop
while(verdadero) {
	check_cheapest()
}

Uso

After saving the script you can run it by typing:

run nameOfYourScript.script

Ejemplo: run hacknet_infinity.script

Under the Hood

This script iterates through all upgrade options sets flags for the cheapest option and waits until there are enough funds to purchase.

Actualmente, it does not utilize the quantity function, as the cheapest option is always to purchase in single units to get your money working for you faster under the passive income method. This is why the variable Qty is set to 1 and not overwritten in the loop.

If you read through the Hacknet API on the official website there is an example script that uses a value of 10 when purchasing basic levels for Nodes. IMO buying single units will net you more money in the long run due to exponential returns from the smaller purchases of single levels.

I am not a JavaScript programmer, I went into this game with zero knowledge of this language only having a background in Python. Would appreciate it if somebody wants to do some string manipulation for me on the summary section of the script to tidy it up on fewer lines. \n\n 🙂

P.S This is not Asynchronous as there is no benefit in multi-threading this task. No matter how many resources you have your bottleneck is the bank balance. Therefore implementation through .script is not only appropriate it is optimal as it makes use of less memory-intensive commands.

Eso es todo lo que estamos compartiendo hoy para este Quemador de bits guía. Esta guía fue originalmente creada y escrita por Laingsta. En caso de que no actualicemos esta guía, puede encontrar la última actualización siguiendo este enlace.

Si cree que alguno de los contenidos de este sitio viola sus derechos, incluyendo sus derechos de propiedad intelectual, por favor contáctenos inmediatamente usando nuestro formulario de contacto.
Guías Etiquetas:Quemador de bits

Navegación de entradas

Publicación anterior: Dark Souls III Beginner’s Tips and Tricks for the Single and Multiplayer Mode
Publicación siguiente: Estación espacial 14 – Guía de piratería (Muros y ventanas incluidos)

Deja una respuesta Cancelar la respuesta

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *

  • Título: Quemador de bits
  • Fecha de lanzamiento:
  • Revelador:
  • Editor:
Information about Bitburner is still incomplete. Por favor ayúdanos a completar los detalles del juego usando esto formulario de contacto.

Descargo de responsabilidad

Todo el contenido citado se deriva de sus respectivas fuentes.. Si cree que hemos utilizado su contenido sin permiso, asegúrese de comunicarse con nosotros y lo tomaremos en serio.
  • Sobre nosotros
  • Contáctenos
  • política de privacidad
  • Términos de servicio

Derechos de autor © 2025 Bits antidisturbios.

Funciona con Tema PressBook Noticias para WordPress