in object needs to be with notecard named whitelist
script:
key second = NULL_KEY; // fill in a second key if you want
string active = "active";
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;
string nameoncard;
string storedname;
integer listener;
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
like(0)