콘텐츠로 건너뛰기
라이엇 비트

라이엇 비트

  • 집
  • 소식
  • 가이드
  • 비디오 가이드
  • 패치 노트
  • 남용 신고
  • 검색 양식 전환
비트버너

비트버너 – 모든 업그레이드를 위한 Hacknet 관리자 (완전 자동화)

에 게시됨 01/01/2022 에 의해 Laingsta 코멘트 없음 ~에 비트버너 – 모든 업그레이드를 위한 Hacknet 관리자 (완전 자동화)
  • 제목: 비트버너
  • 출시일:
  • 개발자:
  • 발행자:
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, purchase, 헹구고 반복하기.

메모: 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

스크립트 코드

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 (in = 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 라이엇 비트.

에 의해 구동 프레스북 뉴스 WordPress 테마