From 0a9218e17d2f4984094ef00d6c6df3650146c9e1 Mon Sep 17 00:00:00 2001 From: ComputeLinux Date: Mon, 25 Apr 2016 13:00:36 -0700 Subject: [PATCH] Cleanly recommit 8ball changes. --- Commands/Fun/Cmd8Ball.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Commands/Fun/Cmd8Ball.cs b/Commands/Fun/Cmd8Ball.cs index 3f17627fa..c95c8d06a 100644 --- a/Commands/Fun/Cmd8Ball.cs +++ b/Commands/Fun/Cmd8Ball.cs @@ -26,12 +26,14 @@ namespace MCGalaxy.Commands { public override string type { get { return CommandTypes.Other; } } public override bool museumUsable { get { return true; } } public override LevelPermission defaultRank { get { return LevelPermission.Banned; } } - + public Cmd8Ball() { } public override void Use(Player p, string message) { if (String.IsNullOrEmpty(message)) { Help(p); return; } + if (p.joker || p.muted) { Player.SendMessage(p, "Cannot use 8ball while muted or jokered."); return; } Random random = new Random(); - string[] messages = { "Not likely." , "Very likely." , "Impossible!" , "Probably." , "Ask again later." , "No." , "Maybe" }; - Player.SendMessage(p, messages[random.Next(messages.Length)]); + string[] messages = { "Not likely." , "Very likely." , "Impossible!" , "Probably." , "Ask again later." , "No." , "Maybe." }; + Chat.GlobalChatLevel(p, p.color + "*" + Colors.StripColours(p.DisplayName) + p.color + " asked the question " + message + " ", false); + Chat.GlobalChatLevel(p, p.color + "*" + p.color + "The answer was " + messages[random.Next(messages.Length)], false); } public override void Help(Player p) {