# llEjectFromLand

*LSL function*

```lsl
void llEjectFromLand(key avatar);
```

- `key avatar`: UUID of the avatar in the same region.

- Energy: 10

Ejects the specified avatar from land/parcels owned by the object's owner (group or resident).

Ejects **avatar** from the parcel.

```lsl title="How to use" frame="terminal"
llEjectFromLand(NULL_KEY);
```

## Examples

<details open>
<summary>Example 1</summary>

```lsl collapse={1-40, 46-52}
// 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.");
    }
}
```

</details>

## History

Added in [SL 0.6.0](http://secondlife.wikia.com/wiki/Version_0.6.0)

## Known issues

From the issue templates included by the wiki article:

- SVC-2516 (bug): llEjectFromLand boots to nearest parcel edge - and fails when nearest edge is sim edge without bordering sim

---

*Source: [LlEjectFromLand](https://wiki.secondlife.com/wiki/LlEjectFromLand) on the Second Life Wiki. Content from the Second Life Wiki articles LlEjectFromLand (revision 1194120, 2015-01-22), Template:Issues/SVC-2516 (revision 407793, 2009-06-25), Template:LSL Function/avatar (revision 1179236, 2013-06-15) and Template:LSL Function/security (revision 1171159, 2012-07-28), CC BY-SA 3.0.*

---

From lsl.dev: https://lsl.dev/functions/llEjectFromLand/
