This commit is contained in:
Fred Beckhusen
2015-08-07 15:34:30 -05:00
parent ce47ec2f3e
commit fde850293c
8080 changed files with 0 additions and 2443112 deletions

View File

@@ -1,8 +0,0 @@
<Project name="NPC_BotKiller" guid="d8f5fa1a-6c00-1014-b904-200204c60a89">
<Object name="Object" guid="d8f5fb06-6c00-1014-b904-200204c60a89">
<Script name="NPC_BotKiller_1.lsl" guid="d8f62f0a-6c00-1014-b904-200204c60a89">
</Script>
<Script name="NPC_BotKiller_Nearby.lsl" guid="2a3ba880-0da5-433a-9b6b-2561d19db2f4">
</Script>
</Object>
</Project>

View File

@@ -1,88 +0,0 @@
// :CATEGORY:OpenSim NPC
// :NAME:NPC_BotKiller
// :AUTHOR:DZ
// :CREATED:2013-08-02 12:52:56.077
// :EDITED:2013-09-18 15:38:58
// :ID:571
// :NUM:784
// :REV:1.0
// :WORLD:OpenSim
// :DESCRIPTION:
Original script from http://opensimulator.org/wiki/User:Dz/NPC_Scripts
//
// License:
// You are free:
// to Share — to copy, distribute and transmit the work
// to Remix — to adapt the work
// to make commercial use of the work
See http://creativecommons.org/licenses/by-sa/2.5/
// :CODE:
/ OpenSimian BotKiller
// Kills all the NPC's in the region.. Please use with discretion.
// Iterate over a list of avatar keys, using them as an arguments to osNpcRemove
// Add a delay to the timer if sim performance starts to drag during logouts
// Feel free to use/distribute/modify to suit your needs
// Prepared for transfer to MOSES grid - D Osborn 5.3.2013
integer who2kill = 0;
integer howmany = 0;
list avatars = [];
default
{
state_entry()
{
llSetText("waiting ", <1.0, 0.0, 0.0>, 1.0);
}
touch_end(integer total_number) // should not change state in touch_start events....
{
avatars = osGetAvatarList();
howmany = llGetListLength(avatars)/3;
state KillThem;
}
changed(integer change) // Reset on region restart
{
if (change & CHANGED_REGION_RESTART)
{
llResetScript();
}
}
}
state KillThem
{
state_entry()
{
llSetText("Processing ", <1.0, 0.0, 0.0>, 1.0);
llSetTimerEvent(3.0); // remove 1 every 3 seconds to minimize performance impact
}
timer()
{
osNpcRemove(llList2Key(avatars,who2kill*3));
llSetText("Removed so far : " + (string) (who2kill + 1), <1.0, 0.0, 0.0>, 1.0);
who2kill++;
if(who2kill>=howmany)
state default;
llSetTimerEvent(3.0/ llGetRegionTimeDilation()); // Use timedilation to add to the delay if lagging
}
touch_end(integer interrupt) // abort by touching the object while it is processing
{
llResetScript();
}
changed(integer change)
{
if (change & CHANGED_REGION_RESTART)
{
llResetScript();
}
}
}

View File

@@ -1,66 +0,0 @@
// :CATEGORY:OpenSim NPC
// :NAME:NPC_BotKiller
// :AUTHOR:Ferd frederix
// :KEYWORDS:
// :CREATED:2013-08-02 12:52:56.077
// :EDITED:2014-09-24
// :ID:571
// :NUM:1661
// :REV:1.1
// :WORLD:OpenSim
// :DESCRIPTION:
// A NPC killer that works only on nearby NPC's. Rez it and touch it.
// Tells you who and how many were deleted
//
// License:
// You are free:
// to Share — to copy, distribute and transmit the work
// to Remix — to adapt the work
// to make commercial use of the work
// See http://creativecommons.org/licenses/by-sa/2.5/
// :CODE:
// OpenSimian BotKiller
// Kills all the NPC's in the region.. Please use with discretion.
// Iterate over a list of avatar keys, using them as an arguments to osNpcRemove
// Add a delay to the timer if sim performance starts to drag during logouts
// Feel free to use/distribute/modify to suit your needs
// Prepared for transfer to MOSES grid - D Osborn 5.3.2013
// lots of mods for nearby and eliinate silly code bits. F Beckhusen 9/18/2014
integer n;
default
{
touch_start(integer ewe)
{
// owner only
if (llDetectedKey(0) != llGetOwner())
return;
list avies = osGetAvatarList();
integer len = llGetListLength(avies); // no need to recalculate ht length each loop check
integer counter = 0;
for(n=0; n<len; n=n+3)
{
key npcKey = llList2Key(avies,n);
if (osIsNpc(npcKey)) {
list things = llGetObjectDetails(npcKey,[OBJECT_NAME,OBJECT_POS]);
vector pos = llList2Vector(things,1);
string name = llList2String(things,0);
float dist = llVecDist(pos, llGetPos());
if (dist < 10) {
counter ++;
llOwnerSay("Removing NPC named " + name);
osNpcRemove((key)llList2Key(avies,n));
}
}
}
if (counter)
llOwnerSay("Removed " + (string) counter + " NPC's");
else
llOwnerSay("No NPC's within 10 meters to remove!");
}
}