Simple Group Joiner
Mon, 10/04/2010 - 01:03 by xantarius.cain
Type:
LSL Script
This is just a simple group joiner script. You will need to add the group key to the script in order for it to work (see comments). Then, add it to the contents of a prim.
Source Code:
string groupkey;
findgroupkey()
{
list a = llGetObjectDetails(llGetKey(), [OBJECT_GROUP]);
groupkey = llList2String(a,0);
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.");
}
else
{
llWhisper(0, "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 our Group", <1,1,1>, 1.0); //Floating Text, edit or remove
findgroupkey();
}
touch_start(integer total_number)
{
findgroupkey();
}
}
findgroupkey()
{
list a = llGetObjectDetails(llGetKey(), [OBJECT_GROUP]);
groupkey = llList2String(a,0);
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.");
}
else
{
llWhisper(0, "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 our Group", <1,1,1>, 1.0); //Floating Text, edit or remove
findgroupkey();
}
touch_start(integer total_number)
{
findgroupkey();
}
}









