UUID/Dialog/Server
|
|
Jenn Yoshikawa
Registered User
Join date: 14 Nov 2007
Posts: 91
|
10-11-2008 17:42
I'm working on a server object that will do some things. Being the server will host names and uuids. What I want the server to do is store the uuids and names. But when I pick name from my hud I want to server to know what uuid to send the e mail comand to.
Basic lay out
Admin Hud sends commands to server. User Hud sends users name and uuid to server. Server will store uuids and names and will e mail commands to said person.
I'm not looking to do a more then 12 names. I'm not sure how I would set up lists to do this. Now I have the color script by Sol Columbia, But I'm not sure how I can set up the the changes in uuids from the objects being they changes there uuids a lot lol. So if you have time to show me how to do this I would be do thank full to you.
Jenn
|
|
Escort DeFarge
Together
Join date: 18 Nov 2004
Posts: 681
|
10-11-2008 18:38
From: Jenn Yoshikawa I'm working on a server object that will do some things. Being the server will host names and uuids. What I want the server to do is store the uuids and names. But when I pick name from my hud I want to server to know what uuid to send the e mail comand to. You'll have to lobby for llName2Key(), or use/set up a database externally to proxy this function. The reason that llName2Key doesn't exist in LSL is very likely because it will make in-world spamming intolerable because SL, like life, has its quota of ignorant, short-sighted and/or selfish idiots. From: Jenn Yoshikawa I'm not looking to do a more then 12 names. I'm not sure how I would set up lists to do this. Your main issue here is that names can be greater than 23 characters long, but dialog button text can't. So you likely need to think about maintaining synchronized lists of agent_names and agent_name_buttons... Yes, I know, all of this is non-trivial - that can't be helped. /esc
_____________________
http://slurl.com/secondlife/Together
|
|
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
|
10-11-2008 19:54
The user hud uuid's will be changing but you aren't sending commands to the user huds. The av's uuid isn't going to change so I don't really see this as a problem. The hud contacts the server with some kind of security handshake if necessary, the server stores the name and key. Admin hud contacts server and asks for list of names. Admin script takes and stores them in a list such as: list keyname = ["Jesse Barnett", "0bf93171-e0d3-4b8c-b6eb-55d2cc30cf26", "Jenn Yoshikawa", "ea7516ac-7e14-4785-b117-3a4706f6292f"];
When you build the button list just trim the names using something like this: list buttons; default { state_entry() { list keyname = ["Jesse Barnett", "0bf93171-e0d3-4b8c-b6eb-55d2cc30cf26", "Jenn Yoshikawa", "ea7516ac-7e14-4785-b117-3a4706f6292f"]; integer listlength = llGetListLength(keyname); integer x = 0; integer strideindex = 0; while(x < listlength/2){ buttons += (list)llGetSubString(llList2String(keyname, strideindex),0 ,11); strideindex += 2; x++; } llOwnerSay(llList2CSV(buttons)); } }
that returns: "temp: Jesse Barnet, Jenn Yoshika" Notice how it trimmed my name to 12 characters?
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime. From: someone I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
|
|
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
|
10-11-2008 20:03
And if you notice I had your key.: http://w-hat.com/name2keyIs accurate probably 90% of the time.
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime. From: someone I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
|
|
Jenn Yoshikawa
Registered User
Join date: 14 Nov 2007
Posts: 91
|
opps
10-11-2008 20:49
not sure if I said it right but all I need to store the uuid of the hud the user has on, Now the server would store just the persons names with there hud key. How I have it set up to run is.
When the user wears the hud/ login it would then e mail the uuid of the hud to the server along with the user name. Then the server would then send the admin hud a updated list of the users online with just there names. Then I pick a name to use the commands on. One the command is used/picked the admin hud would send a e mail to the server. The server would then read the e mail and get the data persons name/command. Then the server would e mail the persons hud with the commands.
Admin hud would be easy to do just with a llCSV2List(data). What I'm geting lost on is when I e mail the command back to the server. Is geting the users gud uuid from the list so the commands can be sent on to the next stage.
Just so you all know I'm not nuts hehe. Adding on to a collar system I have worked on for a while now and I have been asked to add a for the owners to send commands any where from sl. Thank god they have not asked for a web based setup knock on wood hehe.
Not sure if its just me lol. But me and a few friends did some testing on uuids on changes. The uuids only changed when we toke them off and when we did a relog. At one time some one said they would change when you would tp and changes sims. Not sure if it still dose. If itstill dose its easy to work around it would change events.
|
|
Escort DeFarge
Together
Join date: 18 Nov 2004
Posts: 681
|
10-12-2008 02:10
From: Jenn Yoshikawa not sure if I said it right but all I need to store the uuid of the hud the user has on, Now the server would store just the persons names with there hud key. How I have it set up to run is. You could avoid the hud key -> owner key conversion step perhaps by using llGetOwnerKey() on the hud id you get in the listen... regs /esc edit: and consequently get their name to via llKey2Name since you know they are present...
_____________________
http://slurl.com/secondlife/Together
|
|
Qie Niangao
Coin-operated
Join date: 24 May 2006
Posts: 7,138
|
10-12-2008 06:44
From: Jenn Yoshikawa What I'm geting lost on is when I e mail the command back to the server. Is geting the users gud uuid from the list so the commands can be sent on to the next stage. Not sure how literally to take that. You know about the function llListFindList(), right? Or... is the question how to implement an association list? Or... 
|
|
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
|
10-12-2008 07:43
Nope she wants to be able to communicate with the user huds.
Correct me if I am wrong but are you asking how to do the server part? Because you have already laid out the basic outline of how to do everything.
1) When the user comes online, thier hud will update it's uuid to the server and in the message can also include the username.
2) The server locates the username and replaces the uuid if necessary, and sends this info to the admin hud.
3) The admin hud gets the username and uuid, locates the username in the strided list and replaces the uuid if necessary. Or actually just outright replaces the uuid each time. To replace the uuid you use llListReplaceList.
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime. From: someone I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
|
|
Jenn Yoshikawa
Registered User
Join date: 14 Nov 2007
Posts: 91
|
hmmm
10-12-2008 07:53
I'm not sure how I would do the server side of the stage. Lists kick my av bum all over sl life hehe.
What I can't seem to work the way I need it to is store the the persons name and hud uuid in a list for one.
Sending the names with out the hud uuids onto the admin hud.
I looked at the lsl wiki on lists and they don't seem to cover much or I missed some thing on it.
The hard part is when you use the admin hud to send a command back to the server like Jenn Yoshikawa|command I have my server breaking down the message into data strings. Then I would have to search a list for the persons name for there hud uuid to e mail the commands to.
I think it would like some thing like this ["av name","av hud uuid"]
But thats why I come to the lsl gods on lists. Lists kinda make me feel like a 2nd grader hehe.
|
|
Qie Niangao
Coin-operated
Join date: 24 May 2006
Posts: 7,138
|
10-12-2008 14:50
Okay, so the server will receive (at least) two types of messages:
1. User HUD tells server llKey2Name(llGetOwner()) is associated with its llGetKey().
The server stores these in a strided list: [UserName1, UUIDKey1, UserName2, UUIDKey2, ... UserNameN, UUIDKeyN] It might construct this list by first testing if UserNameX is already in the list using llListFindList, and if it is, update the corresponding HUD key (just the next element in the list) with llListReplaceList; if UserNameX is new, it can just append the user name and HUD key with the += operator.
2. Admin HUD tells server that UserNameY should get some Command.
The server finds the corresponding HUD UUID in the strided list with llListFindList for UserNameY. It then sends the command to that HUD.
There are, however, a whole bunch of design issues for other features. Just for starters: should everybody with a User HUD automatically be able to get commands from all Administrators, or are specific Users associated only with specific Admins? How should Admin HUDs learn of new users? How do new Admin HUDs learn about all the existing users to whom they should send commands? Are all commands available to all Admins on all "their" Users?
Also, before a large scale deployment of something like this, probably wise to have at least a redundant pair of pre-existing servers and a means of updating remote HUDs from either of those servers about the existence of new back-up servers. (This can't be foolproof because one can't be sure all HUDs will get the update before all their known servers die, but it's better than nothing.)
By the way, the strided list approach is one way of doing an a-list. An alternative is to keep two parallel lists, one with user names, the other with HUD keys, and just use the index where the name is found in the first list as the index for where to find the associated key in the second. If you'll ever have to sort by name, however, strided lists are the way to go.
|
|
Jenn Yoshikawa
Registered User
Join date: 14 Nov 2007
Posts: 91
|
:0
10-12-2008 15:32
all commands are basic commands that you would find in any collar along with rlv. There would only be one admin to the server. So that parts easy to update on lol. When you say 2 lists witch seems a bit better. But then again how would I do a simple set up on one. I know it would have to find the place of the uuid from the names list.
Now what is better to do for knowing when the users gose off line to update the list. Haveing the hud send a command the user went off line. Or runing a data server in the server to check the users list for any changes. And is there a way remove from a list with out haveing to dump the full list.
|