1. Drop the first script into a cube, name that cube 'display'.
2. Make a second cube called 'aaa_lifetimeproxy' and drop the second script in that.
3. put a copy of 'aaa_lifetimeproxy in the inventory of 'display'.
4. Make any 2 prim object, name it 'Accent Sword' and drop it into the inventory of display.
5. touch the display repeatedly - the 'Accent sword' will appear and dissappear a couple of times (watch your cash).
Eventually the sword won't disapper - though your cash has been refunded. (and the aaa_liftimeproxy has died.)
Selecting the display will act as if the 'Accent sword' still exists and is still linked. You can even select individual pieces, change textures etc. even though those prims have been refunded. The only thing you cannot do is unlink successfully.
If you take the display object back into inventory then re-rez it, the 'Accent Sword' is gone.
CODE
integer bshow = TRUE;
default
{
state_entry()
{
llSetStatus(STATUS_PHYSICS,FALSE);
llRequestPermissions(llGetOwner(),PERMISSION_CHANGE_LINKS);
}
object_rez(key id)
{
llCreateLink(id,TRUE);
}
touch(integer ct)
{
llMessageLinked(LINK_ALL_CHILDREN,0,"Wrap it up",NULL_KEY);
llBreakLink(llGetLinkNumber());
if(bshow)
{
llRezObject("Accent Sword",<0,0,2.0>+llGetPos(),<0,0,0>,<0,0,0,1>,0);
llRezObject("aaa_lifetimeproxy",llGetPos(),<0,0,0>,<0,0,0,1>,0);
}
bshow = !bshow;
}
}
CODE
integer bDie;
default
{
state_entry()
{
bDie = FALSE;
llSetStatus(STATUS_PHYSICS,FALSE);
}
changed(integer ichanged)
{
if ((ichanged & CHANGED_LINK) && bDie)
{
llDie();
}
}
link_message(integer sender,integer num,string str,key id)
{
if (str = "Wrap it up")
{
bDie = TRUE;
}
}
}