Difference between revisions of "Group invitation"

From Second Life Wiki
Jump to navigation Jump to search
(New page: VolumeDetect prim that whispers a group invitation hyperlink that can be clicked in history to bring up the group profile. <lsl> // // BETLOG Hax // AEST: 20080613 0704 [SLT: 20080612 14...)
 
Line 48: Line 48:
</lsl>
</lsl>


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.
<lsl>
//
// 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:
//  Creative Commons Attribution-Share Alike 3.0 license
//  http://creativecommons.org/licenses/by-sa/3.0/
//  You can modify this script, but you must prominently state that you
//  used this script, credit it's original author(s), and supply this
//  unaltered script with your modification.
//=========================================================================
// 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
    }
}
//=========================================================================
</lsl>




[[Category:LSL Examples]]
[[Category:LSL Examples]]

Revision as of 22:35, 16 April 2009

VolumeDetect prim that whispers a group invitation hyperlink that can be clicked in history to bring up the group profile.

<lsl> // // 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: // Creative Commons Attribution-Share Alike 3.0 license // http://creativecommons.org/licenses/by-sa/3.0/ // You can modify this script, but you must prominently state that you // used this script, credit it's original author(s), and supply this // unaltered script with your modification. //========================================================================= // 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"); 
   }

} //========================================================================= </lsl>


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.

<lsl> // // 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: // Creative Commons Attribution-Share Alike 3.0 license // http://creativecommons.org/licenses/by-sa/3.0/ // You can modify this script, but you must prominently state that you // used this script, credit it's original author(s), and supply this // unaltered script with your modification. //========================================================================= // 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
   }

} //========================================================================= </lsl>