Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Anti-Grief Shield/deflector

Exile Loudon
Aspiring Scripter
Join date: 10 Dec 2005
Posts: 122
03-12-2006 17:51
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:
CODE

//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)
CODE
default
{
state_entry()
{
llSleep(2);
llDie();//Let the plate disappear and not spam people's plots.
}
}
Nada Epoch
The Librarian
Join date: 4 Nov 2002
Posts: 1,423
Discussion Thread
03-17-2006 11:44
/54/9e/94268/1.html
_____________________
i've got nothing. ;)
Mcchez Tank
Registered User
Join date: 18 Nov 2005
Posts: 2
good
03-27-2006 11:02
this is a good script thanks will be helpful when sum noobs are firing at me :)