OsAvatarName2Key
From OpenSimulator
(Difference between revisions)
m (Oops and fix the script too) |
(Fix script) |
||
Line 7: | Line 7: | ||
// | // | ||
// osAvatarName2Key Script Exemple | // osAvatarName2Key Script Exemple | ||
+ | // Author: djphil | ||
// | // | ||
string FirstName = "John"; | string FirstName = "John"; | ||
string LastName = "Smith"; | string LastName = "Smith"; | ||
− | + | ||
default | default | ||
{ | { | ||
Line 18: | Line 19: | ||
llSay(PUBLIC_CHANNEL, "Touch to see osAvatarName2Key usage."); | llSay(PUBLIC_CHANNEL, "Touch to see osAvatarName2Key usage."); | ||
} | } | ||
− | + | ||
touch_start(integer number) | touch_start(integer number) | ||
{ | { | ||
− | string AvatarName = osAvatarName2Key(FirstName, LastName); | + | string AvatarName = FirstName + " " + LastName; |
− | llSay(PUBLIC_CHANNEL, "The avatar name is " + AvatarName); | + | key AvatarKey = osAvatarName2Key(FirstName, LastName); |
+ | |||
+ | llSay(PUBLIC_CHANNEL, "The avatar name is " + AvatarName); | ||
+ | llSay(PUBLIC_CHANNEL, "The avatar key is " + (string)AvatarKey); | ||
} | } | ||
} | } |
Revision as of 18:58, 6 December 2020
key osAvatarName2Key(string FirstName, string LastName)
| |
Returns an avatar's key, based on his/her first and last name. | |
Threat Level | Low |
Permissions | ${OSSL|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER |
Extra Delay | 0 seconds |
Example(s) | |
// // osAvatarName2Key Script Exemple // Author: djphil // string FirstName = "John"; string LastName = "Smith"; default { state_entry() { llSay(PUBLIC_CHANNEL, "Touch to see osAvatarName2Key usage."); } touch_start(integer number) { string AvatarName = FirstName + " " + LastName; key AvatarKey = osAvatarName2Key(FirstName, LastName); llSay(PUBLIC_CHANNEL, "The avatar name is " + AvatarName); llSay(PUBLIC_CHANNEL, "The avatar key is " + (string)AvatarKey); } } |