using System;
using Server;
namespace System.Animals
{
public sealed class BunnySlaughterHood
{
public static void Initialize()
{
//Timer.DelayCall( TimeSpan.FromSeconds( 5.0 ), new DelayCallback( SlaughterBunny ) );
}
private static void SlaughterBunny()
{
foreach( Mobile m in World.Mobiles.Values )
if( m is Bunny )
{
Slaughter( m as Bunny );
return;
}
Timer.DelayCall( TimeSpan.FromHours( 1.0 ), new TimerCallback( SlaughterBunny ) );
}
private static void Slaughter( Bunny b )
{
b.SendMessage( "Somebody didn't sign my Guest Book. You deserve nothing but death." );
Timer.DelayCall( TimeSpan.FromSeconds( 3.0 ), new TimerStateCallback( Slaughter ), b );
}
private static void Slaughter( object state )
{
Bunny b = state as Bunny;
if( b != null )
b.Kill();
}
}
}
Two words: Do it.Kenko said:Code:using System; using Server; namespace System.Animals { public sealed class BunnySlaughterHood { public static void Initialize() { //Timer.DelayCall( TimeSpan.FromSeconds( 5.0 ), new DelayCallback( SlaughterBunny ) ); } private static void SlaughterBunny() { foreach( Mobile m in World.Mobiles.Values ) if( m is Bunny ) { Slaughter( m as Bunny ); return; } Timer.DelayCall( TimeSpan.FromHours( 1.0 ), new TimerCallback( SlaughterBunny ) ); } private static void Slaughter( Bunny b ) { b.SendMessage( "Somebody didn't sign my Guest Book. You deserve nothing but death." ); Timer.DelayCall( TimeSpan.FromSeconds( 3.0 ), new TimerStateCallback( Slaughter ), b ); } private static void Slaughter( object state ) { Bunny b = state as Bunny; if( b != null ) b.Kill(); } } }
Now you see I'm talking for real. If I uncomment that line and recompile, the bunnies will be gone.
I don't get it. Do you mean hello? Oh hi.Johabius said:I've got three words for you ELL OH ELL!
More to come if you don't keep me safe, warm and happy.orpheus said:just a bunny?