working on Mizzajl/home/wip/scanFactionAugments.js
This commit is contained in:
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
Mizzajl/home/bestTarget.txt
|
||||||
|
Mizzajl/home/ServerRouteList.txt
|
||||||
|
Mizzajl/home/serverList.txt
|
||||||
@@ -1 +1 @@
|
|||||||
{"home":{"n00dles":{"nectar-net":{"phantasy":{"netlink":{},"crush-fitness":{},"avmnite-02h":{"rothman-uni":{},"summit-uni":{},"syscore":{"lexo-corp":{"global-pharm":{"deltaone":{"defcomm":{"taiyang-digital":{"applied-energetics":{"stormtech":{".":{"nwo":{"ecorp":{},"The-Cave":{}}}}},"run4theh111z":{"fulcrumtech":{"omnitek":{"clarkinc":{}}},"vitalife":{"4sigma":{"b-and-a":{}}}}}},"icarus":{"nova-med":{"microdyne":{"helios":{"kuai-gong":{"blade":{"megacorp":{}},"powerhouse-fitness":{"fulcrumassets":{}}}}}}}}}},"rho-construction":{},"millenium-fitness":{"aerocorp":{"omnia":{"solaris":{}}},"snap-fitness":{"unitalife":{"univ-energy":{"infocomm":{}},"zeus-med":{"zb-def":{"titan-labs":{}}}}}}}}}}},"foodnstuff":{},"sigma-cosmetics":{"zer0":{"omega-net":{"the-hub":{},"johnson-ortho":{}}},"max-hardware":{}},"joesguns":{},"hong-fang-tea":{},"harakiri-sushi":{},"iron-gym":{"CSEC":{"neo-net":{"computek":{"zb-institute":{"alpha-ent":{},"aevum-police":{"galactic-cyber":{}}},"catalyst":{},"I.I.I.I":{}}},"silver-helix":{}}},"darkweb":{}}}
|
{"home":{"n00dles":{"nectar-net":{"phantasy":{"netlink":{},"crush-fitness":{},"avmnite-02h":{"rothman-uni":{},"summit-uni":{},"syscore":{"lexo-corp":{"global-pharm":{"deltaone":{"defcomm":{"taiyang-digital":{"applied-energetics":{"stormtech":{".":{"nwo":{"ecorp":{},"The-Cave":{}}}}},"run4theh111z":{"fulcrumtech":{"omnitek":{"clarkinc":{}}},"vitalife":{"4sigma":{"b-and-a":{}}}}}},"icarus":{"nova-med":{"microdyne":{"helios":{"kuai-gong":{"blade":{"megacorp":{}},"powerhouse-fitness":{"fulcrumassets":{}}}}}}}}}},"rho-construction":{},"millenium-fitness":{"aerocorp":{"omnia":{"solaris":{}}},"snap-fitness":{"unitalife":{"univ-energy":{"infocomm":{}},"zeus-med":{"zb-def":{"titan-labs":{}}}}}}}}}}},"foodnstuff":{},"sigma-cosmetics":{"zer0":{"omega-net":{"the-hub":{},"johnson-ortho":{}}},"max-hardware":{}},"joesguns":{},"hong-fang-tea":{},"harakiri-sushi":{},"iron-gym":{"CSEC":{"neo-net":{"computek":{"zb-institute":{"alpha-ent":{},"aevum-police":{"galactic-cyber":{}}},"catalyst":{},"I.I.I.I":{}}},"silver-helix":{}}},"darkweb":{},"pserv-00":{},"pserv-01":{},"pserv-02":{},"pserv-03":{},"pserv-04":{},"pserv-05":{},"pserv-06":{},"pserv-07":{},"pserv-08":{},"pserv-09":{},"pserv-10":{},"pserv-11":{},"pserv-12":{},"pserv-13":{},"pserv-14":{},"pserv-15":{},"pserv-16":{},"pserv-17":{},"pserv-18":{},"pserv-19":{},"pserv-20":{},"pserv-21":{},"pserv-22":{},"pserv-23":{},"pserv-24":{}}}
|
||||||
@@ -1 +1 @@
|
|||||||
{"serverName":"the-hub","maxRam":64,"maxMoney":440206450.3125,"minSec":13,"minPorts":2,"minHackLvl":298,"rootAccess":true,"openPorts":0,"serverOrgs":"The Hub","serverCores":2,"serverFiles":[]}
|
{"serverName":"clarkinc","maxRam":0,"maxMoney":56342049041.25,"minSec":15,"minPorts":5,"minHackLvl":1195,"rootAccess":true,"openPorts":0,"serverOrgs":"Clarke Incorporated","serverCores":14,"serverFiles":["beyond-man.lit","cost-of-immortality.lit"]}
|
||||||
File diff suppressed because one or more lines are too long
@@ -1,24 +1,49 @@
|
|||||||
/** @param {NS} ns */
|
/** @param {NS} ns */
|
||||||
export async function main(ns) {
|
export async function main(ns) {
|
||||||
|
|
||||||
let aFactions = ns.getPlayer().factions;
|
const aOwnedAugmentations = ns.singularity.getOwnedAugmentations(true);
|
||||||
|
//ns.tprint("aOwnedAugmentations = " + aOwnedAugmentations);
|
||||||
|
const aFactions = ns.getPlayer().factions;
|
||||||
ns.tprint("aFactions = " + aFactions);
|
ns.tprint("aFactions = " + aFactions);
|
||||||
let aAugmentations;
|
let aAugmentations;
|
||||||
let sStats;
|
let aStats;
|
||||||
|
|
||||||
for (let f = 0; f < aFactions.length; f++) {
|
for (let f = 0; f < aFactions.length; f++) {
|
||||||
//ns.tprint("f = " + f);
|
//loop throught the factions
|
||||||
//sFaction = ns.singularity.faction
|
ns.tprint("Faction = " + aFactions[f]);
|
||||||
aAugmentations = ns.singularity.getAugmentationsFromFaction(aFactions[f]);
|
aAugmentations = ns.singularity.getAugmentationsFromFaction(aFactions[f]);
|
||||||
ns.tprint("aAugmentations = " + aAugmentations);
|
let aAvailableAugmentations = aAugmentations.filter(item => !aOwnedAugmentations.includes(item)); //ChatGPT
|
||||||
|
//ns.tprint("aAugmentations = " + aAugmentations);
|
||||||
|
ns.tprint("aAvailableAugmentations = " + aAvailableAugmentations);
|
||||||
|
|
||||||
|
|
||||||
ns.tprint("----------------------------------------------------------------------------------------------------------------------------------------------------------");
|
ns.tprint("----------------------------------------------------------------------------------------------------------------------------------------------------------");
|
||||||
for (let a = 0; a < aFactions.length; a++) {
|
for (let a = 0; a < aAvailableAugmentations.length; a++) {
|
||||||
sStats = JSON.stringify(ns.singularity.getAugmentationStats(aAugmentations[a]));
|
//loop throught their aumentations
|
||||||
ns.tprint(aAugmentations[f] + "sStats = " + sStats);
|
//if (aOwnedAugmentations.includes(aAvailableAugmentations[a]) === false) {
|
||||||
|
|
||||||
|
//JSON.stringify(ns.singularity.getAugmentationStats(aAvailableAugmentations[a]));
|
||||||
|
let oStats = ns.singularity.getAugmentationStats(aAvailableAugmentations[a]);
|
||||||
|
ns.tprint(aAvailableAugmentations[a]);
|
||||||
|
let nAugmentationReputation = ns.singularity.getAugmentationRepReq(aAvailableAugmentations[a]);
|
||||||
|
let sAugmentationPrereq = ns.singularity.getAugmentationPrereq(aAvailableAugmentations[a]);
|
||||||
|
let nAugmentationPrice = ns.singularity.getAugmentationPrice(aAvailableAugmentations[a]);
|
||||||
|
ns.tprint("Reputation needed = " + nAugmentationReputation);
|
||||||
|
ns.tprint("Prereq = " + sAugmentationPrereq);
|
||||||
|
ns.tprint("Price = " + nAugmentationPrice);
|
||||||
|
// ChatGPT - Iterate through the object and display properties where the value is not 1
|
||||||
|
for (const key in oStats) {
|
||||||
|
if (oStats[key] !== 1) {
|
||||||
|
//console.log(`${key}: ${oStats[key]}`);
|
||||||
|
ns.tprint(`${key}: ${oStats[key]}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//ns.tprint(aAvailableAugmentations.filter(index !== 1) + " aStats = " + aStats);
|
||||||
|
//ns.tprint(aAvailableAugmentations[a] + " oStats = " + oStats);
|
||||||
ns.tprint("----------------------------------------------------------------------------------------------------------------------------------------------------------");
|
ns.tprint("----------------------------------------------------------------------------------------------------------------------------------------------------------");
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user