Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using PlayerIOClient;
- namespace EEHexClock
- {
- class Program
- {
- public static class p
- {
- public static string pass { get; set; }
- }
- static Connection con;
- static Client client;
- static void Main(string[] args)
- {
- ConsoleKeyInfo key;
- Console.Title = "EE Hex Clock";
- Console.WriteLine("\nThis bot will connect to your level and change bgcolor constantly based on your system time.\n");
- Console.Write("\nEmail: ");
- string email = Console.ReadLine();
- Console.Write("Password: ");
- do
- {
- key = Console.ReadKey(true);
- // Backspace Should Not Work
- if (key.Key != ConsoleKey.Backspace && key.Key != ConsoleKey.Enter)
- {
- p.pass += key.KeyChar;
- Console.Write("*");
- }
- else
- {
- if (key.Key == ConsoleKey.Backspace && p.pass.Length > 0)
- {
- p.pass = p.pass.Substring(0, (p.pass.Length - 1));
- Console.Write("\b \b");
- }
- }
- }
- // Stops Receving Keys Once Enter is Pressed
- while (key.Key != ConsoleKey.Enter);
- Console.Write("\nWorld ID: ");
- string worldid = Console.ReadLine();
- Console.WriteLine("");
- client = PlayerIO.QuickConnect.SimpleConnect("everybody-edits-su9rn58o40itdbnw69plyw", email, p.pass, null);
- con = client.Multiplayer.CreateJoinRoom(worldid, "public", true, new Dictionary<string, string>(), new Dictionary<string, string>());
- con.Send("init");
- p.pass = "";
- email = "";
- while (true)
- {
- int prep = DateTime.Now.Millisecond;
- // Console.WriteLine(prep);
- if (prep == 500) { break; }
- }
- Console.Clear();
- while (true)
- {
- System.Threading.Thread.Sleep(1000);
- int tHours = DateTime.Now.Hour;
- int tMinutes = DateTime.Now.Minute;
- int tSeconds = DateTime.Now.Second;
- string sHours = tHours.ToString();
- string sMinutes = tMinutes.ToString();
- string sSeconds = tSeconds.ToString();
- if (sHours.Length == 1) { sHours = 0 + sHours; }; // if hour has 1 digit, add 0 at the beginning, for example,
- if (sMinutes.Length == 1) { sMinutes = 0 + sMinutes; }; // if hour is "2" then it will replace with "02"
- if (sSeconds.Length == 1) { sSeconds = 0 + sSeconds; }; // if hour is "22" then it will do nothing.
- con.Send("say","/bgcolor #" + sHours + sMinutes + sSeconds);
- Console.Write("/bgcolor #" + sHours + sMinutes + sSeconds + " ");
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment