Difference between revisions of "Group key finder"
Jump to navigation
Jump to search
Emmas Seetan (talk | contribs) (New page: == The Group Key Finder == Place this script in a prim and touch it to find out the set group's key. <lsl>//Emmas Seetan //21 September, 16:41 default { state_entry() { ...) |
Niles Argus (talk | contribs) |
||
Line 27: | Line 27: | ||
} | } | ||
}</lsl> | }</lsl> | ||
== Slightly Optimized Version == | |||
<lsl> | |||
// Niles Argus [May 11, 2009] | |||
default | |||
{ | |||
state_entry() | |||
{ | |||
llSetText("Touch me to find my group's key...", <1,1,1>, 1.0); | |||
} | |||
touch_start(integer total_number) | |||
{ | |||
key group = llList2Key(llGetObjectDetails(llGetKey(), [OBJECT_GROUP]),0); | |||
string result = "This object is not set to a group."; | |||
if(group != NULL_KEY) | |||
result = "This object's group's key is " + (string)group; | |||
llWhisper(0, result); | |||
} | |||
} | |||
</lsl> |
Revision as of 14:41, 11 May 2009
The Group Key Finder
Place this script in a prim and touch it to find out the set group's key.
<lsl>//Emmas Seetan //21 September, 16:41 default { state_entry() { llSetText("Touch to learn\nGroup Key", <1,1,1>, 1); //Like it says } touch_start(integer total_number) { list a = llGetObjectDetails(llGetKey(), [OBJECT_GROUP]); string b = llList2String(a,0); if (b == "00000000-0000-0000-0000-000000000000") //Black UUID, group key will fill this in { llWhisper(0, "Please set the Group for this object in EDIT under the GENERAL tab first."); //Set the group you want } else { llWhisper(0, "This object's Group Key is: " + b); //Blank gets replaced by the group's UUID } } }</lsl>
Slightly Optimized Version
<lsl> // Niles Argus [May 11, 2009] default {
state_entry() { llSetText("Touch me to find my group's key...", <1,1,1>, 1.0); } touch_start(integer total_number) { key group = llList2Key(llGetObjectDetails(llGetKey(), [OBJECT_GROUP]),0); string result = "This object is not set to a group."; if(group != NULL_KEY) result = "This object's group's key is " + (string)group; llWhisper(0, result); }
} </lsl>