Online Status - Multi User
|
TXGorilla Falcone
KWKAT Planetfurry DJ
Join date: 4 May 2004
Posts: 176
|
07-08-2005 12:35
Is it possable to make a script that uses floating text of friends names where the name is red or green pending there status like. I am needing one to place at my guilds home for the newbes.
Floating text Name Shown | User Name in game | Name color ---------------------------------------------------------- DarkeWolf | Wolf Fielding | Green Burningfox | Burningfox Prefect | Red
_____________________
Drunken Monkeys danceing on the tables. Falling from the sky just like in a fable.
|
Torn Bobbysocks
Registered User
Join date: 6 Jul 2005
Posts: 11
|
07-08-2005 12:52
According to how llSetText works, floating text can only be one color. But it is possible to make an online status indicator for multiple people, see the wiki page for llRequestAgentData. All you need is your friend's UUID to check if they're online.
|
Kurt Zidane
Just Human
Join date: 1 Apr 2004
Posts: 636
|
07-08-2005 13:03
you could, have the list only display names of people who are online. And then have a 2nd list that displays all the people offline.
|
Lit Noir
Arrant Knave
Join date: 3 Jan 2004
Posts: 260
|
07-08-2005 13:04
Or a few transparent prims spaced out but linked to the primary object to offset the different names with different colors.
|
Frans Charming
You only need one Frans
Join date: 28 Jan 2005
Posts: 1,847
|
07-08-2005 14:24
Or create a texture with their names. And then put a prim besides every name, wich you can make green or red.
|
TXGorilla Falcone
KWKAT Planetfurry DJ
Join date: 4 May 2004
Posts: 176
|
07-08-2005 15:16
... ok yall did give me sum ideas cence I have no clue how to create listing scripts I have reverse engineered this to change the texture of a prim... only problem is I cant make heads or tails of what to modify to input there UUID... can sumone help me out there? my guess is its llGetOwner() I also need to rember how to have this always checking insted of just on touch. key g_keyQuery;
default { state_entry() { }
touch_start(integer total_number) { g_keyQuery = llRequestAgentData(llGetOwner(), DATA_ONLINE); }
dataserver(key queryid, string data) { llSay(0,(string)queryid); if ( queryid == g_keyQuery ) { if ( data == "1" ) { llSetColor(<0.0, 1.0, 0.0>,ALL_SIDES); // set to Green - ONLINE } else { llSetColor(<1.0, 0.0, 0.0>,ALL_SIDES); // set to Red - OFFLINE } } } }
_____________________
Drunken Monkeys danceing on the tables. Falling from the sky just like in a fable.
|
Burke Prefect
Cafe Owner, Superhero
Join date: 29 Oct 2004
Posts: 2,785
|
07-08-2005 17:12
replace llGetOwner() with with the KEY... OR.... put a veriable at the top for key user = UUID.
I might take a stab at this later.
|
Catherine Omega
Geometry Ninja
Join date: 10 Jan 2003
Posts: 2,053
|
07-08-2005 18:14
From: TXGorilla Falcone only problem is I cant make heads or tails of what to modify to input there UUID... can sumone help me out there? my guess is its llGetOwner() You can do llDetectedKey(0) in your touch_start event to callibrate. This way, when the user clicks the object, it gets their key. You could then store it in a list, or if you're doing one lookup per script, just a global key variable would work. llGetOwner will only get the key of the object owner. I assume you want to be able to check if a user is online without them needing to own the object? From: someone I also need to rember how to have this always checking insted of just on touch. You want to set up a timer, probably at about a fairly lengthy interval, 60 seconds minimum.
|
Zindorf Yossarian
Master of Disaster
Join date: 9 Mar 2004
Posts: 160
|
07-09-2005 10:43
I have a cool idea for the text: make two prims of the same size and position (just keep them seperate while editing, and make one 100% transparent) and have one do online people and the other do offline. They just need to insert a blank line for people handled by the other object. It would look exactly as though you had different color text from the same object.
_____________________
Badass Ninja Penguin: Killing stuff it doesn't like since sometime in May 2004.
|
Sydney Alexander
Registered User
Join date: 19 Feb 2005
Posts: 69
|
07-10-2005 21:57
Hi!
I have been trying to script a small peice of jewelry that would glow when a resident is online. I do nto want to be limited to it being the object owner. I want to set it to change when say a friend is online. I have replaced llGetOwner with the UUID with no luck. WHat am I missing?
Thanks,
|
Burke Prefect
Cafe Owner, Superhero
Join date: 29 Oct 2004
Posts: 2,785
|
07-10-2005 23:19
string online_status = "PUT TARGET UUID IN DESCRIPTION FEILD"; // This is be replaced on script start if proper key is place. key namerequest; key onlinerequest; integer online = FALSE;
list agents = []; list handles = []; list messages = [];
init() { llSetText("", <1,1,1>, 1); llMessageLinked(LINK_SET, 0, "offline", NULL_KEY); //resets all dependant scripts to OFF llSetTimerEvent(90); //How Often The Script Checks For Status. Set to 90 for less lag. namerequest = llRequestAgentData(llGetObjectDesc(), DATA_NAME); //Pulls Key From Description }
default { on_rez(integer param) { init(); } state_entry() { init(); }
timer() { namerequest = llRequestAgentData(llGetObjectDesc(), DATA_NAME); // Pulls Name onlinerequest = llRequestAgentData(llGetObjectDesc(), DATA_ONLINE); // Pulls Key } touch_start(integer total_number) { integer x; //Built In Key Grabber, For Extra Simplicty for (x = 0;x < total_number;x += 1) { llSay(0, "This Candle Is For: " + online_status +". Your Key Is: " +(string)llDetectedKey(x)); llSay(0, "Set This Candle's Description To Desired Key. Refreshes Every 90 Seconds."); } } dataserver(key request, string data) { if (request == namerequest) { online_status = data; } else { if (data == "1") { // IF USER IS ONLINE, THEN.... llMessageLinked(LINK_SET, 0, "online", NULL_KEY); // The object has other parts that respond to this. llSetObjectName(online_status + "'s Status Candle"); //So you don't have to reset the thing. online = TRUE; } else { // IF USER IS OFFLINE.... llMessageLinked(LINK_SET, 0, "offline", NULL_KEY); online = FALSE; } } } }
Here. I made a candle that pulls the user key from the prim description. So you don't have to fook with the code, just edit the prim's description. No muss, no fuss. Hacked from the Online Message Indicator script.
|
Kurt Zidane
Just Human
Join date: 1 Apr 2004
Posts: 636
|
07-11-2005 06:09
is a timer really necessary? couldn't it just update on touch?
|
Sydney Alexander
Registered User
Join date: 19 Feb 2005
Posts: 69
|
07-12-2005 17:45
Hi Burke! Thank you for sharing your script. I have made some changes to it. What I am having trouble with is this... I would like the ability to turn off the detect key function. I have commented out the llsay but would like to issues a /1 detectkey command and then have the ability to turn off the detect key. I have added an IM feture and do not want to be doing multi things when clicking on it. Before I spend more time n this do you know of any reason why I shoudl not be able to make this change. It is possible to toggle the detect key on and off? Thanks, Sydney From: Burke Prefect string online_status = "PUT TARGET UUID IN DESCRIPTION FEILD"; // This is be replaced on script start if proper key is place. key namerequest; key onlinerequest; integer online = FALSE;
list agents = []; list handles = []; list messages = [];
init() { llSetText("", <1,1,1>, 1); llMessageLinked(LINK_SET, 0, "offline", NULL_KEY); //resets all dependant scripts to OFF llSetTimerEvent(90); //How Often The Script Checks For Status. Set to 90 for less lag. namerequest = llRequestAgentData(llGetObjectDesc(), DATA_NAME); //Pulls Key From Description }
default { on_rez(integer param) { init(); } state_entry() { init(); }
timer() { namerequest = llRequestAgentData(llGetObjectDesc(), DATA_NAME); // Pulls Name onlinerequest = llRequestAgentData(llGetObjectDesc(), DATA_ONLINE); // Pulls Key } touch_start(integer total_number) { integer x; //Built In Key Grabber, For Extra Simplicty for (x = 0;x < total_number;x += 1) { llSay(0, "This Candle Is For: " + online_status +". Your Key Is: " +(string)llDetectedKey(x)); llSay(0, "Set This Candle's Description To Desired Key. Refreshes Every 90 Seconds."); } } dataserver(key request, string data) { if (request == namerequest) { online_status = data; } else { if (data == "1") { // IF USER IS ONLINE, THEN.... llMessageLinked(LINK_SET, 0, "online", NULL_KEY); // The object has other parts that respond to this. llSetObjectName(online_status + "'s Status Candle"); //So you don't have to reset the thing. online = TRUE; } else { // IF USER IS OFFLINE.... llMessageLinked(LINK_SET, 0, "offline", NULL_KEY); online = FALSE; } } } }
Here. I made a candle that pulls the user key from the prim description. So you don't have to fook with the code, just edit the prim's description. No muss, no fuss. Hacked from the Online Message Indicator script.
|