Join us in Outworldz at www.outworldz.com:9000 or follow us:

Search dozens of selected web sites for OpenSim and LSL script

New! Script Meta-Search will search thousands of scripts here and at other sites for LSL or Opensim scripts.
Loading

Want to add a script or a project? Upload it and a half million people will see it and your name here this year.

Home   Show All
Category: Contributor: Creator
Group Inviter Auto_Set_Group_Joiner_script  

Auto_Set_Group_Joiner_script

This work uses content from the Second Life® Wiki article Viewer Architecture. Copyright © 2007-2009 Linden Research, Inc. Licensed under the Creative Commons Attribution-Share Alike 3.0 Licens

Category: Group Inviter
By : Fred Gandt
Created: 2011-01-02 Edited: 2011-01-02
Worlds: Second Life

the Zip file

Download all files for Auto_Set_Group_Joiner_script
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. Auto_Set_Group_Joiner_script_1.lsl
1 // V2 //
2
3 key group_key;
4
5 Function()
6 {
8 if(group_key != NULL_KEY)
9 llHTTPRequest("http://world.secondlife.com/group/" + ((string)group_key), [], "");
10 else
11 {
12 llSay(0, "\nSince you are not wearing a group tag I am not set to any group." +
13 "\nWear a group tag and try again." +
14 "\nThis script will self delete.");
16 }
17 }
18
19 default
20 {
22 {
23 Function();
24 }
25 on_rez(integer param)
26 {
27 Function();
28 }
29 http_response(key q, integer status, list metadata, string body)
30 {
31 if(status == 200)
32 {
33 integer name_start = (llSubStringIndex(body, "<title>") + 7);
34 integer name_end = (llSubStringIndex(body, "</title>") - 1);
35 integer tex_key_start = (llSubStringIndex(body, "imageid") + 18);
36 integer tex_key_end = (tex_key_start + 35);
37 string group_name = llGetSubString(body, name_start, name_end);
38 llSetObjectName("Join " + group_name);
39 key group_tex = llGetSubString(body, tex_key_start, tex_key_end);
40 if(group_tex != NULL_KEY)
41 llSetTexture(group_tex, ALL_SIDES);
42 else
44 }
45 else
46 {
47 llOwnerSay("HTTP Request failed. Trying again in 60 seconds. Please wait.");
48 llSleep(60.0);
49 llHTTPRequest("http://world.secondlife.com/group/" + ((string)group_key), [], "");
50 }
51 }
53 {
54 llSay(0, "/me by clicking this link\nsecondlife:///app/group/" + ((string)group_key) + "/about");
55 }
56 }

Back to the Best Free Tools in Second Life and OpenSim.