These forums are CLOSED. Please visit the new forums HERE
Checking for Group Membership |
|
|
Seri Franciosa
Registered User
Join date: 17 Dec 2006
Posts: 25
|
09-19-2007 07:05
Hi, I want to create a vendor which will sell only to members of a particular group. There are plenty of vendor scripts out there, and I think I know where I'm going with that aspect of things. However, I'm a little confused about how to actually check that someone is a member of the target group. Is there anyone who can give me a few pointers while the grid is down and I can't get inworld to test my ideas? Thanks in advance.
|
|
Tre Giles
Registered User
Join date: 16 Dec 2005
Posts: 294
|
09-19-2007 07:41
You'll have to be part of that group - atleast until you rez the vendor/server - or the vendor will have to be part of the group (unless you plan on using a server, then only the server will have to be part of the group, unless the server is not on group land then go buy a 5 prim little square of land somewhere and make an Auth Manager type device; explained more below xD)
I had a similiar problem like this. Since the land was owned by a "group land holder" and not my group, I had to make an "Authentifications Handler/Manager" in another sim on my own land (like 5 available prims land lol), have the vendor Email a server which emails that object, runs a check if the key is part of the group, emails back results to server, server processes and if the correct results are given gives the person the item they bought (watered down, the "basically" version lol). Of course I use 20 or 30 email slaves for the server and the Auth Manager (because I have vendors stationed everywhere). Hope you could find even a little help in that solution ![]() _____________________
"The Dirt Gods Are Pleased" OMFG I FOUND HACKS TO SECONDLIFE ON GOOGLE??? Hacks!!!? Found on google lmao! |
|
2fast4u Nabob
SL-ice.net
Join date: 28 Dec 2005
Posts: 542
|
09-19-2007 07:56
You cannot check if someone is in a specific group - you can only check if someone is in the same group that the vendor is in.
Try this: Put this script into a prim and set the prim to which the user should belong. This will return L$ to anyone that pays it and does not belong to the same group. // warning: not tested state default { state_entry() { //required to refund money to user if in the wrong group llRequestPermissions(llGetOwner(),PERMISSION_DEBIT); } // state entry money(key giver, integer amount) { if( ! llSameGroup(giver) ) { llGiveMoney(giver, amount); llSay(0,"Sorry, you need to be in the group to purchase from this vendor" ;return; } llSay(0,"Thanks for buying!" ;llGiveInventory(....); // etc.... } // money event } // state default -2fast |
|
Squirrel Wood
Nuteater. Beware!
Join date: 14 Jun 2006
Posts: 471
|
09-20-2007 00:29
A script can only check if someone is in the same group as the object that contains the script is.
For this to work, that person will not only need to be a member of the group but ALSO have that group active. llSameGroup(); Other than that you have no options. Except keeping a list of names/UUID keys somewhere on a notecard or an external storage and checking back with that one. |
|
Seri Franciosa
Registered User
Join date: 17 Dec 2006
Posts: 25
|
09-21-2007 00:21
Thanks Guys, this is very helpful, and with your advice I got the thing to work!
|
|
Tre Giles
Registered User
Join date: 16 Dec 2005
Posts: 294
|
09-21-2007 08:30
You cannot check if someone is in a specific group - you can only check if someone is in the same group that the vendor is in. A script can only check if someone is in the same group as the object that contains the script is. Exactly. And if you're clever enough, setting up a networked system of group only vendors (if thats the direction you're going) would be a walk on the beach (eating cake ).2fast's script its the practical one though ![]() _____________________
"The Dirt Gods Are Pleased" OMFG I FOUND HACKS TO SECONDLIFE ON GOOGLE??? Hacks!!!? Found on google lmao! |