Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Rejecting inventory drop from non group?

Christif Vaher
Registered User
Join date: 24 Jun 2008
Posts: 51
04-10-2009 06:37
I am sure the process is even easier than the logic but repeated attempts and no go on this task. I want to be able to allow anyone to drop a notecard on an object, if they have the same group allow the inventory change, if not reject it.


anyone drops

if same group keep

if different group reject

I am looking at llSameGroup and llAlloweInventoryDrop but can't seem to get the right flow down. Any suggestions or code would be appreciated.
Ruthven Willenov
Darkness in your light
Join date: 16 Jan 2008
Posts: 965
04-10-2009 09:34
CODE

default
{
touch_start(integer nd)
{
if(llSameGroup(llDetectedKey(0)))
{
llSetTimerEvent(30.0);
llAllowInventoryDrop(TRUE);
}
}

timer()
{
llAllowInventoryDrop(FALSE);
llSetTimerEvent(0.0);
}

changed(integer mask)
{
if(mask & (CHANGED_ALLOWED_DROP | CHANGED_INVENTORY))
{
llWhisper(0, "My inventory has changed");
llAllowInventoryDrop(FALSE);
llSetTimerEvent(0.0);
}
}
}
_____________________
Dark Heart Emporium

http://www.xstreetsl.com/modules.php?name=Marketplace&MerchantID=133020

want more layers for tattoos, specifically for the head? vote here
http://jira.secondlife.com/browse/VWR-1449?

llDetectedCollision* Functions similar to touch
http://jira.secondlife.com/browse/SVC-3369
Argent Stonecutter
Emergency Mustelid
Join date: 20 Sep 2005
Posts: 20,263
04-10-2009 09:40
The key piece of information you need: you can't actually do what I think you want. You can't refuse an inventory drop, and you can't tell who dropped it, you have to have someone touch it then accept drops for some period after the touch.

Yes, this sub-optimal. :p

It's still the best you can do.
_____________________
Argent Stonecutter - http://globalcausalityviolation.blogspot.com/

"And now I'm going to show you something really cool."

Skyhook Station - http://xrl.us/skyhook23
Coonspiracy Store - http://xrl.us/coonstore
Sindy Tsure
Will script for shoes
Join date: 18 Sep 2006
Posts: 4,103
04-10-2009 09:51
Yep. The real killer is that there's just no way to tell who has changed the objects inventory. Something like llDetectedChangeOriginator (or something) would be nice here..
Christif Vaher
Registered User
Join date: 24 Jun 2008
Posts: 51
04-10-2009 10:44
Ok thank you very much. Perhaps I could approach it a different way. Maybe allow the drop then check the new inventory's owner and remove if they arent in the group? Anyway thank you for the code. That helps.
Argent Stonecutter
Emergency Mustelid
Join date: 20 Sep 2005
Posts: 20,263
04-10-2009 10:48
From: Christif Vaher
Ok thank you very much. Perhaps I could approach it a different way. Maybe allow the drop then check the new inventory's owner and remove if they arent in the group?
The new inventory's owner will be the owner of the prim it was dropped in. YOU CAN NOT FIND OUT WHO DROPPED IT. Period. YES, THIS IS SUBOPTIMAL. :(
_____________________
Argent Stonecutter - http://globalcausalityviolation.blogspot.com/

"And now I'm going to show you something really cool."

Skyhook Station - http://xrl.us/skyhook23
Coonspiracy Store - http://xrl.us/coonstore
Rolig Loon
Not as dumb as I look
Join date: 22 Mar 2007
Posts: 2,482
04-10-2009 11:19
You can't figure out who dropped the notecard in inventory, but you can determine who created it and then check that information against a list of group members. That might be close enough, depending on how security-conscious you are. You could also add a layer of security by giving each person in your group a password and requiring that password on the notecard. No system is foolproof, and adding security protection can make your dropbox too difficult/annoying for your group members to use. Anyway, take a look at . It might help.
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
04-10-2009 13:38
oh how I'd love to see this function reborn as
llAllowInventoryDropKey( integer add, key id )
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
04-10-2009 15:45
Another possibility might be to delete all objects dropped in after a short timeout UNLESS someone from the group (e.g. with the group tag active) somehow confirms the drop. For example, by chatting the name of the recently dropped item on a particular channel, or by touching the receptacle and selecting the name of the recently dropped item from a list of choices of unconfirmed additions. This might be a LITTLE more secure than the touch-drop solution, though it too has its holes and pitfalls.
Argent Stonecutter
Emergency Mustelid
Join date: 20 Sep 2005
Posts: 20,263
04-10-2009 15:50
Don't forget that there's also no LSL call to tell you if someone is in the group, directly. You'd still have to ask them to click something even if you could tell who dropped it. :(
_____________________
Argent Stonecutter - http://globalcausalityviolation.blogspot.com/

"And now I'm going to show you something really cool."

Skyhook Station - http://xrl.us/skyhook23
Coonspiracy Store - http://xrl.us/coonstore