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
Groups Group_Info_on_touch  

Group_Info_on_touch

This script gets the group key that the prim belongs to and prints out the information:
See http://wiki.secondlife.com/wiki/World_API for more info on groups. //For example, you cannot just get a groups info without first knowing the key.

Category: Groups
By : Ferd Frederix
Created: 2013-04-12 Edited: 2013-09-07
Worlds: Second Life

the Zip file

Download all files for Group_Info_on_touch
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. Group_Info_on_touch_1.lsl

This script by Ferd Frederix may be used in any manner, modified, and republished.  Unless specified otherwise, my scripts are always free and open source.  Objects made with these scripts may be sold with no restrictions.  All I ask is that you point others to this location should they ask you about it and to not sell this script, unless it is for $0 L. Please help improve my work by reporting bugs and improvements.

1 //
2 // [09:50] Object: Touch me for this prims group info
3 // [09:50] Object: Description:Wiki Wiki means a meta wiki, or a wiki of wikis
4 // [09:50] Object: member_count:22
5 // [09:50] Object: open_enrollment:N
6 // [09:50] Object: membership_fee:0
7 // [09:50] Object: founderid:a4dd7d22-071e-47d3-98c7-4d793e07124a
8 // [09:50] Object: founder:Ferd Frederix the Blue Adept (ferd.frederix)
9 // [09:50] Object: groupid:9045d102-57c5-cea1-a1b1-b42ec27d8e25
10 // [09:50] Object: imageid:2446d7da-0e11-a83b-6d84-6dedc375de46
11 // [09:50] Object: founder:Ferd Frederix the Blue Adept (ferd.frederix)
12 // License: Creative Commons/BY
13 // http://creativecommons.org/licenses/by/2.0/
14 // author: Ferd Frederix
15
16 string url = "http://world.secondlife.com/group/";
17 key http_request_id;
18
19 string parse(string input,string name )
20 {
21 return left(right(input, name + "\" content=\""),"\" />");
22 }
23
24 string left(string src, string divider) {
25 integer index = llSubStringIndex( src, divider );
26 if(~index)
27 return llDeleteSubString( src, index , -1);
28 return src;
29 }
30
31 string right(string src, string divider) {
32 integer index = llSubStringIndex( src, divider );
33 if(~index)
34 return llDeleteSubString( src, 0, index + llStringLength(divider) - 1);
35 return src;
36 }
37
38
39 default
40 {
42 {
43 llSay(0, "Touch me for group info");
44 }
45
46 touch_start(integer total_number)
47 {
48
49 list groupKeys = llGetObjectDetails(llGetKey(),[OBJECT_GROUP]); // get this objects group key
50 key groupKey = llList2Key(groupKeys,0);
51 string urx = url + (string) groupKey;
52 http_request_id = llHTTPRequest(urx, [], "");
53
54 }
55
56 http_response(key request_id, integer status, list metadata, string body)
57 {
58 if(request_id == http_request_id)
59 {
60 // llOwnerSay(body);
61
62 llOwnerSay("Description:" + parse(body,"description"));
63 llOwnerSay("member_count:" + parse(body,"member_count"));
64 llOwnerSay("open_enrollment:" + parse(body,"open_enrollment"));
65 llOwnerSay("membership_fee:" + parse(body,"membership_fee"));
66 llOwnerSay("founderid:" + parse(body,"founderid"));
67 llOwnerSay("founder:" + parse(body,"founder"));
68 llOwnerSay("groupid:" + parse(body,"groupid"));
69 llOwnerSay("imageid:" + parse(body,"imageid"));
70 llOwnerSay("founder:" + parse(body,"founder"));
71
72 }
73 }
74 }

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