Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Can you stop the scripts in an object given via inventory drop?

Yumi Murakami
DoIt!AttachTheEarOfACat!
Join date: 27 Sep 2005
Posts: 6,860
11-24-2005 13:17
(subject says it all ;) )
Jillian Callahan
Rotary-winged Neko Girl
Join date: 24 Jun 2004
Posts: 3,766
11-24-2005 13:21
Drop this script in:
CODE
default
{
state_entry()
{
integer ns = llGetInventoryNumber(INVENTORY_SCRIPT);
integer i;
string myname = llGetScriptName();
for (i=0; i<ns; i++)
{
string itsname = llGetInventoryName(INVENTORY_SCRIPT, i);
if ( itsname != myname ) llSetScriptState(itsname, FALSE);
}
llRemoveInventory(myname);
}
}


(Tired and headache, so it may note be perfect.)
_____________________
Yumi Murakami
DoIt!AttachTheEarOfACat!
Join date: 27 Sep 2005
Posts: 6,860
11-24-2005 13:24
Thanks, but that only works if it's the script that was dropped into the inventory.

What if it's not the script directly, but an object which itself might contain scripts?
Jillian Callahan
Rotary-winged Neko Girl
Join date: 24 Jun 2004
Posts: 3,766
11-24-2005 13:26
From: Yumi Murakami
Thanks, but that only works if it's the script that was dropped into the inventory.

What if it's not the script directly, but an object which itself might contain scripts?
I guess the subject line DIDN'T say it all.

Please be more specific, I'm now not sure what you're asking.
_____________________
Yumi Murakami
DoIt!AttachTheEarOfACat!
Join date: 27 Sep 2005
Posts: 6,860
11-24-2005 17:11
From: Jillian Callahan
I guess the subject line DIDN'T say it all.

Please be more specific, I'm now not sure what you're asking.


Ah, ok.

There's my object, which has a script in it. As it happens, what my object's job is to collect OTHER objects submitted by users who might be passing by, for a building contest. They can drop their objects into it, via llAllowInventoryDrop(), and then the owner can pull them out and look at them.

All nice and hunkidory, until some clever W-Hat a** comes and drops a griefsphere in it. Owner pulls it out, sim goes poof, and owner gets blamed because they owned all the griefspheres.

Therefore: what I want to do: whenever one of these built objects gets dropped into my object, I want to stop all the scripts in it so that when the owner rezzes it it won't be running. The owner can then start it via the tools menu if they choose.

Can that be done?
Jillian Callahan
Rotary-winged Neko Girl
Join date: 24 Jun 2004
Posts: 3,766
11-24-2005 17:16
Ah.

No, sorry, can't be done.

Here's an idea, though:

Have a neighbor make you a 16 meter spot on thier land for you to rez things, with no-outide-scripts unchecked.

If you've got group land, you can do that yourself.
_____________________