Skip to content
lsl.devlsl.devLSL Dev

Group invitation

VolumeDetect prim that whispers a group invitation hyperlink that can be clicked in history to bring up the group profile.
//
// BETLOG Hax
// AEST: 20080613 0704 [SLT:  20080612 1404]
// For  Harleywood Guru request in SecondLife Hobos group chat
// UTC10: 20090417 1557 [SLT:  20090416 2257]
// Rewrote for volumedetect collision detection
//
// Thanks to Punkaroo Snoring, and Pavig Lok for inadvertently pointing out something
// i read in a RC release notes and totally didnt pay attention to. But which is really useful.
//
// Set the group active on your avatar before rezzing this box.
// If you forget just reset the script after you set the box to the right group.
// Volumedetect is activated in script, so dont link this prim.
// This solution can be a bit spammy, so its certainly not ideal.
//=========================================================================
// ---LICENCE START---
// http://creativecommons.org/licenses/by-sa/3.0/
// ie: Attribution licence:
//   Give me credit by leaving it in the script I created.
//   Supply my original script with your modified version.
//   Refer to the wiki URL from which you copied this script.
//      https://wiki.secondlife.com/wiki/Group_invitation
// ---LICENCE END---
//=========================================================================

// SHARED CONFIGURATION
//----------------------------------
// CONFIGURATION
//----------------------------------
// CORE CODE
string      gUUID;
//=========================================================================
default
{   on_rez(integer start_param)
    {   llResetScript();
    }
    state_entry()
    {   gUUID = llList2String(llGetObjectDetails(llGetKey(), ([OBJECT_GROUP])), 0);    
        llVolumeDetect(TRUE);
    }
    collision_start(integer num)
    {   if(llGetAndResetTime() < 10.0) return;
        if (~llDetectedType(0) & AGENT) return;
        llWhisper(0, "\nJoin the group! Please click the link in your history window (ctrl-H)"
                +"\n secondlife:///app/group/"+gUUID+"/about"); 
    }
}
//=========================================================================
Touch based solution.
Sends group invite text as an IM - so far less spammy, and only delivered to avatars who
voluntarily touch the box. Much better solution.
//
// BETLOG Hax
//
// AEST: 20080613 0704 [SLT:  20080612 1404]
// For  Harleywood Guru request in SecondLife Hobos group chat
//
// Thanks to Punkaroo Snoring, and Pavig Lok for inadvertently pointing out something
// i read in a RC release notes and totally didnt pay attention to. But which is really useful.
//=========================================================================
// ---LICENCE START---
// http://creativecommons.org/licenses/by-sa/3.0/
// ie: Attribution licence:
//   Give me credit by leaving it in the script I created.
//   Supply my original script with your modified version.
//   Refer to the wiki URL from which you copied this script.
//      https://wiki.secondlife.com/wiki/Group_invitation
// ---LICENCE END---
//=========================================================================
// SHARED CONFIGURATION
//----------------------------------
// CONFIGURATION
//----------------------------------
// CORE CODE
//=========================================================================
default
{   state_entry()
    {   llSetText("group join offer EXAMPLE - touch to get the IM", <1.0, 1.0, 1.0>,1.0);
    }
    touch_start(integer total_number)
    {   list data = llGetObjectDetails(llGetKey(), ([OBJECT_GROUP]));
        string UUID = llList2String(data, 0);
        llSetColor(<1.0, 0.0, 0.0>, ALL_SIDES);         //IM adds a delay.. indicate this visually
//        llLoadURL(        //does NOT seem to work, but i'd love to know if it does (like if it gets fixed in a client release)
        llInstantMessage(
            llDetectedKey(0)
//            , "Join the group! Please click the dialog box."           //as above 
            , "\nJoin the group! Please click the link in your history window (ctrl-H)"
                +"\n secondlife:///app/group/"+UUID+"/about"
        ); 
        llSetColor(<0.0, 1.0, 0.0>, ALL_SIDES);        //IM adds a delay.. indicate this visually
    }
}
//=========================================================================
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 Group invitation, 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.