/nighttime and /daytime |#CPE|

/nighttime and /daytime |#CPE|

Postby Leeizazombie » 01 Mar 2014, 19:27

For ClassiCube users, you can use these commands to set a night time feeling on all CPE clients, then revert back to normal day time! Hope you like it! :) (Refreshes after a map re-loads, might work on a real time sky changer like premium survival)

Night Time:

Code: Select all
using System;
using System.IO;

namespace MCDzienny
{
    public class CmdNightTime : Command
    {
        public override string name { get { return "nighttime"; } }
        public override string shortcut { get { return "night"; } }
        public override string type { get { return "information"; } }
        public override bool museumUsable { get { return true; } }
        public override LevelPermission defaultRank { get { return LevelPermission.Admin; } }

        public override void Use(Player p, string message)
        {
            Player.players.ForEachSync(pl =>
            {
                if (pl.Cpe.EnvColors == 1)
                {
                    Cpe.V1.EnvSetColor(pl, 0, 20, 20, 20);
                    Cpe.V1.EnvSetColor(pl, 1, 107, 19, 196);
                    Cpe.V1.EnvSetColor(pl, 2, 53, 33, 74);
                    Cpe.V1.EnvSetColor(pl, 3, 75, 75, 75);
                    Cpe.V1.EnvSetColor(pl, 4, 100, 100, 100);
                }
            });
        }

        public override void Help(Player p)
        {
            Player.SendMessage(p, "Night Time");
        }
    }
}


Day Time:

Code: Select all
using System;
using System.IO;

namespace MCDzienny
{
    public class CmdDayTime : Command
    {
        public override string name { get { return "daytime"; } }
        public override string shortcut { get { return "day"; } }
        public override string type { get { return "information"; } }
        public override bool museumUsable { get { return true; } }
        public override LevelPermission defaultRank { get { return LevelPermission.Admin; } }

        public override void Use(Player p, string message)
        {
            Player.players.ForEachSync(pl =>
            {
                if (pl.Cpe.EnvColors == 1)
                {
                    Cpe.V1.EnvSetColor(pl, 0, 135, 206, 235);
                    Cpe.V1.EnvSetColor(pl, 1, 255, 255, 255);
                    Cpe.V1.EnvSetColor(pl, 2, 245, 245, 245);
                    Cpe.V1.EnvSetColor(pl, 3, 169, 169, 169);
                    Cpe.V1.EnvSetColor(pl, 4, 255, 255, 255);
                }
            });
        }

        public override void Help(Player p)
        {
            Player.SendMessage(p, "Day Time");
        }
    }
}
Owner of:
LeeIzaZombie Freebuild and Lava Survival V2 (Shut Down and updated)
LeeIzaZombie Survival (Comming back soon)

Contact:
Skype: leeizazombie
IRC: irc.geekshed.net, #leeizazombie, #mcclassichosting
User avatar
Leeizazombie
 
Posts: 536
Joined: 10 Jun 2013, 17:45
Location: Ireland.

Re: /nighttime and /daytime |#CPE|

Postby Messoras » 20 May 2014, 12:45

It wont compile... :(
Witzigfahren 3.0.9 (ger): http://witzigfahren.jimdo.com/
User avatar
Messoras
 
Posts: 6
Joined: 05 Apr 2014, 22:47

Re: /nighttime and /daytime |#CPE|

Postby dzienny » 20 May 2014, 16:09

Messoras wrote:It wont compile... :(

There was a bug in MCDzienny. It should be fixed in the newest version.
User avatar
dzienny
Administrator
 
Posts: 1181
Joined: 23 Jan 2011, 14:27

Re: /nighttime and /daytime |#CPE|

Postby HelloWorldCool » 28 May 2014, 14:44

Hold on...there's a moon in a classic?

I think there might be a sun but a moon? I never knew that.
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: /nighttime and /daytime |#CPE|

Postby HETAL » 29 May 2014, 14:57

There is no moon or sun, it sends EnvSetColor packets introduced in ClassiCube's protocol (CPE) to change the player's screen's color.
YOU HAVENT SEEN THE LAST OF ME ISMELLIKE
HETAL
 
Posts: 397
Joined: 24 May 2013, 12:10


Return to Custom Commands

Who is online

Users browsing this forum: No registered users and 2 guests

cron