/unflood - unfloods a level

/unflood - unfloods a level

Postby jkl139 » 26 Jun 2011, 18:40

Here u go: That's what it does:

1. Puts physics to 0
2. Turns instant building ON
3. Replaces All of [liquid]
4. Reveals all
5. Instant building OFF
6. Physics back to 1
7. Says "Unflooded!"

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

       Use this as a basis for custom commands implemented via the MCLawl 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, MCLawl is designed for .NET 3.5.
    using System;

    namespace MCLawl
    {
       public class CmdUnflood : Command
       {
          // The command's name, in all lowercase.  What you'll be putting behind the slash when using it.
          public override string name { get { return "unflood"; } }

          // Command's shortcut (please take care not to use an existing one, or you may have issues.
          public override string shortcut { get { return ""; } }

          // Determines which submenu the command displays in under /help.
          public override string type { get { return "other"; } }

          // Determines whether or not this command can be used in a museum.  Block/map altering commands should be made false to avoid errors.
          public override bool museumUsable { get { return false; } }

          // Determines the command's default rank.  Valid values are:
          // LevelPermission.Nobody, LevelPermission.Banned, LevelPermission.Guest
          // LevelPermission.Builder, LevelPermission.AdvBuilder, LevelPermission.Operator, LevelPermission.Admin
          public override LevelPermission defaultRank { get { return LevelPermission.Operator; } }

          // This is where the magic happens, naturally.
          // p is the player object for the player executing the command.  message is everything after the command invocation itself.
          public override void Use(Player p, string message)
          {
                Command.all.Find("physics").Use(p, "0");
                Command.all.Find("map").Use(p, "instant");
                Command.all.Find("replaceall").Use(p, message+" air");
                Command.all.Find("reveal").Use(p, "all");
                Command.all.Find("map").Use(p, "instant");
                Command.all.Find("physics").Use(p, "1");
                Player.GlobalMessage("Unflooded!");
          }

          // This one controls what happens when you use /help [commandname].
          public override void Help(Player p)
          {
             Player.SendMessage(p, "/unflood [liquid] - Unfloods the map you are on of [liquid]");
          }
       }
    }


Have fun! :D
Image
Image
User avatar
jkl139
 
Posts: 444
Joined: 13 Jun 2011, 11:46
Location: MCDzienny Forum

Re: /unflood, unfloods a level

Postby jkl139 » 26 Jun 2011, 18:54

U can just edit the first minute, cant you? lmao. Okay then ill post:

Type /unflood [block], it will unflood (delete) all these [blocks] :P
Image
Image
User avatar
jkl139
 
Posts: 444
Joined: 13 Jun 2011, 11:46
Location: MCDzienny Forum


Return to Custom Commands

Who is online

Users browsing this forum: No registered users and 5 guests

cron