Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Checking that a sim has rebooted ?

StableMaster Insoo
Registered User
Join date: 29 Nov 2006
Posts: 6
05-13-2008 12:37
Hi all, I have been experimenting with trying to detect when a sim's server goes down and is restarted. Currently the way im doing it is to store the sims current DNS address in a string, and then once every 300seconds (5mins) to get the sim's DNS address and compair them. This is only reliable if the sim does not come back up on the same server. (There is a slight chance that this could happen).

Which would you say is the most reliable way to detect that the sim the object is on has just been rebooted ? Is it doing it the way that I am already doing it or are there any events that are re-triggered that could be used to get rid of the 5min timer event?

I know i could use the llRequestSimulatorData() function, but this in itself would require a timer event to be run on a set period to do the check. Are any events triggered again on a sim restart, such as state_entry() or such ?

Reason im asking is im trying to make the script as passive as possible to reduce script execution times on the sim.

Thanks in advance.
Darien Caldwell
Registered User
Join date: 12 Oct 2006
Posts: 3,127
05-13-2008 13:06
/15/3a/81552/1.html

:)
_____________________
Johan Laurasia
Fully Rezzed
Join date: 31 Oct 2006
Posts: 1,394
05-13-2008 21:27
you can use llGetTime(), llGetTime returns the # of seconds since the last sim reset, script reset, or call to llResetTime() or llGetAndResetTime(). On state_entry() call and store llGetTime(), then setup a timer to read llGetTime() and compare it to the initial call. If the current read is less than the initial read, the sim has been reset.