mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-16 14:28:36 +02:00
Compare commits
204 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
31e9f65f06 | ||
|
|
4ce7981cc0 | ||
|
|
d6016f490c | ||
|
|
9ccdd7f4e5 | ||
|
|
def3846b72 | ||
|
|
c76110b575 | ||
|
|
3db440fd95 | ||
|
|
1df0af0fa4 | ||
|
|
f8d65b9240 | ||
|
|
a4fe6d80d6 | ||
|
|
3a31ebdce3 | ||
|
|
8b812b92cc | ||
|
|
2ce6ff2041 | ||
|
|
a00c253dcb | ||
|
|
123628ec0b | ||
|
|
cae28e2d25 | ||
|
|
486d025572 | ||
|
|
d4816ad0c4 | ||
|
|
e7dbc08e18 | ||
|
|
0483c809ff | ||
|
|
cd972dabe3 | ||
|
|
e2a353fc8a | ||
|
|
1b8214b6fa | ||
|
|
af584e8c87 | ||
|
|
250841df66 | ||
|
|
d9aef91ea3 | ||
|
|
c285d494b9 | ||
|
|
316a1aa475 | ||
|
|
56a3660d38 | ||
|
|
e1aec379c1 | ||
|
|
381ea915f7 | ||
|
|
619db14622 | ||
|
|
84423e6309 | ||
|
|
1d2136da4b | ||
|
|
56441b8e34 | ||
|
|
5106315128 | ||
|
|
6ca7f10faf | ||
|
|
56802fc85e | ||
|
|
700583a739 | ||
|
|
a290b0bef5 | ||
|
|
79a06dd91c | ||
|
|
6cd6f28820 | ||
|
|
dabb5016fc | ||
|
|
58e38faad6 | ||
|
|
31e8ca8c8d | ||
|
|
c72519e3ea | ||
|
|
58333c1b46 | ||
|
|
f0ad090cdc | ||
|
|
4bd1fce1f6 | ||
|
|
b35e25e5dc | ||
|
|
a8bb345c88 | ||
|
|
bbe4f9c286 | ||
|
|
f9dcefd6ea | ||
|
|
44c2bab557 | ||
|
|
fbca5a4d8f | ||
|
|
c2ceaa9bdd | ||
|
|
dc402bef68 | ||
|
|
64272c99fb | ||
|
|
c8377c0bb3 | ||
|
|
4145ddad39 | ||
|
|
e9dfe3c389 | ||
|
|
f9162e4d30 | ||
|
|
b97fab2bf4 | ||
|
|
3c9ebb75fe | ||
|
|
434a522429 | ||
|
|
49fa63971b | ||
|
|
8dfc563c86 | ||
|
|
dded9103cb | ||
|
|
741f57e9e2 | ||
|
|
59cf1d5baf | ||
|
|
916ef06913 | ||
|
|
91ee65a101 | ||
|
|
042f926700 | ||
|
|
c0432359c3 | ||
|
|
fbf5545708 | ||
|
|
6ae7b0136c | ||
|
|
200ccd3ad0 | ||
|
|
31f97f74fd | ||
|
|
4cabd2e4ed | ||
|
|
8be7fa9157 | ||
|
|
8ddf7dfbd4 | ||
|
|
571ddb109a | ||
|
|
b2772bbfc1 | ||
|
|
57815ac6a0 | ||
|
|
758f329d14 | ||
|
|
096f984d6b | ||
|
|
06cd584f10 | ||
|
|
4f2f75762c | ||
|
|
d94516f39b | ||
|
|
b479a3570e | ||
|
|
ac49b8074f | ||
|
|
7a49a5b3e8 | ||
|
|
6d9e6e6466 | ||
|
|
2d179199ed | ||
|
|
dc928828e2 | ||
|
|
658df9fb01 | ||
|
|
44bf3cb101 | ||
|
|
b82d7c12af | ||
|
|
4476d6b258 | ||
|
|
433b399de9 | ||
|
|
58d04c0cbb | ||
|
|
e3a74f23a1 | ||
|
|
3a374de210 | ||
|
|
4cc6437408 | ||
|
|
821725cf4d | ||
|
|
931de230ae | ||
|
|
7301946236 | ||
|
|
a15041da75 | ||
|
|
00f8c0a51f | ||
|
|
63483837bc | ||
|
|
dc5f4e6694 | ||
|
|
35f8a5115a | ||
|
|
8398fd47f0 | ||
|
|
9d7c869c0a | ||
|
|
74587f269e | ||
|
|
6a3ffff3ad | ||
|
|
2f8eac07ee | ||
|
|
3eaefa01f9 | ||
|
|
b250af913d | ||
|
|
0b4968d148 | ||
|
|
8817d179c6 | ||
|
|
e5e3fec1a9 | ||
|
|
eecb0c0f01 | ||
|
|
d45689c7df | ||
|
|
2201dfc371 | ||
|
|
3ef9042051 | ||
|
|
1236ad252b | ||
|
|
65331ab22e | ||
|
|
c485fdfa87 | ||
|
|
6effda29a9 | ||
|
|
7035154454 | ||
|
|
d7f3ab9177 | ||
|
|
3660dde75f | ||
|
|
99688b78c7 | ||
|
|
6841f24932 | ||
|
|
9f94d0838a | ||
|
|
086fc67ecc | ||
|
|
a2551f98c2 | ||
|
|
95c928afc9 | ||
|
|
8a00e6e532 | ||
|
|
287a97aea6 | ||
|
|
664267bff0 | ||
|
|
2597b33f81 | ||
|
|
9442b348e6 | ||
|
|
3b7f9c9fb0 | ||
|
|
20ca7533b0 | ||
|
|
15a324a946 | ||
|
|
94175877d7 | ||
|
|
c1ec3c5eba | ||
|
|
42804b0cd3 | ||
|
|
b1248521f3 | ||
|
|
b744997c72 | ||
|
|
2d37409392 | ||
|
|
bd02e724e5 | ||
|
|
fef7aaba8f | ||
|
|
1775ea86ff | ||
|
|
b0918d7bd3 | ||
|
|
29e0ce5f96 | ||
|
|
44c26165f4 | ||
|
|
9dd68947f1 | ||
|
|
db5fdb1fcb | ||
|
|
74e72854d8 | ||
|
|
ece246b391 | ||
|
|
cdb5dfec62 | ||
|
|
8a5b6f6cbc | ||
|
|
585e1ac7aa | ||
|
|
8726946d4a | ||
|
|
064008d200 | ||
|
|
d955280f90 | ||
|
|
580a7fac24 | ||
|
|
9df054dd0c | ||
|
|
8fa7b112e1 | ||
|
|
dd9df0a18c | ||
|
|
3a601a015d | ||
|
|
87b4698d5b | ||
|
|
67632ced09 | ||
|
|
d7fb335815 | ||
|
|
4809a21e38 | ||
|
|
6b3646e981 | ||
|
|
0c64bf470a | ||
|
|
99e034921e | ||
|
|
7a3a3de7d1 | ||
|
|
f91c5bd7b9 | ||
|
|
bcb198220d | ||
|
|
bf1af6a68c | ||
|
|
3dd2975c61 | ||
|
|
33f1e0cb3c | ||
|
|
7514f63dcd | ||
|
|
b6ff73391d | ||
|
|
369ea8d381 | ||
|
|
a7296c512c | ||
|
|
8f70817c10 | ||
|
|
7417fb6ef8 | ||
|
|
d044739f1c | ||
|
|
3d1684f825 | ||
|
|
f6af9e94ab | ||
|
|
215cf59e0b | ||
|
|
0d14cd6e7e | ||
|
|
98a04e4932 | ||
|
|
8d33c5b571 | ||
|
|
221b81d802 | ||
|
|
df89cc5002 | ||
|
|
3b6b37f8a6 | ||
|
|
cf2acb8844 |
6
.gitignore
vendored
6
.gitignore
vendored
@@ -3,6 +3,6 @@ Netburner.txt
|
||||
/doc/build
|
||||
/node_modules
|
||||
/dist/*.map
|
||||
/tests/*.map
|
||||
/tests/*.bundle.*
|
||||
/tests/*.css
|
||||
/test/*.map
|
||||
/test/*.bundle.*
|
||||
/test/*.css
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# Bitburner
|
||||
Bitburner is a cyberpunk hacking-themed incremental game. The game can be
|
||||
played at https://danielyxie.github.io/bitburner.
|
||||
Bitburner is a programming-based [incremental game](https://en.wikipedia.org/wiki/Incremental_game)
|
||||
that revolves around hacking and cyberpunk themes.
|
||||
The game can be played at https://danielyxie.github.io/bitburner.
|
||||
|
||||
# Documentation
|
||||
The game's official documentation can be found on [Read The
|
||||
|
||||
126
css/activescripts.scss
Normal file
126
css/activescripts.scss
Normal file
@@ -0,0 +1,126 @@
|
||||
@import "theme";
|
||||
|
||||
.active-scripts-list {
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
#active-scripts-container {
|
||||
position: fixed;
|
||||
padding-top: 10px;
|
||||
|
||||
> p {
|
||||
width: 70%;
|
||||
margin: 6px;
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
.accordion-header {
|
||||
> pre {
|
||||
color: white;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.active-scripts-server-header {
|
||||
background-color: #444;
|
||||
font-size: $defaultFontSize * 1.25;
|
||||
color: #fff;
|
||||
margin: 6px 6px 0 6px;
|
||||
padding: 6px;
|
||||
cursor: pointer;
|
||||
width: 60%;
|
||||
text-align: left;
|
||||
border: none;
|
||||
outline: none;
|
||||
|
||||
&:after {
|
||||
content: '\02795'; /* "plus" sign (+) */
|
||||
font-size: $defaultFontSize * 0.8125;
|
||||
color: #fff;
|
||||
float: right;
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
&.active, &:hover {
|
||||
background-color: #555;
|
||||
}
|
||||
}
|
||||
|
||||
.active-scripts-server-header.active {
|
||||
&:after {
|
||||
content: "\2796"; /* "minus" sign (-) */
|
||||
font-size: $defaultFontSize * 0.8125;
|
||||
color: #fff;
|
||||
float: right;
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background-color: #666;
|
||||
}
|
||||
}
|
||||
|
||||
.active-scripts-server-panel {
|
||||
margin: 0 6px 6px 6px;
|
||||
padding: 0 6px 6px 6px;
|
||||
width: 55%;
|
||||
margin-left: 5%;
|
||||
display: none;
|
||||
|
||||
div, ul, ul > li {
|
||||
background-color: #555;
|
||||
}
|
||||
}
|
||||
|
||||
.active-scripts-script-header {
|
||||
background-color: #555;
|
||||
border: none;
|
||||
color: var(--my-font-color);
|
||||
cursor: pointer;
|
||||
display: block;
|
||||
outline: none;
|
||||
padding: 4px 25px 4px 10px;
|
||||
position: relative;
|
||||
text-align: left;
|
||||
width: auto;
|
||||
|
||||
&:after {
|
||||
content: '\02795'; /* "plus" sign (+) */
|
||||
font-size: $defaultFontSize * 0.8125;
|
||||
float: right;
|
||||
margin-left: 5px;
|
||||
color: transparent;
|
||||
text-shadow: 0 0 0 var(--my-font-color);
|
||||
position: absolute;
|
||||
bottom: 4px;
|
||||
}
|
||||
|
||||
&.active:after {
|
||||
content: "\2796"; /* "minus" sign (-) */
|
||||
}
|
||||
|
||||
&:hover,
|
||||
&.active:hover {
|
||||
background-color: #666;
|
||||
}
|
||||
|
||||
&.active {
|
||||
background-color: #555;
|
||||
}
|
||||
}
|
||||
|
||||
.active-scripts-script-panel {
|
||||
background-color: #555;
|
||||
display: none;
|
||||
font-size: 14px;
|
||||
margin-bottom: 6px;
|
||||
padding: 0 18px;
|
||||
width: auto;
|
||||
|
||||
pre, h2, ul, li {
|
||||
background-color: #555;
|
||||
width: auto;
|
||||
color: #fff;
|
||||
margin-left: 5%;
|
||||
}
|
||||
}
|
||||
31
css/augmentations.scss
Normal file
31
css/augmentations.scss
Normal file
@@ -0,0 +1,31 @@
|
||||
/**
|
||||
* Styling for the Augmentations UI. This is the page that displays all of the
|
||||
* player's owned and purchased Augmentations and Source-Files. It also allows
|
||||
* the player to install Augmentations
|
||||
*/
|
||||
@import "theme";
|
||||
|
||||
#augmentations-container {
|
||||
position: fixed;
|
||||
padding-top: 10px;
|
||||
}
|
||||
|
||||
#augmentations-content {
|
||||
> p {
|
||||
font-size: $defaultFontSize * 0.875;
|
||||
width: 70%;
|
||||
}
|
||||
}
|
||||
|
||||
.augmentations-list {
|
||||
button,
|
||||
div {
|
||||
color: var(--my-font-color);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
button {
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -59,10 +59,16 @@
|
||||
}
|
||||
|
||||
#character-hp-wrapper { color: $my-stat-hp-color; }
|
||||
.character-hp-cell { color: $my-stat-hp-color; }
|
||||
#character-money-wrapper { color: $my-stat-money-color; }
|
||||
.character-money-cell { color: $my-stat-money-color; }
|
||||
#character-hack-wrapper { color: $my-stat-hack-color; }
|
||||
.character-hack-cell { color: $my-stat-hack-color; }
|
||||
#character-cha-wrapper { color: $my-stat-cha-color; }
|
||||
.character-cha-cell { color: $my-stat-cha-color; }
|
||||
#character-int-wrapper { color: $my-stat-int-color; }
|
||||
.character-int-cell { color: $my-stat-int-color; }
|
||||
.character-combat-cell { color: $my-stat-physical; }
|
||||
|
||||
.character-overview-btn {
|
||||
@include borderRadius(12px);
|
||||
|
||||
@@ -18,126 +18,6 @@
|
||||
position: fixed;
|
||||
}
|
||||
|
||||
/* Active scripts */
|
||||
.active-scripts-list {
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
#active-scripts-container {
|
||||
position: fixed;
|
||||
padding-top: 10px;
|
||||
}
|
||||
|
||||
#active-scripts-text,
|
||||
#active-scripts-total-prod {
|
||||
width: 70%;
|
||||
margin: 6px;
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
.active-scripts-server-header {
|
||||
background-color: #444;
|
||||
font-size: $defaultFontSize * 1.25;
|
||||
color: #fff;
|
||||
margin: 6px 6px 0 6px;
|
||||
padding: 6px;
|
||||
cursor: pointer;
|
||||
width: 60%;
|
||||
text-align: left;
|
||||
border: none;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.active-scripts-server-header.active,
|
||||
.active-scripts-server-header:hover {
|
||||
background-color: #555;
|
||||
}
|
||||
|
||||
.active-scripts-server-header.active:hover {
|
||||
background-color: #666;
|
||||
}
|
||||
|
||||
.active-scripts-server-header:after {
|
||||
content: '\02795'; /* "plus" sign (+) */
|
||||
font-size: $defaultFontSize * 0.8125;
|
||||
color: #fff;
|
||||
float: right;
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
.active-scripts-server-header.active:after {
|
||||
content: "\2796"; /* "minus" sign (-) */
|
||||
font-size: $defaultFontSize * 0.8125;
|
||||
color: #fff;
|
||||
float: right;
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
.active-scripts-server-panel {
|
||||
margin: 0 6px 6px 6px;
|
||||
padding: 0 6px 6px 6px;
|
||||
width: 55%;
|
||||
margin-left: 5%;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.active-scripts-server-panel div,
|
||||
.active-scripts-server-panel ul,
|
||||
.active-scripts-server-panel ul > li {
|
||||
background-color: #555;
|
||||
}
|
||||
|
||||
.active-scripts-script-header {
|
||||
background-color: #555;
|
||||
color: var(--my-font-color);
|
||||
padding: 4px 25px 4px 10px;
|
||||
cursor: pointer;
|
||||
width: auto;
|
||||
text-align: left;
|
||||
border: none;
|
||||
outline: none;
|
||||
position: relative;
|
||||
|
||||
&:after {
|
||||
content: '\02795'; /* "plus" sign (+) */
|
||||
font-size: $defaultFontSize * 0.8125;
|
||||
float: right;
|
||||
margin-left: 5px;
|
||||
color: transparent;
|
||||
text-shadow: 0 0 0 var(--my-font-color);
|
||||
position: absolute;
|
||||
bottom: 4px;
|
||||
}
|
||||
|
||||
&.active:after {
|
||||
content: "\2796"; /* "minus" sign (-) */
|
||||
}
|
||||
|
||||
&:hover,
|
||||
&.active:hover {
|
||||
background-color: #666;
|
||||
}
|
||||
|
||||
&.active {
|
||||
background-color: #555;
|
||||
}
|
||||
}
|
||||
|
||||
.active-scripts-script-panel {
|
||||
padding: 0 18px;
|
||||
background-color: #555;
|
||||
width: auto;
|
||||
display: none;
|
||||
margin-bottom: 6px;
|
||||
|
||||
p, h2, ul, li {
|
||||
background-color: #555;
|
||||
width: auto;
|
||||
color: #fff;
|
||||
margin-left: 5%;
|
||||
}
|
||||
}
|
||||
|
||||
/* World */
|
||||
#world-container {
|
||||
position: fixed;
|
||||
@@ -185,19 +65,6 @@
|
||||
width: 70%;
|
||||
}
|
||||
|
||||
#faction-donate-amount-txt,
|
||||
#faction-donate-input {
|
||||
padding: 6px;
|
||||
margin: 6px;
|
||||
display: inline-block;
|
||||
color: var(--my-font-color);
|
||||
background-color: #000;
|
||||
}
|
||||
|
||||
#faction-donate-amount-txt {
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
#faction-container p,
|
||||
#faction-container pre {
|
||||
padding: 4px 6px;
|
||||
@@ -213,45 +80,12 @@
|
||||
word-wrap: break-word; /* Internet Explorer 5.5+ */
|
||||
}
|
||||
|
||||
/* Faction Augmentations */
|
||||
#faction-augmentations-container {
|
||||
position: fixed;
|
||||
padding-top: 10px;
|
||||
|
||||
p, a, ul, h1 {
|
||||
margin: 8px;
|
||||
padding: 4px;
|
||||
}
|
||||
}
|
||||
|
||||
/* World */
|
||||
#world-container li {
|
||||
margin: 0 0 15px 0;
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
/* Augmentations */
|
||||
#augmentations-container {
|
||||
position: fixed;
|
||||
padding-top: 10px;
|
||||
}
|
||||
|
||||
.augmentations-list {
|
||||
button,
|
||||
div {
|
||||
color: var(--my-font-color);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
button {
|
||||
padding: 2px 5px;
|
||||
}
|
||||
|
||||
div {
|
||||
padding: 6px;
|
||||
}
|
||||
}
|
||||
|
||||
/* Tutorial */
|
||||
#tutorial-container {
|
||||
position: fixed;
|
||||
|
||||
@@ -7,16 +7,28 @@
|
||||
position: fixed;
|
||||
}
|
||||
|
||||
|
||||
.bitnode {
|
||||
color: #00f;
|
||||
}
|
||||
&.level-0 {
|
||||
color: red;
|
||||
}
|
||||
|
||||
.bitnode-destroyed {
|
||||
color: #f00;
|
||||
}
|
||||
&.level-1 {
|
||||
color: yellow;
|
||||
}
|
||||
|
||||
.bitnode:hover,
|
||||
.bitnode-destroyed:hover {
|
||||
color: #fff;
|
||||
&.level-2 {
|
||||
color: #48D1CC;
|
||||
}
|
||||
|
||||
&.level-3 {
|
||||
color: blue;
|
||||
}
|
||||
|
||||
&.unimplemented {
|
||||
color: gray;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
margin: 4px;
|
||||
padding: 2px;
|
||||
resize: none;
|
||||
width: 50%;
|
||||
width: 60%;
|
||||
}
|
||||
|
||||
#script-editor-status {
|
||||
|
||||
@@ -7,35 +7,45 @@
|
||||
p {
|
||||
font-size: $defaultFontSize * 0.8125;
|
||||
}
|
||||
|
||||
a {
|
||||
font-size: $defaultFontSize * 0.875;
|
||||
}
|
||||
h2 {
|
||||
}
|
||||
|
||||
.stock-market-info-and-purchases {
|
||||
> h2 {
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
> p {
|
||||
display: block;
|
||||
margin-left: 10px;
|
||||
width: 70%;
|
||||
}
|
||||
|
||||
> a, > button {
|
||||
margin: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
#stock-market-list li {
|
||||
button {
|
||||
font-size: $defaultFontSize;
|
||||
#stock-market-list {
|
||||
list-style: none;
|
||||
|
||||
li {
|
||||
button {
|
||||
font-size: $defaultFontSize;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#stock-market-container p {
|
||||
padding: 6px;
|
||||
margin: 6px;
|
||||
width: 70%;
|
||||
}
|
||||
|
||||
#stock-market-container a {
|
||||
margin: 10px;
|
||||
}
|
||||
|
||||
#stock-market-watchlist-filter {
|
||||
display: block;
|
||||
margin: 5px 5px 5px 10px;
|
||||
padding: 4px;
|
||||
width: 50%;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.stock-market-input {
|
||||
@@ -47,14 +57,36 @@
|
||||
color: var(--my-font-color);
|
||||
}
|
||||
|
||||
.stock-market-price-movement-warning {
|
||||
border: 1px solid white;
|
||||
color: red;
|
||||
margin: 2px;
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
.stock-market-position-text {
|
||||
color: #fff;
|
||||
display: inline-block;
|
||||
display: block;
|
||||
|
||||
p {
|
||||
color: #fff;
|
||||
display: inline-block;
|
||||
margin: 4px;
|
||||
}
|
||||
|
||||
h3 {
|
||||
margin: 4px;
|
||||
}
|
||||
}
|
||||
|
||||
.stock-market-order-list {
|
||||
overflow-y: auto;
|
||||
max-height: 100px;
|
||||
|
||||
li {
|
||||
color: #fff;
|
||||
padding: 4px;
|
||||
}
|
||||
}
|
||||
|
||||
.stock-market-order-cancel-btn {
|
||||
|
||||
@@ -17,7 +17,8 @@ body {
|
||||
p,
|
||||
pre,
|
||||
h2,
|
||||
.text {
|
||||
.text,
|
||||
td {
|
||||
color: var(--my-font-color);
|
||||
}
|
||||
|
||||
@@ -79,6 +80,28 @@ a:visited {
|
||||
right: 0;
|
||||
}
|
||||
|
||||
#factions-tab {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#factions-notification {
|
||||
font-size: $defaultFontSize * 0.625;
|
||||
position: absolute; /* Position the badge within the relatively positioned button */
|
||||
top: 0;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
#augmentations-tab {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#augmentations-notification {
|
||||
font-size: $defaultFontSize * 0.625;
|
||||
position: absolute; /* Position the badge within the relatively positioned button */
|
||||
top: 0;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.notification-on {
|
||||
background-color: #fa3e3e;
|
||||
color: #fff;
|
||||
@@ -243,8 +266,8 @@ a:visited {
|
||||
/* Accordion menus (Header with collapsible panel) */
|
||||
.accordion-header {
|
||||
background-color: #444;
|
||||
font-size: $defaultFontSize * 1.25;
|
||||
color: #fff;
|
||||
font-size: $defaultFontSize * 1.25;
|
||||
margin: 6px 6px 0 6px;
|
||||
padding: 4px 6px;
|
||||
cursor: pointer;
|
||||
@@ -336,3 +359,40 @@ a:visited {
|
||||
.smallfont {
|
||||
font-size: $defaultFontSize * 0.8125;
|
||||
}
|
||||
|
||||
input[type=checkbox] {
|
||||
filter: invert(1) sepia(1) hue-rotate(41deg) brightness(100%) saturate(10);
|
||||
}
|
||||
|
||||
.optionCheckbox {
|
||||
margin: 5px;
|
||||
float: right;
|
||||
}
|
||||
|
||||
.optionRange {
|
||||
-webkit-appearance: none;
|
||||
background: #777;
|
||||
outline: none;
|
||||
opacity: 0.7;
|
||||
height: 10px;
|
||||
-webkit-transition: .2s;
|
||||
transition: opacity .2s;
|
||||
margin: 3px;
|
||||
}
|
||||
|
||||
|
||||
.optionRange::-webkit-slider-thumb {
|
||||
-webkit-appearance: none;
|
||||
appearance: none;
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
background: var(--my-font-color);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.optionRange::-moz-range-thumb {
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
background: var(--my-font-color);
|
||||
cursor: pointer;
|
||||
}
|
||||
20
dist/engine.bundle.js
vendored
20
dist/engine.bundle.js
vendored
File diff suppressed because one or more lines are too long
2
dist/engineStyle.bundle.js
vendored
Normal file
2
dist/engineStyle.bundle.js
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
!function(n){function t(t){for(var e,i,f=t[0],c=t[1],l=t[2],p=0,s=[];p<f.length;p++)i=f[p],u[i]&&s.push(u[i][0]),u[i]=0;for(e in c)Object.prototype.hasOwnProperty.call(c,e)&&(n[e]=c[e]);for(a&&a(t);s.length;)s.shift()();return r.push.apply(r,l||[]),o()}function o(){for(var n,t=0;t<r.length;t++){for(var o=r[t],e=!0,f=1;f<o.length;f++){var c=o[f];0!==u[c]&&(e=!1)}e&&(r.splice(t--,1),n=i(i.s=o[0]))}return n}var e={},u={1:0},r=[];function i(t){if(e[t])return e[t].exports;var o=e[t]={i:t,l:!1,exports:{}};return n[t].call(o.exports,o,o.exports,i),o.l=!0,o.exports}i.m=n,i.c=e,i.d=function(n,t,o){i.o(n,t)||Object.defineProperty(n,t,{enumerable:!0,get:o})},i.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},i.t=function(n,t){if(1&t&&(n=i(n)),8&t)return n;if(4&t&&"object"==typeof n&&n&&n.__esModule)return n;var o=Object.create(null);if(i.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:n}),2&t&&"string"!=typeof n)for(var e in n)i.d(o,e,function(t){return n[t]}.bind(null,e));return o},i.n=function(n){var t=n&&n.__esModule?function(){return n.default}:function(){return n};return i.d(t,"a",t),t},i.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},i.p="";var f=window.webpackJsonp=window.webpackJsonp||[],c=f.push.bind(f);f.push=t,f=f.slice();for(var l=0;l<f.length;l++)t(f[l]);var a=c;r.push([377,0]),o()}({320:function(n,t,o){},322:function(n,t,o){},324:function(n,t,o){},326:function(n,t,o){},328:function(n,t,o){},330:function(n,t,o){},332:function(n,t,o){},334:function(n,t,o){},336:function(n,t,o){},338:function(n,t,o){},340:function(n,t,o){},342:function(n,t,o){},344:function(n,t,o){},346:function(n,t,o){},348:function(n,t,o){},350:function(n,t,o){},352:function(n,t,o){},354:function(n,t,o){},356:function(n,t,o){},358:function(n,t,o){},360:function(n,t,o){},362:function(n,t,o){},364:function(n,t,o){},366:function(n,t,o){},368:function(n,t,o){},370:function(n,t,o){},372:function(n,t,o){},374:function(n,t,o){},377:function(n,t,o){"use strict";o.r(t);o(376),o(374),o(372),o(370),o(368),o(366),o(364),o(362),o(360),o(358),o(356),o(354),o(352),o(350),o(348),o(346),o(344),o(342),o(340),o(338),o(336),o(334),o(332),o(330),o(328),o(326),o(324),o(322),o(320)}});
|
||||
//# sourceMappingURL=engineStyle.bundle.js.map
|
||||
487
dist/engine.css → dist/engineStyle.css
vendored
487
dist/engine.css → dist/engineStyle.css
vendored
@@ -1,46 +1,3 @@
|
||||
/* COLORS */
|
||||
/* Attributes */
|
||||
/**
|
||||
* Customized styling for the Code Mirror editor
|
||||
*/
|
||||
#codemirror-form-wrapper {
|
||||
height: 80%;
|
||||
margin: 10px 0px 0px 6px; }
|
||||
|
||||
.CodeMirror {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
border: 2px solid var(--my-highlight-color);
|
||||
z-index: 1;
|
||||
font-family: "Lucida Console", "Lucida Sans Unicode", "Fira Mono", "Consolas", "Courier New", Courier, monospace, "Times New Roman";
|
||||
font-size: 16px; }
|
||||
|
||||
/**
|
||||
* Highlight matches
|
||||
*/
|
||||
.cm-matchhighlight {
|
||||
background-color: #8F908A; }
|
||||
|
||||
.CodeMirror-selection-highlight-scrollbar {
|
||||
background-color: #8F908A; }
|
||||
|
||||
/**
|
||||
* Show Invisibles
|
||||
*/
|
||||
.cm-whitespace::before {
|
||||
position: absolute;
|
||||
pointer-events: none;
|
||||
color: #404F7D; }
|
||||
|
||||
/**
|
||||
* Vim command display
|
||||
*/
|
||||
#codemirror-vim-command-display-wrapper {
|
||||
background-color: white;
|
||||
font-size: 13px;
|
||||
height: 30px;
|
||||
margin-left: 6px; }
|
||||
|
||||
/* COLORS */
|
||||
/* Attributes */
|
||||
/* COLORS */
|
||||
@@ -69,7 +26,8 @@ body {
|
||||
p,
|
||||
pre,
|
||||
h2,
|
||||
.text {
|
||||
.text,
|
||||
td {
|
||||
color: var(--my-font-color); }
|
||||
|
||||
h1 {
|
||||
@@ -121,6 +79,26 @@ a:visited {
|
||||
top: 0;
|
||||
right: 0; }
|
||||
|
||||
#factions-tab {
|
||||
position: relative; }
|
||||
|
||||
#factions-notification {
|
||||
font-size: 10px;
|
||||
position: absolute;
|
||||
/* Position the badge within the relatively positioned button */
|
||||
top: 0;
|
||||
right: 0; }
|
||||
|
||||
#augmentations-tab {
|
||||
position: relative; }
|
||||
|
||||
#augmentations-notification {
|
||||
font-size: 10px;
|
||||
position: absolute;
|
||||
/* Position the badge within the relatively positioned button */
|
||||
top: 0;
|
||||
right: 0; }
|
||||
|
||||
.notification-on {
|
||||
background-color: #fa3e3e;
|
||||
color: #fff;
|
||||
@@ -304,8 +282,8 @@ a:visited {
|
||||
/* Accordion menus (Header with collapsible panel) */
|
||||
.accordion-header {
|
||||
background-color: #444;
|
||||
font-size: 20px;
|
||||
color: #fff;
|
||||
font-size: 20px;
|
||||
margin: 6px 6px 0 6px;
|
||||
padding: 4px 6px;
|
||||
cursor: pointer;
|
||||
@@ -378,6 +356,37 @@ a:visited {
|
||||
.smallfont {
|
||||
font-size: 13px; }
|
||||
|
||||
input[type=checkbox] {
|
||||
filter: invert(1) sepia(1) hue-rotate(41deg) brightness(100%) saturate(10); }
|
||||
|
||||
.optionCheckbox {
|
||||
margin: 5px;
|
||||
float: right; }
|
||||
|
||||
.optionRange {
|
||||
-webkit-appearance: none;
|
||||
background: #777;
|
||||
outline: none;
|
||||
opacity: 0.7;
|
||||
height: 10px;
|
||||
-webkit-transition: .2s;
|
||||
transition: opacity .2s;
|
||||
margin: 3px; }
|
||||
|
||||
.optionRange::-webkit-slider-thumb {
|
||||
-webkit-appearance: none;
|
||||
appearance: none;
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
background: var(--my-font-color);
|
||||
cursor: pointer; }
|
||||
|
||||
.optionRange::-moz-range-thumb {
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
background: var(--my-font-color);
|
||||
cursor: pointer; }
|
||||
|
||||
/* COLORS */
|
||||
/* Attributes */
|
||||
/* Styling for tooltip-style elements */
|
||||
@@ -727,18 +736,36 @@ button {
|
||||
#character-hp-wrapper {
|
||||
color: #dd3434; }
|
||||
|
||||
.character-hp-cell {
|
||||
color: #dd3434; }
|
||||
|
||||
#character-money-wrapper {
|
||||
color: #ffd700; }
|
||||
|
||||
.character-money-cell {
|
||||
color: #ffd700; }
|
||||
|
||||
#character-hack-wrapper {
|
||||
color: #adff2f; }
|
||||
|
||||
.character-hack-cell {
|
||||
color: #adff2f; }
|
||||
|
||||
#character-cha-wrapper {
|
||||
color: #a671d1; }
|
||||
|
||||
.character-cha-cell {
|
||||
color: #a671d1; }
|
||||
|
||||
#character-int-wrapper {
|
||||
color: #6495ed; }
|
||||
|
||||
.character-int-cell {
|
||||
color: #6495ed; }
|
||||
|
||||
.character-combat-cell {
|
||||
color: #faffdf; }
|
||||
|
||||
.character-overview-btn {
|
||||
-webkit-border-radius: 12px;
|
||||
-moz-border-radius: 12px;
|
||||
@@ -893,7 +920,7 @@ button {
|
||||
margin: 4px;
|
||||
padding: 2px;
|
||||
resize: none;
|
||||
width: 50%; }
|
||||
width: 60%; }
|
||||
|
||||
#script-editor-status {
|
||||
float: left;
|
||||
@@ -933,6 +960,147 @@ button {
|
||||
|
||||
/* Specified overrides for Code mirror Editor are defined in codemirror-override.scss */
|
||||
|
||||
/* COLORS */
|
||||
/* Attributes */
|
||||
/**
|
||||
* Customized styling for the Code Mirror editor
|
||||
*/
|
||||
#codemirror-form-wrapper {
|
||||
height: 80%;
|
||||
margin: 10px 0px 0px 6px; }
|
||||
|
||||
.CodeMirror {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
border: 2px solid var(--my-highlight-color);
|
||||
z-index: 1;
|
||||
font-family: "Lucida Console", "Lucida Sans Unicode", "Fira Mono", "Consolas", "Courier New", Courier, monospace, "Times New Roman";
|
||||
font-size: 16px; }
|
||||
|
||||
/**
|
||||
* Highlight matches
|
||||
*/
|
||||
.cm-matchhighlight {
|
||||
background-color: #8F908A; }
|
||||
|
||||
.CodeMirror-selection-highlight-scrollbar {
|
||||
background-color: #8F908A; }
|
||||
|
||||
/**
|
||||
* Show Invisibles
|
||||
*/
|
||||
.cm-whitespace::before {
|
||||
position: absolute;
|
||||
pointer-events: none;
|
||||
color: #404F7D; }
|
||||
|
||||
/**
|
||||
* Vim command display
|
||||
*/
|
||||
#codemirror-vim-command-display-wrapper {
|
||||
background-color: white;
|
||||
font-size: 13px;
|
||||
height: 30px;
|
||||
margin-left: 6px; }
|
||||
|
||||
/* COLORS */
|
||||
/* Attributes */
|
||||
.active-scripts-list {
|
||||
list-style-type: none; }
|
||||
|
||||
#active-scripts-container {
|
||||
position: fixed;
|
||||
padding-top: 10px; }
|
||||
#active-scripts-container > p {
|
||||
width: 70%;
|
||||
margin: 6px;
|
||||
padding: 4px; }
|
||||
#active-scripts-container .accordion-header > pre {
|
||||
color: white; }
|
||||
|
||||
.active-scripts-server-header {
|
||||
background-color: #444;
|
||||
font-size: 20px;
|
||||
color: #fff;
|
||||
margin: 6px 6px 0 6px;
|
||||
padding: 6px;
|
||||
cursor: pointer;
|
||||
width: 60%;
|
||||
text-align: left;
|
||||
border: none;
|
||||
outline: none; }
|
||||
.active-scripts-server-header:after {
|
||||
content: '\2795';
|
||||
/* "plus" sign (+) */
|
||||
font-size: 13px;
|
||||
color: #fff;
|
||||
float: right;
|
||||
margin-left: 5px; }
|
||||
.active-scripts-server-header.active, .active-scripts-server-header:hover {
|
||||
background-color: #555; }
|
||||
|
||||
.active-scripts-server-header.active:after {
|
||||
content: "\2796";
|
||||
/* "minus" sign (-) */
|
||||
font-size: 13px;
|
||||
color: #fff;
|
||||
float: right;
|
||||
margin-left: 5px; }
|
||||
|
||||
.active-scripts-server-header.active:hover {
|
||||
background-color: #666; }
|
||||
|
||||
.active-scripts-server-panel {
|
||||
margin: 0 6px 6px 6px;
|
||||
padding: 0 6px 6px 6px;
|
||||
width: 55%;
|
||||
margin-left: 5%;
|
||||
display: none; }
|
||||
.active-scripts-server-panel div, .active-scripts-server-panel ul, .active-scripts-server-panel ul > li {
|
||||
background-color: #555; }
|
||||
|
||||
.active-scripts-script-header {
|
||||
background-color: #555;
|
||||
border: none;
|
||||
color: var(--my-font-color);
|
||||
cursor: pointer;
|
||||
display: block;
|
||||
outline: none;
|
||||
padding: 4px 25px 4px 10px;
|
||||
position: relative;
|
||||
text-align: left;
|
||||
width: auto; }
|
||||
.active-scripts-script-header:after {
|
||||
content: '\2795';
|
||||
/* "plus" sign (+) */
|
||||
font-size: 13px;
|
||||
float: right;
|
||||
margin-left: 5px;
|
||||
color: transparent;
|
||||
text-shadow: 0 0 0 var(--my-font-color);
|
||||
position: absolute;
|
||||
bottom: 4px; }
|
||||
.active-scripts-script-header.active:after {
|
||||
content: "\2796";
|
||||
/* "minus" sign (-) */ }
|
||||
.active-scripts-script-header:hover, .active-scripts-script-header.active:hover {
|
||||
background-color: #666; }
|
||||
.active-scripts-script-header.active {
|
||||
background-color: #555; }
|
||||
|
||||
.active-scripts-script-panel {
|
||||
background-color: #555;
|
||||
display: none;
|
||||
font-size: 14px;
|
||||
margin-bottom: 6px;
|
||||
padding: 0 18px;
|
||||
width: auto; }
|
||||
.active-scripts-script-panel pre, .active-scripts-script-panel h2, .active-scripts-script-panel ul, .active-scripts-script-panel li {
|
||||
background-color: #555;
|
||||
width: auto;
|
||||
color: #fff;
|
||||
margin-left: 5%; }
|
||||
|
||||
/* COLORS */
|
||||
/* Attributes */
|
||||
/**
|
||||
@@ -1007,107 +1175,6 @@ button {
|
||||
padding-top: 10px;
|
||||
position: fixed; }
|
||||
|
||||
/* Active scripts */
|
||||
.active-scripts-list {
|
||||
list-style-type: none; }
|
||||
|
||||
#active-scripts-container {
|
||||
position: fixed;
|
||||
padding-top: 10px; }
|
||||
|
||||
#active-scripts-text,
|
||||
#active-scripts-total-prod {
|
||||
width: 70%;
|
||||
margin: 6px;
|
||||
padding: 4px; }
|
||||
|
||||
.active-scripts-server-header {
|
||||
background-color: #444;
|
||||
font-size: 20px;
|
||||
color: #fff;
|
||||
margin: 6px 6px 0 6px;
|
||||
padding: 6px;
|
||||
cursor: pointer;
|
||||
width: 60%;
|
||||
text-align: left;
|
||||
border: none;
|
||||
outline: none; }
|
||||
|
||||
.active-scripts-server-header.active,
|
||||
.active-scripts-server-header:hover {
|
||||
background-color: #555; }
|
||||
|
||||
.active-scripts-server-header.active:hover {
|
||||
background-color: #666; }
|
||||
|
||||
.active-scripts-server-header:after {
|
||||
content: '\2795';
|
||||
/* "plus" sign (+) */
|
||||
font-size: 13px;
|
||||
color: #fff;
|
||||
float: right;
|
||||
margin-left: 5px; }
|
||||
|
||||
.active-scripts-server-header.active:after {
|
||||
content: "\2796";
|
||||
/* "minus" sign (-) */
|
||||
font-size: 13px;
|
||||
color: #fff;
|
||||
float: right;
|
||||
margin-left: 5px; }
|
||||
|
||||
.active-scripts-server-panel {
|
||||
margin: 0 6px 6px 6px;
|
||||
padding: 0 6px 6px 6px;
|
||||
width: 55%;
|
||||
margin-left: 5%;
|
||||
display: none; }
|
||||
|
||||
.active-scripts-server-panel div,
|
||||
.active-scripts-server-panel ul,
|
||||
.active-scripts-server-panel ul > li {
|
||||
background-color: #555; }
|
||||
|
||||
.active-scripts-script-header {
|
||||
background-color: #555;
|
||||
color: var(--my-font-color);
|
||||
padding: 4px 25px 4px 10px;
|
||||
cursor: pointer;
|
||||
width: auto;
|
||||
text-align: left;
|
||||
border: none;
|
||||
outline: none;
|
||||
position: relative; }
|
||||
.active-scripts-script-header:after {
|
||||
content: '\2795';
|
||||
/* "plus" sign (+) */
|
||||
font-size: 13px;
|
||||
float: right;
|
||||
margin-left: 5px;
|
||||
color: transparent;
|
||||
text-shadow: 0 0 0 var(--my-font-color);
|
||||
position: absolute;
|
||||
bottom: 4px; }
|
||||
.active-scripts-script-header.active:after {
|
||||
content: "\2796";
|
||||
/* "minus" sign (-) */ }
|
||||
.active-scripts-script-header:hover, .active-scripts-script-header.active:hover {
|
||||
background-color: #666; }
|
||||
.active-scripts-script-header.active {
|
||||
background-color: #555; }
|
||||
|
||||
.active-scripts-script-panel {
|
||||
padding: 0 18px;
|
||||
background-color: #555;
|
||||
width: auto;
|
||||
display: none;
|
||||
margin-bottom: 6px; }
|
||||
.active-scripts-script-panel p, .active-scripts-script-panel h2, .active-scripts-script-panel ul, .active-scripts-script-panel li {
|
||||
background-color: #555;
|
||||
width: auto;
|
||||
color: #fff;
|
||||
margin-left: 5%; }
|
||||
|
||||
/* World */
|
||||
#world-container {
|
||||
position: fixed;
|
||||
@@ -1147,17 +1214,6 @@ button {
|
||||
margin: 6px;
|
||||
width: 70%; }
|
||||
|
||||
#faction-donate-amount-txt,
|
||||
#faction-donate-input {
|
||||
padding: 6px;
|
||||
margin: 6px;
|
||||
display: inline-block;
|
||||
color: var(--my-font-color);
|
||||
background-color: #000; }
|
||||
|
||||
#faction-donate-amount-txt {
|
||||
width: 50%; }
|
||||
|
||||
#faction-container p,
|
||||
#faction-container pre {
|
||||
padding: 4px 6px;
|
||||
@@ -1176,35 +1232,11 @@ button {
|
||||
word-wrap: break-word;
|
||||
/* Internet Explorer 5.5+ */ }
|
||||
|
||||
/* Faction Augmentations */
|
||||
#faction-augmentations-container {
|
||||
position: fixed;
|
||||
padding-top: 10px; }
|
||||
#faction-augmentations-container p, #faction-augmentations-container a, #faction-augmentations-container ul, #faction-augmentations-container h1 {
|
||||
margin: 8px;
|
||||
padding: 4px; }
|
||||
|
||||
/* World */
|
||||
#world-container li {
|
||||
margin: 0 0 15px 0;
|
||||
list-style-type: none; }
|
||||
|
||||
/* Augmentations */
|
||||
#augmentations-container {
|
||||
position: fixed;
|
||||
padding-top: 10px; }
|
||||
|
||||
.augmentations-list button,
|
||||
.augmentations-list div {
|
||||
color: var(--my-font-color);
|
||||
text-decoration: none; }
|
||||
|
||||
.augmentations-list button {
|
||||
padding: 2px 5px; }
|
||||
|
||||
.augmentations-list div {
|
||||
padding: 6px; }
|
||||
|
||||
/* Tutorial */
|
||||
#tutorial-container {
|
||||
position: fixed;
|
||||
@@ -1286,6 +1318,29 @@ button {
|
||||
display: inline;
|
||||
width: 25%; }
|
||||
|
||||
/**
|
||||
* Styling for the Augmentations UI. This is the page that displays all of the
|
||||
* player's owned and purchased Augmentations and Source-Files. It also allows
|
||||
* the player to install Augmentations
|
||||
*/
|
||||
/* COLORS */
|
||||
/* Attributes */
|
||||
#augmentations-container {
|
||||
position: fixed;
|
||||
padding-top: 10px; }
|
||||
|
||||
#augmentations-content > p {
|
||||
font-size: 14px;
|
||||
width: 70%; }
|
||||
|
||||
.augmentations-list button,
|
||||
.augmentations-list div {
|
||||
color: var(--my-font-color);
|
||||
text-decoration: none; }
|
||||
|
||||
.augmentations-list button {
|
||||
padding: 4px; }
|
||||
|
||||
/* COLORS */
|
||||
/* Attributes */
|
||||
/**
|
||||
@@ -1294,14 +1349,22 @@ button {
|
||||
#red-pill-container {
|
||||
position: fixed; }
|
||||
|
||||
.bitnode {
|
||||
color: #00f; }
|
||||
.bitnode.level-0 {
|
||||
color: red; }
|
||||
|
||||
.bitnode-destroyed {
|
||||
color: #f00; }
|
||||
.bitnode.level-1 {
|
||||
color: yellow; }
|
||||
|
||||
.bitnode:hover,
|
||||
.bitnode-destroyed:hover {
|
||||
.bitnode.level-2 {
|
||||
color: #48D1CC; }
|
||||
|
||||
.bitnode.level-3 {
|
||||
color: blue; }
|
||||
|
||||
.bitnode.unimplemented {
|
||||
color: gray; }
|
||||
|
||||
.bitnode:hover {
|
||||
color: #fff; }
|
||||
|
||||
/* COLORS */
|
||||
@@ -1313,25 +1376,30 @@ button {
|
||||
font-size: 13px; }
|
||||
#stock-market-container a {
|
||||
font-size: 14px; }
|
||||
#stock-market-container h2 {
|
||||
margin-top: 10px;
|
||||
margin-left: 10px;
|
||||
display: block; }
|
||||
|
||||
#stock-market-list li button {
|
||||
font-size: 16px; }
|
||||
.stock-market-info-and-purchases > h2 {
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
margin-left: 10px; }
|
||||
|
||||
#stock-market-container p {
|
||||
padding: 6px;
|
||||
margin: 6px;
|
||||
.stock-market-info-and-purchases > p {
|
||||
display: block;
|
||||
margin-left: 10px;
|
||||
width: 70%; }
|
||||
|
||||
#stock-market-container a {
|
||||
.stock-market-info-and-purchases > a, .stock-market-info-and-purchases > button {
|
||||
margin: 10px; }
|
||||
|
||||
#stock-market-list {
|
||||
list-style: none; }
|
||||
#stock-market-list li button {
|
||||
font-size: 16px; }
|
||||
|
||||
#stock-market-watchlist-filter {
|
||||
width: 50%;
|
||||
margin-left: 10px; }
|
||||
display: block;
|
||||
margin: 5px 5px 5px 10px;
|
||||
padding: 4px;
|
||||
width: 50%; }
|
||||
|
||||
.stock-market-input {
|
||||
display: inline-block;
|
||||
@@ -1341,13 +1409,28 @@ button {
|
||||
border: 1px solid #fff;
|
||||
color: var(--my-font-color); }
|
||||
|
||||
.stock-market-price-movement-warning {
|
||||
border: 1px solid white;
|
||||
color: red;
|
||||
margin: 2px;
|
||||
padding: 2px; }
|
||||
|
||||
.stock-market-position-text {
|
||||
color: #fff;
|
||||
display: inline-block; }
|
||||
display: block; }
|
||||
.stock-market-position-text p {
|
||||
color: #fff;
|
||||
display: inline-block;
|
||||
margin: 4px; }
|
||||
.stock-market-position-text h3 {
|
||||
margin: 4px; }
|
||||
|
||||
.stock-market-order-list {
|
||||
overflow-y: auto;
|
||||
max-height: 100px; }
|
||||
.stock-market-order-list li {
|
||||
color: #fff;
|
||||
padding: 4px; }
|
||||
|
||||
.stock-market-order-cancel-btn {
|
||||
background-color: #000;
|
||||
@@ -4866,4 +4949,4 @@ html {
|
||||
margin-right: 0px; }
|
||||
|
||||
|
||||
/*# sourceMappingURL=engine.css.map*/
|
||||
/*# sourceMappingURL=engineStyle.css.map*/
|
||||
623
dist/vendor.bundle.js
vendored
623
dist/vendor.bundle.js
vendored
File diff suppressed because one or more lines are too long
@@ -86,8 +86,11 @@ Sleeve memory dictates what a sleeve's synchronization will be when its reset by
|
||||
switching BitNodes. For example, if a sleeve has a memory of 10, then when you
|
||||
switch BitNodes its synchronization will initially be set to 10, rather than 1.
|
||||
|
||||
Memory can only be increased by purchasing upgrades from The Covenant.
|
||||
It is a persistent stat, meaning it never gets reset back to 1.
|
||||
Memory can only be increased by purchasing upgrades from The Covenant. Just like
|
||||
the ability to purchase additional sleeves, this is only available in BitNodes-10
|
||||
and above, and is only available after defeating BitNode-10 at least once.
|
||||
|
||||
Memory is a persistent stat, meaning it never gets reset back to 1.
|
||||
The maximum possible value for a sleeve's memory is 100.
|
||||
|
||||
Re-sleeving
|
||||
|
||||
@@ -40,7 +40,7 @@ solutions. Some may be numbers, others may be strings or arrays.
|
||||
If a contract asks for a specific solution format, then
|
||||
use that. Otherwise, follow these rules when submitting solutions:
|
||||
|
||||
* String-type solutions should not have quotation marks surrounding
|
||||
* String-type solutions should **not** have quotation marks surrounding
|
||||
the string (unless specifically asked for). Only quotation
|
||||
marks that are part of the actual string solution should be included.
|
||||
* Array-type solutions should be submitted with each element
|
||||
@@ -204,8 +204,8 @@ The list contains the name of (i.e. the value returned by
|
||||
| | | the string, the result should be an array with only an empty string. |
|
||||
| | | |
|
||||
| | | Examples: |
|
||||
| | | ()())() -> ["()()()", "(())()"] |
|
||||
| | | (a)())() -> ["(a)()()", "(a())()"] |
|
||||
| | | ()())() -> [()()(), (())()] |
|
||||
| | | (a)())() -> [(a)()(), (a())()] |
|
||||
| | | )( -> [""] |
|
||||
+------------------------------------+------------------------------------------------------------------------------------------+
|
||||
| Find All Valid Math Expressions | | You are given a string which contains only digits between 0 and 9 as well as a target |
|
||||
@@ -214,10 +214,12 @@ The list contains the name of (i.e. the value returned by
|
||||
| | | |
|
||||
| | | The answer should be provided as an array of strings containing the valid expressions. |
|
||||
| | | |
|
||||
| | | NOTE: Numbers in an expression cannot have leading 0's |
|
||||
| | | |
|
||||
| | | Examples: |
|
||||
| | | Input: digits = "123", target = 6 |
|
||||
| | | Output: ["1+2+3", "1*2*3"] |
|
||||
| | | Output: [1+2+3, 1*2*3] |
|
||||
| | | |
|
||||
| | | Input: digits = "105", target = 5 |
|
||||
| | | Output: ["1*0+5", "10-5"] |
|
||||
| | | Output: [1*0+5, 10-5] |
|
||||
+------------------------------------+------------------------------------------------------------------------------------------+
|
||||
|
||||
@@ -7,10 +7,14 @@ buy and sell stocks in order to make money.
|
||||
|
||||
The WSE can be found in the 'City' tab, and is accessible in every city.
|
||||
|
||||
Automating the Stock Market
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
You can write scripts to perform automatic and algorithmic trading on the Stock Market.
|
||||
See :ref:`netscript_tixapi` for more details.
|
||||
Fundamentals
|
||||
------------
|
||||
The Stock Market is not as simple as "buy at price X and sell at price Y". The following
|
||||
are several fundamental concepts you need to understand about the stock market.
|
||||
|
||||
.. note:: For those that have experience with finance/trading/investing, please be aware
|
||||
that the game's stock market does not function exactly like it does in the real
|
||||
world. So these concepts below should seem similar, but won't be exactly the same.
|
||||
|
||||
Positions: Long vs Short
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@@ -21,16 +25,73 @@ is the exact opposite. In a Short position you purchase shares of a stock and
|
||||
earn a profit if the price of that stock decreases. This is also called 'shorting'
|
||||
a stock.
|
||||
|
||||
NOTE: Shorting stocks is not available immediately, and must be unlocked later in the
|
||||
game.
|
||||
.. note:: Shorting stocks is not available immediately, and must be unlocked later in the
|
||||
game.
|
||||
|
||||
Forecast & Second-Order Forecast
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
A stock's forecast is its likelihood of increasing or decreasing in value. The
|
||||
forecast is typically represented by its probability of increasing in either
|
||||
a decimal or percentage form. For example, a forecast of 70% means the stock
|
||||
has a 70% chance of increasing and a 30% chance of decreasing.
|
||||
|
||||
A stock's second-order forecast is the target value that its forecast trends towards.
|
||||
For example, if a stock has a forecast of 60% and a second-order forecast of 70%,
|
||||
then the stock's forecast should slowly trend towards 70% over time. However, this is
|
||||
determined by RNG so there is a chance that it may never reach 70%.
|
||||
|
||||
Both the forecast and the second-order forecast change over time.
|
||||
|
||||
A stock's forecast can be viewed after purchasing Four Sigma (4S) Market Data
|
||||
access. This lets you see the forecast info on the Stock Market UI. If you also
|
||||
purchase access to the 4S Market Data TIX API, then you can view a stock's forecast
|
||||
using the :js:func:`getStockForecast` function.
|
||||
|
||||
A stock's second-order forecast is always hidden.
|
||||
|
||||
.. _gameplay_stock_market_spread:
|
||||
|
||||
Spread (Bid Price & Ask Price)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
The **bid price** is the maximum price at which someone will buy a stock on the
|
||||
stock market.
|
||||
|
||||
The **ask price** is the minimum price that a seller is willing to receive for a stock
|
||||
on the stock market
|
||||
|
||||
The ask price will always be higher than the bid price (This is because if a seller
|
||||
is willing to receive less than the bid price, that transaction is guaranteed to
|
||||
happen). The difference between the bid and ask price is known as the **spread**.
|
||||
A stock's "price" will be the average of the bid and ask price.
|
||||
|
||||
The bid and ask price are important because these are the prices at which a
|
||||
transaction actually occurs. If you purchase a stock in the long position, the cost
|
||||
of your purchase depends on that stock's ask price. If you then try to sell that
|
||||
stock (still in the long position), the price at which you sell is the stock's
|
||||
bid price. Note that this is reversed for a short position. Purchasing a stock
|
||||
in the short position will occur at the stock's bid price, and selling a stock
|
||||
in the short position will occur at the stock's ask price.
|
||||
|
||||
Transactions Influencing Stock Forecast
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
Buying or selling a large number of shares
|
||||
of a stock will influence that stock's forecast & second-order forecast.
|
||||
The forecast is the likelihood that the stock will increase or decrease in price.
|
||||
The magnitude of this effect depends on the number of shares being transacted.
|
||||
More shares will have a bigger effect.
|
||||
|
||||
The effect that transactions have on a stock's second-order forecast is
|
||||
significantly smaller than the effect on its forecast.
|
||||
|
||||
.. _gameplay_stock_market_order_types:
|
||||
|
||||
Order Types
|
||||
^^^^^^^^^^^
|
||||
There are three different types of orders you can make to buy or sell stocks on the exchange:
|
||||
Market Order, Limit Order, and Stop Order.
|
||||
|
||||
Note that Limit Orders and Stop Orders are not available immediately, and must be unlocked
|
||||
later in the game.
|
||||
.. note:: Limit Orders and Stop Orders are not available immediately, and must be unlocked
|
||||
later in the game.
|
||||
|
||||
When you place a Market Order to buy or sell a stock, the order executes immediately at
|
||||
whatever the current price of the stock is. For example if you choose to short a stock
|
||||
@@ -71,3 +132,77 @@ A Limit Order to sell will execute if the stock's price <= order's price
|
||||
A Stop Order to buy will execute if the stock's price <= order's price
|
||||
|
||||
A Stop Order to sell will execute if the stock's price >= order's price.
|
||||
|
||||
.. _gameplay_stock_market_player_actions_influencing_stock:
|
||||
|
||||
Player Actions Influencing Stocks
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
It is possible for your actions elsewhere in the game to influence the stock market.
|
||||
|
||||
Hacking
|
||||
If a server has a corresponding stock (e.g. *foodnstuff* server -> FoodNStuff
|
||||
stock), then hacking that server can decrease the stock's second-order
|
||||
forecast. This causes the corresponding stock's forecast to trend downwards in value
|
||||
over time.
|
||||
|
||||
This effect only occurs if you set the *stock* option to
|
||||
true when calling the :js:func:`hack` function. The chance that hacking a
|
||||
server will cause this effect is based on what percentage of the
|
||||
server's total money you steal.
|
||||
|
||||
A single hack will have a minor
|
||||
effect, but continuously hacking a server for lots of money over time
|
||||
will have a noticeable effect in making the stock's forecast trend downwards.
|
||||
|
||||
Growing
|
||||
If a server has a corresponding stock (e.g. *foodnstuff* server -> FoodNStuff
|
||||
stock), then growing that server's money can increase the stock's
|
||||
second-order forecast. This causes the corresponding stock's
|
||||
forecast to trend upwards in value over time.
|
||||
|
||||
This effect only occurs if you set the *stock* option to true when calling the
|
||||
:js:func:`grow` function. The chance that growing a server will cause this
|
||||
effect is based on what percentage of the server's total money to add to it.
|
||||
|
||||
A single grow operation will have a minor effect, but continuously growing
|
||||
a server for lots of money over time will have a noticeable effect in making
|
||||
the stock's forecast trend upwards.
|
||||
|
||||
Working for a Company
|
||||
If a company has a corresponding stock, then working for that company will
|
||||
increase the corresponding stock's second-order forecast. This will
|
||||
cause the stock's forecast to (slowly) trend upwards in value
|
||||
over time.
|
||||
|
||||
The potency of this effect is based on how "effective" you are when you work
|
||||
(i.e. its based on your stats and multipliers).
|
||||
|
||||
Automating the Stock Market
|
||||
---------------------------
|
||||
You can write scripts to perform automatic and algorithmic trading on the Stock Market.
|
||||
See :ref:`netscript_tixapi` for more details.
|
||||
|
||||
Under the Hood
|
||||
--------------
|
||||
Stock prices are updated every ~6 seconds.
|
||||
|
||||
Whether a stock's price moves up or down is determined by RNG. However,
|
||||
stocks have properties that can influence the way their price moves. These properties
|
||||
are hidden, although some of them can be made visible by purchasing the
|
||||
Four Sigma (4S) Market Data upgrade. Some examples of these properties are:
|
||||
|
||||
* Volatility
|
||||
* Likelihood of increasing or decreasing (i.e. the stock's forecast)
|
||||
* Likelihood of forecast increasing or decreasing (i.e. the stock's second-order forecast)
|
||||
* How easily a stock's price/forecast is influenced by transactions
|
||||
* Spread percentage
|
||||
* Maximum price (not a real maximum, more of a "soft cap")
|
||||
|
||||
Each stock has its own unique values for these properties.
|
||||
|
||||
Offline Progression
|
||||
-------------------
|
||||
The Stock Market does not change or process anything while the game has closed.
|
||||
However, it does accumulate time when offline. This accumulated time allows
|
||||
the stock market to run 50% faster when the game is opened again. This means
|
||||
that stock prices will update every ~4 seconds instead of 6.
|
||||
|
||||
@@ -312,9 +312,12 @@ kill
|
||||
^^^^
|
||||
|
||||
$ kill [script name] [args...]
|
||||
$ kill [pid]
|
||||
|
||||
Kill the script specified by the script name and arguments. Each argument must
|
||||
be separated by a space. Remember that a running script is uniquely identified
|
||||
Kill the script specified by the script filename and arguments OR by its PID.
|
||||
|
||||
If you are killing the script using its filename and arguments, then each argument
|
||||
must be separated by a space. Remember that a running script is uniquely identified
|
||||
by both its name and the arguments that are used to start it. So, if a script
|
||||
was ran with the following arguments::
|
||||
|
||||
@@ -324,8 +327,7 @@ Then to kill this script the same arguments would have to be used::
|
||||
|
||||
$ kill foo.script 50e3 sigma-cosmetics
|
||||
|
||||
Note that after issuing the 'kill' command for a script, it may take a few seconds for
|
||||
the script to actually stop running.
|
||||
If you are killing the script using its PID, then the PID argument must be numeric.
|
||||
|
||||
killall
|
||||
^^^^^^^
|
||||
@@ -403,7 +405,7 @@ to convert from script to text file, or vice versa.
|
||||
This function can also be used to rename files.
|
||||
|
||||
.. note:: Unlike the Linux :code:`mv` command, the *destination* argument must be the
|
||||
full filepath. It cannot be a directory.
|
||||
full filepath. It cannot be a directory.
|
||||
|
||||
Examples::
|
||||
|
||||
@@ -511,6 +513,8 @@ sudov
|
||||
|
||||
Prints whether or not you have root access to the current server.
|
||||
|
||||
.. _tail_terminal_command:
|
||||
|
||||
tail
|
||||
^^^^
|
||||
|
||||
@@ -584,7 +588,7 @@ The data can only be downloaded to a script (.script, .ns, .js) or a text file
|
||||
(.txt). If the target file already exists, it will be overwritten by this command.
|
||||
|
||||
Note that will not be possible to download data from many websites because they
|
||||
do not allow cross-origin origin sharing (CORS). This includes websites such
|
||||
do not allow cross-origin resource sharing (CORS). This includes websites such
|
||||
as gist and pastebin. One notable site it will work on is rawgithub. Example::
|
||||
|
||||
$ wget https://raw.githubusercontent.com/danielyxie/bitburner/master/README.md game_readme.txt
|
||||
|
||||
@@ -3,6 +3,239 @@
|
||||
Changelog
|
||||
=========
|
||||
|
||||
|
||||
v0.49.2 - 2021-03-13 (hydroflame)
|
||||
-------
|
||||
|
||||
BN8
|
||||
* A new bitnode multipler has been added, it lets you reduce money from a
|
||||
server without gaining actually any money. This is important for BN8 where
|
||||
hack/grow can influence the stock market. No money can be gained from
|
||||
hacking but server money can still be reduced.
|
||||
|
||||
Documentation
|
||||
* readthedocs should now be more consistent and many examples were added.
|
||||
|
||||
Netscript
|
||||
* Ace editor will now correctly highlight all functions.
|
||||
* 'tFormat' is a new netscript function that returns a human readable
|
||||
representation of milliseconds. eg. "2 hours 15 minute 43 seconds"
|
||||
|
||||
Gang
|
||||
* style improvements
|
||||
|
||||
Bladeburner
|
||||
* style improvements
|
||||
* fix bug where 'skill list SKILL' would crash if skill is level 0.
|
||||
|
||||
Sleeve
|
||||
* karma gain now scales with sync.
|
||||
|
||||
Misc.
|
||||
Fix issue where the effective stats under Character>Stats were being calculated.
|
||||
|
||||
v0.49.0 - 2021-03-11 Source-File -1 (hydroflame)
|
||||
-------
|
||||
|
||||
**Source-File -1**
|
||||
|
||||
* For advanced players: The game now embraces exploits and will reward
|
||||
players for doing so.
|
||||
|
||||
**Gang**
|
||||
|
||||
* ascension is less effective as the ascension multiplier goes up.
|
||||
* territory gain scales with power difference.
|
||||
|
||||
**Netscript**
|
||||
|
||||
* 'gang.getEquipmentStats' returns the stats of the equipment.
|
||||
* 'gang.getTaskStats' returns the stats of a task.
|
||||
* 'getCrimeStats' returns the stats of a crime.
|
||||
* Crashes should now print the ns stack trace.
|
||||
* Log messages are now more consistent.
|
||||
* 'softReset' now accepts a callback script like 'installAugmentations'
|
||||
|
||||
**Misc.**
|
||||
|
||||
* Minor formatting under Hacking>Active Scripts
|
||||
* option menu colors now match the rest of the game, kinda.
|
||||
|
||||
|
||||
v0.48.0 - ASCII - 2021-03-07 (hydroflame)
|
||||
-------
|
||||
|
||||
**ASCII**
|
||||
|
||||
* Travel Agency now displays a world map
|
||||
* Cities are now top view of metro station maps
|
||||
|
||||
**Netscript**
|
||||
|
||||
* 'softReset' is a new netscript function that performs a soft reset
|
||||
regardless of if the player has bought augmentations or not.
|
||||
* 'getAugmentationStats' is a new netscript function that returns the stats of
|
||||
an augmentation.
|
||||
* getCharacterInformation now additionally returns exp
|
||||
* pid resets back to 1 when installing or destroying a BitNode.
|
||||
* New '.ns' scripts start with a main function.
|
||||
* 'hacknet.maxNumNodes' returns the maximum number of hacknet nodes.
|
||||
|
||||
**Bladeburner**
|
||||
|
||||
* Current stamina will scale as max stamina increases, this prevents players
|
||||
from having very high penalty when they gain huge amount of exp at the
|
||||
start of a reset.
|
||||
|
||||
**Misc.**
|
||||
|
||||
* Fixed an issue where SF3 was listed as infinitly repeatable and SF12 as
|
||||
having a limit of 3.
|
||||
* Fixed an issue where the gang equipment screen would freeze the game if a
|
||||
script installed augmentations while it is open.
|
||||
* All BonusTime now displays in the 'H M S' format.
|
||||
* Donation textbox style updated to match the rest of the game.
|
||||
* Corporation name style updated to match the rest of the game.
|
||||
* minor formatting under Hacking>Active Scripts
|
||||
* typo in BN12 description
|
||||
* BN12 now reduces contract money
|
||||
* Character>Stats percentages are aligned, server and hacknet limit are
|
||||
displayed, if the player has SF5 the reduces stats are shown.
|
||||
* Character>Augmentations now displays by how much the player stats will
|
||||
increase.
|
||||
* Character>Augmentations has a badge indicating how many augs the player
|
||||
has bought but not installed
|
||||
* Character>Factions has a badge indicating how many factions have pending
|
||||
invites.
|
||||
|
||||
v0.47.2 - 7/15/2019
|
||||
-------------------
|
||||
|
||||
**Netscript Changes**
|
||||
|
||||
* Added tail() Netscript function
|
||||
* hacknet.getNodeStats() function now returns an additional property for Hacknet Servers: hashCapacity
|
||||
* When writing to a file, the write() function now casts the data being written to a string (using String())
|
||||
* BitNode-selection page now shows what Source-File level you have for each BitNode
|
||||
* Overloaded kill() function so that you can kill a script by its PID
|
||||
* spawn() now only takes 10 seconds to run (decreased from 20 seconds)
|
||||
* run() and exec() now return the PID of the newly-executed scripts, rather than a boolean
|
||||
* (A PID is just a positive integer)
|
||||
* run(), exec(), and spawn() no longer need to be await-ed in NetscriptJS
|
||||
* Script parsing and RAM calculations now support ES9
|
||||
* installAugmentations() no longer has a return value since it causes all scripts to die
|
||||
* isBusy() now returns true if you are in a Hacking Mission
|
||||
* Bug fix: workForFaction() function now properly accounts for disabled logs
|
||||
* Bug fix: RAM should now be properly calculated when running a callback script with installAugmentations()
|
||||
* Bug fix: Fixed bug that caused scripts killed by exit()/spawn() to "clean up" twice
|
||||
|
||||
**Misc Changes**
|
||||
|
||||
* The 'kill' Terminal command can now kill a script by its PID
|
||||
* Added 'Solarized Dark' theme to CodeMirror editor
|
||||
* After Infiltration, you will now return to the company page rather than the city page
|
||||
* Bug fix: Stock Market UI should no longer crash for certain locale settings
|
||||
* Bug fix: You can now properly remove unfinished programs (the *.exe-N%-INC files)
|
||||
* Bug fix: Fixed an issue that allowed you to increase money on servers with a 'maxMoney' of 0 (like CSEC)
|
||||
* Bug fix: Scripts no longer persist if they were started with syntax/import errors
|
||||
* Bug fix: 'hack' and 'analyze' Terminal commands are now blocking
|
||||
* Bug fix: Exp earned by duplicate sleeves at universities/gyms now takes hash upgrades into account
|
||||
|
||||
v0.47.1 - 6/27/2019
|
||||
-------------------
|
||||
* Stock Market changes:
|
||||
* Transactions no longer influence stock prices (but they still influence forecast)
|
||||
* Changed the way stocks behave, particularly with regard to how the stock forecast occasionally "flips"
|
||||
* Hacking & growing a server can potentially affect the way the corresponding stock's forecast changes
|
||||
* Working for a company positively affects the way the corresponding stock's forecast changes
|
||||
|
||||
* Scripts now start/stop instantly
|
||||
* Improved performance when starting up many copies of a new NetscriptJS script (by Ornedan)
|
||||
* Improved performance when killing scripts
|
||||
* Dialog boxes can now be closed with the ESC key (by jaguilar)
|
||||
* NetscriptJS scripts should now be "re-compiled" if their dependencies change (by jaguilar)
|
||||
* write() function should now properly cause NetscriptJS scripts to "re-compile" (by jaguilar)
|
||||
|
||||
v0.47.0 - 5/17/2019
|
||||
-------------------
|
||||
* Stock Market changes:
|
||||
* Implemented spread. Stock's now have bid and ask prices at which transactions occur
|
||||
* Large transactions will now influence a stock's price and forecast
|
||||
* This "influencing" can take effect in the middle of a transaction
|
||||
* See documentation for more details on these changes
|
||||
* Added getStockAskPrice(), getStockBidPrice() Netscript functions to the TIX API
|
||||
* Added getStockPurchaseCost(), getStockSaleGain() Netscript functions to the TIX API
|
||||
|
||||
* Re-sleeves can no longer have the NeuroFlux Governor augmentation
|
||||
* This is just a temporary patch until the mechanic gets re-worked
|
||||
|
||||
* hack(), grow(), and weaken() functions now take optional arguments for number of threads to use (by MasonD)
|
||||
* codingcontract.attempt() now takes an optional argument that allows you to configure the function to return a contract's reward
|
||||
* Adjusted RAM costs of Netscript Singularity functions (mostly increased)
|
||||
* Adjusted RAM cost of codingcontract.getNumTriesRemaining() Netscript function
|
||||
* Netscript Singularity functions no longer cost extra RAM outside of BitNode-4
|
||||
* Corporation employees no longer have an "age" stat
|
||||
* Gang Wanted level gain rate capped at 100 (per employee)
|
||||
* Script startup/kill is now processed every 3 seconds, instead of 6 seconds
|
||||
* getHackTime(), getGrowTime(), and getWeakenTime() now return Infinity if called on a Hacknet Server
|
||||
* Money/Income tracker now displays money lost from hospitalizations
|
||||
* Exported saves now have a unique filename based on current BitNode and timestamp
|
||||
* Maximum number of Hacknet Servers decreased from 25 to 20
|
||||
* Bug Fix: Corporation employees stats should no longer become negative
|
||||
* Bug Fix: Fixed sleeve.getInformation() throwing error in certain scenarios
|
||||
* Bug Fix: Coding contracts should no longer generate on the w0r1d_d43m0n server
|
||||
* Bug Fix: Duplicate Sleeves now properly have access to all Augmentations if you have a gang
|
||||
* Bug Fix: getAugmentationsFromFaction() & purchaseAugmentation() functions should now work properly if you have a gang
|
||||
* Bug Fix: Fixed issue that caused messages (.msg) to be sent when refreshing/reloading the game
|
||||
* Bug Fix: Purchasing hash upgrades for Bladeburner/Corporation when you don't actually have access to those mechanics no longer gives hashes
|
||||
* Bug Fix: run(), exec(), and spawn() Netscript functions now throw if called with 0 threads
|
||||
* Bug Fix: Faction UI should now automatically update reputation
|
||||
* Bug Fix: Fixed purchase4SMarketData()
|
||||
* Bug Fix: Netscript1.0 now works properly for multiple 'namespace' imports (import * as namespace from "script")
|
||||
* Bug Fix: Terminal 'wget' command now correctly evaluates directory paths
|
||||
* Bug Fix: wget(), write(), and scp() Netscript functions now fail if an invalid filepath is passed in
|
||||
* Bug Fix: Having Corporation warehouses at full capacity should no longer freeze game in certain conditions
|
||||
* Bug Fix: Prevented an exploit that allows you to buy multiple copies of an Augmentation by holding the 'Enter' button
|
||||
* Bug Fix: gang.getOtherGangInformation() now properly returns a deep copy
|
||||
* Bug Fix: Fixed getScriptIncome() returning an undefined value
|
||||
* Bug Fix: Fixed an issue with Hacknet Server hash rate not always updating
|
||||
|
||||
v0.46.3 - 4/20/2019
|
||||
-------------------
|
||||
* Added a new Augmentation: The Shadow's Simulacrum
|
||||
* Improved tab autocompletion feature in Terminal so that it works better with directories
|
||||
* Bug Fix: Tech vendor location UI now properly refreshed when purchasing a TOR router
|
||||
* Bug Fix: Fixed UI issue with faction donations
|
||||
* Bug Fix: The money statistics & breakdown should now properly track money earned from Hacknet Server (hashes -> money)
|
||||
* Bug Fix: Fixed issue with changing input in 'Minimum Path Sum in a Triangle' coding contract problem
|
||||
* Fixed several typos in various places
|
||||
|
||||
v0.46.2 - 4/14/2019
|
||||
-------------------
|
||||
* Source-File 2 now allows you to form gangs in other BitNodes when your karma reaches a very large negative value
|
||||
* (Karma is a hidden stat and is lowered by committing crimes)
|
||||
|
||||
* Gang changes:
|
||||
* Bug Fix: Gangs can no longer clash with themselve
|
||||
* Bug Fix: Winning against another gang should properly reduce their power
|
||||
|
||||
* Bug Fix: Terminal 'wget' command now works properly
|
||||
* Bug Fix: Hacknet Server Hash upgrades now properly reset upon installing Augs/switching BitNodes
|
||||
* Bug Fix: Fixed button for creating Corporations
|
||||
|
||||
v0.46.1 - 4/12/2019
|
||||
-------------------
|
||||
* Added a very rudimentary directory system to the Terminal
|
||||
* Details here: https://bitburner.readthedocs.io/en/latest/basicgameplay/terminal.html#filesystem-directories
|
||||
|
||||
* Added numHashes(), hashCost(), and spendHashes() functions to the Netscript Hacknet Node API
|
||||
* 'Generate Coding Contract' hash upgrade is now more expensive
|
||||
* 'Generate Coding Contract' hash upgrade now generates the contract randomly on the server, rather than on home computer
|
||||
* The cost of selling hashes for money no longer increases each time
|
||||
* Selling hashes for money now costs 4 hashes (in exchange for $1m)
|
||||
* Bug Fix: Hacknet Node earnings should work properly when game is inactive/offline
|
||||
* Bug Fix: Duplicate Sleeve augmentations are now properly reset when switching to a new BitNode
|
||||
|
||||
v0.46.0 - 4/3/2019
|
||||
------------------
|
||||
* Added BitNode-9: Hacktocracy
|
||||
|
||||
@@ -64,9 +64,9 @@ documentation_title = '{0} Documentation'.format(project)
|
||||
# built documents.
|
||||
#
|
||||
# The short X.Y version.
|
||||
version = '0.46'
|
||||
version = '0.47'
|
||||
# The full version, including alpha/beta/rc tags.
|
||||
release = '0.46.0'
|
||||
release = '0.47.0'
|
||||
|
||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||
# for a list of supported languages.
|
||||
|
||||
@@ -2,10 +2,11 @@ Guides & Tips
|
||||
=============
|
||||
|
||||
Getting Started Guide for Intermediate Programmers
|
||||
What BitNode should I do?
|
||||
|
||||
Beginners FAQ
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 3
|
||||
|
||||
Getting Started Guide for Beginner Programmers <guidesandtips/gettingstartedguideforbeginnerprogrammers>
|
||||
What BitNode should I do?<guidesandtips/recommendedbitnodeorder>
|
||||
|
||||
490
doc/source/guidesandtips/recommendedbitnodeorder.rst
Normal file
490
doc/source/guidesandtips/recommendedbitnodeorder.rst
Normal file
@@ -0,0 +1,490 @@
|
||||
What BitNode should I do?
|
||||
=========================
|
||||
|
||||
.. warning:: This page contains spoilers regarding the game's story/plot-line.
|
||||
|
||||
After destroying their first :ref:`BitNode <gameplay_bitnodes>`, many players
|
||||
wonder which BitNode they should tackle next. This guide hopefully helps answer
|
||||
that question.
|
||||
|
||||
Overview of each BitNode
|
||||
------------------------
|
||||
|
||||
BitNode-1: Source Genesis
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
Description
|
||||
The first BitNode created by the Enders to imprison the minds of humans. It became
|
||||
the prototype and testing-grounds for all of the BitNodes that followed.
|
||||
This is the first BitNode that you play through. It has no special
|
||||
modifications or mechanics.
|
||||
|
||||
Source-File
|
||||
:Max Level: 3
|
||||
|
||||
This Source-File lets the player start with 32GB of RAM on his/her home computer when
|
||||
entering a new BitNode, and also increases all of the player's multipliers by:
|
||||
|
||||
* Level 1: 16%
|
||||
* Level 2: 24%
|
||||
* Level 3: 28%
|
||||
|
||||
Difficulty
|
||||
The easiest BitNode
|
||||
|
||||
BitNode-2: Rise of the Underworld
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
Description
|
||||
Organized crime groups quickly filled the void of power left behind from the collapse of
|
||||
Western government in the 2050s. As society and civlization broke down, people quickly
|
||||
succumbed to the innate human impulse of evil and savagery. The organized crime
|
||||
factions quickly rose to the top of the modern world.
|
||||
|
||||
In this BitNode:
|
||||
|
||||
* Your hacking level is reduced by 20%
|
||||
* The growth rate and maximum amount of money available on servers are significantly decreased
|
||||
* The amount of money gained from crimes and Infiltration is tripled
|
||||
* Certain Factions (Slum Snakes, Tetrads, The Syndicate, The Dark Army, Speakers for the Dead,
|
||||
NiteSec, The Black Hand) give the player the ability to form and manage their own gangs. These gangs
|
||||
will earn the player money and reputation with the corresponding Faction
|
||||
* Every Augmentation in the game will be available through the Factions listed above
|
||||
* For every Faction NOT listed above, reputation gains are halved
|
||||
* You will no longer gain passive reputation with Factions
|
||||
|
||||
Source-File
|
||||
:Max Level: 3
|
||||
|
||||
This Source-File allows you to form gangs in other BitNodes once your karma decreases to a certain value.
|
||||
It also increases the player's crime success rate, crime money, and charisma multipliers by:
|
||||
|
||||
* Level 1: 24%
|
||||
* Level 2: 36%
|
||||
* Level 3: 42%
|
||||
|
||||
Difficulty
|
||||
Fairly easy, as hacking is still very profitable and the costs of various purchases/upgrades
|
||||
is not increased. The gang mechanic may seem strange as its very different from anything
|
||||
else, but it can be very powerful once you get the hang of it.
|
||||
|
||||
BitNode-3: Corporatocracy
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
Description
|
||||
Our greatest illusion is that a healthy society can revolve around a
|
||||
single-minded pursuit of wealth.
|
||||
Sometime in the early 21st century economic and political globalization turned
|
||||
the world into a corporatocracy, and it never looked back. Now, the privileged
|
||||
elite will happily bankrupt their own countrymen, decimate their own community,
|
||||
and evict their neighbors from houses in their desperate bid to increase their wealth.
|
||||
In this BitNode you can create and manage your own corporation. Running a successful corporation
|
||||
has the potential of generating massive profits. All other forms of income are reduced by 75%. Furthermore:
|
||||
|
||||
* The price and reputation cost of all Augmentations is tripled
|
||||
* The starting and maximum amount of money on servers is reduced by 75%
|
||||
* Server growth rate is reduced by 80%
|
||||
* You now only need 75 favour with a faction in order to donate to it, rather than 150
|
||||
|
||||
Source-File
|
||||
:Max Level: 3
|
||||
|
||||
This Source-File lets you create corporations on other BitNodes (although
|
||||
some BitNodes will disable this mechanic). This Source-File also increases your
|
||||
charisma and company salary multipliers by:
|
||||
|
||||
* Level 1: 8%
|
||||
* Level 2: 12%
|
||||
* Level 3: 14%
|
||||
|
||||
Difficulty
|
||||
Somewhat-steep learning curve as you learn how to use and manage Corporations. Afterwards,
|
||||
however, the BitNode is easy as Corporations can be very profitable.
|
||||
|
||||
BitNode-4: The Singularity
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
Description
|
||||
The Singularity has arrived. The human race is gone, replaced by artificially superintelligent
|
||||
beings that are more machine than man.
|
||||
|
||||
In this BitNode, progressing is significantly harder:
|
||||
|
||||
* Experience gain rates for all stats are reduced.
|
||||
* Most methods of earning money will now give significantly less.
|
||||
|
||||
In this BitNode you will gain access to a new set of Netscript Functions known as Singularity Functions.
|
||||
These functions allow you to control most aspects of the game through scripts, including
|
||||
working for factions/companies, purchasing/installing Augmentations, and creating programs.
|
||||
|
||||
Source-File
|
||||
:Max Level: 3
|
||||
|
||||
This Source-File lets you access and use the Singularity Functions in other BitNodes.
|
||||
Each level of this Source-File will open up more Singularity Functions that you can use.
|
||||
|
||||
Difficulty:
|
||||
Depending on what Source-Files you have unlocked before attempting this BitNode,
|
||||
it can range from easy to moderate.
|
||||
|
||||
BitNode-5: Artificial Intelligence
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
Description
|
||||
They said it couldn't be done. They said the human brain,
|
||||
along with its consciousness and intelligence, couldn't be replicated. They said the complexity
|
||||
of the brain results from unpredictable, nonlinear interactions that couldn't be modeled
|
||||
by 1's and 0's. They were wrong.
|
||||
|
||||
In this BitNode:
|
||||
|
||||
* The base security level of servers is doubled
|
||||
* The starting money on servers is halved, but the maximum money remains the same
|
||||
* Most methods of earning money now give significantly less
|
||||
* Infiltration gives 50% more reputation and money
|
||||
* Corporations have 50% lower valuations and are therefore less profitable
|
||||
* Augmentations are more expensive
|
||||
* Hacking experience gain rates are reduced
|
||||
|
||||
Source-File
|
||||
:Max Level: 3
|
||||
|
||||
This Source-File grants you a special new stat called Intelligence.
|
||||
|
||||
Intelligence is unique because it is permanent and persistent (it never gets reset back to 1). However
|
||||
gaining Intelligence experience is much slower than other stats, and it is also hidden (you won't know
|
||||
when you gain experience and how much). Higher Intelligence levels will boost your production for many actions
|
||||
in the game.
|
||||
|
||||
In addition, this Source-File will unlock the :js:func:`getBitNodeMultipliers()` Netscript function,
|
||||
and will also raise all of your hacking-related multipliers by:
|
||||
|
||||
* Level 1: 8%
|
||||
* Level 2: 12%
|
||||
* Level 3: 14%
|
||||
|
||||
Difficulty
|
||||
Depending on what Source-Files you have unlocked before attempting this BitNode, it
|
||||
can range from easy to moderate.
|
||||
|
||||
BitNode-6: Bladeburners
|
||||
^^^^^^^^^^^^^^^^^^^^^^^
|
||||
Description
|
||||
In the middle of the 21st century, OmniTek Incorporated began designing and manufacturing advanced synthetic
|
||||
androids, or Synthoids for short. They achieved a major technological breakthrough in the sixth generation
|
||||
of their Synthoid design, called MK-VI, by developing a hyperintelligent AI. Many argue that this was
|
||||
the first sentient AI ever created. This resulted in Synthoid models that were stronger, faster, and more intelligent
|
||||
than the humans that had created them.
|
||||
|
||||
In this BitNode you will be able to access the Bladeburner Division at the NSA, which provides
|
||||
a new mechanic for progression. Furthermore:
|
||||
|
||||
* Hacking and Hacknet Nodes will be less profitable
|
||||
* Your hacking level is reduced by 65%
|
||||
* Hacking experience gain from scripts is reduced by 75%
|
||||
* Corporations have 80% lower valuations and are therefore less profitable
|
||||
* Working for companies is 50% less profitable
|
||||
* Crimes and Infiltration are 25% less profitable
|
||||
|
||||
Source-File
|
||||
:Max Level: 3
|
||||
|
||||
This Source-File allows you to access the NSA's Bladeburner Division in other
|
||||
BitNodes. In addition, this Source-File will raise both the level and experience
|
||||
gain rate of all your combat stats by:
|
||||
|
||||
* Level 1: 8%
|
||||
* Level 2: 12%
|
||||
* Level 3: 14%
|
||||
|
||||
Difficulty
|
||||
Initially difficult due to the fact that hacking is no longer profitable and you have
|
||||
to learn a new mechanic. After you get the hang of the Bladeburner mechanic, however,
|
||||
it becomes moderately easy.
|
||||
|
||||
BitNode-7: Bladeburners 2079
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
Description
|
||||
In the middle of the 21st century, you were doing cutting-edge work at OmniTek Incorporated
|
||||
as part of the AI design team for advanced synthetic androids, or Synthoids for short. You helped
|
||||
achieve a major technological breakthrough in the sixth generation of the company's Synthoid
|
||||
design, called MK-VI, by developing a hyperintelligent AI. Many argue that this was the first
|
||||
sentient AI ever created. This resulted in Synthoid models that were stronger, faster,
|
||||
and more intelligent than the humans that had created them.
|
||||
|
||||
In this BitNode you will be able to access the Bladeburner API, which allows you to access
|
||||
Bladeburner functionality through Netscript. Furthermore:
|
||||
|
||||
* The rank you gain from Bladeburner contracts/operations is reduced by 40%
|
||||
* Bladeburner skills cost twice as many skill points
|
||||
* Augmentations are 3x more expensive
|
||||
* Hacking and Hacknet Nodes will be significantly less profitable
|
||||
* Your hacking level is reduced by 65%
|
||||
* Hacking experience gain from scripts is reduced by 75%
|
||||
* Corporations have 80% lower valuations and are therefore less profitable
|
||||
* Working for companies is 50% less profitable
|
||||
* Crimes and Infiltration are 25% less profitable
|
||||
|
||||
Source-File
|
||||
:Max Level: 3
|
||||
|
||||
This Source-File allows you to access the Bladeburner Netscript API in other
|
||||
BitNodes. In addition, this Source-File will increase all of your Bladeburner multipliers by:
|
||||
|
||||
* Level 1: 8%
|
||||
* Level 2: 12%
|
||||
* Level 3: 14%
|
||||
|
||||
Difficulty
|
||||
Slightly more difficult than BitNode-6. However, you will be able to automate more
|
||||
aspects of the Bladeburner feature, which means it will be more passive.
|
||||
|
||||
BitNode-8: Ghost of Wall Street
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
Description
|
||||
You are trying to make a name for yourself as an up-and-coming hedge fund manager on Wall Street.
|
||||
|
||||
In this BitNode:
|
||||
|
||||
* You start with $250 million
|
||||
* The only way to earn money is by trading on the stock market
|
||||
* You start with a WSE membership and access to the TIX API
|
||||
* You are able to short stocks and place different types of orders (limit/stop)
|
||||
* You can immediately donate to factions to gain reputation
|
||||
|
||||
Source-File
|
||||
:Max Level: 3
|
||||
|
||||
This Source-File grants the following benefits:
|
||||
|
||||
* Level 1: Permanent access to WSE and TIX API
|
||||
* Level 2: Ability to short stocks in other BitNodes
|
||||
* Level 3: Ability to use limit/stop orders in other BitNodes
|
||||
|
||||
This Source-File also increases your hacking growth multipliers by:
|
||||
|
||||
* Level 1: 12%
|
||||
* Level 2: 18%
|
||||
* Level 3: 21%
|
||||
|
||||
Difficulty
|
||||
Very difficult until you unlock the Four Sigma (4S) Market Data API. After you
|
||||
unlock the API however, it becomes moderately easy.
|
||||
|
||||
BitNode-9: Hacktocracy
|
||||
^^^^^^^^^^^^^^^^^^^^^^
|
||||
Description
|
||||
When Fulcrum Technologies released their open-source Linux distro Chapeau, it quickly
|
||||
became the OS of choice for the underground hacking community. Chapeau became especially
|
||||
notorious for powering the Hacknet, a global, decentralized network used for nefarious
|
||||
purposes. Fulcrum quickly abandoned the project and dissociated themselves from it.
|
||||
|
||||
This BitNode unlocks the Hacknet Server, an upgraded version of the Hacknet Node. Hacknet Servers generate
|
||||
hashes, which can be spent on a variety of different upgrades.
|
||||
|
||||
In this BitNode:
|
||||
* Your stats are significantly decreased
|
||||
* You cannnot purchase additional servers
|
||||
* Hacking is significantly less profitable
|
||||
|
||||
Source-File
|
||||
:Max Level: 3
|
||||
|
||||
This Source-File grants the following benefits:
|
||||
|
||||
* Level 1: Permanently unlocks the Hacknet Server in other BitNodes
|
||||
* Level 2: You start with 128GB of RAM on your home computer when entering a new BitNode
|
||||
* Level 3: Grants a highly-upgraded Hacknet Server when entering a new BitNode
|
||||
|
||||
(Note that the Level 3 effect of this Source-File only applies when entering a new BitNode, NOT
|
||||
when installing Augmentation
|
||||
|
||||
Difficulty
|
||||
Hard
|
||||
|
||||
BitNode-10: Digital Carbon
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
Description
|
||||
In 2084, VitaLife unveiled to the world the Persona Core, a technology that allowed people
|
||||
to digitize their consciousness. Their consciousness could then be transferred into Synthoids
|
||||
or other bodies by trasmitting the digitized data. Human bodies became nothing more than 'sleeves'
|
||||
for the human consciousness. Mankind had finally achieved immortality - at least for those
|
||||
that could afford it.
|
||||
|
||||
This BitNode unlocks Sleeve technology. Sleeve technology allows you to:
|
||||
|
||||
1. Re-sleeve: Purchase and transfer your consciousness into a new body
|
||||
2. Duplicate Sleeves: Duplicate your consciousness into Synthoids, allowing you to perform different tasks synchronously
|
||||
|
||||
In this BitNode:
|
||||
* Your stats are significantly decreased
|
||||
* All methods of gaining money are half as profitable (except Stock Market)
|
||||
* Purchased servers are more expensive, have less max RAM, and a lower maximum limit
|
||||
* Augmentations are 5x as expensive and require twice as much reputation
|
||||
|
||||
Source-File
|
||||
:Max Level: 3
|
||||
|
||||
This Source-File unlocks Sleeve technology in other BitNodes.
|
||||
Each level of this Source-File also grants you a Duplicate Sleeve
|
||||
|
||||
Difficulty
|
||||
Hard
|
||||
|
||||
BitNode-11: The Big Crash
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
Description
|
||||
The 2050s was defined by the massive amounts of violent civil unrest and anarchic rebellion that rose all around the world. It was this period
|
||||
of disorder that eventually lead to the governmental reformation of many global superpowers, most notably
|
||||
the USA and China. But just as the world was slowly beginning to recover from these dark times, financial catastrophe hit.
|
||||
In many countries, the high cost of trying to deal with the civil disorder bankrupted the governments. In all of this chaos and confusion, hackers
|
||||
were able to steal billions of dollars from the world's largest electronic banks, prompting an international banking crisis as
|
||||
governments were unable to bail out insolvent banks. Now, the world is slowly crumbling in the middle of the biggest economic crisis of all time.
|
||||
|
||||
In this BitNode:
|
||||
|
||||
* Your hacking stat and experience gain are halved
|
||||
* The starting and maximum amount of money available on servers is significantly decreased
|
||||
* The growth rate of servers is significantly reduced
|
||||
* Weakening a server is twice as effective
|
||||
* Company wages are decreased by 50%
|
||||
* Corporation valuations are 99% lower and are therefore significantly less profitable
|
||||
* Hacknet Node production is significantly decreased
|
||||
* Crime and Infiltration are more lucrative
|
||||
* Augmentations are twice as expensive
|
||||
|
||||
Source-File
|
||||
:Max Level: 3
|
||||
|
||||
Destroying this BitNode will give you Source-File 11, or if you already have this Source-File it will
|
||||
upgrade its level up to a maximum of 3. This Source-File makes it so that company favor increases BOTH
|
||||
the player's salary and reputation gain rate at that company by 1% per favor (rather than just the reputation gain).
|
||||
This Source-File also increases the player's company salary and reputation gain multipliers by:
|
||||
|
||||
* Level 1: 32%
|
||||
* Level 2: 48%
|
||||
* Level 3: 56%
|
||||
|
||||
Difficulty
|
||||
Hard
|
||||
|
||||
BitNode-12: The Recursion
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
Description
|
||||
Every time this BitNode is destroyed, it becomes slightly harder.
|
||||
|
||||
Source-File
|
||||
:Max Level: Infinity
|
||||
|
||||
Each level of Source-File 12 will increase all of your multipliers by 1%. This effect
|
||||
is multiplicative with itself. In other words, level N of this Source-File will result
|
||||
in a multiplier of 1.01^N (or 0.99^N for multipliers that decrease)
|
||||
|
||||
Difficulty
|
||||
Initially very easy, but then it (obviously) becomes harder as you continue to do it.
|
||||
|
||||
Recommended BitNodes
|
||||
--------------------
|
||||
As a player, you are not forced to tackle the BitNodes in any particular order. You are
|
||||
free to choose whichever ones you want. The "best" order can vary between players,
|
||||
depending on what you like to do any what kind of player you are. In general, here
|
||||
are the recommended BitNodes for different things:
|
||||
|
||||
For fast progression
|
||||
^^^^^^^^^^^^^^^^^^^^
|
||||
.. note:: This does not recommend the absolute fastest path, as I don't know what
|
||||
exactly the fastest path is. But it does recommend the BitNodes that are
|
||||
commonly considered to be optimal by players.
|
||||
|
||||
1. Repeat **BitNode-1: Source Genesis** until you max out its Source-File. Its Source-File
|
||||
is extremely powerful, as it raises all multipliers by a significant amount.
|
||||
|
||||
2. Repeat **BitNode-12: The Recursion** several times. This BitNode will be extremely easy the
|
||||
first few times you tackle it, and its Source-File raises all multipliers. Furthermore,
|
||||
its effect stacks multiplicatively with itself and other Source-Files/Augmentations,
|
||||
which gets better as time goes on
|
||||
|
||||
3. Do **BitNode-5: Artificial Intelligence** once or twice. The intelligence stat it unlocks
|
||||
will gradually build up as you continue to play the game, and will be helpful
|
||||
in the future. The Source-File also provides hacking multipliers, which are
|
||||
strong because hacking is typically one of the best ways of earning money.
|
||||
|
||||
4. (Optional) Consider doing **BitNode-4: The Singularity**. Its Source-File does not directly make you
|
||||
more powerful in any way, but it does unlock :ref:`netscript_singularityfunctions` which
|
||||
let you automate significantly more aspects of the game.
|
||||
|
||||
5. Do **BitNode-3: Corporatocracy** once to unlock the Corporation mechanic. This mechanic
|
||||
has high profit potential.
|
||||
|
||||
6. Do **BitNode-6: Bladeburners** once to unlock the Bladeburners mechanic. The Bladeburner
|
||||
mechanic is useful for some of the future BitNodes (such as 9 and 10).
|
||||
|
||||
7. Do **BitNode-9: Hacktocracy** to unlock the Hacknet Server mechanic. You can
|
||||
consider repeating it as well, as its Level 2 and 3 effects are pretty helpful as well.
|
||||
|
||||
.. todo:: To be continued as more BitNodes get added
|
||||
|
||||
For the strongest Source-Files
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
Note that the strongest Source-Files are typically rewarded by the hardest BitNodes.
|
||||
|
||||
The strongest Source-File is that from **BitNode-1: Source Genesis**, as it raises
|
||||
all multipliers by a significant amount.
|
||||
|
||||
Similarly, the Source-File from **BitNode-12: The Recursion** is also very strong
|
||||
because it raises all multipliers. Each level of Source-File 12 is fairly weak,
|
||||
but its effectiveness gets better over time since the effects of Source-Files and
|
||||
Augmentations are multiplicative with each other.
|
||||
|
||||
The Source-File from **BitNode-9: Hacktocracy** is good because it unlocks the Hacknet
|
||||
Server mechanic. The Hacknet Server mechanic causes Hacknet Nodes to produce a new
|
||||
currency called *hashes*, rather than money. *Hashes* can be spent on powerful upgrades
|
||||
that benefit your hacking, Corporation, Bladeburner, etc.
|
||||
|
||||
The Duplicate Sleeves granted by the Source-File from **BitNode-10: Digital Carbon**
|
||||
are strong, but only after you have several of them and have spent some time/money upgrading
|
||||
them.
|
||||
|
||||
For more scripting/hacking
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
**BitNode-4: The Singularity** unlocks the :ref:`netscript_singularityfunctions`, which
|
||||
can be used to automate many different aspects of the game, including working for factions/companies,
|
||||
purchasing & installing Augmentations, and creating programs
|
||||
|
||||
**BitNode-6** and **BitNode-7** unlock Bladeburner and its corresponding
|
||||
:ref:`Netscript API <netscript_bladeburnerapi>`. This allows you to automate an entire
|
||||
new mechanic.
|
||||
|
||||
**BitNode-2: Rise of the Underworld** also unlocks a new mechanic and Netscript API for automating
|
||||
it (the Gang mechanic). However, it is not as interesting as Bladeburner (in my opinion)
|
||||
|
||||
**BitNode-9: Hacktocracy** unlocks the Hacknet Server mechanic and several new
|
||||
functions in the :ref:`Hacknet Node API <netscript_hacknetnodeapi>` for using it.
|
||||
|
||||
For new mechanics
|
||||
^^^^^^^^^^^^^^^^^
|
||||
**BitNode-2: Rise of the Underworld** unlocks a new mechanic in which you can
|
||||
manage a gang. Gangs earn you money and can be very profitable once they get large
|
||||
and powerful. The biggest benefit of gangs, however, is that they make all
|
||||
Augmentations available to you through their corresponding faction.
|
||||
|
||||
**BitNode-3: Corporatocracy** unlocks a new mechanic in which you can manage a
|
||||
corporation. You can earn money through Corporations by selling your stocks, or by
|
||||
configuring your corporation to pay dividends to shareholders. If your Corporation
|
||||
gets big enough, it can also bribe factions in exchange for faction reputation.
|
||||
|
||||
**BitNode-6: Bladeburners** unlocks a new mechanic that centers around combat rather
|
||||
than hacking. The main benefit of the Bladeburner mechanic is that it offers a new
|
||||
method of destroying a BitNode.
|
||||
|
||||
**BitNode-9: Hacktocracy** unlocks the Hacknet Server, which is an upgraded version of a
|
||||
Hacknet Node. The Hacknet Server generates a computational unit called a *hash*. *Hashes*
|
||||
can be spent on a variety of different upgrades that can benefit your hacking,
|
||||
Corporation, Bladeburner progress, and more. It transforms the Hacknet Node from a
|
||||
simple money-generator to a more interesting mechanic.
|
||||
|
||||
**BitNode-10: Digital Carbon** unlocks two new mechanics: Re-Sleeving and
|
||||
Duplicate Sleeves.
|
||||
|
||||
For a Challenge
|
||||
^^^^^^^^^^^^^^^
|
||||
In general, the higher BitNodes are more difficult than the lower ones.
|
||||
**BitNode-12: The Recursion** is an obvious exception as it gets progressively harder.
|
||||
|
||||
**BitNode-8: Ghost of Wall Street** provides a unique challenge as the only method
|
||||
of earning money in that BitNode is through trading at the stock market.
|
||||
@@ -5,8 +5,9 @@
|
||||
|
||||
Welcome to Bitburner's documentation!
|
||||
=====================================
|
||||
Bitburner is a cyberpunk-themed `incremental game <https://en.wikipedia.org/wiki/Incremental_game>`_ that is currently in the
|
||||
early beta stage of development. The game `can be played here <https://danielyxie.github.io/bitburner/>`_.
|
||||
Bitburner is a programming-based `incremental game <https://en.wikipedia.org/wiki/Incremental_game>`_
|
||||
that revolves around hacking and cyberpunk themes. The game is currently in the
|
||||
early beta stage of development. It `can be played here <https://danielyxie.github.io/bitburner/>`_.
|
||||
|
||||
What is Bitburner?
|
||||
------------------
|
||||
@@ -26,6 +27,7 @@ secrets that you've been searching for.
|
||||
Script Editors <scripteditors>
|
||||
Game Frozen or Stuck? <gamefrozen>
|
||||
Guides & Tips <guidesandtips>
|
||||
Tools & Resources <toolsandresources>
|
||||
Changelog <changelog>
|
||||
Donate <https://paypal.me/danielyxie>
|
||||
|
||||
|
||||
@@ -3,14 +3,19 @@ getBitNodeMultipliers() Netscript Function
|
||||
|
||||
.. js:function:: getBitNodeMultipliers()
|
||||
|
||||
Returns an object containing the current BitNode multipliers. This function requires Source-File 5 in order
|
||||
to run. The multipliers are returned in decimal forms (e.g. 1.5 instead of 150%). The multipliers represent
|
||||
the difference between the current BitNode and the original BitNode (BitNode-1). For example, if the
|
||||
*CrimeMoney* multiplier has a value of 0.1, then that means that committing crimes in the current BitNode
|
||||
will only give 10% of the money you would have received in BitNode-1.
|
||||
:RAM cost: 4 GB
|
||||
|
||||
The structure of the returned object is subject to change as BitNode multipliers get added to the game.
|
||||
Refer to the `source code here <https://github.com/danielyxie/bitburner/blob/master/src/BitNode/BitNodeMultipliers.ts>`_
|
||||
Returns an object containing the current BitNode multipliers. This function
|
||||
requires Source-File 5 in order to run. The multipliers are returned in
|
||||
decimal forms (e.g. 1.5 instead of 150%). The multipliers represent the
|
||||
difference between the current BitNode and the original BitNode (BitNode-1).
|
||||
For example, if the *CrimeMoney* multiplier has a value of 0.1, then that
|
||||
means that committing crimes in the current BitNode will only give 10% of
|
||||
the money you would have received in BitNode-1.
|
||||
|
||||
The structure of the returned object is subject to change as BitNode
|
||||
multipliers get added to the game. Refer to the `source code here
|
||||
<https://github.com/danielyxie/bitburner/blob/master/src/BitNode/BitNodeMultipliers.ts>`_
|
||||
to see the name of the BitNode multipliers.
|
||||
|
||||
Example::
|
||||
|
||||
@@ -1,13 +1,17 @@
|
||||
brutessh() Netscript Function
|
||||
=============================
|
||||
|
||||
.. js:function:: brutessh(hostname/ip)
|
||||
.. js:function:: brutessh(hostname)
|
||||
|
||||
:param string hostname/ip: IP or hostname of the target server
|
||||
:RAM cost: 0 GB
|
||||
:RAM cost: 0.05 GB
|
||||
|
||||
Runs the BruteSSH.exe program on the target server. BruteSSH.exe must exist on your home computer.
|
||||
:param string hostname: Hostname of the target server.
|
||||
|
||||
Example::
|
||||
Runs the BruteSSH.exe program on the target server. BruteSSH.exe must exist
|
||||
on your home computer.
|
||||
|
||||
Examples:
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
brutessh("foodnstuff");
|
||||
|
||||
@@ -1,13 +1,16 @@
|
||||
clear() Netscript Function
|
||||
==========================
|
||||
|
||||
.. js:function:: clear(port/fn)
|
||||
.. js:function:: clear(portOrFilename)
|
||||
|
||||
:param string/number port/fn: Port or text file to clear
|
||||
:RAM cost: 1 GB
|
||||
|
||||
This function is used to clear data in a `Netscript Ports <http://bitburner.wikia.com/wiki/Netscript_Ports>`_ or a text file.
|
||||
:param string/number portOrFilename: Port or text file to clear.
|
||||
|
||||
If the *port/fn* argument is a number between 1 and 20, then it specifies a port and will clear it (deleting all data from the underlying queue).
|
||||
This function is used to clear data in a :ref:`Netscript Port <netscript_ports>` or a text file.
|
||||
|
||||
If the *port/fn* argument is a string, then it specifies the name of a text file (.txt) and will delete all data from that text file.
|
||||
If the ``portOrFilename`` argument is a number between 1 and 20, then it
|
||||
specifies a port and will clear it (deleting all data from the underlying queue).
|
||||
|
||||
If the ``portOrFilename`` argument is a string, then it specifies the name
|
||||
of a text file (.txt) and will delete all data from that text file.
|
||||
|
||||
@@ -5,4 +5,13 @@ clearLog() Netscript Function
|
||||
|
||||
:RAM cost: 0 GB
|
||||
|
||||
Clears the script's logs
|
||||
Clears the script's logs. Useful when making monitoring scripts.
|
||||
|
||||
Examples:
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
while(true) {
|
||||
clearLog();
|
||||
print(getServerMoneyAvailable('foodnstuff'));
|
||||
}
|
||||
|
||||
@@ -3,12 +3,12 @@ deleteServer() Netscript Function
|
||||
|
||||
.. js:function:: deleteServer(hostname)
|
||||
|
||||
:param string hostname: Hostname of the server to delete
|
||||
:RAM cost: 2.25 GB
|
||||
:param string hostname: Hostname of the server to delete.
|
||||
:returns: ``true`` if successful, ``false`` otherwise.
|
||||
|
||||
Deletes one of your purchased servers, which is specified by its hostname.
|
||||
Deletes the specified purchased server.
|
||||
|
||||
The *hostname* argument can be any data type, but it will be converted to a string. Whitespace is automatically removed from
|
||||
the string. This function will not delete a server that still has scripts running on it.
|
||||
|
||||
Returns true if successful, and false otherwise.
|
||||
The ``hostname`` argument can be any data type, but it will be converted to
|
||||
a string. Whitespace is automatically removed from the string. This function
|
||||
will not delete a server that still has scripts running on it.
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
disableLog() Netscript Function
|
||||
===============================
|
||||
|
||||
.. js:function:: disableLog(fn)
|
||||
.. js:function:: disableLog(functionName)
|
||||
|
||||
:param string fn: Name of function for which to disable logging
|
||||
:RAM cost: 0 GB
|
||||
|
||||
:param string functionName: Name of function for which to disable logging.
|
||||
|
||||
Disables logging for the given function. Logging can be disabled for
|
||||
all functions by passing 'ALL' as the argument.
|
||||
|
||||
Note that this does not completely remove all logging functionality.
|
||||
This only stops a function from logging
|
||||
when the function is successful. If the function fails, it will still log the reason for failure.
|
||||
This only stops a function from logging when the function is successful. If
|
||||
the function fails, it will still log the reason for failure.
|
||||
|
||||
Notable functions that cannot have their logs disabled: run, exec, exit
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
enableLog() Netscript Function
|
||||
==============================
|
||||
|
||||
.. js:function:: enableLog(fn)
|
||||
.. js:function:: enableLog(functionName)
|
||||
|
||||
:param string fn: Name of function for which to enable logging
|
||||
:RAM cost: 0 GB
|
||||
|
||||
Re-enables logging for the given function. If 'ALL' is passed into this function
|
||||
as an argument, then it will revert the effects of disableLog('ALL')
|
||||
:param string functionName: Name of function for which to enable logging.
|
||||
|
||||
Re-enables logging for the given function. If 'ALL' is passed into this
|
||||
function as an argument, then it will revert the effects of
|
||||
``disableLog('ALL')``
|
||||
|
||||
@@ -1,34 +1,41 @@
|
||||
exec() Netscript Function
|
||||
=========================
|
||||
|
||||
.. js:function:: exec(script, hostname/ip, [numThreads=1], [args...])
|
||||
.. js:function:: exec(script, hostname[, numThreads=1[, args...]])
|
||||
|
||||
:param string script: Filename of script to execute
|
||||
:param string hostname/ip: IP or hostname of the 'target server' on which to execute the script
|
||||
:param number numThreads: Optional thread count for new script. Set to 1 by default. Will be rounded to nearest integer
|
||||
:param args...:
|
||||
Additional arguments to pass into the new script that is being run. Note that if any arguments are being
|
||||
passed into the new script, then the third argument *numThreads* must be filled in with a value.
|
||||
:RAM cost: 1.3 GB
|
||||
|
||||
Run a script as a separate process on a specified server. This is similar to the *run* function except
|
||||
that it can be used to run a script on any server, instead of just the current server.
|
||||
:param string script: Filename of script to execute.
|
||||
:param string hostname: Hostname of the target server on which to execute the script.
|
||||
:param number numThreads: Optional thread count for new script. Set to 1 by
|
||||
default. Will be rounded to nearest integer
|
||||
:param args...: Additional arguments to pass into the new script that is
|
||||
being run. Note that if any arguments are being
|
||||
passed into the new script, then the third argument ``numThreads`` must
|
||||
be filled in with a value.
|
||||
:returns: Newly created process id on success, 0 on failure.
|
||||
|
||||
Returns true if the script is successfully started, and false otherwise.
|
||||
Run a script as a separate process on a specified server. This is similar to
|
||||
the :doc:`run<run>` function except that it can be used to run a script on any
|
||||
server, instead of just the current server.
|
||||
|
||||
Running this function with a *numThreads* argument of 0 will return false without running the script.
|
||||
However, running this function with a negative *numThreads* argument will cause a runtime error.
|
||||
.. warning:: Running this function with a ``numThreads`` argument of 0 will return 0 without
|
||||
running the script. However, running this function with a negative *numThreads*
|
||||
argument will cause a runtime error.
|
||||
|
||||
The simplest way to use the *exec* command is to call it with just the script name and the target server.
|
||||
The following example will try to run *generic-hack.script* on the *foodnstuff* server::
|
||||
The simplest way to use the :doc:`exec<exec>` command is to call it with
|
||||
just the script name and the target server. The following example will try
|
||||
to run ``generic-hack.script`` on the ``foodnstuff`` server::
|
||||
|
||||
exec("generic-hack.script", "foodnstuff");
|
||||
|
||||
The following example will try to run the script *generic-hack.script* on the *joesguns* server with 10 threads::
|
||||
The following example will try to run the script ``generic-hack.script`` on
|
||||
the ``joesguns`` server with 10 threads::
|
||||
|
||||
exec("generic-hack.script", "joesguns", 10);
|
||||
|
||||
This last example will try to run the script *foo.script* on the *foodnstuff* server with 5 threads. It will also pass
|
||||
the number 1 and the string "test" in as arguments to the script::
|
||||
This last example will try to run the script ``foo.script`` on the
|
||||
``foodnstuff`` server with 5 threads. It will also pass the number 1 and the
|
||||
string "test" in as arguments to the script::
|
||||
|
||||
exec("foo.script", "foodnstuff", 5, 1, "test");
|
||||
|
||||
@@ -5,4 +5,4 @@ exit() Netscript Function
|
||||
|
||||
:RAM cost: 0 GB
|
||||
|
||||
Terminates the current script immediately
|
||||
Terminates the current script immediately.
|
||||
|
||||
@@ -1,25 +1,29 @@
|
||||
fileExists() Netscript Function
|
||||
===============================
|
||||
|
||||
.. js:function:: fileExists(filename, [hostname/ip])
|
||||
.. js:function:: fileExists(filename[, hostname])
|
||||
|
||||
:param string filename: Filename of file to check
|
||||
:param string hostname/ip:
|
||||
Hostname or IP of target server. This is optional. If it is not specified then the
|
||||
function will use the current server as the target server
|
||||
:RAM cost: 0.1 GB
|
||||
|
||||
Returns a boolean indicating whether the specified file exists on the target server. The filename
|
||||
for scripts is case-sensitive, but for other types of files it is not. For example, *fileExists("brutessh.exe")*
|
||||
will work fine, even though the actual program is named "BruteSSH.exe".
|
||||
:param string filename: Filename of file to check.
|
||||
:param string hostname:
|
||||
Hostname of target server. This is optional. If it is not specified then
|
||||
the function will use the current server as the target server.
|
||||
:returns: ``true`` if the file exists, ``false`` if it doesn't.
|
||||
|
||||
If the *hostname/ip* argument is omitted, then the function will search through the current server (the server
|
||||
running the script that calls this function) for the file.
|
||||
The filename for scripts is case-sensitive, but for other types of files it
|
||||
is not. For example, ``fileExists("brutessh.exe")`` will work fine, even
|
||||
though the actual program is named ``BruteSSH.exe``.
|
||||
|
||||
Examples::
|
||||
If the ``hostname`` argument is omitted, then the function will search
|
||||
through the server running the script that calls this function for the file.
|
||||
|
||||
fileExists("foo.script", "foodnstuff");
|
||||
fileExists("ftpcrack.exe");
|
||||
Examples:
|
||||
|
||||
The first example above will return true if the script named *foo.script* exists on the *foodnstuff* server, and false otherwise.
|
||||
The second example above will return true if the current server contains the *FTPCrack.exe* program, and false otherwise.
|
||||
.. code-block:: javascript
|
||||
|
||||
fileExists("foo.script", "foodnstuff"); // returns: false
|
||||
fileExists("ftpcrack.exe"); // returns: true
|
||||
|
||||
The first example above will return true if the script named ``foo.script`` exists on the ``foodnstuff`` server, and false otherwise.
|
||||
The second example above will return true if the current server contains the ``FTPCrack.exe`` program, and false otherwise.
|
||||
|
||||
@@ -1,13 +1,18 @@
|
||||
ftpcrack() Netscript Function
|
||||
=============================
|
||||
|
||||
.. js:function:: ftpcrack(hostname/ip)
|
||||
.. js:function:: ftpcrack(hostname)
|
||||
|
||||
:param string hostname/ip: IP or hostname of the target server
|
||||
:RAM cost: 0 GB
|
||||
:RAM cost: 0.05 GB
|
||||
|
||||
Runs the FTPCrack.exe program on the target server. FTPCrack.exe must exist on your home computer.
|
||||
:param string hostname: Hostname of the target server.
|
||||
|
||||
Example::
|
||||
Runs the ``FTPCrack.exe`` program on the target server. ``FTPCrack.exe``
|
||||
must exist on your home computer.
|
||||
|
||||
|
||||
Examples:
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
ftpcrack("foodnstuff");
|
||||
|
||||
@@ -4,5 +4,10 @@ getFavorToDonate() Netscript Function
|
||||
.. js:function:: getFavorToDonate()
|
||||
|
||||
:RAM cost: 0.1 GB
|
||||
:returns: Amount of faction favor required to unlock donation.
|
||||
|
||||
Returns the amount of Faction favor required to be able to donate to a faction.
|
||||
Example:
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
getFavorToDonate() // returns: 150
|
||||
@@ -1,13 +1,24 @@
|
||||
getGrowTime() Netscript Function
|
||||
================================
|
||||
|
||||
.. js:function:: getGrowTime(hostname/ip[, hackLvl=current level])
|
||||
.. js:function:: getGrowTime(hostname[, hackLvl=current level])
|
||||
|
||||
:param string hostname/ip: Hostname or IP of target server
|
||||
:param number hackLvl: Optional hacking level for the calculation. Defaults to player's current hacking level
|
||||
:RAM cost: 0.05 GB
|
||||
|
||||
Returns the amount of time in seconds it takes to execute the *grow()* Netscript function on the target server.
|
||||
:param string hostname: Hostname of target server.
|
||||
:param number hackLvl: Optional hacking level for the calculation. Defaults
|
||||
to player's current hacking level.
|
||||
:returns: seconds it takes to execute :doc:`grow<grow>` on that server.
|
||||
|
||||
The function takes in an optional *hackLvl* parameter that can be specified
|
||||
to see what the grow time would be at different hacking levels.
|
||||
The function takes in an optional ``hackLvl`` parameter that can be
|
||||
specified to see what the grow time would be at different hacking levels.
|
||||
|
||||
|
||||
Example:
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
getGrowTime("foodnstuff"); // returns: 53.4
|
||||
|
||||
.. note:: For Hacknet Servers (the upgraded version of a Hacknet Node), this function will
|
||||
return ``Infinity``.
|
||||
|
||||
@@ -1,13 +1,22 @@
|
||||
getHackTime() Netscript Function
|
||||
================================
|
||||
|
||||
.. js:function:: getHackTime(hostname/ip[, hackLvl=current level])
|
||||
.. js:function:: getHackTime(hostname[, hackLvl=current level])
|
||||
|
||||
:param string hostname/ip: Hostname or IP of target server
|
||||
:param number hackLvl: Optional hacking level for the calculation. Defaults to player's current hacking level
|
||||
:RAM cost: 0.05 GB
|
||||
:param string hostname: Hostname of target server.
|
||||
:param number hackLvl: Optional hacking level for the calculation. Defaults
|
||||
to player's current hacking level.
|
||||
:returns: seconds it takes to execute :doc:`hack<hack>` on that server.
|
||||
|
||||
Returns the amount of time in seconds it takes to execute the *hack()* Netscript function on the target server.
|
||||
The function takes in an optional ``hackLvl`` parameter that can be
|
||||
specified to see what the hack time would be at different hacking levels.
|
||||
|
||||
The function takes in an optional *hackLvl* parameter that can be specified
|
||||
to see what the hack time would be at different hacking levels.
|
||||
Example:
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
getHackTime("foodnstuff"); // returns: 53.4
|
||||
|
||||
.. note:: For Hacknet Servers (the upgraded version of a Hacknet Node), this function will
|
||||
return :code:`Infinity`.
|
||||
|
||||
@@ -4,5 +4,10 @@ getHackingLevel() Netscript Function
|
||||
.. js:function:: getHackingLevel()
|
||||
|
||||
:RAM cost: 0.05 GB
|
||||
:returns: The player's current hacking level.
|
||||
|
||||
Returns the player's current hacking level
|
||||
Example:
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
getHackingLevel(); // returns: 124
|
||||
@@ -4,9 +4,11 @@ getHackingMultipliers() Netscript Function
|
||||
.. js:function:: getHackingMultipliers()
|
||||
|
||||
:RAM cost: 4 GB
|
||||
:returns: object containing the player's hacking multipliers. These
|
||||
multipliers are returned in decimal forms, not percentages (e.g. 1.5
|
||||
instead of 150%).
|
||||
|
||||
Returns an object containing the Player's hacking related multipliers. These multipliers are
|
||||
returned in decimal forms, not percentages (e.g. 1.5 instead of 150%). The object has the following structure::
|
||||
Structure::
|
||||
|
||||
{
|
||||
chance: Player's hacking chance multiplier,
|
||||
@@ -15,7 +17,9 @@ getHackingMultipliers() Netscript Function
|
||||
growth: Player's hacking growth multiplier
|
||||
}
|
||||
|
||||
Example of how this can be used::
|
||||
Example:
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
mults = getHackingMultipliers();
|
||||
print(mults.chance);
|
||||
|
||||
@@ -4,9 +4,11 @@ getHacknetMultipliers() Netscript Function
|
||||
.. js:function:: getHacknetMultipliers()
|
||||
|
||||
:RAM cost: 4 GB
|
||||
:returns: object containing the player's hacknet multipliers. These
|
||||
multipliers are returned in decimal forms, not percentages (e.g. 1.5
|
||||
instead of 150%).
|
||||
|
||||
Returns an object containing the Player's hacknet related multipliers. These multipliers are
|
||||
returned in decimal forms, not percentages (e.g. 1.5 instead of 150%). The object has the following structure::
|
||||
Structure::
|
||||
|
||||
{
|
||||
production: Player's hacknet production multiplier,
|
||||
@@ -16,7 +18,9 @@ getHacknetMultipliers() Netscript Function
|
||||
levelCost: Player's hacknet level cost multiplier
|
||||
}
|
||||
|
||||
Example of how this can be used::
|
||||
Example:
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
mults = getHacknetMultipliers();
|
||||
print(mults.production);
|
||||
|
||||
@@ -4,5 +4,11 @@ getHostname() Netscript Function
|
||||
.. js:function:: getHostname()
|
||||
|
||||
:RAM cost: 0.05 GB
|
||||
:returns: Hostname of the server this script is running on.
|
||||
|
||||
Returns a string with the hostname of the server that the script is running on
|
||||
Example:
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
getHostname(); // returns: "foodnstuff"
|
||||
|
||||
|
||||
@@ -3,9 +3,9 @@ getPortHandle() Netscript Function
|
||||
|
||||
.. js:function:: getPortHandle(port)
|
||||
|
||||
:param number port: Port number
|
||||
:RAM cost: 10 GB
|
||||
|
||||
Get a handle to a Netscript Port. See more details here: :ref:`netscript_ports`
|
||||
:param number port: Port number
|
||||
:returns: portHandle object. See :ref:`netscript_ports`
|
||||
|
||||
**WARNING:** Port Handles only work in :ref:`netscriptjs`. They will not work in :ref:`netscript1`.
|
||||
|
||||
@@ -6,11 +6,10 @@ getPurchasedServerCost() Netscript Function
|
||||
:RAM cost: 0.25 GB
|
||||
|
||||
:param number ram: Amount of RAM of a potential purchased server. Must be a power of 2 (2, 4, 8, 16, etc.). Maximum value of 1048576 (2^20)
|
||||
:returns: Cost to purchase a server with the specified amount of ``ram``.
|
||||
|
||||
Returns the cost to purchase a server with the specified amount of *ram*.
|
||||
Example:
|
||||
|
||||
Examples::
|
||||
.. code-block:: javascript
|
||||
|
||||
for (i = 1; i <= 20; i++) {
|
||||
tprint(i + " -- " + getPurchasedServerCost(Math.pow(2, i)));
|
||||
}
|
||||
getPurchasedServerCost(8192); // returns: 450560000
|
||||
|
||||
@@ -4,5 +4,10 @@ getPurchasedServerLimit() Netscript Function
|
||||
.. js:function:: getPurchasedServerLimit()
|
||||
|
||||
:RAM cost: 0.05 GB
|
||||
:returns: The maximum number of servers you can purchase.
|
||||
|
||||
Returns the maximum number of servers you can purchase
|
||||
Example:
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
getPurchasedServerLimit() // returns: 25
|
||||
@@ -4,5 +4,10 @@ getPurchasedServerMaxRam() Netscript Function
|
||||
.. js:function:: getPurchasedServerMaxRam()
|
||||
|
||||
:RAM cost: 0.05 GB
|
||||
:returns: The maximum RAM that a purchased server can have.
|
||||
|
||||
Returns the maximum RAM that a purchased server can have
|
||||
Example:
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
getPurchasedServerMaxRam(); // returns: 1048576
|
||||
@@ -1,11 +1,13 @@
|
||||
getPurchasedServers() Netscript Function
|
||||
========================================
|
||||
|
||||
.. js:function:: getPurchasedServers([hostname=true])
|
||||
.. js:function:: getPurchasedServers()
|
||||
|
||||
:param boolean hostname:
|
||||
Specifies whether hostnames or IP addresses should be returned. If it's true then hostnames will be returned, and if false
|
||||
then IPs will be returned. If this argument is omitted then it is true by default
|
||||
:RAM cost: 2.25 GB
|
||||
:returns: String array of hostnames of all of the servers you have purchased.
|
||||
|
||||
Returns an array with either the hostnames or IPs of all of the servers you have purchased.
|
||||
Example:
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
getPurchasedServers(); // returns: ['grow-server-0', 'grow-server-1', 'weaken-server-0']
|
||||
|
||||
@@ -1,14 +1,18 @@
|
||||
getScriptExpGain() Netscript Function
|
||||
=====================================
|
||||
|
||||
.. js:function:: getScriptExpGain([scriptname], [hostname/ip], [args...])
|
||||
.. js:function:: getScriptExpGain([scriptname[, hostname[, args...]]])
|
||||
|
||||
:param string scriptname: Filename of script
|
||||
:param string hostname/ip: Server on which script is running
|
||||
:param args...: Arguments that the script is running with
|
||||
:RAM cost: 0.1 GB
|
||||
:param string scriptname: Filename of script.
|
||||
:param string hostname: Server on which script is running.
|
||||
:param args...: Arguments that the script is running with.
|
||||
:returns: The amount of hacking experience the specified script generates
|
||||
while online.
|
||||
|
||||
Returns the amount of hacking experience the specified script generates while online (when the game is open, does not apply for offline experience gains).
|
||||
Remember that a script is uniquely identified by both its name and its arguments.
|
||||
This function can also return the total experience gain rate of all of your
|
||||
active scripts by running the function with no arguments.
|
||||
|
||||
.. note:: A script is uniquely identified by both its name and its
|
||||
arguments.
|
||||
|
||||
This function can also return the total experience gain rate of all of your active scripts by running the function with no arguments.
|
||||
|
||||
@@ -1,18 +1,19 @@
|
||||
getScriptIncome() Netscript Function
|
||||
====================================
|
||||
|
||||
.. js:function:: getScriptIncome([scriptname], [hostname/ip], [args...])
|
||||
.. js:function:: getScriptIncome([scriptname[, hostname/ip[, [args...]]])
|
||||
|
||||
:RAM cost: 0.1 GB
|
||||
:param string scriptname: Filename of script
|
||||
:param string hostname/ip: Server on which script is running
|
||||
:param args...: Arguments that the script is running with
|
||||
:RAM cost: 0.1 GB
|
||||
:returns: Amount of income the specified script generates while online.
|
||||
|
||||
Returns the amount of income the specified script generates while online (when the game is open, does not apply for offline income).
|
||||
Remember that a script is uniquely identified by both its name and its arguments. So for example if you ran a script with the arguments
|
||||
"foodnstuff" and "5" then in order to use this function to get that script's income you must specify those same arguments in the same order
|
||||
in this function call.
|
||||
If called with no arguments this function will return an array of two
|
||||
values. The first value is the total income ($ / second) of all of your
|
||||
active scripts (scripts that are currently running on any server). The
|
||||
second value is the total income ($ / second) that you've earned from
|
||||
scripts since you last installed Augmentations.
|
||||
|
||||
This function can also be called with no arguments. If called with no arguments, then this function will return an array of two values. The
|
||||
first value is the total income ($ / second) of all of your active scripts (scripts that are currently running on any server). The second value
|
||||
is the total income ($ / second) that you've earned from scripts since you last installed Augmentations.
|
||||
.. note:: A script is uniquely identified by both its name and its
|
||||
arguments.
|
||||
@@ -1,27 +1,27 @@
|
||||
getScriptLogs() Netscript Function
|
||||
==================================
|
||||
|
||||
.. js:function:: getScriptLogs([fn], [hostname/ip=current ip], [args...])
|
||||
.. js:function:: getScriptLogs([filename[, hostname=current hostname[, args...]]])
|
||||
|
||||
:param string fn: Optional. Filename of script to get logs from.
|
||||
:param string ip: Optional. IP or hostname of the server that the script is on
|
||||
:param args...: Arguments to identify which scripts to get logs for
|
||||
:RAM cost: 0 GB
|
||||
:param string filename: Optional. Filename of script to get logs from.
|
||||
:param string hostname: Optional. Hostname of the server running the script.
|
||||
:param args...: Arguments to identify which scripts to get logs for
|
||||
:returns: Array of string, each line being a logged line. Chronological.
|
||||
|
||||
Returns a script's logs. The logs are returned as an array, where each
|
||||
line is an element in the array. The most recently logged line is at the
|
||||
end of the array.
|
||||
|
||||
Note that there is a maximum number of lines that a script stores in its logs.
|
||||
.. note:: There is a maximum number of lines that a script stores in its logs.
|
||||
This is configurable in the game's options.
|
||||
|
||||
If the function is called with no arguments, it will return the current script's logs.
|
||||
If the function is called with no arguments, it will return the current
|
||||
script's logs.
|
||||
|
||||
Otherwise, the `fn`, `hostname/ip,` and `args...` arguments can be used to get the logs
|
||||
from another script. Remember that scripts are uniquely identified by both
|
||||
their names and arguments.
|
||||
Otherwise, the ``filename``, ``hostname``, and ``args...`` arguments can be
|
||||
used to get the logs from another script. Remember that scripts are uniquely
|
||||
identified by both their names and arguments.
|
||||
|
||||
Examples::
|
||||
Example:
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
// Get logs from foo.script on the current server that was run with no args
|
||||
getScriptLogs("foo.script");
|
||||
|
||||
@@ -4,5 +4,10 @@ getScriptName() Netscript Function
|
||||
.. js:function:: getScriptName()
|
||||
|
||||
:RAM cost: 0 GB
|
||||
:returns: Current script name.
|
||||
|
||||
Returns the current script name
|
||||
Example:
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
getScriptName(); // returns: "example.script"
|
||||
|
||||
@@ -1,11 +1,16 @@
|
||||
getScriptRam() Netscript Function
|
||||
=================================
|
||||
|
||||
.. js:function:: getScriptRam(scriptname[, hostname/ip])
|
||||
.. js:function:: getScriptRam(filename[, hostname])
|
||||
|
||||
:param string scriptname: Filename of script. This is case-sensitive.
|
||||
:param string hostname/ip: Hostname or IP of target server the script is located on. This is optional, If it is not specified then the function will set the current server as the target server.
|
||||
:RAM cost: 0.1 GB
|
||||
:param string filename: Filename of script.
|
||||
:param string hostname: Hostname of target server the script is located on.
|
||||
Default to the server this script is running on.
|
||||
:returns: Amount of RAM required to run the script, 0 if it does not exist.
|
||||
|
||||
Returns the amount of RAM required to run the specified script on the target server. Returns
|
||||
0 if the script does not exist.
|
||||
Example:
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
getScriptRam("grow.script"); // returns: 1.75
|
||||
|
||||
@@ -1,12 +1,28 @@
|
||||
getServerBaseSecurityLevel() Netscript Function
|
||||
===============================================
|
||||
|
||||
.. js:function:: getServerBaseSecurityLevel(hostname/ip)
|
||||
.. js:function:: getServerBaseSecurityLevel(hostname)
|
||||
|
||||
:param string hostname/ip: Hostname or IP of target server
|
||||
:RAM cost: 0.1 GB
|
||||
:param string hostname: Hostname of target server.
|
||||
:returns: Base security level of target server.
|
||||
|
||||
Returns the base security level of the target server. This is the security level that the server starts out with.
|
||||
This is different than *getServerSecurityLevel()* because *getServerSecurityLevel()* returns the current
|
||||
security level of a server, which can constantly change due to *hack()*, *grow()*, and *weaken()*, calls on that
|
||||
server. The base security level will stay the same until you reset by installing an Augmentation(s).
|
||||
The base security level is the security level that the server starts out with.
|
||||
|
||||
This function isn't particularly useful.
|
||||
:doc:`getServerSecurityLevel<getServerSecurityLevel>` and
|
||||
:doc:`getServerMinSecurityLevel<getServerMinSecurityLevel>` are more often
|
||||
used.
|
||||
|
||||
Example:
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
getServerBaseSecurityLevel('foodnstuff'); // returns: 9
|
||||
|
||||
.. note:: This is different than :doc:`getServerSecurityLevel<getServerSecurityLevel>`
|
||||
because :doc:`getServerSecurityLevel<getServerSecurityLevel>` returns the current
|
||||
security level of a server, which can constantly change due to
|
||||
:doc:`hack<hack>`, :doc:`grow<grow>`, and :doc:`weaken<weaken>` calls on
|
||||
that server. The base security level will stay the same until you reset
|
||||
by installing augmentation(s).
|
||||
|
||||
@@ -1,12 +1,19 @@
|
||||
getServerGrowth() Netscript Function
|
||||
====================================
|
||||
|
||||
.. js:function:: getServerGrowth(hostname/ip)
|
||||
.. js:function:: getServerGrowth(hostname)
|
||||
|
||||
:param string hostname/ip: Hostname or IP of target server
|
||||
:RAM cost: 0.1 GB
|
||||
:param string hostname: Hostname of target server.
|
||||
:returns: Server growth parameter.
|
||||
|
||||
Returns the server's instrinsic "growth parameter". This growth parameter is a number
|
||||
between 1 and 100 that represents how quickly the server's money grows. This parameter affects the
|
||||
percentage by which the server's money is increased when using the *grow()* function. A higher
|
||||
growth parameter will result in a higher percentage increase from *grow()*.
|
||||
The growth parameter is a number between 1 and 100 affects the percentage by
|
||||
which the server's money is increased when using the :doc:`grow<grow>`
|
||||
function. A higher growth parameter will result in a higher percentage
|
||||
increase.
|
||||
|
||||
Example:
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
getServerGrowth('foodnstuff'); // returns: 5
|
||||
|
||||
@@ -1,9 +1,14 @@
|
||||
getServerMaxMoney() Netscript Function
|
||||
======================================
|
||||
|
||||
.. js:function:: getServerMaxMoney(hostname/ip)
|
||||
.. js:function:: getServerMaxMoney(hostname)
|
||||
|
||||
:param string hostname/ip: Hostname or IP of target server
|
||||
:RAM cost: 0.1 GB
|
||||
:param string hostname: Hostname of target server.
|
||||
:returns: Maximum amount of money that can be available on a server.
|
||||
|
||||
Returns the maximum amount of money that can be available on a server
|
||||
Example:
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
getServerMaxMoney('foodnstuff'); // returns: 4000000
|
||||
|
||||
@@ -1,9 +1,14 @@
|
||||
getServerMinSecurityLevel() Netscript Function
|
||||
==============================================
|
||||
|
||||
.. js:function:: getServerMinSecurityLevel(hostname/ip)
|
||||
.. js:function:: getServerMinSecurityLevel(hostname)
|
||||
|
||||
:param string hostname/ip: Hostname or IP of target server
|
||||
:RAM cost: 0.1 GB
|
||||
:param string hostname: Hostname of target server.
|
||||
:returns: The minimum security level of the target server.
|
||||
|
||||
Returns the minimum security level of the target server
|
||||
Example:
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
getServerMinSecurityLevel('foodnstuff'); // returns: 3
|
||||
|
||||
@@ -1,15 +1,19 @@
|
||||
getServerMoneyAvailable() Netscript Function
|
||||
============================================
|
||||
|
||||
.. js:function:: getServerMoneyAvailable(hostname/ip)
|
||||
.. js:function:: getServerMoneyAvailable(hostname)
|
||||
|
||||
:param string hostname/ip: Hostname or IP of target server
|
||||
:RAM cost: 0.1 GB
|
||||
:param string hostname: Hostname of target server.
|
||||
:returns: Money available on that server.
|
||||
|
||||
Returns the amount of money available on a server. **Running this function on the home computer will return
|
||||
the player's money.**
|
||||
.. note::
|
||||
|
||||
Example::
|
||||
Running this function on the home computer will return the player's money.
|
||||
|
||||
getServerMoneyAvailable("foodnstuff");
|
||||
getServerMoneyAvailable("home"); //Returns player's money
|
||||
Example:
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
getServerMoneyAvailable("foodnstuff"); // returns: 120000
|
||||
getServerMoneyAvailable("home"); // returns: 1000
|
||||
@@ -1,9 +1,15 @@
|
||||
getServerNumPortsRequired() Netscript Function
|
||||
==============================================
|
||||
|
||||
.. js:function:: getServerNumPortsRequired(hostname/ip)
|
||||
.. js:function:: getServerNumPortsRequired(hostname)
|
||||
|
||||
:param string hostname/ip: Hostname or IP of target server
|
||||
:RAM cost: 0.1 GB
|
||||
:param string hostname: Hostname of target server.
|
||||
:returns: The number of open ports required to successfully run NUKE.exe on
|
||||
the specified server.
|
||||
|
||||
Returns the number of open ports required to successfully run NUKE.exe on the specified server.
|
||||
Example:
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
getServerNumPortsRequired("unitalife"); // returns: 4
|
||||
|
||||
@@ -1,17 +1,21 @@
|
||||
getServerRam() Netscript Function
|
||||
=================================
|
||||
|
||||
.. js:function:: getServerRam(hostname/ip)
|
||||
.. js:function:: getServerRam(hostname)
|
||||
|
||||
:param string hostname/ip: Hostname or IP of target server
|
||||
:RAM cost: 0.1 GB
|
||||
:param string hostname: Hostname of target server.
|
||||
:returns: An array of 2 number, first number is the total RAM, second the
|
||||
used RAM.
|
||||
|
||||
Returns an array with two elements that gives information about a server's memory (RAM). The first
|
||||
element in the array is the amount of RAM that the server has total (in GB). The second element in
|
||||
the array is the amount of RAM that is currently being used on the server (in GB).
|
||||
|
||||
Example::
|
||||
Example:
|
||||
|
||||
res = getServerRam("helios");
|
||||
.. code-block:: javascript
|
||||
|
||||
res = getServerRam("helios"); // returns: [5, 10]
|
||||
totalRam = res[0];
|
||||
ramUsed = res[1];
|
||||
|
||||
@@ -1,9 +1,14 @@
|
||||
getServerRequiredHackingLevel() Netscript Function
|
||||
==================================================
|
||||
|
||||
.. js:function:: getServerRequiredHackingLevel(hostname/ip)
|
||||
.. js:function:: getServerRequiredHackingLevel(hostname)
|
||||
|
||||
:param string hostname/ip: Hostname or IP of target server
|
||||
:RAM cost: 0.1 GB
|
||||
:param string hostname: Hostname of target server.
|
||||
:returns: The required hacking level of target server.
|
||||
|
||||
Returns the required hacking level of the target server
|
||||
Example:
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
getServerRequiredHackingLevel("foodnstuff"); // returns: 5
|
||||
@@ -1,10 +1,14 @@
|
||||
getServerSecurityLevel() Netscript Function
|
||||
===========================================
|
||||
|
||||
.. js:function:: getServerSecurityLevel(hostname/ip)
|
||||
.. js:function:: getServerSecurityLevel(hostname)
|
||||
|
||||
:param string hostname/ip: Hostname or IP of target server
|
||||
:RAM cost: 0.1 GB
|
||||
:param string hostname: Hostname of target server.
|
||||
:returns: The security level of the target server.
|
||||
|
||||
Returns the security level of the target server. A server's security level is denoted by a number, typically
|
||||
between 1 and 100 (but it can go above 100).
|
||||
Example:
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
getServerSecurityLevel("foodnstuff"); // returns: 3.45
|
||||
@@ -4,5 +4,10 @@ getTimeSinceLastAug() Netscript Function
|
||||
.. js:function:: getTimeSinceLastAug()
|
||||
|
||||
:RAM cost: 0.05 GB
|
||||
:returns: Milliseconds since you last installed augmentations.
|
||||
|
||||
Returns the amount of time in milliseconds that have passed since you last installed Augmentations
|
||||
Example:
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
getTimeSinceLastAug(); // returns: 13912400
|
||||
@@ -1,13 +1,23 @@
|
||||
getWeakenTime() Netscript Function
|
||||
==================================
|
||||
|
||||
.. js:function:: getWeakenTime(hostname/ip[, hackLvl=current level])
|
||||
.. js:function:: getWeakenTime(hostname[, hackLvl=current level])
|
||||
|
||||
:param string hostname/ip: Hostname or IP of target server
|
||||
:param number hackLvl: Optional hacking level for the calculation. Defaults to player's current hacking level
|
||||
:RAM cost: 0.05 GB
|
||||
|
||||
Returns the amount of time in seconds it takes to execute the *weaken()* Netscript function on the target server.
|
||||
:param string hostname: Hostname of target server.
|
||||
:param number hackLvl: Optional hacking level for the calculation. Defaults
|
||||
to player's current hacking level.
|
||||
:returns: seconds it takes to execute the :doc:`weaken<weaken>` Netscript
|
||||
function on the target server.
|
||||
|
||||
The function takes in an optional *hackLvl* parameter that can be specified
|
||||
to see what the weaken time would be at different hacking levels.
|
||||
|
||||
Example:
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
getWeakenTime("foodnstuff"); // returns: 34.5
|
||||
|
||||
.. note:: For Hacknet Servers (the upgraded version of a Hacknet Node), this function will
|
||||
return :code:`Infinity`.
|
||||
|
||||
@@ -1,21 +1,37 @@
|
||||
grow() Netscript Function
|
||||
=========================
|
||||
|
||||
.. js:function:: grow(hostname/ip)
|
||||
.. js:function:: grow(hostname[, opts={}])
|
||||
|
||||
:param string hostname/ip: IP or hostname of the target server to grow
|
||||
:returns: The number by which the money on the server was multiplied for the growth
|
||||
:RAM cost: 0.15 GB
|
||||
:param string hostname: Hostname of the target server.
|
||||
:param object opts: Optional parameters for configuring function behavior. Properties:
|
||||
|
||||
Use your hacking skills to increase the amount of money available on a server. The runtime for this command depends on your hacking
|
||||
level and the target server's security level. When grow() completes, the money available on a target server will be increased by a
|
||||
certain, fixed percentage. This percentage is determined by the target server's growth rate (which varies between servers) and security level.
|
||||
Generally, higher-level servers have higher growth rates. The getServerGrowth() function can be used to obtain a server's growth rate.
|
||||
* threads (*number*) - Number of threads to use for this function.
|
||||
Must be less than or equal to the number of threads the script is running with.
|
||||
* stock (*boolean*) - If true, the function can affect the stock market. See
|
||||
:ref:`gameplay_stock_market_player_actions_influencing_stock`
|
||||
|
||||
Like hack(), grow() can be called on any server, regardless of where the script is running. The grow() command requires
|
||||
root access to the target server, but there is no required hacking level to run the command. It also raises the security level
|
||||
of the target server by 0.004.
|
||||
:returns: The number by which the money on the server was multiplied for the growth
|
||||
|
||||
Example::
|
||||
Increase the amount of money available on a server. The time it takes to
|
||||
execute depends on your hacking level and the target server's security
|
||||
level. When :doc:`grow<grow>` completes, the money available on a target
|
||||
server will be increased by a certain, fixed percentage. This percentage is
|
||||
determined by the target server's growth rate (which varies between servers)
|
||||
and security level. Generally, higher-level servers have higher growth
|
||||
rates. The :doc:`getServerGrowth<getServerGrowth>` function can be used to
|
||||
obtain a server's growth rate.
|
||||
|
||||
grow("foodnstuff");
|
||||
Like :doc:`hack<hack>`, :doc:`grow<grow>` can be called on any server, from
|
||||
any server. The :doc:`grow<grow>` command requires root access to the target
|
||||
server, but there is no required hacking level to run the command. It also
|
||||
raises the security level of the target server by 0.004 per thread.
|
||||
|
||||
Example:
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
while(true) {
|
||||
grow("foodnstuff");
|
||||
}
|
||||
|
||||
@@ -1,24 +1,23 @@
|
||||
growthAnalyze() Netscript Function
|
||||
==================================
|
||||
|
||||
.. js:function:: growthAnalyze(hostname/ip, growthAmount)
|
||||
.. js:function:: growthAnalyze(hostname, growthAmount)
|
||||
|
||||
:param string hostname/ip: IP or hostname of server to analyze
|
||||
:param number growthAmount: Multiplicative factor by which the server is grown. Decimal form.
|
||||
:returns: The amount of grow() calls needed to grow the specified server by the specified amount
|
||||
:RAM cost: 1 GB
|
||||
:param string hostname: Hostname of server to analyze.
|
||||
:param number growthAmount: Multiplicative factor by which the server is
|
||||
grown. Decimal form. Must be >= 1.
|
||||
:returns: The amount of :doc:`grow<grow>` threads needed to grow the specified
|
||||
server by the specified amount.
|
||||
|
||||
This function returns the number of "growths" needed in order to increase the amount
|
||||
of money available on the specified server by the specified amount.
|
||||
Example:
|
||||
|
||||
The specified amount is multiplicative and is in decimal form, not percentage.
|
||||
.. code-block:: javascript
|
||||
|
||||
For example, if you want to determine how many `grow()` calls you need
|
||||
to double the amount of money on `foodnstuff`, you would use::
|
||||
// How many grow threads are needed to double the current money on 'foodnstuff'
|
||||
growthAnalyze("foodnstuff", 2); // returns: 5124
|
||||
|
||||
growthAnalyze("foodnstuff", 2);
|
||||
|
||||
If this returns 100, then this means you need to call `grow()` 100 times
|
||||
in order to double the money (or once with 100 threads).
|
||||
If this returns 5124, then this means you need to call :doc:`grow<grow>`
|
||||
5124 times in order to double the money (or once with 5124 threads).
|
||||
|
||||
**Warning**: The value returned by this function isn't necessarily a whole number.
|
||||
|
||||
@@ -1,22 +1,36 @@
|
||||
hack() Netscript Function
|
||||
=========================
|
||||
|
||||
.. js:function:: hack(hostname/ip)
|
||||
.. js:function:: hack(hostname[, opts={}])
|
||||
|
||||
:param string hostname/ip: IP or hostname of the target server to hack
|
||||
:returns: The amount of money stolen if the hack is successful, and zero otherwise
|
||||
:RAM cost: 0.1 GB
|
||||
:param string hostname: Hostname of the target server.
|
||||
:param object opts: Optional parameters for configuring function behavior. Properties:
|
||||
|
||||
Function that is used to try and hack servers to steal money and gain hacking experience. The runtime for this command depends
|
||||
on your hacking level and the target server's security level. In order to hack a server you must first gain root access
|
||||
to that server and also have the required hacking level.
|
||||
* threads (*number*) - Number of threads to use for this function.
|
||||
Must be less than or equal to the number of threads the script is running with.
|
||||
* stock (*boolean*) - If true, the function can affect the stock market. See
|
||||
:ref:`gameplay_stock_market_player_actions_influencing_stock`
|
||||
:returns: The amount of money stolen if the hack is successful, and zero otherwise
|
||||
|
||||
A script can hack a server from anywhere. It does not need to be running on the same server to hack that server. For example,
|
||||
you can create a script that hacks the 'foodnstuff' server and run that script on any server in the game.
|
||||
Function that is used to try and hack servers to steal money and gain
|
||||
hacking experience. The runtime for this command depends on your hacking
|
||||
level and the target server's security level. In order to hack a server you
|
||||
must first gain root access to that server and also have the required
|
||||
hacking level.
|
||||
|
||||
A successful hack() on a server will raise that server's security level by 0.002.
|
||||
A script can hack a server from anywhere. It does not need to be running on
|
||||
the same server to hack that server. For example, you can create a script
|
||||
that hacks the 'foodnstuff' server and run that script on any server in the
|
||||
game.
|
||||
|
||||
Example::
|
||||
A successful :doc:`hack<hack>` on a server will raise that server's security
|
||||
level by 0.002.
|
||||
|
||||
Example:
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
hack("foodnstuff");
|
||||
hack("10.1.2.3");
|
||||
hack("foodnstuff", { threads: 5 }); // Only use 5 threads to hack
|
||||
|
||||
@@ -1,20 +1,22 @@
|
||||
hackAnalyzePercent() Netscript Function
|
||||
=======================================
|
||||
|
||||
.. js:function:: hackAnalyzePercent(hostname/ip)
|
||||
.. js:function:: hackAnalyzePercent(hostname)
|
||||
|
||||
:param string hostname/ip: IP or hostname of target server
|
||||
:returns: The percentage of money you will steal from the target server with a single hack
|
||||
:RAM cost: 1 GB
|
||||
:param string hostname: Hostname of target server.
|
||||
:returns: The percentage of money you will steal from the target server with
|
||||
a single hack.
|
||||
|
||||
Returns the percentage of the specified server's money you will steal with a
|
||||
single hack. This value is returned in **percentage form, not decimal (Netscript
|
||||
functions typically return in decimal form, but not this one).**
|
||||
single hack. This value is returned in percentage form, not decimal.
|
||||
|
||||
For example, assume the following returns 1::
|
||||
For example, assume the following returns 1:
|
||||
|
||||
hackAnalyzePercent("foodnstuff");
|
||||
.. code-block:: javascript
|
||||
|
||||
This means that if hack the `foodnstuff` server, then you will steal 1% of its
|
||||
total money. If you `hack()` using N threads, then you will steal N% of its total
|
||||
hackAnalyzePercent("foodnstuff"); // returns: 1
|
||||
|
||||
This means that if hack the 'foodnstuff' server, then you will steal 1% of its
|
||||
total money. If you :doc:`hack<hack>` using N threads, then you will steal N% of its total
|
||||
money.
|
||||
|
||||
@@ -1,24 +1,37 @@
|
||||
hackAnalyzeThreads() Netscript Function
|
||||
=======================================
|
||||
|
||||
.. js:function:: hackAnalyzeThreads(hostname/ip, hackAmount)
|
||||
.. js:function:: hackAnalyzeThreads(hostname, hackAmount)
|
||||
|
||||
:param string hostname/ip: IP or hostname of server to analyze
|
||||
:param number hackAmount: Amount of money you want to hack from the server
|
||||
:returns: The number of threads needed to hack() the server for *hackAmount* money
|
||||
:RAM cost: 1 GB
|
||||
:param string hostname: Hostname of server to analyze.
|
||||
:param number hackAmount: Amount of money you want to hack from the server.
|
||||
:returns: The number of threads needed to :doc:`hack<hack>` the server for
|
||||
``hackAmount`` money.
|
||||
|
||||
This function returns the number of script threads you need when running
|
||||
the `hack()` command to steal the specified amount of money from the target server.
|
||||
the :doc:`hack<hack>` command to steal the specified amount of money from
|
||||
the target server.
|
||||
|
||||
If `hackAmount` is less than zero or greater than the amount of money available
|
||||
on the server, then this function returns -1.
|
||||
If ``hackAmount`` is less than zero or greater than the amount of money
|
||||
available on the server, then this function returns -1.
|
||||
|
||||
For example, let's say the `foodnstuff` server has $10m and you run::
|
||||
For example, let's say the 'foodnstuff' server has $10m and you run:
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
hackAnalyzeThreads("foodnstuff", 1e6);
|
||||
|
||||
If this function returns 50, this means that if your next `hack()` call
|
||||
If this function returns 50, this means that if your next :doc:`hack<hack>` call
|
||||
is run on a script with 50 threads, it will steal $1m from the `foodnstuff` server.
|
||||
|
||||
**Warning**: The value returned by this function isn't necessarily a whole number.
|
||||
.. warning:: The value returned by this function isn't necessarily a whole number.
|
||||
.. warning:: It is possible for this function to return :code:`Infinity` or :code:`NaN` in
|
||||
certain uncommon scenarios. This is because in JavaScript:
|
||||
|
||||
* :code:`0 / 0 = NaN`
|
||||
* :code:`N / 0 = Infinity` for 0 < N < Infinity.
|
||||
|
||||
For example, if a server has no money available and you want to hack some positive
|
||||
amount from it, then the function would return :code:`Infinity` because
|
||||
this would be impossible.
|
||||
|
||||
@@ -1,11 +1,16 @@
|
||||
hackChance() Netscript Function
|
||||
===============================
|
||||
|
||||
.. js:function:: hackChance(hostname/ip)
|
||||
.. js:function:: hackChance(hostname)
|
||||
|
||||
:param string hostname/ip: IP or hostname of target server
|
||||
:returns: The chance you have of successfully hacking the target server
|
||||
:RAM cost: 1 GB
|
||||
:param string hostname: Hostname of target server.
|
||||
:returns: The chance you have of successfully hacking the target server.
|
||||
in decimal form.
|
||||
|
||||
Returns the chance you have of successfully hacking the specified server. This
|
||||
returned value is in decimal form, not percentage.
|
||||
Example:
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
hackChance("foodnstuff"); // returns: .5
|
||||
// So 50% chance to hack "foodnstuff"
|
||||
@@ -1,14 +1,15 @@
|
||||
hasRootAccess() Netscript Function
|
||||
==================================
|
||||
|
||||
.. js:function:: hasRootAccess(hostname/ip)
|
||||
.. js:function:: hasRootAccess(hostname)
|
||||
|
||||
:param string hostname/ip: Hostname or IP of the target server
|
||||
:RAM cost: 0.05 GB
|
||||
:param string hostname: Hostname of the target server.
|
||||
:returns: ``true`` if you have root access on the target server.
|
||||
|
||||
Returns a boolean indicating whether or not the player has root access to the specified target server.
|
||||
Example:
|
||||
|
||||
Example::
|
||||
.. code-block:: javascript
|
||||
|
||||
if (hasRootAccess("foodnstuff") == false) {
|
||||
nuke("foodnstuff");
|
||||
|
||||
@@ -1,13 +1,16 @@
|
||||
httpworm() Netscript Function
|
||||
=============================
|
||||
|
||||
.. js:function:: httpworm(hostname/ip)
|
||||
.. js:function:: httpworm(hostname)
|
||||
|
||||
:param string hostname/ip: IP or hostname of the target server
|
||||
:RAM cost: 0 GB
|
||||
:RAM cost: 0.05 GB
|
||||
:param string hostname: Hostname of the target server.
|
||||
|
||||
Runs the HTTPWorm.exe program on the target server. HTTPWorm.exe must exist on your home computer.
|
||||
Runs the HTTPWorm.exe program on the target server. HTTPWorm.exe must exist
|
||||
on your home computer.
|
||||
|
||||
Example::
|
||||
Example:
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
httpworm("foodnstuff");
|
||||
|
||||
@@ -1,10 +1,14 @@
|
||||
isLogEnabled() Netscript Function
|
||||
=================================
|
||||
|
||||
.. js:function:: isLogEnabled(fn)
|
||||
.. js:function:: isLogEnabled(functionName)
|
||||
|
||||
:param string fn: Name of function to check
|
||||
:RAM cost: 0 GB
|
||||
:param string functionName: Name of function to check.
|
||||
:returns: ``true`` is logs are enabled for this function or for 'ALL'
|
||||
|
||||
Returns a boolean indicating whether or not logging is enabled for that
|
||||
function (or 'ALL')
|
||||
Example:
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
isLogEnabled('hack'); // returns: true
|
||||
@@ -1,29 +1,40 @@
|
||||
isRunning() Netscript Function
|
||||
==============================
|
||||
|
||||
.. js:function:: isRunning(filename, hostname/ip, [args...])
|
||||
.. js:function:: isRunning(filename, hostname, [args...])
|
||||
|
||||
:param string filename: Filename of script to check. This is case-sensitive.
|
||||
:param string hostname/ip: Hostname or IP of target server
|
||||
:param args...: Arguments to specify/identify which scripts to search for
|
||||
:RAM cost: 0.1 GB
|
||||
:param string filename: Filename of script to check. case-sensitive.
|
||||
:param string hostname: Hostname of target server.
|
||||
:param args...: Arguments to specify/identify which scripts to search for
|
||||
:returns: ``true`` if that script with those args is running on that server.
|
||||
|
||||
Returns a boolean indicating whether the specified script is running on the target server. Remember that a script is
|
||||
uniquely identified by both its name and its arguments.
|
||||
.. note::
|
||||
|
||||
Remember that a script is uniquely identified by both its name and its arguments.
|
||||
|
||||
**Examples:**
|
||||
|
||||
In this first example below, the function call will return true if there is a script named *foo.script* with no arguments
|
||||
running on the *foodnstuff* server, and false otherwise::
|
||||
In this first example below, the function call will return true if there is
|
||||
a script named ``foo.script`` with no arguments running on the
|
||||
``foodnstuff`` server, and false otherwise:
|
||||
|
||||
isRunning("foo.script", "foodnstuff");
|
||||
.. code-block:: javascript
|
||||
|
||||
In this second example below, the function call will return true if there is a script named *foo.script* with no arguments
|
||||
running on the current server, and false otherwise::
|
||||
isRunning("foo.script", "foodnstuff");
|
||||
|
||||
isRunning("foo.script", getHostname());
|
||||
In this second example below, the function call will return true if there is
|
||||
a script named ``foo.script`` with no arguments running on the current
|
||||
server, and false otherwise:
|
||||
|
||||
In this next example below, the function call will return true if there is a script named *foo.script* running with the arguments
|
||||
1, 5, and "test" (in that order) on the *joesguns* server, and false otherwise::
|
||||
.. code-block:: javascript
|
||||
|
||||
isRunning("foo.script", "joesguns", 1, 5, "test");
|
||||
isRunning("foo.script", getHostname());
|
||||
|
||||
In this next example below, the function call will return true if there is a
|
||||
script named ``foo.script`` running with the arguments 1, 5, and "test" (in
|
||||
that order) on the ``joesguns`` server, and false otherwise:
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
isRunning("foo.script", "joesguns", 1, 5, "test");
|
||||
|
||||
@@ -1,29 +1,58 @@
|
||||
kill() Netscript Function
|
||||
=========================
|
||||
|
||||
.. js:function:: kill(script, hostname/ip, [args...])
|
||||
.. js:function:: kill(script, hostname, [args...])
|
||||
|
||||
:param string script: Filename of the script to kill
|
||||
:param string hostname/ip: IP or hostname of the server on which to kill the script
|
||||
:param args...: Arguments to identify which script to kill
|
||||
:RAM cost: 0.5 GB
|
||||
:param string script: Filename of the script to kill.
|
||||
:param string hostname: Hostname of the server on which to kill the script.
|
||||
:param args...: Arguments to identify which script to kill.
|
||||
:returns: ``true`` is that script was killed.
|
||||
|
||||
Kills the script on the target server specified by the script's name and arguments. Remember that scripts
|
||||
are uniquely identified by both their name and arguments. For example, if *foo.script* is run with the argument 1, then this
|
||||
is not the same as *foo.script* run with the argument 2, even though they have the same code.
|
||||
|
||||
If this function successfully kills the specified script, then it will return true. Otherwise, it will return false.
|
||||
Kills the script on the target server specified by the script's name and
|
||||
arguments. Remember that scripts are uniquely identified by both their name
|
||||
and arguments. For example, if ``foo.script`` is run with the argument 1,
|
||||
then this is not the same as ``foo.script`` run with the argument 2, even
|
||||
though they have the same code.
|
||||
|
||||
Examples:
|
||||
|
||||
The following example will try to kill a script named *foo.script* on the *foodnstuff* server that was ran with no arguments::
|
||||
The following example will try to kill a script named ``foo.script`` on the
|
||||
``foodnstuff`` server that was ran with no arguments:
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
kill("foo.script", "foodnstuff");
|
||||
|
||||
The following will try to kill a script named *foo.script* on the current server that was ran with no arguments::
|
||||
The following will try to kill a script named ``foo.script`` on the current
|
||||
server that was ran with no arguments:
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
kill("foo.script", getHostname());
|
||||
|
||||
The following will try to kill a script named *foo.script* on the current server that was ran with the arguments 1 and "foodnstuff"::
|
||||
The following will try to kill a script named ``foo.script`` on the current
|
||||
server that was ran with the arguments 1 and "foodnstuff":
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
kill("foo.script", getHostname(), 1, "foodnstuff");
|
||||
|
||||
.. js:function:: kill(scriptPid)
|
||||
|
||||
:RAM cost: 0.5 GB
|
||||
:param number scriptPid: PID of the script to kill
|
||||
:returns: ``true`` that script was killed.
|
||||
|
||||
Kills the script with the specified PID. Killing a script by its PID will
|
||||
typically have better performance, especially if you have many scripts
|
||||
running.
|
||||
|
||||
|
||||
Example:
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
if (kill(10)) {
|
||||
print("Killed script with PID 10!");
|
||||
}
|
||||
|
||||
@@ -1,10 +1,17 @@
|
||||
killall() Netscript Function
|
||||
============================
|
||||
|
||||
.. js:function:: killall(hostname/ip)
|
||||
.. js:function:: killall(hostname)
|
||||
|
||||
:param string hostname/ip: IP or hostname of the server on which to kill all scripts
|
||||
:RAM cost: 0.5 GB
|
||||
:param string hostname: Hostname of the server on which to kill all scripts.
|
||||
:returns: ``true`` if scripts were killed on target server.
|
||||
|
||||
Kills all running scripts on the specified server. This function returns true if any scripts were killed, and
|
||||
false otherwise. In other words, it will return true if there are any scripts running on the target server.
|
||||
Kills all running scripts on the specified server.
|
||||
|
||||
|
||||
Example:
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
killall('foodnstuff'); // returns: true
|
||||
@@ -1,11 +1,15 @@
|
||||
ls() Netscript Function
|
||||
=======================
|
||||
|
||||
.. js:function:: ls(hostname/ip, [grep])
|
||||
.. js:function:: ls(hostname[, grep])
|
||||
|
||||
:param string hostname/ip: Hostname or IP of the target server
|
||||
:param string grep: a substring to search for in the filename
|
||||
:RAM cost: 0 GB
|
||||
:RAM cost: 0.2 GB
|
||||
:param string hostname: Hostname of the target server.
|
||||
:param string grep: a substring to search for in the filename.
|
||||
:returns: String array of all files in alphabetical order.
|
||||
|
||||
Returns an array with the filenames of all files on the specified server (as strings). The returned array
|
||||
is sorted in alphabetic order
|
||||
Example:
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
ls("home"); // returns: ["demo.script", "msg1.txt"]
|
||||
@@ -3,17 +3,20 @@ nFormat() Netscript Function
|
||||
|
||||
.. js:function:: nFormat(n, format)
|
||||
|
||||
:param number n: Number to format
|
||||
:param string format: Formatter
|
||||
:RAM cost: 0 GB
|
||||
:param number n: number to format
|
||||
:param string format: The format to use.
|
||||
|
||||
Converts a number into a string with the specified formatter. This uses the
|
||||
`numeraljs <http://numeraljs.com/>`_ library, so the formatters must be compatible
|
||||
with that.
|
||||
Converts a number into a string with the specified format. This uses the
|
||||
`numeraljs <http://numeraljs.com/>`_ library, so the formatters must be
|
||||
compatible with that.
|
||||
|
||||
This is the same function that the game itself uses to display numbers.
|
||||
The game uses the ``$0.000a`` format to display money.
|
||||
|
||||
Examples::
|
||||
Example:
|
||||
|
||||
nFormat(1.23e9, "$0.000a"); // Returns "$1.230b"
|
||||
nFormat(12345.678, "0,0"); // Returns "12,346"
|
||||
nFormat(0.84, "0.0%"); // Returns "84.0%
|
||||
.. code-block:: javascript
|
||||
|
||||
nFormat(1.23e9, "$0.000a"); // returns: "$1.230b"
|
||||
nFormat(12345.678, "0,0"); // returns: "12,346"
|
||||
nFormat(0.84, "0.0%"); // returns: "84.0%"
|
||||
|
||||
@@ -1,13 +1,16 @@
|
||||
nuke() Netscript Function
|
||||
=========================
|
||||
|
||||
.. js:function:: nuke(hostname/ip)
|
||||
.. js:function:: nuke(hostname)
|
||||
|
||||
:param string hostname/ip: IP or hostname of the target server
|
||||
:RAM cost: 0 GB
|
||||
:RAM cost: 0.05 GB
|
||||
:param string hostname: Hostname of the target server.
|
||||
|
||||
Runs the NUKE.exe program on the target server. NUKE.exe must exist on your home computer.
|
||||
|
||||
Example::
|
||||
|
||||
Example:
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
nuke("foodnstuff");
|
||||
|
||||
@@ -3,10 +3,12 @@ peek() Netscript Function
|
||||
|
||||
.. js:function:: peek(port)
|
||||
|
||||
:param number port: Port to peek. Must be an integer between 1 and 20
|
||||
:RAM cost: 1 GB
|
||||
:param number port: Port to peek. Must be an integer between 1 and 20.
|
||||
:returns: First element on that port.
|
||||
|
||||
This function is used to peek at the data from a port. It returns the first element in the specified port
|
||||
without removing that element. If the port is empty, the string "NULL PORT DATA" will be returned.
|
||||
This function is used to peek at the data from a port. It returns the first
|
||||
element in the specified port without removing that element. If the port is
|
||||
empty, the string "NULL PORT DATA" will be returned.
|
||||
|
||||
Read about how :ref:`netscript_ports` work here
|
||||
|
||||
@@ -3,7 +3,13 @@ print() Netscript Function
|
||||
|
||||
.. js:function:: print(x)
|
||||
|
||||
:param x: Value to be printed
|
||||
:RAM cost: 0 GB
|
||||
:param x: Value to be printed.
|
||||
|
||||
Prints a value or a variable to the script's logs.
|
||||
|
||||
Example:
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
print("Hello world!"); // Prints "Hello world!" in the logs.
|
||||
@@ -3,8 +3,21 @@ prompt() Netscript Function
|
||||
|
||||
.. js:function:: prompt(txt)
|
||||
|
||||
:param string txt: Text to appear in the prompt dialog box
|
||||
:RAM cost: 0 GB
|
||||
:param string txt: Text to appear in the prompt dialog box.
|
||||
:returns: ``true`` if the player clicks "Yes".
|
||||
|
||||
Prompts the player with a dialog box with two options: "Yes" and "No". This function will return true if the player click "Yes" and
|
||||
false if the player clicks "No". The script's execution is halted until the player selects one of the options.
|
||||
Prompts the player with a dialog box with two options: "Yes" and "No". This
|
||||
function will return true if the player click "Yes" and false if the player
|
||||
clicks "No". The script's execution is halted until the player selects one
|
||||
of the options.
|
||||
|
||||
Example:
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
cost = getPurchasedServerCost(8192);
|
||||
answer = prompt("Buy a server for $"+cost);
|
||||
if(answer) {
|
||||
purchaseServer("my server", 8192);
|
||||
}
|
||||
@@ -1,28 +1,29 @@
|
||||
ps() Netscript Function
|
||||
=======================
|
||||
|
||||
.. js:function:: ps(hostname/ip=current ip)
|
||||
.. js:function:: ps([hostname=current hostname])
|
||||
|
||||
:param string ip: Hostname or IP address of the target server.
|
||||
If not specified, it will be the current server's IP by default
|
||||
:RAM cost: 0.2 GB
|
||||
:param string hostname: Hostname address of the target server.
|
||||
If not specified, it will be the current server's IP by default.
|
||||
:returns: array of object
|
||||
|
||||
Returns an array with general information about all scripts running on the specified
|
||||
target server. The information for each server is given in an object with
|
||||
the following structure::
|
||||
Returns an array with general information about all scripts running on the
|
||||
specified target server. The information for each server is given in an
|
||||
object with the following structure::
|
||||
|
||||
{
|
||||
filename: Script name,
|
||||
threads: Number of threads script is running with,
|
||||
args: Script's arguments
|
||||
filename: Script name,
|
||||
threads: Number of threads script is running with,
|
||||
args: Script's arguments
|
||||
}
|
||||
|
||||
Example usage (using :ref:`netscriptjs`)::
|
||||
Example:
|
||||
|
||||
export async function main(ns) {
|
||||
const ps = ns.ps("home");
|
||||
for (let i = 0; i < ps.length; ++i) {
|
||||
ns.tprint(ps[i].filename + ' ' + ps[i].threads);
|
||||
ns.tprint(ps[i].args);
|
||||
}
|
||||
.. code-block:: javascript
|
||||
|
||||
processes = ps("home");
|
||||
for (let i = 0; i < ps.length; ++i) {
|
||||
tprint(ps[i].filename + ' ' + ps[i].threads);
|
||||
tprint(ps[i].args);
|
||||
}
|
||||
|
||||
@@ -3,25 +3,29 @@ purchaseServer() Netscript Function
|
||||
|
||||
.. js:function:: purchaseServer(hostname, ram)
|
||||
|
||||
:param string hostname: Hostname of the purchased server
|
||||
:param number ram: Amount of RAM of the purchased server. Must be a power of 2. Maximum value of :js:func:`getPurchasedServerMaxRam`
|
||||
:RAM cost: 2.25 GB
|
||||
:param string hostname: Hostname of the purchased server.
|
||||
:param number ram: Amount of RAM of the purchased server. Must be a power of
|
||||
2. Maximum value of :doc:`getPurchasedServerMaxRam<getPurchasedServerMaxRam>`
|
||||
:returns: The hostname of the newly purchased server.
|
||||
|
||||
Purchased a server with the specified hostname and amount of RAM.
|
||||
|
||||
The *hostname* argument can be any data type, but it will be converted to a string and have whitespace removed. Anything that resolves to an empty string will
|
||||
cause the function to fail. If there is already a server with the specified hostname, then the function will automatically append
|
||||
a number at the end of the *hostname* argument value until it finds a unique hostname. For example, if the script calls
|
||||
*purchaseServer("foo", 4)* but a server named "foo" already exists, the it will automatically change the hostname to "foo-0". If there is already
|
||||
a server with the hostname "foo-0", then it will change the hostname to "foo-1", and so on.
|
||||
The ``hostname`` argument can be any data type, but it will be converted to
|
||||
a string and have whitespace removed. Anything that resolves to an empty
|
||||
string will cause the function to fail. If there is already a server with
|
||||
the specified hostname, then the function will automatically append a number
|
||||
at the end of the ``hostname`` argument value until it finds a unique
|
||||
hostname. For example, if the script calls ``purchaseServer("foo", 4)`` but
|
||||
a server named "foo" already exists, the it will automatically change the
|
||||
hostname to "foo-0". If there is already a server with the hostname "foo-0",
|
||||
then it will change the hostname to "foo-1", and so on.
|
||||
|
||||
Note that there is a maximum limit to the amount of servers you can purchase.
|
||||
|
||||
Returns the hostname of the newly purchased server as a string. If the function fails to purchase a server, then it will return an
|
||||
empty string. The function will fail if the arguments passed in are invalid, if the player does not have enough money to purchase
|
||||
the specified server, or if the player has exceeded the maximum amount of servers.
|
||||
Example:
|
||||
|
||||
Example::
|
||||
.. code-block:: javascript
|
||||
|
||||
ram = 64;
|
||||
hn = "pserv-";
|
||||
|
||||
@@ -1,16 +1,21 @@
|
||||
read() Netscript Function
|
||||
=========================
|
||||
|
||||
.. js:function:: read(port/fn)
|
||||
.. js:function:: read(portOrFilename)
|
||||
|
||||
:param string/number port/fn: Port or text file to read from
|
||||
:RAM cost: 1 GB
|
||||
:param string/number portOrFilename: Port or text file to read from.
|
||||
|
||||
This function is used to read data from a port, a text file (.txt), or a script (.script, .js, .ns)
|
||||
This function is used to read data from a port, a text file (.txt), or a
|
||||
script (.script, .js, .ns).
|
||||
|
||||
If the argument *port/fn* is a number between 1 and 20, then it specifies a port and it will read data from that port. Read
|
||||
about how :ref:`netscript_ports` work here. A port is a serialized queue. This function
|
||||
will remove the first element from that queue and return it. If the queue is empty, then the string "NULL PORT DATA" will be returned.
|
||||
If the argument ``portOrFilename`` is a number between 1 and 20, then it
|
||||
specifies a port and it will read data from that port. Read about how
|
||||
:ref:`netscript_ports` work here. A port is a serialized queue. This
|
||||
function will remove the first element from that queue and return it. If the
|
||||
queue is empty, then the string "NULL PORT DATA" will be returned.
|
||||
|
||||
If the argument *port/fn* is a string, then it specifies the name of a text file or script and this function will return the data in the specified text file/script. If
|
||||
the text file does not exist, an empty string will be returned.
|
||||
If the argument ``portOrFilename`` is a string, then it specifies the name
|
||||
of a text file or script and this function will return the data in the
|
||||
specified text file/script. If the text file does not exist, an empty string
|
||||
will be returned.
|
||||
|
||||
@@ -1,13 +1,17 @@
|
||||
relaysmtp() Netscript Function
|
||||
==============================
|
||||
|
||||
.. js:function:: relaysmtp(hostname/ip)
|
||||
.. js:function:: relaysmtp(hostname)
|
||||
|
||||
:param string hostname/ip: IP or hostname of the target server
|
||||
:RAM cost: 0 GB
|
||||
:RAM cost: 0.05 GB
|
||||
:param string hostname: Hostname of the target server.
|
||||
|
||||
Runs the relaySMTP.exe program on the target server. relaySMTP.exe must exist on your home computer.
|
||||
|
||||
Example::
|
||||
Runs the relaySMTP.exe program on the target server. relaySMTP.exe must
|
||||
exist on your home computer.
|
||||
|
||||
Example:
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
relaysmtp("foodnstuff");
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
rm() Netscript Function
|
||||
=======================
|
||||
|
||||
.. js:function:: rm(fn[, hostname/ip=current server])
|
||||
.. js:function:: rm(filename[, hostname=current server])
|
||||
|
||||
:param string fn: Filename of file to remove. Must include the extension
|
||||
:param string hostname/ip: Hostname or IP Address of the server on which to delete the file. Optional. Defaults to current server
|
||||
:returns: True if it successfully deletes the file, and false otherwise
|
||||
:RAM cost: 1 GB
|
||||
:param string filename: Filename of file to remove. Must include the extension.
|
||||
:param string hostname: Hostname address of the server on which to delete
|
||||
the file. Optional. Defaults to current server
|
||||
:returns: ``true`` if it successfully deletes the file.
|
||||
|
||||
Removes the specified file from the current server. This function works for every file type except message (.msg) files.
|
||||
Removes the specified file from the current server. This function works for
|
||||
every file type except ``.msg`` files.
|
||||
|
||||
@@ -1,33 +1,44 @@
|
||||
run() Netscript Function
|
||||
========================
|
||||
|
||||
.. js:function:: run(script, [numThreads=1], [args...])
|
||||
.. js:function:: run(script[, numThreads=1[, args...]])
|
||||
|
||||
:param string script: Filename of script to run
|
||||
:param number numThreads: Optional thread count for new script. Set to 1 by default. Will be rounded to nearest integer
|
||||
:param args...:
|
||||
Additional arguments to pass into the new script that is being run. Note that if any arguments are being
|
||||
passed into the new script, then the second argument *numThreads* must be filled in with a value.
|
||||
:RAM cost: 1 GB
|
||||
:param string script: Filename of script to run
|
||||
:param number numThreads: Optional thread count for new script. Set to 1 by
|
||||
default. Will be rounded to nearest integer.
|
||||
:param args...:
|
||||
Additional arguments to pass into the new script that is being run. Note
|
||||
that if any arguments are being passed into the new script, then the
|
||||
second argument ``numThreads`` must be filled in with a value.
|
||||
:returns: The process id of the new process or 0 on failure.
|
||||
|
||||
Run a script as a separate process. This function can only be used to run scripts located on the current server (the server
|
||||
running the script that calls this function).
|
||||
Run a script as a separate process. This function can only be used to run
|
||||
scripts located on the current server (the server running the script that
|
||||
calls this function).
|
||||
|
||||
Returns true if the script is successfully started, and false otherwise.
|
||||
.. warning:: Running this function with a ``numThreads`` argument of 0 will
|
||||
return 0 without running the script. However, running this function with
|
||||
a negative ``numThreads`` argument will cause a runtime error.
|
||||
|
||||
Running this function with a *numThreads* argument of 0 will return false without running the script.
|
||||
However, running this function with a negative *numThreads* argument will cause a runtime error.
|
||||
The simplest way to use the :doc:`run<run>` command is to call it with just
|
||||
the script name. The following example will run ``foo.script``
|
||||
single-threaded with no arguments:
|
||||
|
||||
The simplest way to use the *run* command is to call it with just the script name. The following example will run
|
||||
'foo.script' single-threaded with no arguments::
|
||||
.. code-block:: javascript
|
||||
|
||||
run("foo.script");
|
||||
|
||||
The following example will run 'foo.script' but with 5 threads instead of single-threaded::
|
||||
The following example will run 'foo.script' but with 5 threads instead of
|
||||
single-threaded:
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
run("foo.script", 5);
|
||||
|
||||
This next example will run 'foo.script' single-threaded, and will pass the string 'foodnstuff' into the script
|
||||
as an argument::
|
||||
This next example will run ``foo.script`` single-threaded, and will pass the
|
||||
string ``foodnstuff`` into the script as an argument:
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
run("foo.script", 1, 'foodnstuff');
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
scan() Netscript Function
|
||||
=========================
|
||||
|
||||
.. js:function:: scan(hostname/ip=current ip[, hostnames=true])
|
||||
.. js:function:: scan(hostname=current hostname)
|
||||
|
||||
:param string hostname/ip: IP or hostname of the server to scan
|
||||
:param boolean: Optional boolean specifying whether the function should output hostnames (if true) or IP addresses (if false)
|
||||
:RAM cost: 0.2 GB
|
||||
:param string hostname: Hostname of the server to scan.
|
||||
:returns: array of strings of all the host directly connected to the target
|
||||
server.
|
||||
|
||||
Returns an array containing the hostnames or IPs of all servers that are one node way from the specified target server. The
|
||||
hostnames/IPs in the returned array are strings.
|
||||
Example:
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
scan("home"); // returns: ["foodnstuff", "sigma-cosmetics", "joesguns", "hong-fang-tea", "harakiri-sushi", "iron-gym"]
|
||||
@@ -1,29 +1,33 @@
|
||||
scp() Netscript Function
|
||||
========================
|
||||
|
||||
.. js:function:: scp(files, [source], destination)
|
||||
.. js:function:: scp(files[, source], destination)
|
||||
|
||||
:RAM cost: 0.6 GB
|
||||
:param string/array files: Filename or an array of filenames of script/literature files to copy
|
||||
:param string source:
|
||||
Hostname or IP of the source server, which is the server from which the file will be copied.
|
||||
Hostname of the source server, which is the server from which the file will be copied.
|
||||
This argument is optional and if it's omitted the source will be the current server.
|
||||
:param string destination: Hostname or IP of the destination server, which is the server to which the file will be copied.
|
||||
:RAM cost: 0.6 GB
|
||||
:param string destination: Hostname of the destination server, which is the server to which the file will be copied.
|
||||
:returns: ``true`` is the copy was a success.
|
||||
|
||||
Copies a script or literature (.lit) file(s) to another server. The *files* argument can be either a string specifying a
|
||||
single file to copy, or an array of strings specifying multiple files to copy.
|
||||
Copies a script or literature (.lit) file(s) to another server. The
|
||||
``files`` argument can be either a string specifying a single file to copy,
|
||||
or an array of strings specifying multiple files to copy.
|
||||
|
||||
Returns true if the script/literature file is successfully copied over and false otherwise. If the *files* argument is an array
|
||||
then this function will return true if at least one of the files in the array is successfully copied.
|
||||
If the ``files`` argument is an array then this function will return true if
|
||||
at least one of the files in the array is successfully copied.
|
||||
|
||||
Examples::
|
||||
Example:
|
||||
|
||||
//Copies hack-template.script from the current server to foodnstuff
|
||||
scp("hack-template.script", "foodnstuff");
|
||||
.. code-block:: javascript
|
||||
|
||||
//Copies foo.lit from the helios server to the home computer
|
||||
scp("foo.lit", "helios", "home");
|
||||
//Copies "hack-template.script" from the current server to "foodnstuff"
|
||||
scp("hack-template.script", "foodnstuff"); // returns: true
|
||||
|
||||
//Tries to copy three files from rothman-uni to home computer
|
||||
//Copies "foo.lit" from the helios server to the "home" computer
|
||||
scp("foo.lit", "helios", "home"); // returns: true
|
||||
|
||||
//Tries to copy three files from "rothman-uni" to "home" computer
|
||||
files = ["foo1.lit", "foo2.script", "foo3.script"];
|
||||
scp(files, "rothman-uni", "home");
|
||||
scp(files, "rothman-uni", "home"); // returns: true
|
||||
|
||||
@@ -1,11 +1,18 @@
|
||||
scriptKill() Netscript Function
|
||||
===============================
|
||||
|
||||
.. js:function:: scriptKill(scriptname, hostname/ip)
|
||||
.. js:function:: scriptKill(scriptname, hostname)
|
||||
|
||||
:param string scriptname: Filename of script to kill. This is case-sensitive.
|
||||
:param string hostname/ip: Hostname or IP of target server
|
||||
:RAM cost: 1 GB
|
||||
:param string scriptname: Filename of script to kill. case-sensitive.
|
||||
:param string hostname: Hostname of target server.
|
||||
:returns: ``true`` if any scripts were killed.
|
||||
|
||||
Kills all scripts with the specified filename on the target server specified by *hostname/ip*, regardless of arguments. Returns
|
||||
true if one or more scripts were successfully killed, and false if none were.
|
||||
Kills all scripts with the specified filename on the target server specified
|
||||
by ``hostname``, regardless of arguments.
|
||||
|
||||
Example:
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
scriptKill("demo.script"); // returns: true
|
||||
|
||||
@@ -1,24 +1,30 @@
|
||||
scriptRunning() Netscript Function
|
||||
==================================
|
||||
|
||||
.. js:function:: scriptRunning(scriptname, hostname/ip)
|
||||
.. js:function:: scriptRunning(scriptname, hostname)
|
||||
|
||||
:param string scriptname: Filename of script to check. This is case-sensitive.
|
||||
:param string hostname/ip: Hostname or IP of target server
|
||||
:RAM cost: 1 GB
|
||||
:param string scriptname: Filename of script to check. case-sensitive.
|
||||
:param string hostname: Hostname of target server.
|
||||
:returns: ``true`` if any script with that file name is running on that
|
||||
server.
|
||||
|
||||
Returns a boolean indicating whether any instance of the specified script is running on the target server, regardless of
|
||||
its arguments.
|
||||
This is different than the :doc:`isRunning<isRunning>` function because it
|
||||
does not try to identify a specific instance of a running script by its
|
||||
arguments.
|
||||
|
||||
This is different than the *isRunning()* function because it does not try to identify a specific instance of a running script
|
||||
by its arguments.
|
||||
Examples:
|
||||
|
||||
**Examples:**
|
||||
The example below will return true if there is any script named
|
||||
``foo.script`` running on the ``foodnstuff`` server, and false otherwise:
|
||||
|
||||
The example below will return true if there is any script named *foo.script* running on the *foodnstuff* server, and false otherwise::
|
||||
.. code-block:: javascript
|
||||
|
||||
scriptRunning("foo.script", "foodnstuff");
|
||||
|
||||
The example below will return true if there is any script named "foo.script" running on the current server, and false otherwise::
|
||||
The example below will return true if there is any script named
|
||||
``foo.script`` running on the current server, and false otherwise:
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
scriptRunning("foo.script", getHostname());
|
||||
|
||||
@@ -1,9 +1,14 @@
|
||||
serverExists() Netscript Function
|
||||
=================================
|
||||
|
||||
.. js:function:: serverExists(hostname/ip)
|
||||
.. js:function:: serverExists(hostname)
|
||||
|
||||
:param string hostname/ip: Hostname or IP of target server
|
||||
:RAM cost: 0.1 GB
|
||||
:param string hostname: Hostname of target server.
|
||||
:returns: ``true`` if the target server exists.
|
||||
|
||||
Returns a boolean denoting whether or not the specified server exists
|
||||
Example:
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
serverExists("foodnstuff"); // returns: true
|
||||
@@ -3,7 +3,14 @@ sleep() Netscript Function
|
||||
|
||||
.. js:function:: sleep(n)
|
||||
|
||||
:param number n: Number of milliseconds to sleep
|
||||
:RAM cost: 0 GB
|
||||
:param number n: Number of milliseconds to sleep
|
||||
|
||||
Suspends the script for n milliseconds.
|
||||
|
||||
|
||||
Example:
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
sleep(3000); // Will wait 3 seconds.
|
||||
@@ -1,20 +1,24 @@
|
||||
spawn() Netscript Function
|
||||
==========================
|
||||
|
||||
.. js:function:: spawn(script, numThreads, [args...])
|
||||
.. js:function:: spawn(script, numThreads[, args...])
|
||||
|
||||
:RAM cost: 2 GB
|
||||
:param string script: Filename of script to execute
|
||||
:param number numThreads: Number of threads to spawn new script with. Will be rounded to nearest integer
|
||||
:param number numThreads: Number of threads to spawn new script with. Will
|
||||
be rounded to nearest integer.
|
||||
:param args...:
|
||||
Additional arguments to pass into the new script that is being run.
|
||||
:RAM cost: 2 GB
|
||||
|
||||
Terminates the current script, and then after a delay of about 20 seconds it will execute the newly-specified script.
|
||||
The purpose of this function is to execute a new script without being constrained by the RAM usage of the current one.
|
||||
This function can only be used to run scripts on the local server.
|
||||
Terminates the current script, and then after a delay of about 10 seconds it
|
||||
will execute the newly-specified script. The purpose of this function is to
|
||||
execute a new script without being constrained by the RAM usage of the
|
||||
current one. This function can only be used to run scripts on the local
|
||||
server.
|
||||
|
||||
Because this function immediately terminates the script, it does not have a return value.
|
||||
|
||||
The following example will execute the script 'foo.script' with 10 threads and the arguments 'foodnstuff' and 90::
|
||||
Example:
|
||||
|
||||
spawn('foo.script', 10, 'foodnstuff', 90);
|
||||
.. code-block:: javascript
|
||||
|
||||
spawn('foo.script', 10, 'foodnstuff', 90); // "run foo.script 10 foodnstuff 90" in 10 seconds.
|
||||
|
||||
@@ -1,13 +1,16 @@
|
||||
sqlinject() Netscript Function
|
||||
==============================
|
||||
|
||||
.. js:function:: sqlinject(hostname/ip)
|
||||
.. js:function:: sqlinject(hostname)
|
||||
|
||||
:param string hostname/ip: IP or hostname of the target server
|
||||
:RAM cost: 0 GB
|
||||
:RAM cost: 0.05 GB
|
||||
:param string hostname: Hostname of the target server.
|
||||
|
||||
Runs the SQLInject.exe program on the target server. SQLInject.exe must exist on your home computer.
|
||||
Runs the SQLInject.exe program on the target server. SQLInject.exe must
|
||||
exist on your home computer.
|
||||
|
||||
Example::
|
||||
Example:
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
sqlinject("foodnstuff");
|
||||
|
||||
15
doc/source/netscript/basicfunctions/tFormat.rst
Normal file
15
doc/source/netscript/basicfunctions/tFormat.rst
Normal file
@@ -0,0 +1,15 @@
|
||||
tFormat() Netscript Function
|
||||
============================
|
||||
|
||||
.. js:function:: tFormat(milliseconds)
|
||||
|
||||
:RAM cost: 0 GB
|
||||
:param number milliseconds: Amount of milliseconds to format.
|
||||
:returns: milliseconds in the "D M H S" format
|
||||
|
||||
Example:
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
tFormat(3000); // returns: "3 seconds"
|
||||
tFormat(10000000); // returns: "2 hours 46 minutes 40 seconds"
|
||||
31
doc/source/netscript/basicfunctions/tail.rst
Normal file
31
doc/source/netscript/basicfunctions/tail.rst
Normal file
@@ -0,0 +1,31 @@
|
||||
tail() Netscript Function
|
||||
==================================
|
||||
|
||||
.. js:function:: tail([fn[, hostname=current hostname[, [...args]]])
|
||||
|
||||
:RAM cost: 0 GB
|
||||
:param string fn: Optional. Filename of script to get logs from.
|
||||
:param string hostname: Optional. Hostname of the server that the script is on.
|
||||
:param args...: Arguments to identify which scripts to get logs for.
|
||||
|
||||
Opens a script's logs. This is functionally the same as the
|
||||
:ref:`tail_terminal_command` Terminal command.
|
||||
|
||||
If the function is called with no arguments, it will open the current script's logs.
|
||||
|
||||
Otherwise, the ``fn``, ``hostname``, and ``args...`` arguments can be
|
||||
used to get the logs from another script. Remember that scripts are uniquely
|
||||
identified by both their names and arguments.
|
||||
|
||||
Example:
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
// Open logs from foo.script on the current server that was run with no args
|
||||
tail("foo.script");
|
||||
|
||||
// Open logs from foo.script on the foodnstuff server that was run with no args
|
||||
tail("foo.script", "foodnstuff");
|
||||
|
||||
// Open logs from foo.script on the foodnstuff server that was run with the arguments [1, "test"]
|
||||
tail("foo.script", "foodnstuff", 1, "test");
|
||||
@@ -3,7 +3,13 @@ tprint() Netscript Function
|
||||
|
||||
.. js:function:: tprint(x)
|
||||
|
||||
:param x: Value to be printed
|
||||
:RAM cost: 0 GB
|
||||
:param x: Value to be printed
|
||||
|
||||
Prints a value or a variable to the Terminal
|
||||
Prints a value or a variable to the Terminal.
|
||||
|
||||
Example:
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
tprint("Hello world!"); // Prints "Hello world!" to the terminal.
|
||||
@@ -3,10 +3,12 @@ tryWrite() Netscript Function
|
||||
|
||||
.. js:function:: tryWrite(port, data="")
|
||||
|
||||
:RAM cost: 1 GB
|
||||
:param number port: Port to be written to
|
||||
:param string data: Data to try to write
|
||||
:returns: True if the data is successfully written to the port, and false otherwise
|
||||
:RAM cost: 1 GB
|
||||
:returns: ``true`` if the data is successfully written to the port.
|
||||
|
||||
Attempts to write data to the specified Netscript Port. If the port is full, the data will
|
||||
not be written. Otherwise, the data will be written normally
|
||||
Attempts to write data to the specified Netscript Port. If the port is full,
|
||||
the data will not be written. Otherwise, the data will be written normally.
|
||||
|
||||
See :ref:`netscript_ports` for more details.
|
||||
@@ -1,20 +1,31 @@
|
||||
weaken() Netscript Function
|
||||
===========================
|
||||
|
||||
.. js:function:: weaken(hostname/ip)
|
||||
.. js:function:: weaken(hostname[, opts={}])
|
||||
|
||||
:param string hostname/ip: IP or hostname of the target server to weaken
|
||||
:returns: The amount by which the target server's security level was decreased. This is equivalent to 0.05 multiplied
|
||||
by the number of script threads
|
||||
:RAM cost: 0.15 GB
|
||||
:param string hostname: Hostname of the target server to weaken.
|
||||
:param object opts: Optional parameters for configuring function behavior. Properties:
|
||||
|
||||
Use your hacking skills to attack a server's security, lowering the server's security level. The runtime for this command
|
||||
depends on your hacking level and the target server's security level. This function lowers the security level of the target
|
||||
server by 0.05.
|
||||
* threads (*number*) - Number of threads to use for this function.
|
||||
Must be less than or equal to the number of threads the script is running with.
|
||||
:returns: The amount by which the target server's security level was
|
||||
decreased. This is equivalent to 0.05 multiplied by the number of script
|
||||
threads.
|
||||
|
||||
Like hack() and grow(), weaken() can be called on any server, regardless of where the script is running. This command requires
|
||||
root access to the target server, but there is no required hacking level to run the command.
|
||||
Use your hacking skills to attack a server's security, lowering the server's
|
||||
security level. The runtime for this command depends on your hacking level
|
||||
and the target server's security level. This function lowers the security
|
||||
level of the target server by 0.05.
|
||||
|
||||
Example::
|
||||
Like :doc:`hack<hack>` and :doc:`grow<grow>`, :doc:`weaken<weaken>` can be
|
||||
called on any server, regardless of where the script is running. This
|
||||
command requires root access to the target server, but there is no required
|
||||
hacking level to run the command.
|
||||
|
||||
Example:
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
weaken("foodnstuff");
|
||||
weaken("foodnstuff", { threads: 5 }); // Only use 5 threads to weaken
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
wget() Netscript Function
|
||||
=========================
|
||||
|
||||
.. js:function:: wget(url, target[, hostname/ip=current ip])
|
||||
.. js:function:: wget(url, target[, hostname=current hostname])
|
||||
|
||||
:RAM cost: 0 GB
|
||||
:param string url: URL to pull data from
|
||||
:param string target: Filename to write data to. Must be script or text file
|
||||
:param string ip: Optional hostname/ip of server for target file.
|
||||
:RAM cost: 0 GB
|
||||
:param string ip: Optional hostname of server for target file.
|
||||
|
||||
Retrieves data from a URL and downloads it to a file on the specified server. The data can only
|
||||
be downloaded to a script (.script, .ns, .js) or a text file (.txt). If the file already exists,
|
||||
@@ -20,12 +20,12 @@ wget() Netscript Function
|
||||
**IMPORTANT:** This is an asynchronous function that returns a Promise. The Promise's resolved
|
||||
value will be a boolean indicating whether or not the data was successfully
|
||||
retrieved from the URL. Because the function is async and returns a Promise,
|
||||
it is recommended you use :code:`wget` in :ref:`netscriptjs`.
|
||||
it is recommended you use ``wget`` in :ref:`netscriptjs`.
|
||||
|
||||
In NetscriptJS, you must preface any call to
|
||||
:code:`wget` with the :code:`await` keyword (like you would :code:`hack` or :code:`sleep`).
|
||||
``wget`` with the ``await`` keyword (like you would ``hack`` or ``sleep``).
|
||||
|
||||
:code:`wget` will still work in :ref:`netscript1`, but the functions execution will not
|
||||
``wget`` will still work in :ref:`netscript1`, but the functions execution will not
|
||||
be synchronous (i.e. it may not execute when you expect/want it to). Furthermore, since Promises are not
|
||||
supported in ES5, you will not be able to process the returned value of :code:`wget` in
|
||||
supported in ES5, you will not be able to process the returned value of ``wget`` in
|
||||
Netscript 1.0.
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user