Jump to content

Is it possible to create a gift giver that checks for a specific role within a specific group?


harryheath
 Share

You are about to reply to a thread that has been inactive for 991 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Hello,

I'm aware that there are plenty of scripts out there that give group gifts and require the user to activate the group before clicking and recieving the gift. However, I haven't seen a script that not only checks the active group but also the role within that group, before handing out the script. I'm not sure it's possible but asking here just in case.

Example:
 

Quote

"Group A" has "Owner", "Officer" and "Everyone" roles. If I wanted to give a gift to only group users with the "Officer" role but not the other two, is this possible? So the script would check that the user has "Group A" active and also has the role of "Officer" within that group.

 

Any help would be hugely appreciated :)!

Link to comment
Share on other sites

not easily no.  We can't get group details from within LSL

when the box gives on touch then the typical thing is to give to a list of officers maintained independently. For example a notecard in the giver contents, a Experience KVP entry, or a own managed web service

another way requires the officers to wear a attachment and their group tag, before they touch the box. For this then:

http://wiki.secondlife.com/wiki/LlSameGroup

look at the See Also section

llGetAttachedList and llGetObjectDetails

the giver script checks their attachment for OBJECT_CREATOR (you) and OBJECT_NAME  (some name for this purpose). When matched then give gift

see Lucia's answer below: OBJECT_GROUP_TAG

 

 

 

Edited by Mollymews
  • Like 1
Link to comment
Share on other sites

first, check an attachment with llGetAttachedList() + llGetObjectDetails () + OBJECT_GROUP (alternatively, make sure object isn't temp attached if NULL_KEY is returned)

then, check the wearer with llGetObjectDetails () + OBJECT_GROUP_TAG (make sure all group role titles are unique and no one else can/will change them)

http://wiki.secondlife.com/wiki/LlGetObjectDetails

http://wiki.secondlife.com/wiki/LlGetAttachedList

Edited by Lucia Nightfire
  • Like 3
Link to comment
Share on other sites

3 hours ago, bobsknief Orsini said:

Only possible with a bot.

Lucia's method is the way to do it

when the person who touches the machine is wearing their group tag, then OBJECT_GROUP_TAG can be obtained from any non-temp attachment they are wearing. Give gifts to group members / officers based on their tag

Edited by Mollymews
Link to comment
Share on other sites

16 minutes ago, Mollymews said:

Lucia's method is the way to do it

when the person who touches the machine is wearing their group tag, then OBJECT_GROUP_TAG can be obtained from any non-temp attachment they are wearing. Give gifts to group members / officers based on their tag

You are right. Just make sure to do llSameGroup before so not everyone can make a tag with the matching text.

  • Like 1
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 991 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...