Beezle Warburton Scrubbing Script


Copy/paste the code below into a new script. Drop the script into as many prims in the object as necessary, then touch any one of the prims with the script in it. It will activate all copies in the object simultaneously. The "Destruct" option will then remove all copies of the script.


// Beezle Warburton Scrubbing Script (C) 2007 //
list buttons =["SitTarget", "SitText", "FloatText", "Particles","TextureAn", "Sound", "TargetOmega", "ALL", "DESTRUCT"];
string menutext = "Select an item to clear, use ALL to Clear all, or DESTRUCT to remove script from prim";
integer handler;

default
{
state_entry()
{
if (handler)
{
llListenRemove(handler);
}
handler =llListen(1,"",llGetOwner(),"");
}
touch_start(integer num_detected)
{
llDialog(llGetOwner(), menutext, buttons, 1);
}
listen( integer channel, string name, key id, string message )
{
string lowmsg = llToLower(message);
if (lowmsg == "sittarget")
{
llWhisper(0,"Clearing Sit Position.");
llSitTarget(ZERO_VECTOR,ZERO_ROTATION);
}
if (lowmsg == "floattext")
{
llWhisper(0,"Clearing Floating Text.");
llSetText("", <1,1,1>, 1.5);
}
if (lowmsg == "particles")
{
llWhisper(0,"Clearing Particles.");
llParticleSystem([]);
}
if (lowmsg == "texturean")
{
llWhisper(0,"Clearing Texture Animation.");
llSetTextureAnim(FALSE, ALL_SIDES,0,0,0.0, 1,0.3);
}
if(lowmsg == "targetomega")
{
llWhisper(0, "Clearing llTargetOmega().");
llTargetOmega(ZERO_VECTOR, 0.0, 1.0);
}
if(lowmsg == "sound")
{
llWhisper(0, "Clearing Sounds.");
llStopSound();
}
if(lowmsg == "sittext")
{
llWhisper(0,"Clearing Sit Text.");
llSetSitText("Sit Here");
}
if (lowmsg == "all")
{
llWhisper(0,"Clearing Floating Text.");
llSetText("", <1,1,1>, 1.5);
llSetSitText("Sit Here");
llWhisper(0,"Clearing Texture Animation.");
llSetTextureAnim(FALSE, ALL_SIDES,0,0,0.0, 1,0.3);
llWhisper(0,"Clearing Particles.");
llParticleSystem([]);
llWhisper(0,"Clearing Sit Position.");
llSitTarget(ZERO_VECTOR,ZERO_ROTATION);
llWhisper(0, "Clearing llTargetOmega().");
llTargetOmega(ZERO_VECTOR, 0.0, 1.0);
llStopSound();
}
if (lowmsg == "destruct")
{
llWhisper(0,"Removing script from prim in 0.2 seconds");
llSleep(0.2);
llRemoveInventory(llGetScriptName());
}
}
}


Source: http://forums.secondlife.com/showthread.php?t=243987&page=1&pp=15