|
Karine Koba
Registered User
Join date: 22 Feb 2007
Posts: 167
|
02-16-2008 20:13
Here is the script. // When the script is reset do the following:<br /> {<br /> GroupKey = llGetObjectDetails(llGetKey(), [OBJECT_GROUP]);// Detects the key of the group the object is set to and stores it in the list GroupKey.<br /> llSetText("Click me for a group invite",<0.337,0.671,1>,1);// Sets the the text hovering over the prim.<br /> }<br /> <br /> on_rez(integer param)// When the script is rezed do the following:<br /> {<br /> GroupKey = llGetObjectDetails(llGetKey(), [OBJECT_GROUP]);// Detects the key of the group the object is set to and stores it in the list GroupKey.<br /> llSetText("Click me for a group invite",<0.337,0.671,1>,1);// Sets the the text hovering over the prim.<br /> }<br /> <br /> touch_start(integer total_number)// When someone is touching the object, do the following:<br /> {<br /> llInstantMessage(llDetectedKey(0),"Open history (Ctrl-H), then click the following link to join the group: secondlife:///app/group/" + (string)GroupKey + "/about");// send a message to the one touching the object ( llDetectedKey(0) ) with a message. The script inserts the key made earlier by calling the variable named GroupKey.<br /> }<br />}<br /><br />// Made by: Ariensky Noel - Jan 2008 ) group key is 4d222763-b36c-9fc9-c6dc-02105c0f26c1 I would like not to have to set the object to the same group as the one set to my lands. Is there any way I could add the group key in the script instead of the script reading the group that the object is set to? Thanks!
|
|
Karine Koba
Registered User
Join date: 22 Feb 2007
Posts: 167
|
02-16-2008 20:26
Found it ;p string GroupKey = "4d222763-b36c-9fc9-c6dc-02105c0f26c1"; string GroupName = "Averlast Boxing"; default { touch_start(integer total_number) { llInstantMessage(llDetectedKey(0),"Open history (Ctrl-H), then click the following link to join " + GroupName + ": secondlife:///app/group/" + GroupKey + "/about"  ; } state_entry() { llSetText("Click me for a group invite to " + GroupName,<0.337,0.671,1>,1); } on_rez(integer param) { llSetText("Click me for a group invite to " + GroupName,<0.337,0.671,1>,1); } }
|