moriakaice / bitburner

Collection of scripts for https://danielyxie.github.io/bitburner/
ISC License
114 stars 145 forks source link

Sleep #20

Open Xowie89 opened 2 years ago

Xowie89 commented 2 years ago

The script sleeps a ridiculously long time (literally hours) even after installing augments and starting over on the first set of businesses. I don't fully understand it but it appears to want to sleep for 12+ hours before it does anything. My home server is 64 terabytes. Playing on steam.

mainHack.ns: [4:52:09 PM] Starting mainHack.ns

mainHack.ns: [4:52:09 PM] Selected rho-construction for a target. Planning to weaken the server. Will wake up around 6:28:09 AM

mainHack.ns: [4:52:09 PM] Stock values: baseSecurity: 42; minSecurity: 14; maxMoney: $13,184,119,700

mainHack.ns: [4:52:09 PM] Current values: security: 22.78; money: $13,184,119,700

mainHack.ns: [4:52:09 PM] Time to: hack: 09:23:59; grow: 10:52:47; weaken: 13:35:59

mainHack.ns: [4:52:09 PM] Delays: 04:11:29 for hacks, 02:42:56 for grows

mainHack.ns: [4:52:09 PM] Cycles ratio: 35885 grow cycles; 3297 weaken cycles; expected security reduction: 164.85

grow.ns log:

sleep: Sleeping for 96176964.8840369 milliseconds

Seems it doesn't account for scripts you already have running on home that it doesn't kill so I cant run my stock market manager and node manager scripts while it is running (Easy fix on your part just get free ram and not max ram when calculating grow/hack threads). But still it sleeps forever.

Blaisun commented 2 years ago

looks as though the the getgrowtime,gethacktime,and getweakentime changed not that long ago to return milliseconds, not seconds. you need to remove the * 1000 from:

    const hackTime = ns.getHackTime(bestTarget) * 1000
    const growTime = ns.getGrowTime(bestTarget) * 1000
    const weakenTime = ns.getWeakenTime(bestTarget) * 1000

in mainHack.ns

Xowie89 commented 2 years ago

Doesn't it auto update when i run start.ns though?

Edit: Oh I see the files in src have not been updated so its auto updating for 1.0.0.