I'm not gonna lie. It took me around 3 hours to finally get this working. I had a friend make me a script with a similar idea on NeoBot, but as he does not play anymore, I had to try it myself. Also, I could not find anything similar on the forum.
Variables on Setup:
Action on Cavebot to check if it's time to logout:
time_before_ss = '04:40'
time_ss = '05:00'
time_to_login = '05:15'
Action on Cavebot to logout and login:
if time() > time_before_ss and time() < time_ss then
It works. What I'm wanting to know is if there is a more optimal way of doing it. I'm not too sure if the code I used is the best, and also not too sure if it will keep trying to connect if it fails the first attempt. This is a much safer way of using a reconnect than the ones that just reconnect in the middle of the spawn, plus there is no need to use a bp opener as there is an action right after the reconnector that opens the backpacks.
if islocation() and time() > time_before_ss and time() < time_ss then
while time() < time_to_login do
connect('ACCNAME', 'PW', 'CHARNAME')
until connected == true
Do anyone have any suggestions to improve it? If so, please share.