Difference between revisions of "LlOverMyLand"

From Second Life Wiki
Jump to navigation Jump to search
m (Optimized my previous example, provided link to optimizations)
Line 11: Line 11:
|constants
|constants
|examples=<pre>//--// private land message //--//
|examples=<pre>//--// private land message //--//
//-- @@ = Contains code optimizations, see the following page for details
//-- http://wiki.secondlife.com/wiki/User_talk:Void_Singer#Coding_Practices_Part_2_.28optimizations.29


//-- list of people not to pester, lower case only
//-- list of people not to pester, lower case only
Line 20: Line 23:
     {
     {
         llOwnerSay( "I'll pester anyone on your land I can find,"
         llOwnerSay( "I'll pester anyone on your land I can find,"
                   + " 'less they're in your ignore list or a linden" );
                   + " unless they're in your ignore list, or a Linden" );
         llSensorRepeat( "", "", AGENT, 96, PI, 30 );
         llSensorRepeat( "", "", AGENT, 96, PI, 30 );
     }
     }
Line 34: Line 37:
             {
             {
                 //-- don't pester people in the ignore list
                 //-- don't pester people in the ignore list
                 if (!~llListFindList( vgLstIgnore, (list)vStrName ))
                 if (!~llListFindList( vgLstIgnore, (list)vStrName )) //-- @@ x 2
                 {
                 {
                     //-- don't pester lindens, they might get testy
                     //-- don't pester lindens, they might get testy
                     //-- note the space, can't be faked that I know of!
                     //-- note the space, can't be faked that I know of!
                     if (!~llSubStringIndex( vStrName, " linden" ))
                     if (!~llSubStringIndex( vStrName, " linden" )) //-- @@
                     {
                     {
                         //-- pester everyone else !!!
                         //-- pester everyone else !!!
Line 46: Line 49:
                 }
                 }
             }
             }
         }while (++vIntCounter < vIntFound);
         }while (++vIntCounter < vIntFound); //-- @@
     }
     }
}</pre>[[User:Void Singer|Void Singer]] 02:04, 15 October 2007 (PDT)
}</pre>[[User:Void Singer|Void Singer]] 02:04, 15 October 2007 (PDT)

Revision as of 20:24, 16 October 2007

Deletion Requested
The deletion of this article was requested for the following reason:

Template is no longer used and it's creator thinks it does not function properly.

If there is a need to discuss the deletion of this article, please add your comment(s) here.

Summary

Function: integer llOverMyLand( key id );
0.0 Forced Delay
10.0 Energy

Returns an integer boolean, TRUE if id is over land owned by the script owner, FALSE otherwise.

• key id

On group deeded land the object containing the script must be deeded to the same group. (It is not enough to set the script to the group.)

Examples

//--// private land message //--//

//-- @@ = Contains code optimizations, see the following page for details
//-- http://wiki.secondlife.com/wiki/User_talk:Void_Singer#Coding_Practices_Part_2_.28optimizations.29

//-- list of people not to pester, lower case only
list vgLstIgnore = ["void singer"];

default
{
    state_entry()
    {
        llOwnerSay( "I'll pester anyone on your land I can find,"
                  + " unless they're in your ignore list, or a Linden" );
        llSensorRepeat( "", "", AGENT, 96, PI, 30 );
    }

    sensor( integer vIntFound )
    {
        integer vIntCounter = 0;
        do{
            string vStrName = llToLower( llDetectedName( vIntCounter ) );

            //-- if they are over our land, check 'em
            if (llOverMyLand( llDetectedKey( vIntCounter ) ))
            {
                //-- don't pester people in the ignore list
                if (!~llListFindList( vgLstIgnore, (list)vStrName )) //-- @@ x 2
                {
                    //-- don't pester lindens, they might get testy
                    //-- note the space, can't be faked that I know of!
                    if (!~llSubStringIndex( vStrName, " linden" ))  //-- @@
                    {
                        //-- pester everyone else !!!
                        llInstantMessage( llDetectedKey( vIntCounter ),
                              "You are on private land, please leave this parcel" );
                    }
                }
            }
        }while (++vIntCounter < vIntFound); //-- @@
    }
}
Void Singer 02:04, 15 October 2007 (PDT)

Deep Notes

Signature

function integer llOverMyLand( key id );