Giter Site home page Giter Site logo

bitburner-scripts's Introduction

Bitburner

Scripts for Bitburner.

If you're starting BitBurner and want all the Codez

Hi! Welcome, please look around. You are absolutely welcome and free to copy/paste, fork, splat, or whatever. The initial startup script and copy-paste instructions below I borrowed from https://github.com/moriakaice/bitburner/tree/master. That repo (at the time of this edit) doesn't work out of the box, but they're trying to be pretty new-player friendly. I recommend checking it out.

This repo.... is not especially new-player-friendly. If you want to take my repo whole-hog and run it in your own game (following the instructions below), it is unlikely to work unless you've been playing for a while. I started this repo primarily for myself, and the code makes some assumptions about certain features that are not available to new players. I also assume that there is at least 32GB of ram on your home computer, which is not immediately available to new players.

Also, be aware, I am not primarily a Javascript programmer, though it is something I enjoy playing with. I don't follow best practices in the industry for this language. If somebody says that the way I did something was not good, it probably is not good and trust other resources before you trust my code for the best way if you're learning.

Good luck, and have fun out there.

WARNINGS

  • This is an unstable repo. I regularly push untested code. I'm a rebel, I know.
  • This is an unstable repo. I change method signatures for the hell of it. Depend on nothing.
  • I'm a flake. If I haven't commited in a few weeks, it probably means I'm bored or got stuck and found something else to play with.
  • This does not work for new players. This repo uses methods that are locked behind game mechanics.
  • This contains spoilers. If you don't like spoilers, well... I warned you.

Installation

Create a new script called start.js by issuing the following command: nano start.js. Make sure you are on your home server; if you are not you can quickly go home by running home in the console.

Paste the following content:

export async function main(ns) {
  if (ns.getHostname() !== "home") {
    throw new Exception("Run the script from home");
  }

  let args = ns.flags([['branch', 'master']])

  await ns.wget(
    `https://raw.githubusercontent.com/hyrotos/bitburner-scripts/${args.branch}/src/initStartup.js?ts=${new Date().getTime()}`,
    "initStartup.js"
  );
  ns.spawn("initStartup.js", 1, '--branch', args.branch);
}

Save and exit nano and write in console: run start.js then press enter.

My aliases

// startup everything. If you've run this at least once and want to skip
// downloading/overwriting files, do `run startup/run.js` instead
alias startd="run start.js"
alias start="run startup/run.js"

// run arbitrary ns processes and helper functions, see doProcess for examples
alias do="run doProcess.js"

// connect to any server by name
alias find="run find.js"

// get server data about what the best server to hack might be right now
alias best="run bestHack.js"

// quickly tail the first personal server's moneymaking script
alias tail0="connect pserv-0; tail breadwinner.js; home"

// manipulate localStorage
alias get="run lsGet.js"
alias set="run lsSet.js"

// force crime.js/workForFactions.js to stop, so you can play in-game
alias working="run lsSet.js working"
alias done="run lsClear.js working"

// set a reserve amount manually, above reseved money for buying programs
alias reserve="run lsSet.js reserve"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.