Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Land Filler to Reduce griefer atacks.

LaserFur Leonov
Registered User
Join date: 16 Jan 2006
Posts: 18
02-10-2006 23:38
After yesterdays "ultra lag" attack, We need to fill up our parcels so that they can't rez too many items and crash the sim.

The concept is simple, replicate until fail and then delete x copys.

I'll leave a full permission copy at yadni's junkyard.

Note: The prim names must be exact.

1. Go to a far away area or up high so that this does not cause lag.
2. Create a blank, white, "Full bright" prim and name it "Land_Fill"
3. Place the "Land_Fill_Die" script into the prim.
4. Take it.
5. Create a blank, white, "Full bright" prim and name it "Land_Filler"
6. Place the "Rez_Array" script into the prim named "Land_Filler"
7. Place "Land_Fill" into "Land_Filler"
8. Enter 20 into the description field of "Land_Filler" to leave space for 20 prims.
9. Touch it twice. The first touch clears out any leftovers.


Rez_Array
CODE

// Rez to fill property - (description count)
// Released into the public domain by Grumble Loudon and LaserFur Leonov

//Rez and then touch to either rez or kill

//Note, The land max is not updated imedietly, so there will be a little
// time while no objects can be rezed.

integer m_RezLimit = 16384; //limit the number of prims created, just in case.

// you could also set this if you are on rented land and don't want to go over your limit.

integer m_channel = 25626;

list m_OwnerNames = []; //Add other owner names here for groups.

//**************************************************************************************
integer m_RezNotKill = TRUE;
integer m_RezCount = 0;
vector m_RezPos;
integer m_RezTimeout =0;
default
{
state_entry()
{
m_OwnerNames += llKey2Name(llGetOwner()); // assumes owner is online when he rezes it
llSetStatus(STATUS_BLOCK_GRAB, TRUE); //needed if we add a touch start
}
//*************************************************************************************
on_rez(integer StartPram)
{
llResetScript();
}//on rez
//**************************************************************************************
touch_start(integer total_number)
{
key DetKey = llDetectedKey(0);
string DetName = llKey2Name(DetKey);

//owner info
list FindName;
FindName += DetName; //name of avitar
if (llListFindList( m_OwnerNames, FindName) == -1) //not an owner
{
m_RezNotKill = !m_RezNotKill; //toggle

if (m_RezNotKill)
{ //Rez
llOwnerSay("Starting");
m_RezCount = 1;
m_RezPos = llGetPos();
m_RezPos.z += 0.5;
llRezObject("Land_Fill",m_RezPos,<0,0,0>,<0,0,0,1>,m_RezCount); //start process
m_RezTimeout = 0;
llSetTimerEvent(1);
}else{
llOwnerSay("Killing all");
llSay(m_channel,"2147483647"); //kill all
};//if m_RezNotKill
};// if owner
}// touch_start
//**************************************************************************************
object_rez(key id)// it worked. So there may be more prim space left
{
m_RezTimeout = 0; //reset timeout

if (m_RezNotKill) //check just in case a touch canceled the rez
{
++m_RezCount; //next number
if (m_RezCount < m_RezLimit)
{
llRezObject("Land_Fill",m_RezPos,<0,0,0>,<0,0,0,1>,m_RezCount); //do it again
};
llSetTimerEvent(1); //just in case a lag caused a timeout and a then a Rez
};
} //object_rez
//**************************************************************************************
timer()
{
++m_RezTimeout;
if (m_RezTimeout > 5) //rez failed so parcel is full
{
llSay(m_channel,llGetObjectDesc()); //kill x number
llSetTimerEvent(0); //kill timer
llOwnerSay("Done");
};
}//timer
}//


Land_Fill_Die
CODE

//Kills the object on command
// Released into the public domain by Grumble Loudon and LaserFur Leonov

integer m_channel = 25626;
//***************************************************************************
integer m_RezNumber = 0;
default
{
state_entry()
{
llListen(m_channel,"Land_Filler",NULL_KEY,"");
}//start
//***************************************************************************************
on_rez(integer StartPram)
{
m_RezNumber = StartPram; //starts at 1
}//on rez
//***************************************************************************************
listen(integer channel,string name, key id, string msg)
{
if (llGetOwnerKey(id) == llGetOwner()) //prevent hack
{
//msg will be a number of how many to kill
if ((integer)msg >= m_RezNumber) //numbers start at 1
{
llDie();
};
};
}//Listen
//***************************************************************************************
}
Nada Epoch
The Librarian
Join date: 4 Nov 2002
Posts: 1,423
Discussion Thread
02-11-2006 14:32
/54/e7/87742/1.html
_____________________
i've got nothing. ;)
DoteDote Edison
Thinks Too Much
Join date: 6 Jun 2004
Posts: 790
02-11-2006 19:56
... or enable the NO CREATE/BUILD setting under land options. There's also a NO OUTSIDE SCRIPTS option to keep scripted objects from functioning over your land.

Where this script would be useful might be on abandoned land parcels. I think it's a great idea to fill neglected land with prims to prevent the occasional crashed vehicle from becoming locked onto the abandoned land when autoreturn is disabled.