Difference between revisions of "LlOverMyLand"

From Second Life Wiki
Jump to navigation Jump to search
m (Example Added)
m
Line 11: Line 11:
|examples=<pre>//--// private land message //--//
|examples=<pre>//--// private land message //--//


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


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


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


      //-- if they are over our land, check 'em
            //-- if they are over our land, check 'em
      if (llOverMyLand( llDetectedKey( vIntCounter ) )){
            if (llOverMyLand( llDetectedKey( vIntCounter ) ))
 
            {
        //-- don't pester people in the ignore list
                //-- don't pester people in the ignore list
        if (llListFindList( vgLstIgnore, [vStrName] ) == -1 ){
                if (!~llListFindList( vgLstIgnore, (list)vStrName ))
 
                {
          //-- 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" ) == -1 ){
                    if (!~llSubStringIndex( vStrName, " linden" ))
 
                    {
            //-- pester everyone else !!!
                        //-- pester everyone else !!!
            llInstantMessage( llDetectedKey( vIntCounter ),
                        llInstantMessage( llDetectedKey( vIntCounter ),
                               "You are on private land, please leave this parcel" );
                               "You are on private land, please leave this parcel" );
          }
                    }
        }
                }
      }
            }
    }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)
|helpers
|helpers

Revision as of 10:18, 15 October 2007

Summary

Function: integer llOverMyLand( key id );

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 //--//

//-- 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,"
                  + " 'less 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 ))
                {
                    //-- 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

Search JIRA for related Issues

Signature

function integer llOverMyLand( key id );