To avoid retrieving the buffbot data at each try, replace line 114
cli_execute("zlib acquireBuff_last_update = " + today_to_string());
Another issue is that the script should try a first online bot (as determined by is_online()), and try the next one if you don't get the buff after waiting. The problem is that gather_data() is called at each try, and gather_data() resets the "online" flag that was meant to be switched off to skip the buffbot on the next iteration.
vars["acquireBuff_last_update"] = today_to_string();
The best way to avoid this would be to only call gather_data() only once, from the top level so it is called even if another script imports acquireBuff.ash. Simply move line 210
to the top level (on line 100 for example, right after the function is defined).