Bling Scrubber ( V1 )

This is specifically for removing particles and the scripts that set them from objects. It will cure link_sets or single prims. If the option to scrub the scripts is chosen (as well as to scrub the particles) ALL the scripts in the whole object will be removed.

 

 

// V1 //
 
string instructions = "";
 
integer channel = -9865443;
 
string scrub = "SCRUB";
 
string no = "NO";
 
integer link_num;
 
Dialog(integer d)
{
    key owner = llGetOwner();
    llListen(channel, "", owner, "");
    if(d)
    llDialog(owner, "\n\n" + instructions + "ARE YOU SURE YOU WANT TO REMOVE ALL SCRIPTS?" + 
                    "CLICKING \"" + no +
                    "\" WILL STILL REMOVE ALL PARTICLES BUT, THEY MIGHT COME BACK.", [scrub, no], channel);
}
 
default
{
    on_rez(integer param)
    {
        Dialog(1);
    }
    state_entry()
    {
        if((link_num = llGetLinkNumber()) == 1)
        {
            integer i = 2;
            do
            llGiveInventory(llGetLinkKey(i), llGetScriptName());
            while((++i) <= llGetNumberOfPrims());
            instructions = "Open an edit on me and goto your viewer \"Tools\" menu.\n" +
                           "Near the bottom of the menu click \"Set Scripts Running in Selection\".\n" +
                           "Once ALL the scripts are set running, click the \"" + scrub + "\" button.\n\n";
            llOwnerSay("Take then rez me. Follow the instructions given on rez.");
        }
        else if(!link_num)
        Dialog(1);
        else
        Dialog(0);
    }
    listen(integer chan, string name, key id, string msg)
    {
        chan = 0;
        if(msg == scrub)
        {
            string name;
            while((llGetInventoryNumber(INVENTORY_SCRIPT) - 1))
            {
                if((name = llGetInventoryName(INVENTORY_SCRIPT, chan)) != llGetScriptName())
                llRemoveInventory(name);
                else
                chan = 1;
            }
        }
        if(((chan = link_num) == 1))
        {
            do
            llLinkParticleSystem(chan, []);
            while((++chan) <= llGetNumberOfPrims());
        }
        else
        llParticleSystem([]);
        if(link_num < 2)
        llOwnerSay("All done!");
        llRemoveInventory(llGetScriptName());
    }
}

 

 

 

Flash Scratch to SL - Your Scripting Tool

Script ImageNeed to write a LSL script and don't know how to script?  I know I hate trying to get my head around LSLS when I an in a time crunch. So why not give Flash Scratch a try! Its a great tool for learning and scoding your own scripts for Second Life without having to pay someone to do it and without a crash course in LSL

A Huge thanks to John Bennet of ATLAS Institute at University of Colorado and Eric Rosenbaum at MIT for writing Scratch for SL to begin with.

Read more: Flash Scratch to SL - Your Scripting Tool