moriakaice / bitburner

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

Script trapped in weaken cycle #6

Open Grubleafeater opened 3 years ago

Grubleafeater commented 3 years ago

At max money, your script sometimes continues to weaken the server...and launch grow scripts. Problem is that this increases the security level--requiring a new weaken cycle. Starting a infinite loop of 0 money.

I added a check to my local version of the script to see if money is at or near max and if so omit grows from weaken cycles. It's incredibly crude because I don't fully understand your code, so I'd recommend you rewrite it in your own manner.

Grubleafeater commented 3 years ago

Ah. Found the issue.

Your script assumes that ALL SPACE THAT EXISTS is open to it, so running ANY scripts on Home will completely fuck with it since it assigns Weakens there.