Tuesday, October 23, 2007

A simple antenna

This script will reset the media on a parcel for whoever chats at it, not for everyone, just for the avatar that does it. The object and the script need to be owned by the group or land owners, but the avatar chatting does not need to be in the owning group.

I've set it to a default channel of 55.


default
{
state_entry()
{
llListen(55,"",NULL_KEY,"");
}

listen(integer channel,string name,key id,string m)
{
if ( llParcelMediaQuery([PARCEL_MEDIA_COMMAND_TEXTURE]) == [] )
llSay(0, "Lacking permission to set/query parcel media. This object has to be owned by/deeded to the land owner.");

llParcelMediaCommandList( [
PARCEL_MEDIA_COMMAND_URL, m,
PARCEL_MEDIA_COMMAND_AGENT, id,
PARCEL_MEDIA_COMMAND_PLAY ] );


}


}


Features can be added to this as needed.

No comments:

Post a Comment