User:Dz

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
(New page: == Welcome to the OpenSimulator Space of dz == I am generally involved in running OpenSim instances for fun, but I have been induced to try it for profit and the pursuit of scholarly cre...)
 
(Welcome to the OpenSimulator Space of dz)
Line 11: Line 11:
 
I have been administering Linux based OpenSim servers since release 6.1, mostly on Ubuntu.
 
I have been administering Linux based OpenSim servers since release 6.1, mostly on Ubuntu.
 
I have active avatars on OSGrid, ScienceSim, Inworldz, and that "SL" place.
 
I have active avatars on OSGrid, ScienceSim, Inworldz, and that "SL" place.
 +
 +
 +
 +
----
 +
 +
== NPC Utilities ==
 +
 +
 +
<source lang = "lsl">
 +
 +
// 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();
 +
      }
 +
    }
 +
}
 +
 
 +
</source >

Revision as of 18:02, 6 May 2013

Welcome to the OpenSimulator Space of dz

I am generally involved in running OpenSim instances for fun, but I have been induced to try it for profit and the pursuit of scholarly credits.

I am an incessant lurker...It took me 2 years to add these 3 lines to my profile here.

I monitor the following OpenSimulator mailing-lists Opensim-Users, OpenSim-devs, libomv-dev. I can also be found lurking in the SL opensim group chat.

I have been administering Linux based OpenSim servers since release 6.1, mostly on Ubuntu. I have active avatars on OSGrid, ScienceSim, Inworldz, and that "SL" place.



NPC Utilities

// 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();
       }
    }
}
Personal tools
General
About This Wiki