Jump to content

Script Remover for Linksets

Dora Gustafson

You are about to reply to a thread that has been inactive for 3970 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

New Forum Edition

Run this script in a linkset/object and it will remove all scripts in the linkset.

  1. Put the script in the linkset
  2. Take the linkset into Inventory
  3. Rezz it back into the world
  4. Select it and 'Set Scripts to Running in Selection'
  • The script will guide you through these steps
  • When rezzed back into the world the linkset will snap to the position where it was taken,
    if that position isn't more than 10 meters away
// SCRIPT REMOVER by Dora Gustafson, Studio Dora 2010
// Based on 'Script eraser v1.2' Script by Dora Gustafson 2008
// Place script in the root of the object you want to clean for scripts and follow the instructions
// v1.01 monitor number of scripts started
// v1.02 child count down

vector position_original;
integer primNo;
integer childcount;
float eb_delay = 0.03125; // seconds to hold script. Defeat event buffer limit (64 events)

{ // erase all scripts from prim
integer i = 0;
string s;
string thisScript = llGetScriptName();
{ s = llGetInventoryName( INVENTORY_SCRIPT, i );
if ( s != thisScript ) llRemoveInventory( s );
else ++i; // don't erase skip it
while ( llGetInventoryNumber( INVENTORY_SCRIPT ) > 1 );
if ( primNo == 1 )
llOwnerSay("All scripts have been removed from this object");
llSetText("", <1.0, 1.0, 1.0>, 1.0);
llRemoveInventory( thisScript ); // remove this as the last

integer dg;
primNo = llGetLinkNumber();
if ( primNo == 1 )
childcount = llGetNumberOfPrims()-1;
position_original = llGetPos();
for ( dg = 2; dg <= llGetNumberOfPrims(); dg++ ) llGiveInventory( llGetLinkKey( dg ), llGetScriptName());
llOwnerSay("\n1. Take this object into Inventory!\n2. Rezz it back into the world!\n(will snap in position if less than 10m from where it was)");
else if (primNo > 1)
llSleep( eb_delay*primNo );
llMessageLinked( LINK_ROOT, FALSE, "child running", NULL_KEY);
on_rez( integer parm )
if ( !primNo )
{ // if linkset is just one prim, probably the box it is sold in
llOwnerSay("\nOpen prim and save script in inventory before use:\nPlace script in the object you want to clean and follow the instructions\nCongratulations with this SCRIPT REMOVER by Dora Gustafson, Studio Dora");
else if ( primNo == 1 )
llSetPos( position_original );
llOwnerSay( "\n3. Select and 'Set Scripts to Running in Selection'");
link_message(integer targ, integer num, string instruct, key id)
if ( instruct == "Erase Only" ) eraser();
else if ( instruct == "child running" )
if ( --childcount < 1 ) llMessageLinked( LINK_SET, FALSE, "Erase Only", NULL_KEY);
llSetText( (string)childcount+" scripts are NOT running", <1.0, 1.0, 1.0>, 1.0);

Note 1: In viewer 2 the menu function:"Set Scripts to Running in Selection" is changed to:"Set scripts to running".

Note 2: Now the script shows the progress by displaying the number of remaining scripts not running. This gives very much the same feel as we had in viewer 1.xx

Link to old Forum




  • Like 1
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 3970 days.

Please take a moment to consider if this thread is worth bumping.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...