Free SL Scripts

  • Increase font size
  • Default font size
  • Decrease font size

Avatar On/Offline Detection

E-mail Print PDF

//IM's you when the person with the target key comes on and off line. Especially useful as, if you're not online and have your settings appropriatly configured, the alert goes to your e-mail


 // Retrieved from from Free SL Scripts on http://www.freeSLscripts.com or www.freeslscripts.gendersquare.org

//Script by Deevyde Maelstrom of the Brainiacs
//Feel free to do whatever you want with it, but keep this header please :)

key target = "97981694-0f2c-48a0-8203-208e4d65dfdc"; // You can look up the key of the avatar of your choice at: http://w-hat.com/name2key
string nick = "Adalace";
string objname = "Object";
integer online;

default

{
    state_entry()
    {
        llSetTimerEvent(5); // Set timer event
    }
   
    timer()
    {
        llRequestAgentData(target, DATA_ONLINE);
    }
   
    dataserver(key id, string data)
    {
        if((integer)data == 1 && online == 0)
        {
            llSetObjectName(nick + "is Online!");
            llInstantMessage(llGetOwner(), "MEEP!");
            online = 1;
            llSetObjectName(objname);
        }
        else if((integer)data == 0 && online == 1)
        {
            llSetObjectName(nick + "'s Offline");
            llInstantMessage(llGetOwner(), "NARK!");
            online = 0;
            llSetObjectName(objname);
        }
    }
}

Comments
Search
Only registered users can write comments!

3.26 Copyright (C) 2008 Compojoom.com / Copyright (C) 2007 Alain Georgette / Copyright (C) 2006 Frantisek Hliva. All rights reserved."

Last Updated on Thursday, 30 July 2009 20:23  

Submit a Free Script

GTranslate

English French German Italian Portuguese Russian Spanish

SL News Feeds

Test SL Script Vendor


Follow Me

Facebook Twitter YouTube

Feedburner

GSyndication

Scripters online in SL