Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Need help with detaching

Ruboneout Shoreman
Registered User
Join date: 29 Jul 2009
Posts: 38
08-18-2009 19:23
So one afternoon I was out shopping for hair and I wanted to try on this hair demo by Action. When I was flying around debating if I was going to buy this hair or not I accidentally left the sim then the hair detached all by it self. Then it gave me a message telling me I can only use the demo hair in that particular sim. I'm horrible at scripting and I tried replicating a similar script for a friend of mine. However, when i do llDetachFromAvatar that requires permissions if im not mistaken.
I never had to give permissions for that demo hair and I don't want it to ask for permissions because the whole purpose is to help prevent copy botting.
Thank you for your time and efforts!
Argent Stonecutter
Emergency Mustelid
Join date: 20 Sep 2005
Posts: 20,263
08-18-2009 19:33
You can't stop copybotting with a script. The perp will just rez it in a no-script zone.
_____________________
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
Ruboneout Shoreman
Registered User
Join date: 29 Jul 2009
Posts: 38
08-18-2009 19:35
Ahh I've been focusing on this script for a while now since I'm by no means any good with scripting that I completely forgot about that. I feel like a scrub. Haha. Thanks for saving me an even bigger headache
Ruthven Willenov
Darkness in your light
Join date: 16 Jan 2008
Posts: 965
08-18-2009 19:36
permissions are automatically granted when attaching an object, unless the script resides in a child prim, then you still have to click the blue dialog
_____________________
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
Ruboneout Shoreman
Registered User
Join date: 29 Jul 2009
Posts: 38
08-18-2009 19:39
I understand now. Thank you! : )
Argent Stonecutter
Emergency Mustelid
Join date: 20 Sep 2005
Posts: 20,263
08-19-2009 05:16
From: Ruthven Willenov
permissions are automatically granted when attaching an object, unless the script resides in a child prim, then you still have to click the blue dialog
I think they fixed the child prim problem a few versions ago.
_____________________
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
Eli Schlegal
Registered User
Join date: 20 Nov 2007
Posts: 2,387
08-19-2009 05:39
Tell me your name is NOT really Ruboneout.
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
08-19-2009 14:16
As for functionality like that observed in the original post, you might try something like the following. (Not yet compiled; may need a couple minor fixes.)

CODE

string HOME_REGION = "Someplace Special";
string DETACH_MESSAGE = "This is a demo version and cannot be used outside Someplace Special";

detachInForeignRegion()
{
if (llGetRegionName() == HOME_REGION)
{
return;
}

if (llGetPermissionsKey() == llGetOwner() &&
llGetPermissions() & PERMISSION_ATTACH)
{
if (DETACH_MESSAGE != "")
{
llOwnerSay(DETACH_MESSAGE);
}
llDetachFromAvatar();
} else
{
llRequestPermissions(llGetOwner(), PERMISSION_ATTACH);
}
}

default
{
on_rez(integer startParam)
{
if (llGetOwner() != llGetCreator())
{
// Prevent rezzing except to attach
llDie();
}
}

attach(key id)
{
if (id == NULL_KEY)
{
// Prevent dropping in-world
llDie();
} else
{
detachInForeignRegion();
}
}

changed(integer changes)
{
if (changes & (CHANGED_REGION | CHANGED_TELEPORT))
{
detachInForeignRegion();
}
}

run_time_permissions(integer perms)
{
if (perms & PERMISSION_ATTACH)
{
detachInForeignRegion();
}
}
}
Ruthven Willenov
Darkness in your light
Join date: 16 Jan 2008
Posts: 965
08-19-2009 14:51
one other thing you can do is take controls, this allows script to run in no script land. i haven't tested to see if detaching/attaching messes that up or not. guess it depends if you reset the script on attach?
_____________________
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
Lear Cale
wordy bugger
Join date: 22 Aug 2007
Posts: 3,569
08-19-2009 20:08
From: Ruthven Willenov
permissions are automatically granted when attaching an object, unless the script resides in a child prim, then you still have to click the blue dialog
Clarification: This applies to most, but not all permissions. Permission to take lindens are not automatically granted. There may be others. But I do believe permission to detach would be granted automatically.
Lear Cale
wordy bugger
Join date: 22 Aug 2007
Posts: 3,569
08-19-2009 20:10
Right, Ruthven, but there are plenty of other reasons a copybot can still work.

If the object is ever rezzed, it can be copybotted. If it can't ever be rezzed, it's not of much use.
Ruthven Willenov
Darkness in your light
Join date: 16 Jan 2008
Posts: 965
08-19-2009 21:29
From: Lear Cale
Right, Ruthven, but there are plenty of other reasons a copybot can still work.

If the object is ever rezzed, it can be copybotted. If it can't ever be rezzed, it's not of much use.

which is why i suggested taking controls so the script that would kill the object can still run on no script land
_____________________
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
08-20-2009 01:12
From: Ruthven Willenov
which is why i suggested taking controls so the script that would kill the object can still run on no script land
That would make no difference. It has to run before it can take controls. If the perp rezzes or attaches it on no-script land it would just sit there like a brick waiting for them to leave no-script land so it could start running and take controls.
_____________________
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
Lear Cale
wordy bugger
Join date: 22 Aug 2007
Posts: 3,569
08-20-2009 08:40
Right, Argent, and in any case, I don't see how killing an object can prevent it being copied. I mean, when does one kill the object? Immediately? If so, what purpose can it serve? (It could serve a useful purpose if scripted to have some one-shot behavior -- but in that case, it would be the script that would need protecting, not the object, and copybot can't copy scripts.)

If it doesn't kill itself immediately, then when does it? There's no way to detect copybotting.

Perhaps if this object kills itself whenever anyone other than the owner is within some radius ...

Maybe it's paucity of imagination on my part, but I can't conceive of any practical way that llDie() can be used to prevent copybot.
Argent Stonecutter
Emergency Mustelid
Join date: 20 Sep 2005
Posts: 20,263
08-20-2009 08:44
From: Lear Cale

Maybe it's paucity of imagination on my part, but I can't conceive of any practical way that llDie() can be used to prevent copybot.

llDie() is the new !quit
_____________________
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
Lear Cale
wordy bugger
Join date: 22 Aug 2007
Posts: 3,569
08-20-2009 08:51
Lol
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
08-20-2009 11:21
From: Eli Schlegal
Tell me your name is NOT really Ruboneout.

lol I didn't parse that before.... kudos =) =) =)
_____________________
|
| . "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...
| -