コンテンツにスキップ
ライオットビット

ライオットビット

  • 家
  • ニュース
  • ガイド
  • ビデオガイド
  • パッチノート
  • 不正行為を報告する
  • 検索フォームを切り替え
ビットバーナー

ビットバーナー – Hacknet Manager for All Upgrades (フルオートメーション)

ポストする 01/01/2022 に Laingsta コメントはありません の上 ビットバーナー – Hacknet Manager for All Upgrades (フルオートメーション)
  • タイトル: ビットバーナー
  • 発売日:
  • 開発者:
  • 出版社:
Bitburner に関する情報はまだ不完全です. これを使用してゲームの詳細を記入するのにご協力ください。 お問い合わせフォーム.

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, 購入, 洗い流して繰り返します.

ノート: 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

例: nano hacknet_infinite.script

ノート: 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("家");
}

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

//  Create Function to Purchase Upgrade Based on 3 Flags for Node, アイテム, Qty 
//  # Note Qty is not utilised but the Framework is in Place to Future Proof
function purchase(ノード, アイテム, qty){
    var node = node, item = item, qty = qty;
    
    もし (item == "New Node"){
        hacknet.purchaseNode();
        print("Purchasing New Node")
    }
    もし (item == "LVL"){
        hacknet.upgradeLevel(ノード , qty)
        print("Purchasing LVL Upgrade for Node: " + ノード)
    }
    もし (item == "ラム"){
        hacknet.upgradeRam(ノード , qty)
        print("Purchasing RAM Upgrade for Node: " + ノード)
    }
    もし (item == "CPU"){
        hacknet.upgradeCore(ノード , qty)
        print("Purchasing CPU Upgrade for Node: " + ノード)
    }
}

//  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 = "デフォルト";
    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; 私 < node_qty; i++) {
        var node_lvl = hacknet.getLevelUpgradeCost(私, 1);
        var node_ram = hacknet.getRamUpgradeCost(私, 1);
        var node_cpu = hacknet.getCoreUpgradeCost(私, 1);

        もし (node_lvl < cheapest) {
               cheapest = node_lvl;
               node = i;
               item = "LVL";
        }
        もし (node_ram < cheapest) {
              cheapest = node_ram;
               node = i;
               item = "ラム";
        }
        もし (node_cpu < cheapest) {
               cheapest = node_cpu;
               node = i;
               item = "CPU";
        }
}

    //  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("")
    print("Cheapest Hacknet Upgrade Available;")
    print("Node             : " + ノード);
    print("アイテム             : " + アイテム);
    print("Qty              : " + qty);
    print("")
    print("Current Balance  : $" + myMoney());
    print("Upgrade Cost     : $" + cheapest);
    print("")

    //  After Determining the Cheapest Upgrade we will wait for Balance to Increase Enough to Purchase (This is why we turned off logging)
    その間 (myMoney() < cheapest) {
        print("Waiting for funds to increase")
        寝る(3000);
    }
    
    //  Call the Purchase Function
    purchase(ノード, アイテム, qty);
}

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

使用法

After saving the script you can run it by typing:

run nameOfYourScript.script

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

現在, 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.

これが今日私たちがこの目的で共有するすべてです ビットバーナー ガイド. このガイドは元々、次の者によって作成および執筆されました。 Laingsta. このガイドを更新できなかった場合, これに従って最新のアップデートを見つけることができます リンク.

このサイトのコンテンツがあなたの権利を侵害していると思われる場合, あなたの知的財産権を含む, お問い合わせフォームを使用してすぐにご連絡ください.
ガイド タグ:ビットバーナー

ポストナビゲーション

前の投稿: Dark Souls III Beginner’s Tips and Tricks for the Single and Multiplayer Mode
次の投稿: 宇宙ステーション 14 – Door Hacking Guide (Walls and Windows Included)

返信を残す 返信をキャンセル

あなたのメールアドレスは公開されません. 必須フィールドにマークが付いています *

  • タイトル: ビットバーナー
  • 発売日:
  • 開発者:
  • 出版社:
Bitburner に関する情報はまだ不完全です. これを使用してゲームの詳細を記入するのにご協力ください。 お問い合わせフォーム.

免責事項

引用されたすべてのコンテンツはそれぞれの情報源から得られています. 当社があなたのコンテンツを許可なく使用したと思われる場合, 必ずご連絡ください。真剣に対応させていただきます.
  • 私たちに関しては
  • お問い合わせ
  • プライバシーポリシー
  • 利用規約

著作権 © 2025 ライオットビット.

搭載 プレスブックニュース ワードプレスのテーマ