One potential source of annoyance or embarrassment is the presence of an under-dressed avatar. The following script outlines a possible strategy for handling this by teleporting the avatar to a changing room. The script would require substantial modification to work satisfactorily at world-scale -- this is just proof-of-concept code that requires the avatar to touch a prim containing the script. The prim needs to be owned by the World Manager or Owner.
The script works by creating an appearance card in the prim for the avatar, counting the number of lines in the card and teleporting the avatar if the count is below a set limit. Again, the figure of 100 is somewhat arbitrary and requires further investigation. You could also use osGetGender to make the teleport destination conditional.
- Code: Select all
integer LIMIT = 100;
vector CHANGING_ROOM = <128,128, 25>;
AVATAR = llDetectedKey(0);
NAME = llKey2Name(AVATAR);
if (osGetNumberOfNotecardLines(NAME) < LIMIT)
llInstantMessage(AVATAR, "Possible wardrobe malfunction");
osTeleportAgent(AVATAR, CHANGING_ROOM, ZERO_VECTOR);