// Exile Loudon
// Aspiring Scripter
 
// Join Date: Dec 2005
// Location: New York City
// Posts: 122
 
// Anti-Grief Shield/deflector
// This is a very simple script I quickly put together, and what it does is it rezzes a shield around you when a bullet comes close, and deflects the bullet away. This script isn't extrmemly powerful and may not be able to protect all bullets. Don't depend on it too much. Put it into a 80 % dimpled (aroudn there) sphere, around 2m in diameter. This would be the shield plate. IM me in world for a free UPDATED copy.
 
// Anti-Grief Attachment Script:
 
// --------------------------------------------
 
//Exile's Simple Anti-Grief Auto shield! Please don't resell or use in any products you plan
//to sell. This is open-sourced, so give full rights to anyone who gets this script.
// Please don't remove this disclaimer, as it isn't nice to take the the gratitude that's
//supposed to be for me. Have fun and keep safe!
 
default
{
    state_entry()
    {
        llListen(2,"",llGetOwner(),"");
    }
 
    listen(integer channel,string name,key id,string message)
    {
        if(message=="auto shield on")
        {
            llOwnerSay("Auto Shields Activated.");
            llSensorRepeat("","",ACTIVE,5,TWO_PI,0.1);
        }
 
        if(message=="auto shield off")
        {
            llOwnerSay("Auto Shields deactivated.");
            llSensorRemove();
        }
    }
 
            sensor(integer num_detected)
    {
             if(llVecMag(llDetectedVel(0)) > 7.0)
            {
                rotation rot = llGetRot();
                rotation drot = llDetectedRot(0);
                rotation between = llGetRot() * llRotBetween(<0.5,0,0> * llGetRot(), llDetectedPos(0) - llGetPos());
            llRezObject("Auto Shield",llGetPos() + <0.5,0,0> * between,ZERO_VECTOR,between,0);
 
            }
        }
    } 
 
-------------------
 
Auto Shield Plate Script (Just for the plate to die after 2 seconds)
 
--------------------
 
default
{
    state_entry()
    {
        llSleep(2);
        llDie();//Let the plate disappear and not spam people's plots.
    }
}