예제 #1
0
 public static void Animate_OnCommand( Server.Commands.CommandEventArgs e )
 {
     if ( e.Length == 6 )
     {
         e.Mobile.Animate( e.GetInt32( 0 ), e.GetInt32( 1 ), e.GetInt32( 2 ), e.GetBoolean( 3 ), e.GetBoolean( 4 ), e.GetInt32( 5 ) );
     }
     else
     {
         e.Mobile.SendAsciiMessage( "Format: Animate <action> <frameCount> <repeatCount> <forward> <repeat> <delay>" );
     }
 }
예제 #2
0
		public static void Randomize_OnCommand( Server.Commands.CommandEventArgs args )
		{
			Mobile m = args.Mobile;

			if( args.Length != 4 )
			{
				m.SendMessage( "Format: Randomize <starting itemID> <ending itemID> <Z level> <bool includeNonFlooring>" );
				return;
			}

			int start = args.GetInt32( 0 );
			int end = args.GetInt32( 1 );
			int z = args.GetInt32( 2 );
			bool walls = args.GetBoolean( 3 );

			object[] state = new object[4] { start, end, z, walls };

			BoundingBoxPicker.Begin( m, new BoundingBoxCallback( BoxPickerCallback ), state );
		}
예제 #3
0
 public static void Sound_OnCommand( Server.Commands.CommandEventArgs e )
 {
     if ( e.Length == 1 )
         PlaySound( e.Mobile, e.GetInt32( 0 ), true );
     else if ( e.Length == 2 )
         PlaySound( e.Mobile, e.GetInt32( 0 ), e.GetBoolean( 1 ) );
     else
         e.Mobile.SendAsciiMessage( "Format: Sound <index> [toAll]" );
 }
예제 #4
0
        private static void SetGuarded_OnCommand(Server.Commands.CommandEventArgs e)
        {
            Mobile from = e.Mobile;

            if (e.Length == 1)
            {
                GuardedRegion reg = from.Region as GuardedRegion;

                if (reg == null)
                {
                    from.SendAsciiMessage("You are not in a guardable region.");
                }
                else
                {
                    reg.Disabled = !e.GetBoolean(0);
                    from.SendAsciiMessage("After your changes:");
                    reg.TellGuardStatus(from);
                }
            }
            else
            {
                from.SendAsciiMessage("Format: SetGuarded <true|false>");
            }
        }