private static void OnSkillTitles(Commands.CommandEventArgs e) { Mobile m = e.Mobile; if (m is PlayerMobile) { m.SendGump(new SkillTitlesGump((PlayerMobile)m, (int)SkillTitlesGump.Page.Titles)); } }
public static void Initialize() { Commands.Register("Path", AccessLevel.GameMaster, new CommandEventHandler(Path_OnCommand)); }
public static void Initialize() { PacketHandlers.Register(0xD9, 0x10C, false, new OnPacketReceive(OnReceive)); Commands.Register("HWInfo", AccessLevel.GameMaster, new CommandEventHandler(HWInfo_OnCommand)); }
private static void Main(string[] args) { _cmds = new Commands(); if (args.Length > 0) checkArgs(args); _remoteEndPoint = new IPEndPoint(IPAddress.Parse(_IP), _port); Thread sendThread = new Thread(SendMessage); sendThread.IsBackground = true; sendThread.Start(); _client = new UdpClient(); string inputStr = ""; EInput input; bool foundCmd = false; string[] cmd; Initialize(); while (!finished) { Console.Write("SOnU>"); inputStr = Console.ReadLine(); input = checkInput(inputStr); if (input == EInput.FINISHED) finished = true; else if (input == EInput.STOP) _messages = null; //message will not be sent if null else if (input == EInput.HELP) showHelp(); else if (input == EInput.SEND) { cmd = getCommand(inputStr); foundCmd = checkIfCommandsExist(cmd); if (foundCmd) { messagesLocked = true; getMessagesFromTable(cmd); //changes _messages messagesLocked = false; showSendingMessages(cmd); } else showCmdNotFound(cmd); } else { Console.WriteLine("Invalid command line!\n"); } } sendThread.Abort(); }