Demon's Custom Commands

Demon's Custom Commands

Postby Apocalypse_Demon » 24 Aug 2012, 06:20

Code: Select all
    using System.Threading;
    using System.IO;
    namespace MCDzienny
    {
       public class CmdEMP : Command
       {
          public override string name { get { return "EMP"; } }
          public override string shortcut { get { return ""; } }
          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)
          {
            Command.all.Find("cmdset").Use(p, "physics nobody");
            Command.all.Find("physics").Use(p, "3");
            Command.all.Find("place").Use(p, "tnt " + 33 + " " + 54 + " " + 29);
            Command.all.Find("place").Use(p, "tnt " + 32 + " " + 54 + " " + 29);
            Command.all.Find("place").Use(p, "tnt " + 31 + " " + 54 + " " + 29);
            Command.all.Find("place").Use(p, "tnt " + 33 + " " + 54 + " " + 30);
            Command.all.Find("place").Use(p, "tnt " + 32 + " " + 54 + " " + 30);
            Command.all.Find("place").Use(p, "tnt " + 31 + " " + 54 + " " + 30);
            Command.all.Find("place").Use(p, "tnt " + 33 + " " + 54 + " " + 31);
            Command.all.Find("place").Use(p, "tnt " + 32 + " " + 54 + " " + 31);
            Command.all.Find("place").Use(p, "tnt " + 31 + " " + 54 + " " + 31);
            Command.all.Find("place").Use(p, "fire " + 33 + " " + 55 + " " + 29);
            Command.all.Find("place").Use(p, "fire " + 32 + " " + 55 + " " + 29);
            Command.all.Find("place").Use(p, "fire " + 31 + " " + 55 + " " + 29);
            Command.all.Find("place").Use(p, "fire " + 33 + " " + 55 + " " + 30);
            Command.all.Find("place").Use(p, "fire " + 32 + " " + 55 + " " + 30);
            Command.all.Find("place").Use(p, "fire " + 31 + " " + 55 + " " + 30);
            Command.all.Find("place").Use(p, "fire " + 33 + " " + 55 + " " + 31);
            Command.all.Find("place").Use(p, "fire " + 32 + " " + 55 + " " + 31);
            Command.all.Find("place").Use(p, "fire " + 31 + " " + 55 + " " + 31);
            Command.all.Find("physics").Use(p, "0"):
            Player.GlobalMessage("%4The server has just been EMPED!");
            Thread.Sleep(2000)
            Player.GlobalMessage("%4The effects of the EMP will last for 3 minutes");
            Thread.Sleep(300000)
            Player.GlobalMessage("%4fPhysics are now available");
            Command.all.Find("physics").Use(p, "3");
            Command.all.Find("cmdset").Use(p, "physics Admin");
        }

        public override void Help(Player p)
        {
            Player.SendMessage(p, "%4/EMP: takes out the physics for 3 minutes.");
            Player.SendMessage(p, "%4If in a lava round the timer willl keep going.");
            Player.SendMessage(p, "%4 Command created by Apocalypse_Demon.");
        }
    }
}

What is wrong with this code? I keep getting errors when i try to compile it, I don't know what i'm doing wrong because i have made commands like this before and they work perfectly fine. If this command is to messed up then I will just remove it from the custom command pack that I will be releasing soon.
Custom Command Maker
Apocalypse_Demon
 
Posts: 65
Joined: 22 Jun 2012, 18:29

Re: Demon's Custom Commands

Postby dryfly21 » 24 Aug 2012, 22:34

here you go dude i looked at it and fixed it and turned out you forgot to include using System and some ;
now the next problem is when i try to use it it keeps saying that it isnt loaded i think the cause of this is because it's caps but i dont know :| .
Code: Select all
    using System;
    using System.Threading;
    using System.IO;

    namespace MCDzienny
    {
       public class CmdEMP : Command
       {
          public override string name { get { return "EMP"; } }
          public override string shortcut { get { return ""; } }
          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)
          {
            Command.all.Find("cmdset").Use(p, "physics nobody");
            Command.all.Find("physics").Use(p, "3");
            Command.all.Find("place").Use(p, "tnt " + 33 + " " + 54 + " " + 29);
            Command.all.Find("place").Use(p, "tnt " + 32 + " " + 54 + " " + 29);
            Command.all.Find("place").Use(p, "tnt " + 31 + " " + 54 + " " + 29);
            Command.all.Find("place").Use(p, "tnt " + 33 + " " + 54 + " " + 30);
            Command.all.Find("place").Use(p, "tnt " + 32 + " " + 54 + " " + 30);
            Command.all.Find("place").Use(p, "tnt " + 31 + " " + 54 + " " + 30);
            Command.all.Find("place").Use(p, "tnt " + 33 + " " + 54 + " " + 31);
            Command.all.Find("place").Use(p, "tnt " + 32 + " " + 54 + " " + 31);
            Command.all.Find("place").Use(p, "tnt " + 31 + " " + 54 + " " + 31);
            Command.all.Find("place").Use(p, "fire " + 33 + " " + 55 + " " + 29);
            Command.all.Find("place").Use(p, "fire " + 32 + " " + 55 + " " + 29);
            Command.all.Find("place").Use(p, "fire " + 31 + " " + 55 + " " + 29);
            Command.all.Find("place").Use(p, "fire " + 33 + " " + 55 + " " + 30);
            Command.all.Find("place").Use(p, "fire " + 32 + " " + 55 + " " + 30);
            Command.all.Find("place").Use(p, "fire " + 31 + " " + 55 + " " + 30);
            Command.all.Find("place").Use(p, "fire " + 33 + " " + 55 + " " + 31);
            Command.all.Find("place").Use(p, "fire " + 32 + " " + 55 + " " + 31);
            Command.all.Find("place").Use(p, "fire " + 31 + " " + 55 + " " + 31);
            Command.all.Find("physics").Use(p, "0");
            Player.GlobalMessage("%4The server has just been EMPED!");
            Thread.Sleep(2000);
            Player.GlobalMessage("%4The effects of the EMP will last for 3 minutes");
            Thread.Sleep(300000);
            Player.GlobalMessage("%4fPhysics are now available");
            Command.all.Find("physics").Use(p, "3");
            Command.all.Find("cmdset").Use(p, "physics Admin");
        }

        public override void Help(Player p)
        {
            Player.SendMessage(p, "%4/EMP: takes out the physics for 3 minutes.");
            Player.SendMessage(p, "%4If in a lava round the timer willl keep going.");
            Player.SendMessage(p, "%4 Command created by Apocalypse_Demon.");
        }
    }
}
dryfly21
 
Posts: 135
Joined: 07 Apr 2012, 03:27

Re: Demon's Custom Commands

Postby Apocalypse_Demon » 24 Aug 2012, 22:36

Oh okay, sorry I wasn't really paying attention when I was making this command it was about 1 in the morning.
Custom Command Maker
Apocalypse_Demon
 
Posts: 65
Joined: 22 Jun 2012, 18:29

Re: Demon's Custom Commands

Postby dryfly21 » 24 Aug 2012, 22:38

XP hey nothing to be a shamed of or be sorry about every one makes mistakes even the best of us :P
dryfly21
 
Posts: 135
Joined: 07 Apr 2012, 03:27

Re: Demon's Custom Commands

Postby dryfly21 » 24 Aug 2012, 22:46

ok so i tried the cmd with out caps and i am now able to /cmdload it and use it. so i'd suggest that you make it lower caps
dryfly21
 
Posts: 135
Joined: 07 Apr 2012, 03:27

Re: Demon's Custom Commands

Postby Apocalypse_Demon » 24 Aug 2012, 23:27

All of the errors on the command have been fixed and some things have been added, the command pack is being released.
Custom Command Maker
Apocalypse_Demon
 
Posts: 65
Joined: 22 Jun 2012, 18:29


Return to Help in Coding

Who is online

Users browsing this forum: No registered users and 8 guests

cron