using System.Threading; using System; namespace MCDzienny #region Settings { public class CmdLeeBot : Command { public override string name { get { return "lb"; } } public override string shortcut { get { return ""; } } public override string type { get { return "mod"; } } public override bool museumUsable { get { return true; } } public override LevelPermission defaultRank { get { return LevelPermission.Operator; } } public override void Use(Player p, string message) { if (message == "spawn") { Command.all.Find("botadd").Use(p, "LeeBot"); } else { Player.GlobalMessage(" %f[%bLeeBot%f]: " + message); } } #endregion #region Joined server public override void Init() { Player.Joined += (object sender, PlayerEventArgs e) => { if (e.Player.name == "Leebyrne115@gmail.com") { Player.GlobalMessage("%f[%bLeeBot%f]: Haiii Boss :D Enjoy your stay bruh!!!"); e.Player.PublicName = "%aLee%fIza%6Zombie%f"; if (e.Player.IsUsingWom) { Player.GlobalMessage("%f[%bLeeBot%f]: %b" + e.Player.PublicName + "%f has joined with WoM Client!"); } e.Player.realName.Equals("test"); } else if (e.Player.name == "mah46124") { Player.GlobalMessage("%f[%bLeeBot%f]: Heeyy mah!!! Welcome back!! :D"); } else { Player.GlobalMessage("%f[%bLeeBot%f]: Welcome to $server %e" + e.Player.PublicName + "! :D"); if (e.Player.IsUsingWom) { Player.GlobalMessage("%f[%bLeeBot%f]: %b" + e.Player.PublicName + "%f has joined with WoM Client!"); } } }; Player.PlayerChatEvent += FilterChat; } #endregion #region greetings private void FilterChat(Player p, ref string message, ref bool stopIt) { string botCmd = message; if (botCmd.ToLower().Contains("leebot") && botCmd.ToLower().Contains("hello")) { Player.GlobalMessage(p.color + p.PublicName + "%f: " + message); Player.GlobalMessage(" %bLeeBot%f is typing... "); Thread.Sleep(2000); message = null; Player.GlobalMessage("%f[%bLeeBot%f]: Hello there, " + p.color + p.PublicName + "%f!"); } if (botCmd.ToLower().Contains("leebot") && botCmd.ToLower().Contains("hey")) { Player.GlobalMessage(p.color + p.PublicName + "%f: " + message); Player.GlobalMessage(" %bLeeBot%f is typing... "); Thread.Sleep(2000); message = null; Player.GlobalMessage("%f[%bLeeBot%f]: Hello there, " + p.color + p.PublicName + "%f!"); } if (botCmd.ToLower().Contains("leebot") && botCmd.ToLower().Contains("hi")) { Player.GlobalMessage(p.color + p.name + "%f: " + message); Player.GlobalMessage(" %bLeeBot%f is typing... "); Thread.Sleep(2000); message = null; Player.GlobalMessage("%f[%bLeeBot%f]: Hello there, " + p.color + p.PublicName + "%f!"); } if (botCmd.ToLower().Equals("leebot")) { Player.GlobalMessage(p.color + p.PublicName + "%f: " + message); Player.GlobalMessage(" %bLeeBot%f is typing... "); Thread.Sleep(2000); message = null; Player.GlobalMessage("%f[%bLeeBot%f]: What do you need?"); } #endregion #region I'm back if (botCmd.ToLower().Contains("back") && botCmd.ToLower().Contains("i")) { Player.GlobalMessage(p.color + p.PublicName + "%f: " + message); Player.GlobalMessage(" %bLeeBot%f is typing... "); Thread.Sleep(2000); message = null; Player.GlobalMessage("%f[%bLeeBot%f]: Welcome back, " + p.color + p.PublicName + "%f!"); } #endregion #region Die LeeBot if (botCmd.ToLower().Contains("leebot") && botCmd.ToLower().Contains("die")) { Player.GlobalMessage(p.color + p.PublicName + "%f: " + message); Player.GlobalMessage(" %bLeeBot%f is fuzzing... "); Thread.Sleep(2000); message = null; Player.GlobalMessage("%f%bLeeBot%f has died."); try { Command.all.Find("botremove").Use(p, "LeeBot"); } catch { } Thread.Sleep(3000); Player.GlobalMessage("*Strange noises appear."); Thread.Sleep(1000); Player.GlobalMessage("%f[%bLeeBot%f]: You cannot kill me!!"); } #endregion #region Where's Lee? if (botCmd.ToLower().Contains("lee") && botCmd.ToLower().Contains("where") && botCmd.ToLower().Contains("?")) { Player.GlobalMessage(p.color + p.PublicName + "%f: " + message); Player.GlobalMessage(" %bLeeBot%f is typing... "); Thread.Sleep(2000); message = null; Player.GlobalMessage("%f[%bLeeBot%f]: LeeIzaZombie the owner seems to be busy!"); } #endregion #region How are you? if (botCmd.ToLower().Contains("how") && botCmd.ToLower().Contains("are") && botCmd.ToLower().Contains("you") && botCmd.ToLower().Contains("leebot")) { Player.GlobalMessage(p.color + p.PublicName + "%f: " + message); Player.GlobalMessage(" %bLeeBot%f is typing... "); Thread.Sleep(2000); message = null; Player.GlobalMessage("%f[%bLeeBot%f]: I'm fine! :D thanks for asking! and you?"); } #endregion #region What's the website? if (botCmd.ToLower().Contains("what") && botCmd.ToLower().Contains("the") && botCmd.ToLower().Contains("website")) { Player.GlobalMessage(p.color + p.PublicName + "%f: " + message); Player.GlobalMessage(" %bLeeBot%f is typing... "); Thread.Sleep(2000); message = null; Player.GlobalMessage("%f[%bLeeBot%f]: The website for the server is www.leeizazombie.cba.pl"); } #endregion #region What's time is it? if (botCmd.ToLower().Contains("what") && botCmd.ToLower().Contains("time") && botCmd.ToLower().Contains("is") && botCmd.ToLower().Contains("it")) { Player.GlobalMessage(p.color + p.PublicName + "%f: " + message); Player.GlobalMessage(" %bLeeBot%f is typing... "); Thread.Sleep(500); message = null; Player.GlobalMessage("%f[%bLeeBot%f]: The time is: %a$time"); } #endregion #region Others if (botCmd.Equals("snail")) { message = "(half)x@"; } if (botCmd.Equals("duck")) { message = "(female)_-"; } if (botCmd.Equals("sc")) { message = "o.o"; } if (botCmd.Equals("banana08")) { message = null; } } #endregion public override void Help(Player p) { Player.SendMessage(p, "LeeBot Version 1.4"); } } }