// Master Levels only Commands:
// ===================
// start protection - Must turn on script before it works.
// reset protection - Will reset script and clear everyone out of ban list and access list and turn script off.
// script status - Will show script info.
// aaccess username - Will give access to anyone in list to add to the ban list.
// raccess username - Will take away access from person in the list.
// accesslist - Will list everyone on access list.
 
// Dancers Levels commands:
// ===================
// Add username - Will add someone to ban list to kick out from club.
// remove username - Will delete from ban list from club.
// list - will list who all in ban list for club.
// ===================
 
integer LID;
list EliteBanList;
list Access_List;
 
// You can change sensor range here.
integer sensor_range = 80;
 
// how fast repeat for sensor is
float how_fast = 1.0;
 
// Name of help card when someone clicks on object they must have access to get the help card.
string note_name = "Help";
 
// Lets give someone we pick to have same master level access so they can add ppl and remove ppl. Note: Owener and who you pick to have master access must add there self to access list before working ban list.
key MasterLevelKey = "Ana Lily";
 
// Config all strings here to match whatever you need to.
string StateEntryText ="Club Elite Protection System: To activate Must have Master Level Access, say 'start protection'";
 
string DeleteFromAccessText=" from Club Elite Protection Access list";
 
string DeleteFromBanListText=" from Club Elite Ban list.";
 
string resetBanListText="Club Elite Protection Script System online!";
 
string EjectText1=" away from Club Elite Land!";
 
string EjectText2=" You have been boot from Club Elite Land!";
 
string TouchStartText=" Sorry you do not have Access to Club Elite Protection System";
 
string ScriptResetText="Resetting Club Elite Protection Script";
 
string AlreadyInAccessListText=" already in Club Elite Access list";
 
string AddToAccessListText=" to Club Elite Access list";
 
string AlreadyInBanListText=" already in Club Elite ban list";
 
string MemeberCantBeAddToBanList=" has Club Elite Access and can't be added to ban list";
 
string AddToBanListText= " to Club Elite ban list";
 
string NotFoundInAccessListText=" was not found in Club Elite Access list";
 
string WasNotFoundInBanListText=" was not found in Club Elite Ban list";
 
string PrintAccessListText="Club Elite Protection Access List:";
 
string PrintBanListText="Club Elite Ban List:";
 
GetScriptStatus()
{
llWhisper(0,"Script Free Memory " + (string)llGetFreeMemory());
llWhisper(0,"Script Name " + (string)llGetScriptName());
llWhisper(0,"Region Name " + (string)llGetRegionName());
llWhisper(0,"Region FPS " + (string)llGetRegionFPS());
}
 
string getParameter(list strings)
{
integer len = llGetListLength(strings);
integer i;
string ret;
string space= "";
for (i=1;i0)
{
llWhisper(0,"I Eject " + name + (string)EjectText1);
llUnSit(person);
llEjectFromLand(person);
llInstantMessage(person, name + (string)EjectText2);
}
 
}
}
 
touch_start(integer total_number)
{
integer i;
for (i=0;i0)
{
llGiveInventory(person, note_name);
}
else llInstantMessage(person, name + (string)TouchStartText);
 
}
}
listen(integer channel, string name, key id, string message)
{
if (message == "script status" && (id == llGetOwner() || llKey2Name(id) == MasterLevelKey))
{
GetScriptStatus();
}
 
else if (message == "start protection" && (id == llGetOwner() || llKey2Name(id) == MasterLevelKey))
{
resetBanList();
return;
}
else if (message == "reset protection" && (id == llGetOwner() || llKey2Name(id) == MasterLevelKey))
{
llWhisper(0,ScriptResetText);
llResetScript();
}
list strings = llParseString2List(message,[" "],[]);
string command = llList2String(strings,0);
if (command=="accesslist" && (id == llGetOwner() || llKey2Name(id) == MasterLevelKey))
{
printAccessList();
}
else if(message=="list" && (isEliteAccessUser(name)>0))
{
printEliteBanList();
return;
}
string par = getParameter(strings);
if (par=="")
{
return;
}
else if (command=="aaccess" && (id == llGetOwner() || llKey2Name(id) == MasterLevelKey))
{
if (isEliteAccessUser(par)>0)
{
llWhisper(0,"Sorry " + par + (string)AlreadyInAccessListText);
return;
}
else Access_List = llListInsertList(Access_List,[par],llGetListLength(Access_List));
llWhisper(0,"Added " + par + (string)AddToAccessListText);
return;
}
else if(command=="add" && (isEliteAccessUser(name)>0))
{
if (isEliteBan(par)>0)
{
llWhisper(0,"Sorry " + par + (string)AlreadyInBanListText);
return;
}
if (isEliteAccessUser(par)>0)
{
llWhisper(0,"Sorry " + par + (string)MemeberCantBeAddToBanList);
return;
}
else EliteBanList = llListInsertList(EliteBanList,[par],llGetListLength(EliteBanList));
llWhisper(0,"Added " + par + (string)AddToBanListText);
return;
}
else if (command=="raccess" && (id == llGetOwner() || llKey2Name(id) == MasterLevelKey))
{
if (isEliteAccessUser(par)>0)
{
DelFromAccessList(par);
return;
}
else llWhisper(0,"Sorry " + par + (string)NotFoundInAccessListText);
}
else if(command=="remove" && (isEliteAccessUser(name)>0))
{
if (isEliteBan(par)>0)
{
DelFromBanList(par);
return;
}
else llWhisper(0,"Sorry " + par + (string)WasNotFoundInBanListText);
}
}
}