OsAvatarName2Key

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
m (Indentation)
m (Oops and fix the script too)
Line 6: Line 6:
 
|ossl_example=<source lang="lsl">  
 
|ossl_example=<source lang="lsl">  
 
//
 
//
// Sample Script using osAvatarName2Key(first,last) to send Instant Message
+
// osAvatarName2Key Script Exemple
 
//  
 
//  
 
   
 
   
 
string FirstName = "John";
 
string FirstName = "John";
 
string LastName = "Smith";
 
string LastName = "Smith";
 
+
 
default
 
default
 
{
 
{
  state_entry()
+
    state_entry()
  {
+
    {
      llSay(PUBLIC_CHANNEL, "Script running");
+
        llSay(PUBLIC_CHANNEL, "Touch to see osAvatarName2Key usage.");
  }
+
    }
 
+
  touch_end(integer number)
+
    touch_start(integer number)
  {
+
    {
      kAvatarKey = osAvatarName2Key(FirstName, LastName);
+
        string AvatarName = osAvatarName2Key(FirstName, LastName);
      llInstantMessage(kAvatarKey, "Test Message Here");     
+
        llSay(PUBLIC_CHANNEL, "The avatar name is " + AvatarName);     
  }
+
    }
 
}
 
}
 
</source>
 
</source>

Revision as of 11:43, 24 November 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
// 
 
string FirstName = "John";
string LastName = "Smith";
 
default
{
    state_entry()
    {
        llSay(PUBLIC_CHANNEL, "Touch to see osAvatarName2Key usage.");
    }
 
    touch_start(integer number)
    {
        string AvatarName = osAvatarName2Key(FirstName, LastName);
        llSay(PUBLIC_CHANNEL, "The avatar name is " + AvatarName);    
    }
}
Personal tools
General
About This Wiki