Alarm Script

This was script was in response to a request for help on the SL wanted forums.  The poster wanted a script that would send an IM at a certain time of day, every day.  This script is the result.

It calculates the difference in time between the required time and now (taking care of midnight of course) and then sets a timer event to trigger at that point.  When the alarm triggers the next alarm is set for 24 hours time (less whatever time it takes for the script to operate).  This allows for any lag and drift in the timers too.

There is an option for touch to control the enabling/disabling of the alarm.  Time can be set in either GMT or SLT using the variables at the top of the script.

See:

Be sure to set the UUID of the avatar to IM at the top and update your message.

If you want a different action, then add the appropriate code in the alarm() function.

Kimm

Advertisements

~ by kimmpaulino on October 22, 2012.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: