Skip to content

Instantly share code, notes, and snippets.

@MrBluePotato
Last active January 4, 2016 20:49
Show Gist options
  • Save MrBluePotato/8676169 to your computer and use it in GitHub Desktop.
Save MrBluePotato/8676169 to your computer and use it in GitHub Desktop.
static readonly CommandDescriptor CdJoke = new CommandDescriptor
{
Name = "Joke",
//Permissions = new Permission[] { Permission.Games},
Aliases = new[] { "Jk" },
Category = CommandCategory.Fun,
IsConsoleSafe = true,
Usage = "/Joke",
Help = "Displays a random joke to the server",
Handler = JokeHandler
};
static void JokeHandler(Player player, Command cmd)
{
List<String> Jokes;
Jokes = new List<String>()
{
"Ssshhh! There's kids here! *Motions to " + player,
"Dyslexic man walks into a bra.",
"&eCheese&s.... Wait..... that's not a joke.",
"Dirty Joke -> Pig fell in the mud",
"I dropped a bomb and " + player + " thought they farted.",
"Congress.SYS is corrupted. Reboot? [Y/N]",
"There are 3 types of people in the world: those who can count and those who can't",
"I've got nothing.",
"Evening News is where they Start Off by Saying ''Good Evening'' and then proceeding to tell why it isn't",
"Police arrested two kids yesterday, one was drinking battery acid, the other was eating fireworks. They charged one - and let the other one off.",
"My mother-in-law fell down a wishing well, I was amazed, I never knew they worked.",
"There's two fish in a tank, and one says ''How do you drive this thing?''",
"I went to buy some camouflage trousers the other day but I couldn't find any.",
"Energizer bunny was arrested, charged with battery",
"Slept like a log last night........ Woke up in the fireplace. ",
"The other day I sent my girlfriend a huge pile of snow. I rang her up, I said ''Did you get my drift?''",
"I was in Tesco's and I saw this man and woman wrapped in a barcode. I said, ''Are you two an item?''",
" Four fonts walk into a bar the barman says ''Oi - get out! We don't want your type in here''"
};
//Sets up randomization
Random rnd = new Random();
//Randomly assigns which joke to use
string myJoke =Jokes[rnd.Next(0, Jokes.Count)];
//Change .warning to whatever that thing shows
Logger.Log(LogType.Warning, myJoke);
Server.Message(myJoke);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment