/shutdown - shutdowns the server

/shutdown - shutdowns the server

Postby HelloWorldCool » 19 Oct 2011, 03:35

Here's just something i created. Hope you like it!

Code: Select all
/*
   Auto-generated command skeleton class.

   Use this as a basis for custom commands implemented via the MCDzienny scripting framework.
   File and class should be named a specific way.  For example, /update is named 'CmdUpdate.cs' for the file, and 'CmdUpdate' for the class.
*/

// Add any other using statements you need up here, of course.
// As a note, MCDzienny is designed for .NET 3.5.
using System;

namespace MCDzienny
{
   public class CmdShutdown : Command
   {
      public override string name { get { return "shutdown"; } }
      public override string shortcut { get { return "shut"; } }
      public override string type { get { return "other"; } }
      public override bool museumUsable { get { return false; } }
      public override LevelPermission defaultRank { get { return LevelPermission.Admin; } }
      public override void Use(Player p, string message)
      {
         Player.GlobalMessage(p.name + " has execute realshutdown!");
            Command.all.Find("shutdown").Use(null, "10" + " Bye2 everyone :D");
      }

      public override void Help(Player p)
      {
         Player.SendMessage(p, "/shutdown - Shutsdown the server ");
      }
   }
}
Download fCraft maps! - viewtopic.php?f=25&t=3012!



Note: The Developer(s) of MCDzienny have resigned and the software is no longer supported.
Errors are bound to occur and Mojang has not attempted to resolve them.
User avatar
HelloWorldCool
 
Posts: 867
Joined: 18 Oct 2011, 00:19
Location: MCDzienny Forums, HelloWorldCool Forums

Re: /shutdown - A Command to shutdown the server.

Postby HelloWorldCool » 19 Oct 2011, 03:37

If you want to troll people use this:

/fakeshutdown - A command that actually doesn't shutdown the server

Code: Select all
/*
   Auto-generated command skeleton class.

   Use this as a basis for custom commands implemented via the MCDzienny scripting framework.
   File and class should be named a specific way.  For example, /update is named 'CmdUpdate.cs' for the file, and 'CmdUpdate' for the class.
*/

// Add any other using statements you need up here, of course.
// As a note, MCDzienny is designed for .NET 3.5.
using System;
using System.Threading;

namespace MCDzienny
{
    public class Cmdfakeshutdown : Command
    {
        public override string name { get { return "fakeshutdown"; } }
        public override string shortcut { get { return "fs"; } }
        public override string type { get { return "other"; } }
        public override bool museumUsable { get { return true; } }
        public override LevelPermission defaultRank { get { return LevelPermission.Admin; } }
        public override void Use(Player p, string message)
        {
            Player.GlobalMessage("%4Server is going to shutdown in 10 seconds");
            Player.GlobalMessage("%4Server shutdown in 10 seconds");
            Thread.Sleep(1000);
            Player.GlobalMessage("%4Server shutdown in 9 seconds");
            Thread.Sleep(1000);
            Player.GlobalMessage("%4Server shutdown in 8 seconds");
            Thread.Sleep(1000);
            Player.GlobalMessage("%4Server shutdown in 7 seconds");
            Thread.Sleep(1000);
            Player.GlobalMessage("%4Server shutdown in 6 seconds");
            Thread.Sleep(1000);
            Player.GlobalMessage("%4Server shutdown in 5 seconds");
            Thread.Sleep(1000);
            Player.GlobalMessage("%4Server shutdown in 4 seconds");
            Thread.Sleep(1000);
            Player.GlobalMessage("%4Server shutdown in 3 seconds");
            Thread.Sleep(1000);
            Player.GlobalMessage("%4Server shutdown in 2 seconds");
            Thread.Sleep(1000);
            Player.GlobalMessage("%4Server shutdown in 1 seconds");

            foreach (Player pl in Player.players)
            {
                if (pl != null)
                    try
                    {
                        Player.GlobalMessage("&c- " + pl.color + pl.prefix + pl.name + Server.DefaultColor + " kicked (Server shutdown. Rejoin in 10 seconds.)");
                        Thread.Sleep(500);
                    }
                    catch
                    { }
            }
        }


        public override void Help(Player p)
        {
            Player.SendMessage(p, "/fakeshutdown - funny and awesome");

        }
    }
}

Download fCraft maps! - viewtopic.php?f=25&t=3012!



Note: The Developer(s) of MCDzienny have resigned and the software is no longer supported.
Errors are bound to occur and Mojang has not attempted to resolve them.
User avatar
HelloWorldCool
 
Posts: 867
Joined: 18 Oct 2011, 00:19
Location: MCDzienny Forums, HelloWorldCool Forums

Re: /shutdown - A Command to shutdown the server.

Postby xTYx728 » 27 Oct 2011, 01:50

HelloWorldCool wrote:If you want to troll people use this:

/fakeshutdown - A command that actually doesn't shutdown the server

Code: Select all
/*
   Auto-generated command skeleton class.

   Use this as a basis for custom commands implemented via the MCDzienny scripting framework.
   File and class should be named a specific way.  For example, /update is named 'CmdUpdate.cs' for the file, and 'CmdUpdate' for the class.
*/

// Add any other using statements you need up here, of course.
// As a note, MCDzienny is designed for .NET 3.5.
using System;
using System.Threading;

namespace MCDzienny
{
    public class Cmdfakeshutdown : Command
    {
        public override string name { get { return "fakeshutdown"; } }
        public override string shortcut { get { return "fs"; } }
        public override string type { get { return "other"; } }
        public override bool museumUsable { get { return true; } }
        public override LevelPermission defaultRank { get { return LevelPermission.Admin; } }
        public override void Use(Player p, string message)
        {
            Player.GlobalMessage("%4Server is going to shutdown in 10 seconds");
            Player.GlobalMessage("%4Server shutdown in 10 seconds");
            Thread.Sleep(1000);
            Player.GlobalMessage("%4Server shutdown in 9 seconds");
            Thread.Sleep(1000);
            Player.GlobalMessage("%4Server shutdown in 8 seconds");
            Thread.Sleep(1000);
            Player.GlobalMessage("%4Server shutdown in 7 seconds");
            Thread.Sleep(1000);
            Player.GlobalMessage("%4Server shutdown in 6 seconds");
            Thread.Sleep(1000);
            Player.GlobalMessage("%4Server shutdown in 5 seconds");
            Thread.Sleep(1000);
            Player.GlobalMessage("%4Server shutdown in 4 seconds");
            Thread.Sleep(1000);
            Player.GlobalMessage("%4Server shutdown in 3 seconds");
            Thread.Sleep(1000);
            Player.GlobalMessage("%4Server shutdown in 2 seconds");
            Thread.Sleep(1000);
            Player.GlobalMessage("%4Server shutdown in 1 seconds");

            foreach (Player pl in Player.players)
            {
                if (pl != null)
                    try
                    {
                        Player.GlobalMessage("&c- " + pl.color + pl.prefix + pl.name + Server.DefaultColor + " kicked (Server shutdown. Rejoin in 10 seconds.)");
                        Thread.Sleep(500);
                    }
                    catch
                    { }
            }
        }


        public override void Help(Player p)
        {
            Player.SendMessage(p, "/fakeshutdown - funny and awesome");

        }
    }
}



nice work removing my name from my command, and stealing from the best didn't get mcdzienny anywhere... but no worries cuz mcdzienny is dead anyway...
original post
http://www.mcforge.net/forums/viewtopic ... &t=20&p=66
xTYx728
 
Posts: 15
Joined: 21 Jun 2011, 13:05

Re: /shutdown - A Command to shutdown the server.

Postby HelloWorldCool » 27 Oct 2011, 22:00

Lol :P

Haha i knew you would find out. But i only posted because i wanted a /shutdown command that works from the console. Do you think you could make that work?
Download fCraft maps! - viewtopic.php?f=25&t=3012!



Note: The Developer(s) of MCDzienny have resigned and the software is no longer supported.
Errors are bound to occur and Mojang has not attempted to resolve them.
User avatar
HelloWorldCool
 
Posts: 867
Joined: 18 Oct 2011, 00:19
Location: MCDzienny Forums, HelloWorldCool Forums


Return to Custom Commands

Who is online

Users browsing this forum: No registered users and 4 guests

cron