Difference between revisions of "Open Group Join"
Jump to navigation
Jump to search
m (Replaced <source> with <syntaxhighlight>) |
|||
(4 intermediate revisions by 4 users not shown) | |||
Line 6: | Line 6: | ||
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. | 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 | The object this script is in must be set to the group you want people to join. | ||
< | <syntaxhighlight lang="lsl2"> | ||
findgroupkey() | findgroupkey() | ||
{ | { | ||
list | list TempList = llGetObjectDetails(llGetKey(), [OBJECT_GROUP]); | ||
groupkey = | key groupkey = llList2Key(TempList, 0); | ||
if (groupkey == | if (groupkey == NULL_KEY) | ||
{ | { | ||
llWhisper(0, "Set the Group for this object in EDIT under the GENERAL tab and be sure your Group is Open Enrollment."); | llWhisper(0, "Set the Group for this object in EDIT under the GENERAL tab and be sure your Group is Open Enrollment."); | ||
Line 20: | Line 19: | ||
else | else | ||
{ | { | ||
llWhisper(0, "Click the link from Chat History (Ctrl+H) and then click on JOIN button! secondlife:///app/group/" + groupkey + "/about"); | llWhisper(0, "Click the link from Chat History (Ctrl+H) and then click on JOIN button! secondlife:///app/group/" + (string) groupkey + "/about"); | ||
} | } | ||
} | } | ||
Line 28: | Line 27: | ||
state_entry() | state_entry() | ||
{ | { | ||
llSetText("Touch to Join\nour Group", <1,1,1>, 1.0); // | llSetText("Touch to Join\nour Group", <1, 1, 1>, 1.0); // white and opaque floating text, optional | ||
findgroupkey(); | findgroupkey(); | ||
} | } | ||
Line 37: | Line 36: | ||
} | } | ||
} | } | ||
</ | </syntaxhighlight> | ||
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. | 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 [[Touch|Touched]]. | ||
Latest revision as of 10:43, 17 May 2023
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
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 the group you want people to join.
findgroupkey()
{
list TempList = llGetObjectDetails(llGetKey(), [OBJECT_GROUP]);
key groupkey = llList2Key(TempList, 0);
if (groupkey == NULL_KEY)
{
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/" + (string) groupkey + "/about");
}
}
default
{
state_entry()
{
llSetText("Touch to Join\nour Group", <1, 1, 1>, 1.0); // white and opaque floating text, optional
findgroupkey();
}
touch_start(integer total_number)
{
findgroupkey();
}
}
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