79
votes
7
comments

Reload Bot Logic when fleet returns

Suggested by: Sandman ()
When a fleet arrives to a planet carrying resources i.e. return from attack or transport the bot logic for that planet should rerun so the wait timer for the building queue can be updated or the next item can be built without manual input.
Awaiting approval

k3c3l ()

como se configura

Djs ()

func BrainRestart() {
SleepRandMs(1000, 15000)
Print("BrainRestart")
StopBrain()
SleepRandMs(3000, 20000)
StartBrain()

}
Print("BrainRestart - started task")
CronExec("45 */15 * * * *", BrainRestart)
<-OnQuitCh

I used that script to restart brain every 15 minutes. You can extend the interval. It works for me

michael ()

As I can see there is a new channel introduced which can help us to re-run brain logic on fleet actions.
It is called "OnFleetDispatch" :-) Thanks! This helps very much!

dav1d ()

definetly one I look forward too the :brain needs to check more often the available res

essaaa1 ()

Please add auto reload bot logic or give me aby script for it thats important

michael ()

Does the Bot handle returning or arriving fleets at all? Sometimes a fleet returned 2 hours ago and the bot dont have that info! I think thats not implemented correctly!

Corvax ()

There is no any API in srcipt to rerun brain bot, am I right ?