Difference between revisions of "LlEjectFromLand"
Jump to navigation
Jump to search
(spelling and style (use the talk page for questions)) |
|||
Line 9: | Line 9: | ||
|return_text | |return_text | ||
|spec | |spec | ||
|caveats | |caveats | ||
|constants | |constants | ||
|examples= | |examples= | ||
<pre> | <pre> | ||
// 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 | //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 | //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 33: | Line 35: | ||
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, 4) == "eject") | |||
{ | |||
name = llToLower(llGetSubString(msg, 6, llStringLength(msg))); | |||
llSensor("", NULL_KEY, AGENT, 96, PI); | |||
llSensor("",NULL_KEY,AGENT,96,PI); | |||
} | } | ||
} | } | ||
sensor(integer n) | sensor(integer n) | ||
{ | { | ||
integer i; | integer i = 0; | ||
for ( | for (;i<n;++i) | ||
{ | { | ||
if (~llSubStringIndex(llToLower(llDetectedName(i)), name)) | |||
if (llSubStringIndex(llToLower(llDetectedName(i)),name) | { | ||
llOwnerSay("ejecting " + llDetectedName(i)); | |||
llEjectFromLand(llDetectedKey(i)); | llEjectFromLand(llDetectedKey(i)); | ||
} | |||
} | } | ||
} | } | ||
no_sensor() | |||
no_sensor() { | { | ||
llOwnerSay("Avatar not found."); | |||
} | } | ||
} | } | ||
Line 72: | Line 71: | ||
|permission | |permission | ||
|negative_index | |negative_index | ||
|cat1=Security | |cat1=Security | ||
|cat2 | |cat2 |
Revision as of 18:12, 16 July 2007
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
Caveats
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, 4) == "eject") { name = llToLower(llGetSubString(msg, 6, llStringLength(msg))); llSensor("", NULL_KEY, AGENT, 96, PI); } } sensor(integer n) { integer i = 0; for (;i<n;++i) { if (~llSubStringIndex(llToLower(llDetectedName(i)), name)) { llOwnerSay("ejecting " + llDetectedName(i)); llEjectFromLand(llDetectedKey(i)); } } } no_sensor() { llOwnerSay("Avatar not found."); } }