Is there a way to prevent chat from "timing out"? I have a chatbot that I'm trying to keep active, even when chat is not. It's not a monitored account, so if I have to spam the account with private messages, that's ok.

I tried this, but it didn't fire off often enough.
Code:
int timetoroll = to_int(get_property("_timetoroll"));

	if(timetoroll+5000 < to_int(now_to_string("HHmmss"))) {
	chat_private("ruby", "hi");
	set_property("_timetoroll", now_to_string("HHmmss"));	}
I also tried the heartbeat script someone Dudicle wrote here.
But the heartbeat script prevented chat from being refreshed properly.

I've tried looking around, but I'm stuck.

Is there perhaps a way to put the bot into a loop that doesn't use wait() commands, but takes time to execute, without pinging the servers?