Skip to content
lsl.devlsl.devLSL Dev

Access (NewAge)

Access Script

How to use?
Change the Access variable to one of the three;
'Public'
'Group'
'Owner'
Returns TRUE if user UUID is allowed to continue using.
Returns FALSE if user UUID is not permitted to use.
// NewAge Access Script
// By Asia Snowfall
// Version 2
//
//  Access Mode:
//      public = anybody
//      group  = agents with the same active group
//      owner  = owner only

string accessMode = "public";

integer asAccessCheck(key id)
{
    string accessModeToLower = llToLower(accessMode);

    if (accessModeToLower == "public" || id == llGetOwner() )
        return TRUE;

    if (accessModeToLower == "group")
        return llSameGroup(id);

    return FALSE;
}

default
{
    touch_start(integer num_detected)
    {
        if (asAccessCheck( llDetectedKey(0) ))
            llWhisper(0, "Access Granted");
        else
            llWhisper(0, "Access Denied");
    }
}
Original wiki source

Some wiki templates and tables need their original context. View this article on the Second Life Wiki. Technical wording and examples are retained from the source; historical guidance may differ from current behavior.

From the Second Life Wiki

Community documentation adapted from Access (NewAge), by Linden Research, Inc. and contributing residents.View contributors and history.

Imported wiki revision:

Licensed under CC BY-SA 3.0. Last wiki edit: .Formatting and links have been adapted for this site; API metadata follows the LSL definitions.