Difference between revisions of "Open Group Join"

From Second Life Wiki
Jump to navigation Jump to search
m (0 >> PUBLIC_CHANNEL)
Line 16: Line 16:
     if (groupkey == "00000000-0000-0000-0000-000000000000")
     if (groupkey == "00000000-0000-0000-0000-000000000000")
     {
     {
         llWhisper(0, "Set the Group for this object in EDIT under the GENERAL tab and be sure your Group is Open Enrollment.");
         llWhisper(PUBLIC_CHANNEL, "Set the Group for this object in EDIT under the GENERAL tab and be sure your Group is Open Enrollment.");
     }
     }
     else
     else
     {
     {
         llWhisper(0, "Click the link from Chat History (Ctrl+H) and then click on JOIN button! secondlife:///app/group/" + groupkey + "/about");
         llWhisper(PUBLIC_CHANNEL, "Click the link from Chat History (Ctrl+H) and then click on JOIN button! secondlife:///app/group/" + groupkey + "/about");
     }
     }
}
}
Line 28: Line 28:
     state_entry()
     state_entry()
     {
     {
         llSetText("Touch to Join\nour Group", <1,1,1>, 1.0); //Floating Text, edit or remove
         llSetText("Touch to Join\nour Group", <1.0, 1.0, 1.0>, 1.0); //white and opaque floating text, optional
         findgroupkey();
         findgroupkey();
     }
     }

Revision as of 03:27, 8 October 2013

User Touches Object to Join Group

No bot needed for this script.

User Touches object for a link in Local Chat that when clicked from History will open the Group Information Window. If Group is set to Open Enrollment the user may JOIN.

The object this script is in must be set to Group you want people to Join. <lsl> string groupkey;

findgroupkey() {

   list a = llGetObjectDetails(llGetKey(), [OBJECT_GROUP]);
   groupkey = llList2String(a,0);
   if (groupkey == "00000000-0000-0000-0000-000000000000")
   {
       llWhisper(PUBLIC_CHANNEL, "Set the Group for this object in EDIT under the GENERAL tab and be sure your Group is Open Enrollment.");
   }
   else
   {
       llWhisper(PUBLIC_CHANNEL, "Click the link from Chat History (Ctrl+H) and then click on JOIN button! secondlife:///app/group/" + groupkey + "/about");
   }

}

default {

   state_entry()
   {
       llSetText("Touch to Join\nour Group", <1.0, 1.0, 1.0>, 1.0); //white and opaque floating text, optional
       findgroupkey();
   }
   touch_start(integer total_number)
   {
       findgroupkey();
   }

} </lsl> If the object Group must be different because of land settings use this object somewhere where you are allowed and Copy the message said from Chat History. Then create a simple script that whispers this message when Touched.


More scripts: http://www.aliciastella.com