Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

online status texture changer?

Sabane Talamasca
Registered User
Join date: 25 Sep 2005
Posts: 56
12-17-2006 22:42
Anyone know where i could find a script to show your online status, but rather than fancy particles or a hover text i'm looking for something that would change one texture to another to show your status.
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
12-18-2006 02:37
From: Sabane Talamasca
Anyone know where i could find a script to show your online status, but rather than fancy particles or a hover text i'm looking for something that would change one texture to another to show your status.


CODE

string stronline = "online texture";
string stroffline = "offline texture";
integer IsOnline = 0;


key query = NULL_KEY;

SetTexture()
{
if(IsOnline)llSetTexture(stronline,ALL_SIDES);
else llSetTexture(stroffline,ALL_SIDES);
}

default
{
state_entry()
{
llSetTimerEvent(1); // Check almost immediately
}

timer()
{
query = llRequestAgentData(llGetOwner(), DATA_ONLINE);
}

dataserver(key queryid, string data)
{
if(query == queryid)
{
llSetTimerEvent(0);
integer online = (integer)data;
if(online != IsOnline)
{
IsOnline = online;
SetTexture();
}
llSetTimerEvent(60); // Check every minute
}
}
}



Should do the job although I'm not in world to try it