Group Gift (LSL)
This second life LSL script (should work in Opensim) gives a free gift to anyone who touches the object as long as they have the tag active for the group that the object is set to.
default {
touch_start(integer total_number) {
if (llDetectedGroup(0)) {
llGiveInventory(llDetectedKey(0), llGetInventoryName(INVENTORY_OBJECT, 0));
}
else {
string group_uuid = llList2Key(llGetObjectDetails(llGetKey(),[OBJECT_GROUP]),0);
llInstantMessage(llDetectedKey(0), "Wrong active group!\n\n" + "Join the group: secondlife:///app/group/" + group_uuid + "/inspect");
}
}
}