joniveehernandez Posted January 8, 2013 Posted January 8, 2013 Hi Guys, Here's the scenario I'm creating a script that accept agent name but the real thing is it saves the UUID not the name. Because I want it User-friendly what is the best way to accept agent name? By the way I'm using Textbox to accept agent name. Since llName2Key is not yet possible and I don't want to rely on libraries the used external database like from Takat Su. I'll implement it to my Security Orb System in adding whitelist and admins and so on. Thanks!
Dora Gustafson Posted January 8, 2013 Posted January 8, 2013 You probably don't need the agent key until the agent enters the region. Use llGetAgentList() to find out who are in the region / over your land / over this exact parcel.llGetAgentList() returns the keys and the keys can easily be converted to names inllKey2Name(), llGetUsername() or llGetDisplayName() :smileysurprised::smileyvery-happy:
Nova Convair Posted January 8, 2013 Posted January 8, 2013 The username is as good as an uuid to identify an avatar. The script should add the "Resident" lastname if needed and convert everything to lowercase for comparison but if someone types in Displaynames - that will not work. There are NO functions: displayname -> username/ uuid and username -> uuid besides 3rd party stuff.
Innula Zenovka Posted January 8, 2013 Posted January 8, 2013 This is what I use when I want to turn input into usernames, from the wiki: string agentUsername(string agentLegacyName) { return llDumpList2String(llParseString2List(llToLower(agentLegacyName)+" ", [" resident ", " "],[]), ".");} I also use this, rather than external databases, when I want to turn names into keys: https://wiki.secondlife.com/wiki/N2K. However, since it risks W3C changing their services (as has happened before) and breaking it, and also it can't find people who have set "show in search" to false, I don't think I would recomend the method here. Usernames are the way to do it, to my mind.
Recommended Posts
Please take a moment to consider if this thread is worth bumping.
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now