setprofiledata (Commands) | |
---|---|
Type | Corrade progressive command |
Command | setprofiledata |
Description | The setprofiledata command can be used to change the profile data of the account that Corrade connects to. |
Permissions | grooming |
Parameters | group , password , data |
Last Changes | none |
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 | AboutText | Second Life profile text |
AllowPublish | Should this profile be published on the web | |
FirstLifeImage | First Life image ID | |
FirstLifeText | First Life about text | |
Flags | Flags of the profile | |
MaturePublish | Is this a mature profile | |
ProfileImage | Profile image ID | |
ProfileURL | Web URL for this profile | |
LanguagesText | Languages profile field | |
SkillsMask | Skills mask | |
SkillsText | Skills text | |
WantToMask | WantTo mask | |
WantToText | WantTo 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) ] ) );
ProfileImage
) or the first life profile image (FirstLifeImage
) the field must be set to an asset UUID (not an inventory UUID).