Advertisement
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 fCraft;
- namespace FortuneCookie
- {
- public class Init : Plugin
- {
- public void Initialize()
- {
- Logger.Log(
- LogType.ConsoleOutput,
- Name + "(v " + Version + " Yay, registering /fortunecookie.");
- CommandManager.RegisterCustomCommand(new CommandDescriptor
- {
- Name = "FortuneCookie",
- Aliases = new[] { "FC", "Fortune" },
- Category = CommandCategory.Chat,
- Permissions = new Permission[] { Permission.Chat },
- IsConsoleSafe = true,
- Usage = "/FortuneCookie",
- Help = "Reads you your fortune",
- NotRepeatable = true,
- Handler = FCHandler,
- });
- }
- public string Name
- {
- get
- {
- return "FortuneCookie";
- }
- set
- {
- Name = value;
- }
- }
- public string Version
- {
- get
- {
- return "2.0";
- }
- set
- {
- Version = value;
- }
- }
- static void FCHandler(Player player, Command cmd)
- {
- player.Message("You ate the fortune cookie, here is your fortune!");
- string[] msgStrings = { "&3You will die in your life time.",
- "&3Early to bed, early to rise, makes a man healthy, wealthy, and tired.",
- "&3About time someone got me out of that stale cookie.",
- "&3Ignore previous fortune.",
- "&3You are not illiterate.",
- "&3Only listen to the fortune cookie. Disregard all other fortune telling units.",
- "&3This is not the fortune cookie you are looking for.",
- "&3That wasn't actually a cookie you just ate...",
- "&3Warning, do not break open or eat your fortune cookie.",
- "&3You may still be hungry. Order takeout now."};
- Random RandmsgString = new Random();
- player.Message(msgStrings[RandmsgString.Next(0, msgStrings.Length)]);
- string[] numStrings = { " &cLucky Numbers:&e 1,2,3,4,5",
- " &cLucky Numbers:&e 0,0,0,0,0",
- " &cLucky Numbers:&e .5,0,-1,10035,poop",
- " &cLucky Numbers:&e 1,2,1,2,1",
- " &cLucky Numbers:&e p,o,o,p,y",
- " &cLucky Numbers:&e 18,11,22,36,8",
- " &cLucky Numbers:&e 11,7,68,0,0",
- " &cLucky Numbers:&e 11,11,11,12,11",
- " &cLucky Numbers:&e M,II,XL,IV,V",
- " &cLucky Numbers:&e 3,2,1,2,1"};
- Random RandnumString = new Random();
- player.Message(numStrings[RandnumString.Next(0, numStrings.Length)]);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement