alainbryden / bitburner-scripts

My own scripts for playing bitburner
MIT License
607 stars 272 forks source link

autopilot.js / casino.js: Avoid going into debt and getting stuck at the casino with no money #436

Open alainbryden opened 2 weeks ago

alainbryden commented 2 weeks ago

Two issues to look at here:

  1. One morning I woke up to a message that casino.js failed to run because we are out of money. This happened because we were studying while heading to the casino. I could have sworn I had code which stopped any player actions before heading to the casino, but I might have missed something. so we should double check.

image

  1. If casino.js runs into this scenario (or any error scenario after having killed all scripts) and cannot proceed, it should be running the "on completion" scripts to restart autopilot.js so we can recover from debt and try again later.
alainbryden commented 1 week ago

Simple problem caused by an unfortunate sequence of events: