Set Profile Data

setprofiledata (Commands)
TypeCorrade progressive command
Commandsetprofiledata
DescriptionThe setprofiledata command can be used to change the profile data of the account that Corrade connects to.
Permissionsgrooming
Parametersgroup, password, data
Last Changesnone
Command Required Parameters Required Corrade Permissions Example
setprofiledata group, password, data grooming
llInstantMessage(CORRADE,
    wasKeyValueEncode(
        [
            "command", "setprofiledata",
            "group", wasURLEscape(GROUP),
            "password", wasURLEscape(PASSWORD),
            "data", wasListToCSV([
                "AboutText", "Good day!",
                // assuming cat is a texture in the inventory
                "ProfileImage", "cat"
            ])
        ]
    )
);

The data parameter follows the AvatarProperties libopenmetaverse structure and sub-structures.

Parameter Possible Values Description
data AboutTextSecond Life profile text
AllowPublishShould this profile be published on the web
FirstLifeImageFirst Life image ID
FirstLifeTextFirst Life about text
FlagsFlags of the profile
MaturePublishIs this a mature profile
ProfileImageProfile image ID
ProfileURLWeb URL for this profile
LanguagesTextLanguages profile field
SkillsMaskSkills mask
SkillsTextSkills text
WantToMaskWantTo mask
WantToTextWantTo text

The SkillsMask and the SkillsMask are special, they represent a bitfield mask corresponding to the individual tick-boxes on the interests profile tab.

The following table gives the individual values of each tick-box for the I Want To: section:

I Want To: Value
Build 1
Explore 2
Meet 4
Group 8
Buy 16
Sell 32
Be Hired 64
Hire 128

And the following table is for the skills section:

Skills: Value
Textures 1
Architecture 2
Event Planning 4
Modeling 8
Scripting 16
Custom Characters 32

Setting the SkillsMask and the WantToMask is fairly literal and can be done using one single command using the wasSetBitFlags from the LSL FUSS page.

For example, if we wanted to set the tick-boxes of Group and Explore we would send the command to Corrade in the following way:

        llInstantMessage(CORRADE,
            wasKeyValueEncode(
                [
                    "command", "setprofiledata",
                    "group", wasURLEscape(GROUP),
                    "password", wasURLEscape(PASSWORD),
                    "data", wasListToCSV(
                        [
                            "WantToMask",
                            wasSetBitFlags(
                                [ "Group","Explore" ],
                                [ "Build", "Explore", "Meet", "Group", "Buy", "Sell", "Be Hired", "Hire" ]
                            )
                        ]
                    ),
                    "callback", wasURLEscape(URL)
                ]
            )
        );

The same applies procedure applies to SkillsMask. Suppose we wanted to tick the checkbox of Event Planning and Custom Characters. In that case we would issue:

        llInstantMessage(CORRADE,
            wasKeyValueEncode(
                [
                    "command", "setprofiledata",
                    "group", wasURLEscape(GROUP),
                    "password", wasURLEscape(PASSWORD),
                    "data", wasListToCSV(
                        [
                            "SkillsMask",
                            wasSetBitFlags(
                                [ "Event Planning", "Custom Characters" ],
                                [ "Textures", "Architecture", "Event Planning", "Modeling", "Scripting", "Custom Characters" ]
                            )
                        ]
                    ),
                    "callback", wasURLEscape(URL)
                ]
            )
        );

Notes