Compare commits

..

2 Commits

Author SHA1 Message Date
Philipp
880860b5de Merge branch 'main' of https://gitea.goetje-ing.de/ArchitectsOfTheBitburner/The_Bitburner_Scripts 2024-10-07 09:49:11 +02:00
Philipp
31c08544ff working on the corp-control 2024-10-07 09:49:02 +02:00

View File

@@ -1,14 +1,33 @@
/** @param {NS} ns */
export async function main(ns) {
export async function main(ns, reset) {
let cities = ["Sector-12", "Aevum", "Volhaven", "Chongqing", "New Tokyo", "Ishima"];
let corpName = "AgraNeo";
//ns.tprint(ns.corporation.getConstants())
//ns.corporation.getMaterial();
//ns.corporation.buyMaterial();
let corpName = "Agri-Ram";
if (reset === true || !ns.fileExists("CorpStatus.txt")){
ns.write("CorpStatus.txt",JSON.stringify({step: 0}),"w");
};
let corpStatus = JSON.parse(ns.read("CorpStatus.txt")) || {step: 0};
let step = corpStatus.step;
while (step < 99) {
step = corpStatus.step;
switch (step) {
case 0:
case 10:
case 20:
case 30:
case 40:
case 50:
case 60:
case 70:
case 80:
case 90:
case 100:
default:
}
for (let city of cities) {
await ns.run("/corp/Smart.js",1,corpName,city);
await ns.tprint(ns.run("/corp/UpgradeOffice.js",1,corpName,city));
await ns.sleep(1000)
}
}
}