bitburner-src/markdown/bitburner.ns.getrecentscripts.md
omuretsu 06a985bdf8 Revert "Remove markdown from git tracking (#139)"
This reverts commit bbb6e3f309935aebac74ddb1fbeec12dfb7540b1.
2022-10-21 11:16:00 -04:00

950 B

Home > bitburner > NS > getRecentScripts

NS.getRecentScripts() method

Get an array of recently killed scripts across all servers.

Signature:

getRecentScripts(): RecentScript[];

Returns:

RecentScript[]

Array with information about previously killed scripts.

Remarks

RAM cost: 0.2 GB

The most recently killed script is the first element in the array. Note that there is a maximum number of recently killed scripts which are tracked. This is configurable in the game's options as Recently killed scripts size.

Example

let recentScripts = ns.getRecentScripts();
let mostRecent = recentScripts.shift()
if (mostRecent)
  ns.tprint(mostRecent.logs.join('\n'))