Difference between revisions of "LlEjectFromLand"

From Second Life Wiki
Jump to: navigation, search
m
 
(18 intermediate revisions by 9 users not shown)
Line 1: Line 1:
 
{{LSL_Function
 
{{LSL_Function
 +
|inject-2={{Issues/SVC-2516}}{{LSL_Function/avatar|avatar|sim=*}}{{LSL Function/security|avatar}}
 
|func_id=213|func_sleep=0.0|func_energy=10.0
 
|func_id=213|func_sleep=0.0|func_energy=10.0
|func=llEjectFromLand|p1_type=key|p1_name=pest
+
|func=llEjectFromLand|p1_type=key|p1_name=avatar
|func_footnote=If '''name''', '''id''', and/or '''type''' are empty or 0, they are ignored.<br/>If '''id''' is an invalid key or [[NULL_KEY]] it is treated as empty.
+
|func_desc=Ejects {{LSLP|avatar}} from the parcel.
|func_desc=Ejects '''pest''' from land that you own.
+
|func_footnote
Performs a single scan for '''name''' and '''id''' with '''type''' within '''range''' meters and '''arc''' radians of forward vector
+
|return_text
+
|spec
+
 
|caveats
 
|caveats
 
|constants
 
|constants
 
|examples=
 
|examples=
<pre>
+
<source lang="lsl2">// Here a script done by shenanigan oh
            // Here a script done by shenanigan oh//
+
  
//It's a easy script that I came up with. When I worked for a carnage I put this script in a computer that was atteched to me. The carnage it self was a pvp sims so it was alot easyer and fast to eject some this way then running after them and clicking on them. The way this work is by trying eject and half type plays name. Example ^ /1 eject shenan
+
//It's a easy script that I came up with. When I worked for a carnage I put this script in a computer that was
 +
//attached to me. The carnage it self was a pvp sims so it was alot easier and fast to eject some this way
 +
//then running after them and clicking on them. The way this work is by trying eject and half type plays name.
 +
//Example: /1 eject shenan
  
//Warning if you type someone name in short be carful of other plays with same name!//
+
//Warning if you type someone name in short be careful of other plays with same name!
 
string msg;
 
string msg;
 
string name;
 
string name;
Line 27: Line 27:
 
     state_entry()
 
     state_entry()
 
     {
 
     {
         llListen(1,"",llGetOwner(),"");
+
         llListen(1, "", llGetOwner(), "");
         llListen(0,"",llGetOwner(),"");
+
         llListen(0, "", llGetOwner(), "");
 
     }
 
     }
 +
 
     listen(integer n, string m, key k, string msg)
 
     listen(integer n, string m, key k, string msg)
    {
+
    {
       
+
        if (llGetSubString(msg, 0, 5) == "eject ")
        if (llGetSubString(msg,0,4) == "eject")
+
        {
        {
+
             name = llToLower(llStringTrim(llDeleteSubString(msg, 0, 5), STRING_TRIM));
              
+
             llSensor("", "", AGENT, 96, PI);
            name = llToLower(llGetSubString(msg,6,llStringLength(msg)));
+
             llSensor("",NULL_KEY,AGENT,96,PI);
+
 
         }
 
         }
       
 
 
     }
 
     }
 
      
 
      
 
     sensor(integer n)
 
     sensor(integer n)
 
     {
 
     {
         integer i;
+
         integer i = 0;
         for (i=0;i<n;i++)
+
         for (;i<n;++i)
 
         {
 
         {
              
+
             if (llOverMyLand(llDetectedKey(i)))
             if (llSubStringIndex(llToLower(llDetectedName(i)),name) != -1)
+
             {
              {
+
                if (~llSubStringIndex(llToLower(llDetectedName(i)), name))
           
+
                {
            llOwnerSay("ejecting " + name);
+
                    llOwnerSay("ejecting " + llDetectedName(i));
                llEjectFromLand(llDetectedKey(i));
+
                    llEjectFromLand(llDetectedKey(i));
 +
                }
 +
            }
 
         }
 
         }
 
     }
 
     }
}
+
     no_sensor()
     no_sensor() {
+
     {
     llOwnerSay("Avatar not found.");
+
        llOwnerSay("Avatar not found.");
 
     }
 
     }
}  
+
}</source>
</pre>
+
 
|helpers
 
|helpers
 
|also_functions
 
|also_functions
Line 67: Line 66:
 
|also_articles
 
|also_articles
 
|notes
 
|notes
|permission
 
|negative_index
 
|sort=EjectFromLand
 
 
|cat1=Security
 
|cat1=Security
|cat2
+
|cat2=Parcel
 
|cat3
 
|cat3
 
|cat4
 
|cat4
 +
|history={{LSL Added|0.6.0|remote=http://secondlife.wikia.com/wiki/Version_0.6.0}}
 
}}
 
}}

Latest revision as of 00:18, 22 January 2015

Summary

Function: llEjectFromLand( key avatar );

Ejects avatar from the parcel.

• key avatar avatar UUID that is in the same region

Generally, the object owner must also be the land owner but there is an exception for land deeded to a group for group members with the "Eject and freeze Residents on parcels" ability. See #Ownership Limitations for details.

Specification

Ownership Limitations

  • If the land under the object is owned by an individual, the script must be owned by the same individual.
  • If the land under the object is deeded to a group the object will need to satisfy one of the following:
    • The object is deeded to the same group.
    • The object owner must have "Eject and freeze Residents on parcels" ability in the group and be connected to the sim[1].

Caveats

Important Issues

~ All Issues ~ Search JIRA for related Bugs
   llEjectFromLand boots to nearest parcel edge - and fails when nearest edge is sim edge without bordering sim

Examples

// Here a script done by shenanigan oh
 
//It's a easy script that I came up with. When I worked for a carnage I put this script in a computer that was
//attached to me. The carnage it self was a pvp sims so it was alot easier and fast to eject some this way
//then running after them and clicking on them. The way this work is by trying eject and half type plays name.
//Example: /1 eject shenan
 
//Warning if you type someone name in short be careful of other plays with same name!
string msg;
string name;
default
{
    on_rez(integer n)
    {
        llResetScript();
    }
 
    state_entry()
    {
        llListen(1, "", llGetOwner(), "");
        llListen(0, "", llGetOwner(), "");
    }
 
    listen(integer n, string m, key k, string msg)
    {
        if (llGetSubString(msg, 0, 5) == "eject ")
        {
            name = llToLower(llStringTrim(llDeleteSubString(msg, 0, 5), STRING_TRIM));
            llSensor("", "", AGENT, 96, PI);
        }
    }
 
    sensor(integer n)
    {
        integer i = 0;
        for (;i<n;++i)
        {
            if (llOverMyLand(llDetectedKey(i)))
            {
                if (~llSubStringIndex(llToLower(llDetectedName(i)), name))
                {
                    llOwnerSay("ejecting " + llDetectedName(i));
                    llEjectFromLand(llDetectedKey(i));
                }
            }
        }
    }
    no_sensor()
    {
        llOwnerSay("Avatar not found.");
    }
}

Deep Notes

History

All Issues

~ Search JIRA for related Issues
   llEjectFromLand boots to nearest parcel edge - and fails when nearest edge is sim edge without bordering sim

Footnotes

  1. ^ The script owner need not be in the region, they can be a child agent of the region.
  2. ^ Early release notes were not very accurate or thorough, they sometimes included information about features added in previous releases or failed to include information about features added in that release.

Signature

function void llEjectFromLand( key avatar );