From OpenSimulator

Jump to: navigation, search
integer osAvatarType(key avatarKey)

integer osAvatarType(string avatarFirstName, string avatarLastName)

Returns the type of a avatar in region:
  • < 0 in case of error
  • 0 if avatar not found in region
  • 1 if it is a normal avatar
  • 2 if it is a NPC
Threat Level This function does not do a threat level check
Permissions Use of this function is always allowed by default
Extra Delay 0 seconds
// This script listens for a key on channel 1 which will then
// tell you the avatar type
// This is the default state definition
    // This function is called when the script enters the default state
        // Setting up a listener on channel 1, listening for any message from the owner
        llListen(1, "", llGetOwner(), "");    
    // This function is called when the script receives a message on the specified channel
    listen(integer channel, string name, key id, string message)
        // Checking if the message was received on channel 1
        if (channel == 1)
            // Calling osAvatarType function to determine the type of the avatar
This function was added in

Personal tools
About This Wiki