removed useless _ folders
This commit is contained in:
@@ -0,0 +1,157 @@
|
||||
// :CATEGORY:Security
|
||||
// :NAME:security_orb_script
|
||||
// :AUTHOR:Anonymous
|
||||
// :CREATED:2010-01-10 05:20:56.000
|
||||
// :EDITED:2013-09-18 15:39:02
|
||||
// :ID:733
|
||||
// :NUM:1001
|
||||
// :REV:1.0
|
||||
// :WORLD:Second Life
|
||||
// :DESCRIPTION:
|
||||
// security orb script.lsl
|
||||
//
|
||||
A better script is at <a href="http://www.outworldz.com/cgi/freescripts.plx?ID=1674">http://www.outworldz.com/cgi/freescripts.plx?ID=1674 </a> by mangowylder
|
||||
// :CODE:
|
||||
|
||||
|
||||
key second = NULL_KEY; // fill in a second key if you want
|
||||
|
||||
|
||||
|
||||
string active = "deactive";
|
||||
|
||||
float range = 25.0; // Range we will be scanning for for persons to check if they are on the whitellist
|
||||
|
||||
|
||||
|
||||
key nrofnamesoncard; // Some variables used to collect all the data from the notecard
|
||||
|
||||
integer nrofnames;
|
||||
|
||||
list names;
|
||||
|
||||
list keynameoncard;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
default // We use the default state to read the notecard.
|
||||
|
||||
{
|
||||
|
||||
state_entry()
|
||||
|
||||
{
|
||||
|
||||
llOwnerSay("Startup state reading whitelist notecard");
|
||||
|
||||
nrofnamesoncard = llGetNumberOfNotecardLines("whitelist"); // Triggers the notecard reading by getting the numer of lines in the notecard
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
on_rez (integer param)
|
||||
|
||||
{
|
||||
|
||||
llResetScript();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
dataserver (key queryid, string data){
|
||||
|
||||
|
||||
|
||||
if (queryid == nrofnamesoncard)
|
||||
|
||||
{
|
||||
|
||||
// When we receive the number of lines in the notecard we do llGetNotecardLine for each line to get the contents
|
||||
|
||||
nrofnames = (integer) data;
|
||||
|
||||
llOwnerSay("Found "+(string)nrofnames+ " names in whitelist.");
|
||||
|
||||
|
||||
|
||||
integer i;
|
||||
|
||||
for (i=0;i < nrofnames;i++){
|
||||
|
||||
keynameoncard += llGetNotecardLine("whitelist", i);
|
||||
|
||||
}
|
||||
|
||||
} else
|
||||
|
||||
{
|
||||
|
||||
integer listlength;
|
||||
|
||||
listlength = llGetListLength(keynameoncard);
|
||||
|
||||
integer j;
|
||||
|
||||
for(j=0;j<listlength;j++) {
|
||||
|
||||
if (queryid == (key) llList2String(keynameoncard,j))
|
||||
|
||||
{ // after checking if this really was an answer to one of our llGetNotecardLines calls (checking the keys we stored earlier)
|
||||
|
||||
// We add the name to our names list. Which we will use in a later state.
|
||||
|
||||
llOwnerSay("Name added to whitelist: "+data);
|
||||
|
||||
names += data;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (llGetListLength(names) == nrofnames)
|
||||
|
||||
{
|
||||
|
||||
// If we have read all the names (just as many names as there where notecard lines). We switch to our next state "start"
|
||||
|
||||
// This state will do the actual work
|
||||
|
||||
llOwnerSay ("Done with reading notecard. Starting script now");
|
||||
|
||||
state start;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
state start
|
||||
|
||||
{
|
||||
|
||||
state_entry ()
|
||||
|
||||
{
|
||||
@@ -0,0 +1,6 @@
|
||||
<Project name="security_orb_script" guid="D792A9C7-6C00-1014-B904-200204C60A89">
|
||||
<Object name="Object" guid="D792AAC1-6C00-1014-B904-200204C60A89">
|
||||
<Script name="security_orb_script_1.lsl" guid="D792D385-6C00-1014-B904-200204C60A89">
|
||||
</Script>
|
||||
</Object>
|
||||
</Project>
|
||||
Reference in New Issue
Block a user