public void FilterCore_CommandLineText(object sender, ChatParserInterceptEventArgs e) { if (e.Text.StartsWith("/mf lcmq add ")) { var command = e.Text.Substring(13, e.Text.Length - 13); loginMessageQueue.Enqueue(command); Debug.WriteToChat("Login Complete Message Queue added: " + command); e.Eat = true; } else if (e.Text.StartsWith("/mf lmq add ")) // Backwards Compatability { var command = e.Text.Substring(12, e.Text.Length - 12); loginMessageQueue.Enqueue(command); Debug.WriteToChat("Login Complete Message Queue added: " + command); e.Eat = true; } else if (e.Text == "/mf lcmq clear" || e.Text == "/mf lmq clear") { loginMessageQueue.Clear(); Debug.WriteToChat("Login Complete Message Queue cleared"); e.Eat = true; } }
public void FilterCore_CommandLineText(object sender, ChatParserInterceptEventArgs e) { if (e.Text.StartsWith("/mf olcmq add ")) { onLoginCompleteMessageQueue.Enqueue(e.Text.Substring(14, e.Text.Length - 14)); Debug.WriteToChat("On Login Complete Message Queue added: " + e.Text); } else if (e.Text == "/mf olcmq clear") { onLoginCompleteMessageQueue.Clear(); Debug.WriteToChat("On Login Complete Message Queue cleared"); } // HACK These two following conditionals are hacks // TODO Fix else if (e.Text.StartsWith("/mf olcwait set ")) { olcmq_timer.Interval = int.Parse(e.Text.Substring(16, e.Text.Length - 16)); Debug.WriteToChat("Wait time set: " + e.Text); } else if (e.Text == "/mf olcwait clear") { olcmq_timer.Interval = DEF_OLCWAIT; Debug.WriteToChat("Wait time reset"); } }
public void FilterCore_CommandLineText(object sender, ChatParserInterceptEventArgs e) { if (e.Text.StartsWith("/mf cssmfps ")) { var value = uint.Parse(e.Text.Substring(12, e.Text.Length - 12)); if (value > 0 && value < 10) { Debug.WriteToChat("Character Selection Screen Maximum FPS cannot be less than 10. Set to zero to disable."); } else { SettingsManager.FrameRateLimiters.CharacterSelectionScreen.Value = value; Debug.WriteToChat("Character Selection Screen Maximum FPS set: " + value); } e.Eat = true; } else if (e.Text.StartsWith("/mf iwmfps ")) { var value = uint.Parse(e.Text.Substring(11, e.Text.Length - 11)); if (value > 0 && value < 20) { Debug.WriteToChat("In-World Maximum FPS cannot be less than 20. Set to zero to disable."); } else { SettingsManager.FrameRateLimiters.InWorld.Value = value; Debug.WriteToChat("In-World Maximum FPS set: " + value); } e.Eat = true; } }
public void FilterCore_CommandLineText(object sender, ChatParserInterceptEventArgs e) { bool writeChanges = true; bool global = false; string cmdtext = e.Text; if (cmdtext.Contains("/tfglobal")) { cmdtext = cmdtext.Replace(" /tfglobal", " /tf"); cmdtext = cmdtext.Replace("/tfglobal ", "/tf "); cmdtext = cmdtext.Replace("/tfglobal", "/tf"); global = true; } if (cmdtext.StartsWith("/tf log ")) { string logmsg = TextRemainder(cmdtext, "/tf log "); log.WriteInfo(logmsg); e.Eat = true; } if (e.Eat && writeChanges) { var persister = new LoginCommandPersister(GameRepo.Game.Account, GameRepo.Game.Server, GameRepo.Game.Character); persister.WriteQueue(_loginCmds, global); } }
private void PortaledLoader_CommandLineText(object sender, ChatParserInterceptEventArgs e) { if (e.Text.StartsWith(prefix) && e.Text.Length > prefix.Length) { e.Eat = true; ProcessCmd(e.Text.Substring(prefix.Length)); } }
/// <summary> /// This parses command line arguments sent from the chat box. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> public void Command(object sender, ChatParserInterceptEventArgs e) { string command = e.Text.ToLower(); if (command.StartsWith("/acm")) { Match match = new Regex("(?<option>(help|status|start|stop))$").Match(command); if (match.Success) { string option = match.Groups["option"].Value; string value = match.Groups["value"].Value; if (option.Equals("start")) { if (!Machine.Enabled) { Machine.Enabled = true; Debug.ToChat("Starting machine..."); } else { Debug.ToChat("Machine is already running."); } } else if (option.Equals("stop")) { if (Machine.Enabled) { Machine.Enabled = false; Debug.ToChat("Stopping machine..."); } else { Debug.ToChat("Machine is already stopped."); } } else if (option.Equals("help")) { Debug.ToChat("Available commands:"); Debug.ToChat("/acm help --- Presents this menu."); Debug.ToChat("/acm ( start | stop ) --- Starts or stops the bot."); Debug.ToChat("/acm status --- Display basic state and statistics of the bot."); Debug.ToChat("For the latest builds, please visit https://github.com/patri0t86/ACManager/releases."); } else if (option.Equals("status")) { TimeSpan duration = DateTime.Now - Machine.MachineStarted; Debug.ToChat($"Machine (v{Machine.Utility.Version}) is currently {(Machine.Enabled ? "running" : "not running")}. It is in the {Machine.CurrentState} state."); if (Machine.Enabled) { Debug.ToChat($"It has been online for {duration.Days} days, {duration.Hours} hours, {duration.Minutes} minutes, and {duration.Seconds} seconds."); Debug.ToChat($"{Machine.PortalsSummonedThisSession} portals have been requested."); } } } e.Eat = true; } }
private void Core_CommandLineText(object sender, ChatParserInterceptEventArgs e) { string Text = e.Text.ToLower().TrimEnd(); if (Text.Length >= 5 && // if the length is at least 5, then check for either /dt or //dt (Text.Substring(0, 3).Equals("/dt") || Text.Substring(0, 4).Equals("//dt"))) { ChatCommandEntry.ProcessCommand(Text); } }
void FilterCore_CommandLineText(object sender, ChatParserInterceptEventArgs e) { try { loginMessageQueueManager.FilterCore_CommandLineText(sender, e); onLoginCompleteMessageQueueManager.FilterCore_CommandLineText(sender, e); defaultFirstCharacterManager.FilterCore_CommandLineText(sender, e); loginNextCharacterManager.FilterCore_CommandLineText(sender, e); } catch (Exception ex) { Debug.LogException(ex); } }
public void FilterCore_CommandLineText(object sender, ChatParserInterceptEventArgs e) { if (e.Text.StartsWith("/mf lmq add ")) { loginMessageQueue.Enqueue(e.Text.Substring(12, e.Text.Length - 12)); Debug.WriteToChat("Login Message Queue added: " + e.Text); } else if (e.Text == "/mf lmq clear") { loginMessageQueue.Clear(); Debug.WriteToChat("Login Message Queue cleared"); } }
private static void a(object A_0, ChatParserInterceptEventArgs A_1) { try { if (!string.IsNullOrEmpty(A_1.get_Text())) { string[] sourceArray = A_1.get_Text().Split(new char[] { ' ' }); if (g.ContainsKey(sourceArray[0])) { string[] strArray2; A_1.set_Eat(true); MyTriple <a.a, int, string> triple = g[sourceArray[0]]; if (triple.b == 0) { strArray2 = new string[0]; } else { if (triple.b > (sourceArray.Length - 1)) { b("Usage: " + triple.c); return; } strArray2 = new string[triple.b]; Array.Copy(sourceArray, 1, strArray2, 0, strArray2.Length - 1); StringBuilder builder = new StringBuilder(); for (int i = strArray2.Length; i < sourceArray.Length; i++) { builder.Append(sourceArray[i]); if (i < (sourceArray.Length - 1)) { builder.Append(" "); } } strArray2[strArray2.Length - 1] = builder.ToString(); } if (!triple.a(sourceArray[0], strArray2)) { b("Usage: " + triple.c); } } } } catch (Exception exception) { if (d != null) { d(exception); } } }
public void FilterCore_CommandLineText(object sender, ChatParserInterceptEventArgs e) { if (e.Text.StartsWith("/mf alcmq add ")) { var command = e.Text.Substring(14, e.Text.Length - 14); loginCompleteMessageQueue.Enqueue(command); Debug.WriteToChat("After Login Complete Message Queue added: " + command); e.Eat = true; } else if (e.Text.StartsWith("/mf olcmq add ")) // Backwards Compatability { var command = e.Text.Substring(14, e.Text.Length - 14); loginCompleteMessageQueue.Enqueue(command); Debug.WriteToChat("After Login Complete Message Queue added: " + command); e.Eat = true; } else if (e.Text == "/mf alcmq clear" || e.Text == "/mf olcmq clear") { loginCompleteMessageQueue.Clear(); Debug.WriteToChat("After Login Complete Message Queue cleared"); e.Eat = true; } else if (e.Text.StartsWith("/mf alcmq wait set ")) { var value = int.Parse(e.Text.Substring(19, e.Text.Length - 19)); millisecondsToWaitAfterLoginComplete = value; Debug.WriteToChat("After Login Complete Message Queue Wait time set: " + value + "ms"); e.Eat = true; } else if (e.Text.StartsWith("/mf olcwait set ")) // Backwards Compatability { var value = int.Parse(e.Text.Substring(16, e.Text.Length - 16)); millisecondsToWaitAfterLoginComplete = value; Debug.WriteToChat("After Login Complete Message Queue Wait time set: " + value + "ms"); e.Eat = true; } else if (e.Text == "/mf alcmq wait clear" || e.Text == "/mf olcwait clear") { millisecondsToWaitAfterLoginComplete = DefaultMillisecondsToWaitAfterLoginComplete; Debug.WriteToChat("After Login Complete Wait time reset to 3000ms"); e.Eat = true; } }
public void FilterCore_CommandLineText(object sender, ChatParserInterceptEventArgs e) { string lower = e.Text.ToLower(); if (lower.StartsWith("/mf lnc set ")) { nextCharacter = lower.Substring(12, lower.Length - 12); Debug.WriteToChat("Login Next Character set to: " + nextCharacter); } else if (lower == "/mf lnc clear") { nextCharacter = null; Debug.WriteToChat("Login Next Character cleared"); } }
public void FilterCore_CommandLineText(object sender, ChatParserInterceptEventArgs e) { string lower = e.Text.ToLower(); if (lower.StartsWith("/mf dlc set")) { Settings.SettingsManager.CharacterSelectionScreen.SetDefaultFirstCharacter(new DefaultFirstCharacter(server, zonename, CoreManager.Current.CharacterFilter.Name)); Debug.WriteToChat("Default Login Character set to: " + CoreManager.Current.CharacterFilter.Name); } else if (lower == "/mf dlc clear") { Settings.SettingsManager.CharacterSelectionScreen.DeleteDefaultFirstCharacter(server, zonename); Debug.WriteToChat("Default Login Character cleared"); } }
private void Current_CommandLineText(object sender, ChatParserInterceptEventArgs e) { REPlugin.Instance.InvokeOperationSafely(() => { KeyValuePair<string, string> keyValue; if (VTUtilities.TryParseOptionOutput(e.Text, out keyValue)) { e.Eat = true; this.CapturedSettings.Add(keyValue.Key, keyValue.Value); REPlugin.Instance.Debug.WriteLine("Captured VT Option : {0} = {1}", keyValue.Key, keyValue.Value); } }); }
private void Core_CommandLineText(object sender, ChatParserInterceptEventArgs e) { try { const string cmd = "/spellbarsaver setinterval"; if (e.Text.StartsWith(cmd)) { string numStr = e.Text.Substring(cmd.Length).Trim(); int num = int.Parse(numStr); mSpellbarChangeTimer.Interval = num; Util.Message("Interval set to " + num + "ms."); } } catch (Exception ex) { Util.HandleException(ex); } }
private void OutboundChat(object sender, ChatParserInterceptEventArgs e) { string cmd = e.Text; if (cmd.StartsWith("@") || cmd.StartsWith("/")) { cmd = cmd.Substring(1); if (cmd.ToLower().StartsWith("whallowretrieve")) { e.Eat = true; cmd = cmd.Substring(15); bool?allow = ParseBool(cmd); if (!allow.HasValue) { Log("warehouse setting value unknown, example: @whallowretrieve yes"); return; } AllowRetrieve = allow.Value; Log(DBGetSetting("allowretrieve").ToString()); } else if (cmd.ToLower().StartsWith("whplayerdetectionjump")) { e.Eat = true; cmd = cmd.Substring(21); bool?jump = ParseBool(cmd); if (!jump.HasValue) { Log("warehouse setting value unknown, example: @whplayerdetectionjump yes"); return; } PlayerDetectionJump = jump.Value; Log(DBGetSetting("playerdetectionjump").ToString()); } else if (cmd.ToLower().StartsWith("whallowjumpcmd")) { e.Eat = true; cmd = cmd.Substring(14); bool?jump = ParseBool(cmd); if (!jump.HasValue) { Log("warehouse setting value unknown, example: @whallowjumpcmd yes"); return; } AllowJumpCommand = jump.Value; Log(DBGetSetting("allowjumpcmd").ToString()); } } }
private void Core_CommandLineText(object sender, ChatParserInterceptEventArgs e) { try { //Just the trigger dumps the list of commands var match = commandParser.Match(e.Text); //Seems like there's a weird time-sensistize need to set e.Eat if (match.Success) { //Util.WriteToChat("Successful match"); //for (var i = 0; i < match.Groups.Count; i++) // Util.WriteToChat($"Group {i}: {match.Groups[i].Success}\t{match.Groups[i].Value}"); //Don't propagate if command was matched e.Eat = true; //Just the trigger if (!match.Groups[1].Success) { //Util.WriteToChat("Trigger hit: " + CommandTrigger); ProcessCommand(Command.Help); return; } var command = (Command)Enum.Parse(typeof(Command), match.Groups[1].Value, true); //There aren't parameters but a command if (!match.Groups[2].Success) { //Util.WriteToChat("Command: " + match.Groups[1].Value); ProcessCommand(command); return; } //There are parameters else { //Util.WriteToChat("Command: " + match.Groups[1].Value + "\t" + command); //Util.WriteToChat("Params: " + match.Groups[2].Value); ProcessCommand(command, match.Groups[2].Value); } } } catch (Exception ex) { Util.LogError(ex); Util.WriteToChat("Error parsing command"); } }
public void FilterCore_CommandLineText(object sender, ChatParserInterceptEventArgs e) { string lower = e.Text.ToLower(); if (lower.StartsWith("/mf lnc set ")) { nextCharacter = lower.Substring(12, lower.Length - 12); nextCharByInt = -1; Debug.WriteToChat("Login Next Character set to: " + nextCharacter); e.Eat = true; } else if (lower.StartsWith("/mf lncbi set ")) { nextCharacter = null; nextCharByInt = int.Parse(lower.Substring(14, lower.Length - 14)); if (nextCharByInt > 10) { nextCharByInt = -1; Debug.WriteToChat("Login Next Character failed with input too large: " + nextCharByInt); } else if (nextCharByInt < 0) { nextCharByInt = -1; Debug.WriteToChat("Login Next Character failed with input too small: " + nextCharByInt); } else { Debug.WriteToChat("Login Next Character set to index: " + nextCharByInt); } e.Eat = true; } else if (lower == "/mf lnc clear" || lower == "/mf lncbi clear") { nextCharacter = null; nextCharByInt = -1; Debug.WriteToChat("Login Next Character cleared"); e.Eat = true; } }
public void FilterCore_CommandLineText(object sender, ChatParserInterceptEventArgs e) { foreach (CommandEntry cmdEntry in cmdHandlers) { // Only look at commands with handlers (others are just for help display) if (cmdEntry.CommandHandler != null) { string prefix = "/tf " + cmdEntry.Command; string commandString; if (IsCommandPrefix(e.Text, prefix, out commandString)) { cmdEntry.CommandHandler(commandString); e.Eat = true; break; } } } }
void Core_CommandLineText(object sender, ChatParserInterceptEventArgs e) { if (e.Text.StartsWith(COMMAND_PREFIX_2)) { string[] cmd = e.Text.Substring(COMMAND_LENGTH_2).Trim().TrimEnd('"').ToLower().Split(' '); if (cmd[0].Equals("magpack")) { e.Eat = true; int myHotKey1 = 56; int myHotKey2 = 16; sendHotKey(myHotKey1, myHotKey2); } else if (cmd[0].Equals("logout")) { e.Eat = true; LogOut(); } } { e.Eat = false; } }
private void OnCommandLineText(object sender, ChatParserInterceptEventArgs e) { string command = e.Text; if (command.StartsWith("@") || command.StartsWith("/")) { // Strip leading @ or / command = command.Substring(1); if (command.StartsWith(commandPrefix, StringComparison.OrdinalIgnoreCase)) { string action = command.Substring(commandPrefix.Length + 1); if (action.StartsWith("enable")) { if (!enabled) { enabled = true; WriteToChat("Alias has been enabled."); } else { WriteToChat("Alias is already enabled."); } } else if (action.StartsWith("disable")) { if (enabled) { enabled = false; WriteToChat("Alias has been disabled."); } else { WriteToChat("Alias is already disabled."); } } else if(action.StartsWith("add")) { Match m = Regex.Match(action, @"add ""(?<first>.*)"" ""(?<second>.*)"""); if (m.Success) { Aliases.Add(m.Groups["first"].ToString(), m.Groups["second"].ToString()); WriteToChat(m.Groups["first"].ToString() + " has been aliased as " + m.Groups["second"].ToString()); SaveSettings(); } else { WriteToChat("Couldn't parse @alias add command."); } } else if(action.StartsWith("remove")) { string player = action.Substring(7); if (Aliases.ContainsKey(player)) { Aliases.Remove(player); WriteToChat(player + " successfully removed from Alias list"); SaveSettings(); } else { WriteToChat("Couldn't find " + player + " in Alias list"); } } else if(action.StartsWith("list")) { if (Aliases.Count == 0) { WriteToChat("You have not set any aliases yet."); } else { WriteToChat(Aliases.Count + " aliases total:"); foreach(string key in Aliases.Keys) { WriteToChat(key + " => " + Aliases[key]); } } } else if (action.StartsWith("help")) { WriteToChat("Alias v0.1", 7); WriteToChat("By Kolthar ([email protected])", 7); WriteToChat("Available commands: enable, disable, add, remove, list, help", 7); WriteToChat("Example usage:", 7); WriteToChat("add => @alias add \"Some Person's Alt\" \"Some Person\"", 7); WriteToChat("remove => @alias remove Some Person", 7); } else { WriteToChat("For help with Alias, type `@alias help`"); } } } }
private void ChatCommandHandler(object sender, ChatParserInterceptEventArgs e) { try { string text = e.Text.ToLower(); string chatCommand = edtChatCommand.Text.ToLower(); string coordsCommand = edtCoordsCommand.Text.ToLower(); string destCommand = edtDestCommand.Text.ToLower(); string findCommand = edtFindCommand.Text.ToLower(); if (text.StartsWith("@" + chatCommand) || text.StartsWith("/" + chatCommand)) { if (text.Length == 1 + chatCommand.Length) { e.Eat = true; ShowHelp(); return; } if (!char.IsWhiteSpace(text[1 + chatCommand.Length])) return; e.Eat = true; text = text.Substring(1 + chatCommand.Length).Trim(); string arg = ""; int idx = text.IndexOf(' '); if (idx > 0) { arg = text.Substring(idx).Trim(); text = text.Substring(0, idx).Trim(); } if (arg == "[coords]") { Util.Error("You're not actually supposed to type [coords] ... " + "replace that with coordinates or \"here\""); return; } Coordinates coords = PlayerCoords; Location loc; switch (text) { case "": case "help": if (arg == "loc" || arg == "dest") ShowLocCommandHelp(arg == "loc"); else ShowHelp(); break; case "on/off": case "onoff": case "show/hide": case "showhide": case "toggle": if (arg == "" || arg == "arrow") { ShowHideArrow(!mArrowHud.Visible); } else if (arg == "map" || arg == "auto") { if (mDungeonHud.IsDungeon(Host.Actions.Landcell)) { mMapHud.Visible = false; mDungeonHud.Visible = !mDungeonHud.Visible; } else { mMapHud.Visible = !mMapHud.Visible; mDungeonHud.Visible = false; } } else if (arg == "dereth" || arg == "derethmap" || arg == "dereth map") { mMapHud.Visible = !mMapHud.Visible; } else if (arg == "dungeon" || arg == "dung" || arg == "dungeonmap" || arg == "dungeon map") { mDungeonHud.Visible = !mDungeonHud.Visible; } else if (arg == "toolbar" || arg == "tool" || arg == "tool bar") { mToolbar.Visible = !mToolbar.Visible; } else if (arg == "all") { ShowHideArrow(!mArrowHud.Visible); mDungeonHud.Visible = !mDungeonHud.Visible; mMapHud.Visible = !mMapHud.Visible; mToolbar.Visible = !mToolbar.Visible; } else { Util.Error("Valid values are: 'arrow', 'map', 'dereth', 'dungeon', 'toolbar', and 'all'"); } break; case "on": case "show": if (arg == "" || arg == "arrow") { ShowHideArrow(true); } else if (arg == "map" || arg == "auto") { if (mDungeonHud.IsDungeon(Host.Actions.Landcell)) { mMapHud.Visible = false; mDungeonHud.Visible = true; } else { mMapHud.Visible = true; mDungeonHud.Visible = false; } } else if (arg == "dereth" || arg == "derethmap" || arg == "dereth map") { mMapHud.Visible = true; } else if (arg == "dungeon" || arg == "dung" || arg == "dungeonmap" || arg == "dungeon map") { mDungeonHud.Visible = true; } else if (arg == "toolbar" || arg == "tool" || arg == "tool bar") { mToolbar.Visible = true; } else if (arg == "all") { ShowHideArrow(true); if (mDungeonHud.IsDungeon(Host.Actions.Landcell)) { mMapHud.Visible = true; mDungeonHud.Visible = true; } else { mDungeonHud.Visible = true; mMapHud.Visible = true; } mToolbar.Visible = true; } else { Util.Error("Valid values are: 'arrow', 'map', 'dereth', 'dungeon', 'toolbar', and 'all'"); } break; case "off": case "hide": if (arg == "" || arg == "arrow") { ShowHideArrow(false); } else if (arg == "map" || arg == "auto") { mMapHud.Visible = false; mDungeonHud.Visible = false; } else if (arg == "dereth" || arg == "derethmap" || arg == "dereth map") { mMapHud.Visible = false; } else if (arg == "dungeon" || arg == "dung" || arg == "dungeonmap" || arg == "dungeon map") { mDungeonHud.Visible = false; } else if (arg == "toolbar" || arg == "tool" || arg == "tool bar") { mToolbar.Visible = false; } else if (arg == "all") { ShowHideArrow(false); mMapHud.Visible = false; mDungeonHud.Visible = false; mToolbar.Visible = false; } else { Util.Error("Valid values are: 'arrow', 'map', 'dereth', 'dungeon', 'toolbar', and 'all'"); } break; case "map": if (arg == "on" || arg == "show") { if (mDungeonHud.IsDungeon(Host.Actions.Landcell)) { mMapHud.Visible = false; mDungeonHud.Visible = true; } else { mMapHud.Visible = true; mDungeonHud.Visible = false; } } else if (arg == "off" || arg == "hide") { mMapHud.Visible = false; mDungeonHud.Visible = false; } else if (arg == "" || arg == "toggle") { if (mDungeonHud.IsDungeon(Host.Actions.Landcell)) { mMapHud.Visible = false; mDungeonHud.Visible = !mDungeonHud.Visible; } else { mMapHud.Visible = !mMapHud.Visible; mDungeonHud.Visible = false; } } else { goto invalidCommand; } break; case "arrow": if (arg == "on" || arg == "show") { ShowHideArrow(true); } else if (arg == "off" || arg == "hide") { ShowHideArrow(false); } else if (arg == "" || arg == "toggle") { ShowHideArrow(!mArrowHud.Visible); } else { goto invalidCommand; } break; case "dereth": if (arg == "on" || arg == "show") { mMapHud.Visible = true; } else if (arg == "off" || arg == "hide") { mMapHud.Visible = false; } else if (arg == "" || arg == "toggle") { mMapHud.Visible = !mMapHud.Visible; } else { goto invalidCommand; } break; case "dungeon": case "dung": if (arg == "on" || arg == "show") { mDungeonHud.Visible = true; } else if (arg == "off" || arg == "hide") { mDungeonHud.Visible = false; } else if (arg == "" || arg == "toggle") { mDungeonHud.Visible = !mDungeonHud.Visible; } else { goto invalidCommand; } break; case "toolbar": case "tool": if (arg == "on" || arg == "show") { mToolbar.Visible = true; } else if (arg == "off" || arg == "hide") { mToolbar.Visible = false; } else if (arg == "" || arg == "toggle") { mToolbar.Visible = !mToolbar.Visible; } else { goto invalidCommand; } break; case "to": if (arg == "here" || arg == "\"here\"" || Coordinates.TryParse(arg, out coords)) { loc = mLocDb.GetLocationAt(coords); if (loc != null) mArrowHud.DestinationLocation = loc; else mArrowHud.DestinationCoords = coords; mArrowHud.Visible = true; //SaveSettings(); } else if (mLocDb.TryGet(arg, out loc)) { mArrowHud.DestinationLocation = loc; mArrowHud.Visible = true; } else { Util.Error("Invalid coordinates or unknown location name. Coordinates " + "must be in the form \"00.0N, 00.0E\" and location names must " + "match the name in the database exactly."); } break; case "start": case "from": if (arg == "here" || Coordinates.TryParse(arg, out coords)) { SetRouteStart(coords); } else if (mLocDb.TryGet(arg, out loc)) { SetRouteStart(loc); } else { Util.Error("Invalid coordinates or unknown location name. Coordinates " + "must be in the form \"00.0N, 00.0E\" and location names must " + "match the name in the database exactly."); } break; case "end": if (arg == "here" || Coordinates.TryParse(arg, out coords)) { SetRouteEnd(coords); } else if (mLocDb.TryGet(arg, out loc)) { SetRouteEnd(loc); } else { Util.Error("Invalid coordinates or unknown location name. Coordinates " + "must be in the form \"00.0N, 00.0E\" and location names must " + "match the name in the database exactly."); } break; case "reset": SetViewLocation(new Point(40, 75)); ResetHudPositions(true); break; case "lock": mArrowHud.PositionLocked = true; Util.Message("Arrow HUD position locked"); break; case "unlock": mArrowHud.PositionLocked = false; Util.Message("Arrow HUD position unlocked"); break; case "loc": idx = e.Text.IndexOf(text, 1 + chatCommand.Length, StringComparison.OrdinalIgnoreCase); SendCoordinates(e.Text.Substring(idx + text.Length), PlayerCoords.ToString("0.0")); break; case "dest": idx = e.Text.IndexOf(text, 1 + chatCommand.Length, StringComparison.OrdinalIgnoreCase); SendCoordinates(e.Text.Substring(idx + text.Length), ArrowDestinationDescription); break; case "search": if (arg != "") { edtSearchName.Text = arg; chkSearchName.Checked = true; edtSearchCoords.Text = ""; chkSearchNearby.Checked = false; choSearchLimit.Selected = 0; btnSearchGo_Click(null, null); } nbkMain.ActiveTab = MainTab.Atlas; nbkAtlas.ActiveTab = AtlasTab.Search; DefaultView.Activate(); break; case "find": FindCommand(arg); break; case "attach": case "tag": AttachCommand(Host.Actions.CurrentSelection, true); break; default: invalidCommand: Util.Error("Invalid command: " + text + ". " + "Type /" + chatCommand + " help for a list of available commands"); break; } } else if (chkEnableCoordsCommand.Checked && (text.StartsWith("@" + coordsCommand + " ") || text.StartsWith("/" + coordsCommand + " "))) { e.Eat = true; SendCoordinates(e.Text.Substring(1 + coordsCommand.Length), PlayerCoords.ToString("0.0")); } else if (chkEnableDestCommand.Checked && (text.StartsWith("@" + destCommand + " ") || text.StartsWith("/" + destCommand + " "))) { e.Eat = true; SendCoordinates(e.Text.Substring(1 + destCommand.Length), ArrowDestinationDescription); } else if (chkEnableFindCommand.Checked && (text.StartsWith("@" + findCommand + " ") || text.StartsWith("/" + findCommand + " "))) { e.Eat = true; FindCommand(e.Text.Substring(1 + findCommand.Length).Trim()); } } catch (Exception ex) { Util.HandleException(ex); } }
private void RecallChatCommandHandler(object sender, ChatParserInterceptEventArgs e) { try { if (chkAutoUpdateRecalls.Checked) { string text = e.Text.ToLower().TrimEnd(); if (text == "/allegiance hometown") { mRecallingToBindstone = RecallStep.RecallStarted; if (mRecallTimeout.Enabled) RecallTimeout_Tick(null, null); mRecallTimeout.Interval = 40000; // 40 seconds mRecallTimeout.Start(); } else if (text == "/lifestone") { mRecallingToLSBind = RecallStep.RecallStarted; if (mRecallTimeout.Enabled) RecallTimeout_Tick(null, null); mRecallTimeout.Interval = 40000; // 40 seconds mRecallTimeout.Start(); } } } catch (Exception ex) { Util.HandleException(ex); } }
private void TextCommandReceived(object sender, ChatParserInterceptEventArgs e) { try { if(e.Text.Trim().ToLower().Contains("@gf")) { WriteToChat("Command Received."); if(e.Text.Trim().ToLower().Contains("cont")) { WriteToChat(Core.WorldFilter[Core.Actions.CurrentSelection].Name + " inventory = " + FoundryInventoryCheck(Core.Actions.CurrentSelection)); } } }catch{} }
internal void LogObject(ChatParserInterceptEventArgs obj) { this.WriteObject(obj, true); }
internal void WriteObject(ChatParserInterceptEventArgs obj, bool toLogFileOnly) { if (ActiveSettings.Instance.DebugLevel == DebugLevel.None) return; lock (_writeLock) { using (StreamWriter stream = new StreamWriter(this._currentPath, true)) { this.LogRawMessage(this.FormatWithPrefix("ChatParserInterceptEventArgs"), stream, toLogFileOnly); this.LogRawMessage(string.Format(" Text = {0}", obj.Text), stream, toLogFileOnly); //this.WriteCurrentStateStuff(stream, toLogFileOnly); this.LogRawMessage("", stream, toLogFileOnly); } } }
internal void WriteObject(ChatParserInterceptEventArgs obj) { this.WriteObject(obj, false); }
private void TextCommandReceived(object sender, ChatParserInterceptEventArgs e) { try { string command = e.Text.Trim().ToLower(); if(command.StartsWith(@"@gf") || command.StartsWith(@"/gf")) { WriteToChat("Command Received."); if(command.Contains("reset")) { if(command.Contains("switchgears")) { mCharacterSettings.vQuickSlotItems.Clear(); mCharacterSettings.hQuickSlotItems.Clear(); iLockerUpdate.bSubmitCharacterSettings = true; DisposeVerticalQuickSlots(); RenderVerticalQuickSlots(); } } // if(command.Contains("update")) // { // WriteToChat("Creating Data Pack"); // CreateDataPack(); // } //// // if(command.Contains("export")) // { // WriteToChat("Exporting Lists"); // ExportSettings(); // } // if(command.Contains("debug")) // { // // // // } if(command.Contains("report")) { if(Core.Actions.CurrentSelection == 0) { WriteToChat("First select something."); return; } AetherObject ao = AetherObjects.Collection[Core.Actions.CurrentSelection]; StringBuilder sb = new StringBuilder(); sb.Append(@"Report Time: " ); sb.Append(@DateTime.Now.ToString()); WriteToChat(sb.ToString()); sb.Length = 0; sb.Append("Object Name: "); sb.Append(@ao.Name); WriteToChat(sb.ToString()); sb.Length = 0; sb.Append("Object Id: "); sb.Append(ao.Id); WriteToChat(sb.ToString()); sb.Length = 0; sb.Append("HasIdData: "); sb.Append(ao.HasIdData); WriteToChat(sb.ToString()); foreach(KeyString ks in ao.StringVals.OrderBy(x => x.Key)) { sb.Length = 0; sb.Append("["); if(Enum.IsDefined(typeof(AStringValueKeys), ks.Key)) {sb.Append(((AStringValueKeys)ks.Key).ToString());} else{sb.Append("S"); sb.Append(ks.Key);} sb.Append("] "); sb.Append(ks.Val); WriteToChat(sb.ToString()); } foreach(KeyLong kl in ao.LongVals.OrderBy(x => x.Key)) { sb.Length = 0; sb.Append("["); if(Enum.IsDefined(typeof(ALongValueKeys), kl.Key)) {sb.Append(((ALongValueKeys)kl.Key).ToString());} else{sb.Append("L"); sb.Append(kl.Key);} sb.Append("] "); sb.Append(kl.Val); WriteToChat(sb.ToString()); } foreach(KeyDouble kd in ao.DoubleVals.OrderBy(x => x.Key)) { sb.Length = 0; sb.Append("["); if(Enum.IsDefined(typeof(ADoubleValueKeys), kd.Key)) {sb.Append(((ADoubleValueKeys)kd.Key).ToString());} else{sb.Append("D"); sb.Append(kd.Key);} sb.Append("] "); sb.Append(kd.Val.ToString("N2")); WriteToChat(sb.ToString()); } foreach(KeyBool kb in ao.BoolVals.OrderBy(x => x.Key)) { sb.Length = 0; sb.Append("["); if(Enum.IsDefined(typeof(ABoolValueKeys), kb.Key)) {sb.Append(((ABoolValueKeys)kb.Key).ToString());} else{sb.Append("B"); sb.Append(kb.Key);} sb.Append("] "); sb.Append(kb.Val); WriteToChat(sb.ToString()); } foreach(KeyQuad kq in ao.QuadVals.OrderBy(x => x.Key)) { sb.Length = 0; sb.Append("["); if(Enum.IsDefined(typeof(AQuadValueKeys), kq.Key)) {sb.Append(((AQuadValueKeys)kq.Key).ToString());} else{sb.Append("Q"); sb.Append(kq.Key);} sb.Append("] "); sb.Append(kq.Val); WriteToChat(sb.ToString()); } foreach(int palette in ao.Palettes) { sb.Length = 0; sb.Append("[P] "); sb.Append(palette); WriteToChat(sb.ToString()); } } if(command.Contains("repair")) { WriteToChat("##########"); WriteToChat("Patching general settings to include current updates."); WriteToChat("##########"); DataPatch(); } if(command.Contains("purge")) { WriteToChat("Attempting to remove character from GearLocker data."); Foundry_RemoveCharacter(e.Text); } // if(command.Contains("skill")) // { // foreach(ASkillKeyValues skill in Enum.GetValues(typeof(ASkillKeyValues))) // { // // WriteToChat(((ASkillKeyValues)skill).ToString() + " B: " + AetherCharacter.CharStats.Values(skill) + " E: " + AetherCharacter.CharStats.EffectiveValues(skill)); // // } // } //// // if(command.Contains("attrib")) // { // WriteToChat("Strenght Value: " + AetherCharacter.CharStats.EffectiveValues(ACharAttributeKeys.Strength)); // WriteToChat("Quick Value: " + AetherCharacter.CharStats.EffectiveValues(ACharAttributeKeys.Quickness)); // WriteToChat("Coord Value: " + AetherCharacter.CharStats.EffectiveValues(ACharAttributeKeys.Coordination)); // WriteToChat("End Value: " + AetherCharacter.CharStats.EffectiveValues(ACharAttributeKeys.Endurance)); // WriteToChat("Focus Value: " + AetherCharacter.CharStats.EffectiveValues(ACharAttributeKeys.Focus)); // WriteToChat("Self Value: " + AetherCharacter.CharStats.EffectiveValues(ACharAttributeKeys.Self)); // } // // if(command.Contains("vital")) // { // WriteToChat("Health Value: " + AetherCharacter.CharStats.EffectiveValues(ACharVitalKeys.Health)); // WriteToChat("Stamina Value: " + AetherCharacter.CharStats.EffectiveValues(ACharVitalKeys.Stamina)); // WriteToChat("Mana Value: " + AetherCharacter.CharStats.EffectiveValues(ACharVitalKeys.Mana)); // } // // if(command.Contains("enchantment")) // { // WriteToChat("Enchantment Count: " + AetherCharacter.CharStats.Enchantments.Count); // foreach(var chant in AetherCharacter.CharStats.Enchantments) // { // LogToFile(tDataTable.SpellIndex[chant.SpellId].spellname); // LogToFile("SpellId: " + chant.SpellId); // LogToFile("Family: " + chant.Family); // LogToFile("Flags: " + chant.Flags); // LogToFile("Key: " + chant.Key); // LogToFile("Layer: " + chant.Layer); // LogToFile("Value: " + chant.Value); // } // // } // // if(command.Contains("pyreal")) // { // WriteToChat("Pyreals: " + mCurrentInventory.Pyreals); // foreach(AetherObject ao in AetherObjects.InventoryByName("Pyreal")) // { // WriteToChat(ao.Id +", " + ao.Name + ", " + ao.Container + ", " + ao.StackCount); // } // } // // if(command.Contains("salv")) // { // WriteToChat("Character Salvaging Skill: " + AetherCharacter.CharStats.EffectiveValues(ASkillKeyValues.Salvaging)); // } // // // if(command.Contains("container")) // { // if(Core.Actions.CurrentSelection != 0) // { // AetherObject ao = AetherObjects.Collection[Core.Actions.CurrentSelection]; // WriteToChat("Container ID: " + ao.Container); // } // if(LastObjectChecked != 0) // { // AetherObject ao2 = AetherObjects.Collection[LastObjectChecked]; // WriteToChat("LastObjectChecked ContainerID: " + ao2.Container); // } // LastObjectChecked = Core.Actions.CurrentSelection; // } // // if(command.Contains("toonid")) // { // WriteToChat("Character Id: " + AetherCharacter.CharacterId); // } e.Eat = true; } }catch{} }
public static bool TryParse(ChatParserInterceptEventArgs eventArgs, out ICommand command) { return TryParse(eventArgs.Text, out command); }
public void FilterCore_CommandLineText(object sender, ChatParserInterceptEventArgs e) { bool writeChanges = true; bool global = false; string cmdtext = e.Text; if (cmdtext.Contains("/mfglobal")) { cmdtext = cmdtext.Replace(" /mfglobal", " /mf"); cmdtext = cmdtext.Replace("/mfglobal ", "/mf "); cmdtext = cmdtext.Replace("/mfglobal", "/mf"); global = true; } if (cmdtext.StartsWith("/mf log ")) { string logmsg = TextRemainder(cmdtext, "/mf log "); log.WriteInfo(logmsg); e.Eat = true; } else if (cmdtext.StartsWith("/mf alcmq add ") || cmdtext.StartsWith("/mf olcmq add ")) { string cmd = TextRemainder(cmdtext, "/mf alcmq add "); _loginCmds.Commands.Enqueue(cmd); Debug.WriteToChat("After Login Complete Message Queue added: " + cmd); e.Eat = true; } else if (cmdtext == "/mf alcmq clear" || cmdtext == "/mf olcmq clear") { _loginCmds.Commands.Clear(); Debug.WriteToChat("After Login Complete Message Queue cleared"); e.Eat = true; } else if (cmdtext.StartsWith("/mf alcmq wait set ")) { string valstr = TextRemainder(cmdtext, "/mf alcmq wait set "); _loginCmds.WaitMillisencds = int.Parse(valstr); Debug.WriteToChat("After Login Complete Message Queue Wait time set: " + valstr + "ms"); e.Eat = true; } else if (cmdtext.StartsWith("/mf olcwait set ")) // Backwards Compatability { string valstr = TextRemainder(cmdtext, "/mf olcwait set "); _loginCmds.WaitMillisencds = int.Parse(valstr); Debug.WriteToChat("After Login Complete Message Queue Wait time set: " + valstr + "ms"); e.Eat = true; } else if (cmdtext == "/mf alcmq wait clear" || cmdtext == "/mf olcwait clear") { _loginCmds.ClearWait(); Debug.WriteToChat(string.Format("After Login Complete Wait time reset to default {0} ms", LoginCommands.DefaultMillisecondsToWaitAfterLoginComplete)); e.Eat = true; } else if (cmdtext == "/mf alcmq show" || cmdtext == "/mf olcmq show" || cmdtext == "/mf alcmq list" || cmdtext == "/mf olcmq list") { var rdr = new LoginCommandPersister(GameRepo.Game.Account, GameRepo.Game.Server, GameRepo.Game.Character); var queue = rdr.ReadQueue(global); Debug.WriteToChat(string.Format("LoginCmds: {0}", queue.Commands.Count)); foreach (string cmd in queue.Commands) { Debug.WriteToChat(string.Format("cmd: {0}", cmd)); } Debug.WriteToChat(string.Format("Wait: {0}", queue.WaitMillisencds)); e.Eat = true; writeChanges = false; } if (e.Eat && writeChanges) { var persister = new LoginCommandPersister(GameRepo.Game.Account, GameRepo.Game.Server, GameRepo.Game.Character); persister.WriteQueue(_loginCmds, global); } }
private void FilterCore_CommandLineText(object sender, ChatParserInterceptEventArgs e) { if (e.Text.ToLower().StartsWith("/ch")) { string setprofile = "/ch setprofile"; string setchatcommand = "/ch setchatcommand"; string sethelpcommand = "/ch help"; string settabcommand = "/ch settab"; //If set profile command is issued if (e.Text.ToLower().Contains(setprofile)) { bool setvis = view.Visible; string temp = e.Text; temp = temp.Remove(0, setprofile.Length).Trim(); LoadBaseXML(false, temp); if (setvis) { view.Visible = true; } else { view.Visible = false; } } //If set chat command is issued else if (e.Text.ToLower().Contains(setchatcommand)) { bool setvis = view.Visible; string temp = e.Text; temp = temp.Remove(0, setchatcommand.Length); ChatCommand.Text = chatLoc = temp.Trim(); LoadBaseXML(false, ""); if (setvis) { view.Visible = true; } else { view.Visible = false; } } //set tab command else if (e.Text.ToLower().Contains(settabcommand)) { bool setvis = view.Visible; string temp = e.Text; temp = temp.Remove(0, settabcommand.Length); int tab = int.Parse(temp); if (!(tab > TabView.TabCount - 1) && !(tab < 0)) { TabView.CurrentTab = tab; } } //Show help else if (e.Text.ToLower().Contains(sethelpcommand)) { Globals.Host.Actions.AddChatText("setprofile profilename.txt : sets the profile", 5); Globals.Host.Actions.AddChatText("setchatcommand /c : sets chat command to /c", 5); Globals.Host.Actions.AddChatText("settab # : sets tab to tab #", 5); } //Do not execute as AC command. e.Eat = true; } }
void FilterCore_CommandLineText(object sender, ChatParserInterceptEventArgs e) { try { loginMessageQueueManager.FilterCore_CommandLineText(sender, e); defaultFirstCharacterManager.FilterCore_CommandLineText(sender, e); loginNextCharacterManager.FilterCore_CommandLineText(sender, e); } catch (Exception ex) { Debug.LogException(ex); } }
public void FilterCore_CommandLineText(object sender, ChatParserInterceptEventArgs e) { string lower = e.Text.ToLower(); if (lower.StartsWith("/mf dlc set")) { Settings.SettingsManager.CharacterSelectionScreen.SetDefaultFirstCharacter(new DefaultFirstCharacter(server, zonename, CoreManager.Current.CharacterFilter.Name)); Debug.WriteToChat("Default Login Character set to: " + CoreManager.Current.CharacterFilter.Name); e.Eat = true; } else if (lower.StartsWith("/mf dlcbi set ")) { var index = int.Parse(lower.Substring(14, lower.Length - 14)); if (index > 10) { index = -1; Debug.WriteToChat("Default Login Character failed with input too large: " + index); } else if (index < 0) { index = -1; Debug.WriteToChat("Default Login Character failed with input too small: " + index); } else { Settings.SettingsManager.CharacterSelectionScreen.SetDefaultFirstCharacter(new DefaultFirstCharacter(server, zonename, null, index)); Debug.WriteToChat("Default Login Character set to index: " + index); } e.Eat = true; } else if (lower == "/mf dlc clear" || lower == "/mf dlcbi clear") { Settings.SettingsManager.CharacterSelectionScreen.DeleteDefaultFirstCharacter(server, zonename); Debug.WriteToChat("Default Login Character cleared"); e.Eat = true; } else if (lower.StartsWith("/mf sdlcbi set ")) { var index = int.Parse(lower.Substring(15, lower.Length - 15)); if (index > 10) { index = -1; Debug.WriteToChat("Default Login Character failed with input too large: " + index); } else if (index < 0) { index = -1; Debug.WriteToChat("Default Login Character failed with input too small: " + index); } else { Settings.SettingsManager.CharacterSelectionScreen.SetDefaultFirstCharacter(new DefaultFirstCharacter(server, null, null, index)); Debug.WriteToChat("Server Default Login Character set to index: " + index); } e.Eat = true; } else if (lower == "/mf sdlcbi clear") { Settings.SettingsManager.CharacterSelectionScreen.DeleteDefaultFirstCharacters(server); Debug.WriteToChat("Server Default Login Characters cleared"); e.Eat = true; } }
private void Core_CommandLineText(object sender, ChatParserInterceptEventArgs e) { try { if (lib.status > 0 && e.Text.Equals("/dump", StringComparison.OrdinalIgnoreCase)) { int currentSelection = CoreManager.Current.Actions.CurrentSelection; if (currentSelection != 0) { Repo.DumpWorldObject(lib.MyCore.WorldFilter[currentSelection]); } else { Utility.AddChatText("No object selected.", 6); } e.Eat = true; } if (e.Text.Equals("/ignorevp", StringComparison.OrdinalIgnoreCase)) { if (lib.DFTEXT != null) { lib.DFTEXT.Visible = false; lib.DFTEXT.Dispose(); lib.DFTEXT = null; } Sounds.DeadVP.Stop(); Vitae.Dispose(); lib.vpcounter = 0; Utility.AddChatText("10% VP Warning ignored until the next death.", 6); e.Eat = true; } if (e.Text.Equals("/vitae", StringComparison.OrdinalIgnoreCase)) { if (lib.DFTEXT != null) { lib.DFTEXT.Visible = false; lib.DFTEXT.Dispose(); lib.DFTEXT = null; } Sounds.DeadVP.Stop(); Vitae.Dispose(); lib.vpcounter = 0; Utility.AddChatText("10% VP Warning ignored until the next death.", 6); e.Eat = true; } if (lib.status > 0 && e.Text.Equals("/defiance help", StringComparison.OrdinalIgnoreCase)) { Utility.AddChatText("--- Welcome to the [DEFIANCE] Help Menu ---", 6); Utility.AddChatText("", 0); Utility.AddChatText("Use these commands to navigate the Defiance Help Menu ", 0); Utility.AddChatText("- /defiance functions - Displays a list of the passive functions", 0); Utility.AddChatText("- /defiance commands - Displays a list of available commands.", 0); Utility.AddChatText("- /defiance modes - Displays and describes Modes.", 0); Utility.AddChatText("- /defiance options - Displays and describes Advanced Options.", 0); Utility.AddChatText("- /defiance buttons - Describes the Main HUD Buttons.", 0); Utility.AddChatText("- /defiance tabs - Explains the way different Tabs work.", 0); Utility.AddChatText("- /defiance retry - Manually retry the authorization process.", 0); e.Eat = true; } if (lib.status > 0 && e.Text.Equals("/defiance functions", StringComparison.OrdinalIgnoreCase)) { Utility.AddChatText("--- PASSIVE FUNCTIONALITY ---", 6); Utility.AddChatText("", 0); Utility.AddChatText("- Fix for the logging bug, keeping your character in-game when it's trying to log off.", 0); Utility.AddChatText("- Included Incoming Spell Detection (not 100% guaranteed).", 0); Utility.AddChatText("- Internal Broadcast System", 0); Utility.AddChatText("- Split Tab for PK's and Guildies.", 0); Utility.AddChatText("- Internal Loggers and Alerts.", 0); Utility.AddChatText("- Fellowship target calling and visual aid.", 0); Utility.AddChatText("- Resizable (hold Ctrl and drag the corners).", 0); Utility.AddChatText("- Allegiance status changes detection/alert.", 0); Utility.AddChatText("- Shortcuts to level 7/8 vulns and debuffs.", 0); Utility.AddChatText("- Shortcut to <TAG> spell (Magic Yield other 1).", 0); Utility.AddChatText("- Global PK Timer tracker.", 0); Utility.AddChatText("- 10 Second warning on turning PK.", 0); Utility.AddChatText("- 10% Vitae Penalty warning and automatic logout.", 0); Utility.AddChatText("- Tabs selection highlight.", 0); e.Eat = true; } if (lib.status > 0 && e.Text.Equals("/defiance modes", StringComparison.OrdinalIgnoreCase)) { Utility.AddChatText("--- MODES EXPLAINED ---", 6); Utility.AddChatText("", 0); Utility.AddChatText(" MODES are a quick way of repurposing [DEFIANCE]. ", 6); Utility.AddChatText("- MASTER: If MASTER mode is checked, Target Calling is enabled, and automatic .", 0); Utility.AddChatText(" fellowship targetting will be disabled.", 0); Utility.AddChatText("- SLAVE: If SLAVE mode is checked, Target Calling is disabled, and automatic .", 0); Utility.AddChatText(" fellowship targetting will be enabled.", 0); Utility.AddChatText("- SOLO: If SOLO mode is checked, Target Calling is disabled, and automatic .", 0); Utility.AddChatText(" fellowship targetting will be disabled.", 0); Utility.AddChatText("- MACRO: If MACRO mode is checked, [DEFIANCE] will start vTank and begin macroing.", 0); Utility.AddChatText(" It will use internal loggers to keep your character safe.", 0); e.Eat = true; } if (lib.status > 0 && e.Text.Equals("/defiance commands", StringComparison.OrdinalIgnoreCase)) { Utility.AddChatText("--- DEFIANCE CHAT COMMANDS ---", 6); Utility.AddChatText("", 0); Utility.AddChatText("- /dump - Dump currently selected object info to chat window and XML file.", 0); Utility.AddChatText("- /ignorevp or /vitae - Will force [DEFIANCE] to ignore the 10% vitae alert until the next relog.", 0); Utility.AddChatText("- /defiance version - Will post current version of [DEFIANCE].", 0); e.Eat = true; } if (lib.status > 0 && e.Text.Equals("/defiance buttons", StringComparison.OrdinalIgnoreCase)) { Utility.AddChatText("--- DEFIANCE BUTTONS ---", 6); Utility.AddChatText("", 0); Utility.AddChatText("[DIE] - Will instantly kill your character. Enabling required.", 0); Utility.AddChatText("[VP] - Will force [DEFIANCE] to ignore the 10% vitae alert until the next relog.", 0); Utility.AddChatText("[FIX] - Will force [DEFIANCE] to run the /fixbusy command.", 0); Utility.AddChatText("[HELP] - Will call for reinforcements at current coords in Allegiance chat", 0); e.Eat = true; } if (lib.status > 0 && e.Text.Equals("/defiance tabs", StringComparison.OrdinalIgnoreCase)) { Utility.AddChatText("--- DEFIANCE TABS ---", 6); Utility.AddChatText("", 0); Utility.AddChatText(" - Clicking on a GREEN Player's WEAPON in the lists selects that player.", 0); Utility.AddChatText("- Clicking on a RED Player's WEAPON in the lists debuffs that player's weapon.", 0); Utility.AddChatText("- If Meelee Weapon - Clouded Motives.", 0); Utility.AddChatText("- If Bow or Wand - Wi's Folly", 0); Utility.AddChatText("- Clicking on GREEN names automatically tosses the target a lvl 7 Heal Other.", 0); Utility.AddChatText("- Dark GREEN name means target is outside casting range.", 0); Utility.AddChatText("- Clicking on RED names calls fellowship target / selects target, depending on Mode.", 0); Utility.AddChatText("- Dark RED name means target is outside casting range.", 0); Utility.AddChatText("- My LOC - Will force [DEFIANCE] to post current coords and heading in Allegiance chat", 0); Utility.AddChatText("- Clicking on a name in the TIMERS tab will display PK Timer and Killer in Allegiance chat", 0); e.Eat = true; } if (e.Text.Equals("/defiance options", StringComparison.OrdinalIgnoreCase)) { Utility.AddChatText("--- DEFIANCE ADVANCED OPTIONS ---", 6); Utility.AddChatText("", 0); Utility.AddChatText("- ELEMENT: The element used in Behaviour actions.", 0); Utility.AddChatText("- BEHAVIOUR: The actionset it uses in MACRO mode when NOT logged by an Enemy.", 0); Utility.AddChatText("- Min. Enemies: The minimum number of enemies required to initiate the logger.", 0); Utility.AddChatText("- Min. Enemy Level: The minimum level an enemy needs to be to initiate the logger.", 0); Utility.AddChatText("- Relog Timer: The number of seconds before the logger logs back in. ", 0); Utility.AddChatText("- Min. Tapers: The minimum number of tapers needed to initiate the logger.", 0); Utility.AddChatText("- Min. Slots: The minimum number of empty inventory slots needed to initiate the logger.", 0); Utility.AddChatText("- Movement detect: A smart way of going against other Loggers.", 0); Utility.AddChatText("- Long Cycle: A smart way of changing the logger Timer if logged off too often.", 0); Utility.AddChatText("- Enable Die Button: Enabled the DIE button function.", 0); Utility.AddChatText("- Ticker Rate: The rate at which it refreshes all Player-related information.", 0); Utility.AddChatText("- Lowering this number will make readings more accurate, but take more ", 0); Utility.AddChatText("- processing power. However, increasing it WILL get you killed.", 0); Utility.AddChatText("- Set this according to your computer specs, but Recommended value", 0); Utility.AddChatText(" will work fine for most computers.", 0); e.Eat = true; } if (e.Text.Equals("/defiance version", StringComparison.OrdinalIgnoreCase)) { Utility.AddChatText("You are currently running version: " + Assembly.GetExecutingAssembly().GetName().Version.ToString(), 6); e.Eat = true; } if (e.Text.Equals("/defiance retry", StringComparison.OrdinalIgnoreCase)) { Core.Core_Login_Retry(); Utility.AddChatText("Retrying to authorize. Standby!", 6); e.Eat = true; } if (e.Text.Equals("/defiance instance", StringComparison.OrdinalIgnoreCase)) { Utility.AddChatText("PluginInstance " + lib.PluginInstance, 6); Utility.AddChatText("CommandsInstance " + lib.CommandsInstance, 6); Utility.AddChatText("SoundInstance " + lib.SoundInstance, 6); Utility.AddChatText("AuthInstance " + lib.AuthInstance, 6); Utility.AddChatText("ScannerInstance " + lib.ScannerInstance, 6); Utility.AddChatText("ViewInstance " + lib.ViewInstance, 6); Utility.AddChatText("ViewControlInstance " + lib.ViewControlInstance, 6); Utility.AddChatText("DeathParseInstance " + lib.DeathParseInstance, 6); Utility.AddChatText("LoggingInstance " + lib.DeathParseInstance, 6); Utility.AddChatText("RedTimerInstance " + lib.RedTimerInstance, 6); Utility.AddChatText("DeathInstance " + lib.DeathInstance, 6); Utility.AddChatText("VitaeInstance " + lib.VitaeInstance, 6); Utility.AddChatText("CompsInstance " + lib.CompsInstance, 6); Utility.AddChatText("InventoryInstance " + lib.InventoryInstance, 6); Utility.AddChatText("DetectionIstance " + lib.DetectionIstance, 6); Utility.AddChatText("MacroInstance " + lib.MacroInstance, 6); Utility.AddChatText("RemoteInstance " + lib.RemoteInstance, 6); Utility.AddChatText("RemoteLogInstance " + lib.RemoteLogInstance, 6); Utility.AddChatText("VersInstance " + lib.VersInstance, 6); Utility.AddChatText("HUDInstance " + lib.HUDInstance, 6); Utility.AddChatText("ReportInstance " + lib.ReportInstance, 6); e.Eat = true; } if (e.Text.Equals("/defiance status", StringComparison.OrdinalIgnoreCase)) { Utility.AddChatText("Current game status: " + lib.gameStatus, 6); e.Eat = true; } } catch (Exception ex) { Repo.RecordException(ex); } }
void Current_CommandLineText(object sender, ChatParserInterceptEventArgs e) { try { if (e.Text == null) return; if (ProcessMTCommand(e.Text)) e.Eat = true; } catch (Exception ex) { Debug.LogException(ex); } }