Page 1 of 1

Auto-Census delay?

Posted: Mon Sep 12, 2005 9:46 am
by gendril
I know that there is a delay with Auto-Census, but what is it. When searching through the code I found:

Code: Select all

local g_LastCensusRun = time() - 1500; --  timer used if auto census is turned on
Does this mean that it runs a census every 1500 seconds?

Posted: Mon Sep 12, 2005 9:58 am
by Rollie
Actually, what that does is cause the first start up census to not start for 10 minutes.

This check on line 1290 causes auto census to not start until 30 minutes after the last census was stopped.

Code: Select all

g_LastCensusRun < time&#40;&#41; - 1800

Posted: Mon Sep 12, 2005 10:26 am
by gendril
So if I wanted to start census immediately (or very soon after I've logged into a character) what would I change?

Posted: Mon Sep 12, 2005 10:40 am
by Rollie
You would want change the default:

Code: Select all

local g_LastCensusRun = time&#40;&#41; - 1500; --  timer used if auto census is turned on
to maybe

Code: Select all

local g_LastCensusRun = time&#40;&#41; - 1730; --  timer used if auto census is turned on
Which would cause a census to start about 30 sec after login.

Posted: Mon Sep 12, 2005 2:05 pm
by gendril
Ok, I can't say that I quite understand that. But what number would I put there if I wanted the census to start 5 seconds after login? 30 seconds is too much time to wait when I take a census and then am out of there.

Posted: Mon Sep 12, 2005 2:29 pm
by Rollie
Basically, when Auto-Census is on, then it will attempt to take a Census 1800 seconds (30 mins) after the time set in g_LastCensusRun. When the mod first loads up, it sets g_LastCensusRun to the current time minus 1200 seconds, meaning in 600 more seconds, a snapshot will be kicked off.

So by setting g_LastCensusRun farther and farther in the past, it will cause a Census to be kicked off sooner. So, to get it to start 5 seconds after loging, you would set it to 1795.

You could also just set it to 1800 and a Census will begin as soon as possible.

Posted: Mon Sep 12, 2005 10:42 pm
by gendril
Thanks, that's exactly what I wanted to know.
Purrrrrrrfect! :lol:

Posted: Sat Oct 08, 2005 9:36 pm
by jonnydont
I want the program to begin taking a census 5 second after logon, and then automatically retake the next census immeadiatly after finishing the current one. How would I do that???

Posted: Sat Oct 08, 2005 9:59 pm
by Rollie
There isn't really much benefit to running a constant census. I'm not really sure why you would want to do that.

Posted: Sat Oct 08, 2005 10:30 pm
by jonnydont
Rollie wrote:There isn't really much benefit to running a constant census. I'm not really sure why you would want to do that.
You'd be suprised at how many new people it finds when you run it back to back.

Posted: Sun Oct 09, 2005 12:15 am
by Rollie
But I would hope you would still be able to see those folks if you waited 30 mins before taking another Census. Still, if this is what you want to do, it would be easy to set up.

You would want to change line 108:

Code: Select all

local g_LastCensusRun = time&#40;&#41; - 1500;
to something like:

Code: Select all

local g_LastCensusRun = time&#40;&#41; - 5;

And change line 1353

Code: Select all

	if&#40; g_VariablesLoaded and g_IsCensusPlusInProgress == false and CensusPlus_Database&#91;"Info"&#93;&#91;"AutoCensus"&#93; == true and g_LastCensusRun < time&#40;&#41; - 1800 &#41; then
to something like

Code: Select all

	if&#40; g_VariablesLoaded and g_IsCensusPlusInProgress == false and CensusPlus_Database&#91;"Info"&#93;&#91;"AutoCensus"&#93; == true and g_LastCensusRun < time&#40;&#41; - 5 &#41; then
I haven't tested the above, but that would pretty much cause you to be taking Census pretty much constantly.

Posted: Sun Oct 09, 2005 4:47 pm
by jonnydont
Thanks! Works like a charm!

Posted: Sun Oct 09, 2005 10:16 pm
by Zimeron
I just login and hit that lovely macro button you gave me ;)

Posted: Tue Nov 15, 2005 1:19 pm
by Bruno
Do I need to have C++ to do this or can I just use notepad to change all that?

Posted: Tue Nov 15, 2005 2:02 pm
by Rollie
Notepad should work just fine =)

Posted: Tue Nov 15, 2005 4:53 pm
by Bruno
Thank you. Works beautifully.