private static void GameOnOnGameLoad(EventArgs args) { MainMenu = new Menu("OneKeyToWin AIO", "OneKeyToWin_AIO" + ObjectManager.Player.ChampionName, true).SetFontStyle(System.Drawing.FontStyle.Bold, Color.DeepSkyBlue); #region MENU ABOUT OKTW MainMenu.SubMenu("About OKTW©").AddItem(new MenuItem("debug", "Debug").SetValue(false)); MainMenu.SubMenu("About OKTW©").AddItem(new MenuItem("debugOrb", "Debug orbwalker").SetValue(false)); MainMenu.SubMenu("About OKTW©").AddItem(new MenuItem("debugChat", "Debug Chat").SetValue(false)); MainMenu.SubMenu("About OKTW©").AddItem(new MenuItem("print", "OKTW NEWS in chat").SetValue(true)); #endregion MainMenu.AddItem(new MenuItem("AIOmode", "AIO mode", true).SetValue(new StringList(new[] { "Utility and champion", "Only Champion", "Only Utility" }, 0))).ValueChanged += Program_ValueChanged; var aioModeMenu = MainMenu.Item("AIOmode", true).GetValue <StringList>().SelectedIndex; if (aioModeMenu == 0) { AioModeSet = AioMode.All; } else if (aioModeMenu == 1) { AioModeSet = AioMode.ChampionOnly; } else if (aioModeMenu == 2) { AioModeSet = AioMode.UtilityOnly; } if (AioModeSet != AioMode.UtilityOnly) { Orbwalker = new Orbwalking.Orbwalker(MainMenu.AddSubMenu(new Menu("Orbwalking", "Orbwalking"))); HeroMenu = MainMenu.SubMenu(Player.ChampionName).SetFontStyle(System.Drawing.FontStyle.Bold, Color.OrangeRed); #region LOAD CHAMPIONS switch (Player.ChampionName) { case "Jinx": new Champions.Jinx(); break; case "Sivir": new Champions.Sivir(); break; case "Ezreal": new Champions.Ezreal(); break; case "KogMaw": new Champions.KogMaw(); break; case "Annie": new Champions.Annie(); break; case "Ashe": new Champions.Ashe(); break; case "MissFortune": new Champions.MissFortune(); break; case "Quinn": new Champions.Quinn(); break; case "Kalista": new Champions.Kalista(); break; case "Caitlyn": new Champions.Caitlyn(); break; case "Graves": new Champions.Graves(); break; case "Urgot": new Champions.Urgot(); break; case "Anivia": new Champions.Anivia(); break; case "Orianna": new Champions.Orianna(); break; case "Ekko": new Champions.Ekko(); break; case "Vayne": new Champions.Vayne(); break; case "Lucian": new Champions.Lucian(); break; case "Darius": new Champions.Darius(); break; case "Blitzcrank": new Champions.Blitzcrank(); break; case "Corki": new Champions.Corki(); break; case "Varus": new Champions.Varus(); break; case "Twitch": new Champions.Twitch(); break; case "Tristana": new Champions.Tristana(); break; case "Xerath": new Champions.Xerath(); break; case "Jayce": new Champions.Jayce(); break; case "Kayle": new Champions.Kayle(); break; case "Thresh": new Champions.Thresh(); break; case "Draven": new Champions.Draven(); break; case "Evelynn": new Champions.Evelynn(); break; case "Ahri": new Champions.Ahri(); break; case "Brand": new Champions.Brand(); break; case "Morgana": new Champions.Morgana(); break; case "Lux": new Champions.Lux(); break; case "Malzahar": new Champions.Malzahar(); break; case "Karthus": new Champions.Karthus(); break; case "Swain": new Champions.Swain(); break; case "TwistedFate": new Champions.TwistedFate(); break; case "Syndra": new Champions.Syndra(); break; case "Velkoz": new Champions.Velkoz(); break; case "Jhin": new Champions.Jhin(); break; case "Kindred": new Champions.Kindred(); break; case "Braum": new Champions.Braum(); break; case "Teemo": new Champions.Teemo(); break; case "Garen": new Champions.Garen(); break; case "Amumu": new Champions.Amumu(); break; case "Viego": new Champions.Viego(); break; case "Leona": new Champions.Leona(); break; case "Hecarim": new Champions.Hecarim(); break; case "Nunu": new Champions.Nunu(); break; } #endregion AddPredictionSpellMenuItem("Q"); AddPredictionSpellMenuItem("W"); AddPredictionSpellMenuItem("E"); AddPredictionSpellMenuItem("R"); MainMenu.SubMenu("Prediction MODE").AddItem(new MenuItem("debugPred", "Draw Aiming OKTW© PREDICTION").SetValue(false)); } if (MainMenu.Item("debug").GetValue <bool>()) { new Core.OKTWlab().LoadOKTW(); } if (AioModeSet != AioMode.ChampionOnly) { Summoners summonners = new Summoners(); ItemsActivator itemsActivator = new ItemsActivator(); TrackerCore trackerCore = new TrackerCore(); BaseUlt baseUlt = new BaseUlt(); AutoLvlUp autoLvlUp = new AutoLvlUp(); ModernUtlity modernUtlity = new ModernUtlity(); new Core.OKTWward().LoadOKTW(); //new Core.OKTWdraws().LoadOKTW(); } MainMenu.AddItem(new MenuItem("aiomodes", "!!! PRESS F5 TO RELOAD MODE !!!")); MainMenu.Item("aiomodes").Show(false); MainMenu.AddToMainMenu(); Game.OnUpdate += OnUpdate; Drawing.OnDraw += OnDraw; if (MainMenu.Item("print").GetValue <bool>()) { Game.PrintChat("<font size='30'>OneKeyToWin</font> <font color='#b756c5'>by Sebby</font>"); } }
public InputWindow() { mainWindow = this; tracker = ScoreTracker.Tracker; display = new DisplayWindow(new DisplayWindowContent()); config = ScoreTracker.config; colors = ScoreTracker.colors; Text = tracker.Data.Name; FormClosing += new FormClosingEventHandler(ConfirmClose); Size = new Size(w, h); MinimumSize = new Size(w, h); MaximumSize = new Size(w, h); submit.Text = "Keep"; undo.Text = "Back"; undo.Enabled = false; save.Text = "Save && Reset"; save.Enabled = false; switchRoute.Text = "Switch File"; casualMode.Text = (config["casual_mode"] == "0") ? "Casual Mode" : "Tracking Mode"; options.Text = "Options..."; //options.Enabled = false; submit.Click += new EventHandler(OnSubmit); undo.Click += new EventHandler(OnUndo); save.Click += new EventHandler(OnReset); switchRoute.Click += new EventHandler(SwitchRoutes); casualMode.Click += new EventHandler(ToggleCasualMode); options.Click += new EventHandler(OpenOptions); selector.Index = tracker.Data.GetComparisonIndex(); selector.Changed = OnDropdownChanged; SwapControls(submit); //SetControls(); // Redraw the form if the window is resized Resize += delegate { DoLayout(); }; //Move += delegate { DoLayout();}; // Draw the form DoLayout(); int x = -10000; int y = -10000; try { x = Int32.Parse(ScoreTracker.config["input_x"]); y = Int32.Parse(ScoreTracker.config["input_y"]); } catch (Exception) { } if (x != -10000 || y != -10000) { this.StartPosition = FormStartPosition.Manual; this.Location = new Point(x, y); } Show(); try { //CheckVersion(); t = new Thread(new ThreadStart(delegate { CheckVersion(); })); t.Start(); } catch (Exception e) { Console.WriteLine(e); } }
public static void Main(string[] args) { Console.WriteLine("Running in: " + Directory.GetCurrentDirectory()); try { var handle = GetConsoleWindow(); ShowWindow(handle, SW_HIDE); } catch (Exception) { } for (int i = 0; i < args.Length; i++) { /*if (args[i] == "-s") * { * // If -s is found in the arguments check if the port is specified * for (int j = 0; j < args.Length; j++) * { * if (args[j] == "-p" && j < args.Length - 1) * { * // If -p is found set port to the next argument * port = Convert.ToInt32(args[j+1]); * } * } * // Start server and return from Main() before client is started * StartServer(port); * return; * }*/ } /*OpenFileDialog test = new OpenFileDialog(); * test.Filter = ".ini|*.ini"; * test.Title = "Test"; * test.ShowDialog();*/ try { //Test(); ConvertFiles(); } catch (Exception e) { Console.WriteLine("Conversion Error: " + e.Message + "\n" + e.StackTrace); } //try { config = new FileReader("config.ini", SortingStyle.Sort); config.AddNewItem("version", ""); config.AddNewItem("file_index", "0"); config.AddNewItem("casual_mode", "0"); config.AddNewItem("layout", "1"); config.AddNewItem("include_route_pbs_in_individuals_file", "0"); config.AddNewItem("sums_horizontal_alignment", "0"); List <string> fonts = new List <string>(); foreach (FontFamily f in System.Drawing.FontFamily.Families) { fonts.Add(f.Name); } if (fonts.Contains("Segoe UI")) { config.AddNewItem("font", "Segoe UI"); } else if (fonts.Contains("DejaVu Sans")) { config.AddNewItem("font", "DejaVu Sans"); } else if (fonts.Contains("Arial")) { config.AddNewItem("font", "Arial"); } else { config.AddNewItem("font", SystemFonts.MessageBoxFont.Name); } config.AddNewItem("font_size", "18"); config.AddNewItem("highlight_current", "0"); config.AddNewItem("start_highlighted", "1"); config.AddNewItem("horizontal_width", "1296"); config.AddNewItem("horizontal_height", "99"); config.AddNewItem("vertical_width", "316"); config.AddNewItem("vertical_height", "309"); config["version"] = version; if (config.ContainsKey("debug") && config["debug"] == "1") { try { var handle = GetConsoleWindow(); ShowWindow(handle, SW_SHOW); } catch (Exception) { } } if (config ["layout"] == "horizontal") { config ["layout"] = "0"; } if (config ["layout"] == "vertical") { config ["layout"] = "1"; } if (config ["layout"] != "0" && config ["layout"] != "1") { config ["layout"] = "0"; } if (config ["sums_horizontal_alignment"] == "right") { config ["sums_horizontal_alignment"] = "0"; } if (config ["sums_horizontal_alignment"] == "left") { config ["sums_horizontal_alignment"] = "1"; } if (config ["sums_horizontal_alignment"] != "0" && config ["sums_horizontal_alignment"] != "1") { config ["sums_horizontal_alignment"] = "0"; } config.Save(); colors = new ColorFileReader("color_theme.ini", SortingStyle.Validate); colors.AddNewItem("text_color", "#FFFFFF"); colors.AddNewItem("text_color_total", "#FFFFFF"); colors.AddNewItem("text_color_highlighted", "#FFFFFF"); colors.AddNewItem("background_color", "#0F0F0F"); colors.AddNewItem("background_color_highlighted", "#3373F4"); colors.AddNewItem("text_color_ahead", "#00CC36"); colors.AddNewItem("text_color_behind", "#CC1200"); colors.AddNewItem("text_color_best", "#D8AF1F"); if (config.ContainsKey("text_color")) { string c = config["text_color"]; config.RemoveKey("text_color"); colors["text_color"] = ColorTranslator.FromHtml(c); } if (config.ContainsKey("text_color_total")) { string c = config["text_color_total"]; config.RemoveKey("text_color_total"); colors["text_color_total"] = ColorTranslator.FromHtml(c); } if (config.ContainsKey("text_color_highlighted")) { string c = config["text_color_highlighted"]; config.RemoveKey("text_color_highlighted"); colors["text_color_highlighted"] = ColorTranslator.FromHtml(c); } if (config.ContainsKey("background_color")) { string c = config["background_color"]; config.RemoveKey("background_color"); colors["background_color"] = ColorTranslator.FromHtml(c); } if (config.ContainsKey("background_color_highlighted")) { string c = config["background_color_highlighted"]; config.RemoveKey("background_color_highlighted"); colors["background_color_highlighted"] = ColorTranslator.FromHtml(c); } if (config.ContainsKey("text_color_ahead")) { string c = config["text_color_ahead"]; config.RemoveKey("text_color_ahead"); colors["text_color_ahead"] = ColorTranslator.FromHtml(c); } if (config.ContainsKey("text_color_behind")) { string c = config["text_color_behind"]; config.RemoveKey("text_color_behind"); colors["text_color_behind"] = ColorTranslator.FromHtml(c); } if (config.ContainsKey("text_color_best")) { string c = config["text_color_best"]; config.RemoveKey("text_color_best"); colors["text_color_best"] = ColorTranslator.FromHtml(c); } files = new List <string>(); if (config.ContainsSection("Files")) { foreach (string key in config.GetSection("Files").Keys) { if (!System.IO.File.Exists(config["Files", key])) { config.RemoveKey("Files", key); continue; } try { FileReader tmp = new FileReader(config["Files", key]); if (!tmp.ContainsSection("Best Run")) { config.RemoveKey("Files", key); continue; } } catch (Exception) { config.RemoveKey("Files", key); continue; } files.Add(config["Files", key]); config.RemoveKey("Files", key); } int fileIndex = 0; foreach (string file in files) { config.AddNewItem("Files", "File_" + FormatNumber(fileIndex++), file); } } else { config["Files", "File_0000"] = "pb_easy.ini"; config["Files", "File_0001"] = "pb_hard.ini"; files.Add("pb_easy.ini"); files.Add("pb_hard.ini"); } colors.Save(); config.Save(); FileReader pbEasy = new FileReader("pb_easy.ini", SortingStyle.Validate); if (!File.Exists("pb_easy.ini")) { pbEasy.AddNewItem("Best Run", "Corneria", "0"); pbEasy.AddNewItem("Best Run", "Meteo", "0"); pbEasy.AddNewItem("Best Run", "Katina", "0"); pbEasy.AddNewItem("Best Run", "Sector X", "0"); pbEasy.AddNewItem("Best Run", "Macbeth", "0"); pbEasy.AddNewItem("Best Run", "Area 6", "0"); pbEasy.AddNewItem("Best Run", "Venom 2", "0"); pbEasy.Save(); } if (!pbEasy.ContainsKey("game")) { pbEasy["name"] = "Easy Route"; pbEasy["game"] = "Star Fox 64"; //pbEasy["IL Syncing"] = "on"; } TrackerData.ValidateFile(pbEasy); FileReader pbHard = new FileReader("pb_hard.ini", SortingStyle.Validate); if (!File.Exists("pb_hard.ini")) { pbHard.AddNewItem("Best Run", "Corneria", "0"); pbHard.AddNewItem("Best Run", "Sector Y", "0"); pbHard.AddNewItem("Best Run", "Aquas", "0"); pbHard.AddNewItem("Best Run", "Zoness", "0"); pbHard.AddNewItem("Best Run", "Macbeth", "0"); pbHard.AddNewItem("Best Run", "Area 6", "0"); pbHard.AddNewItem("Best Run", "Venom 2", "0"); pbHard.Save(); } if (!pbHard.ContainsKey("game")) { pbHard["name"] = "Hard Route"; pbHard["game"] = "Star Fox 64"; //pbHard["IL Syncing"] = "on"; } TrackerData.ValidateFile(pbHard); individualLevels = new FileReader(':', "pb_individuals.txt", SortingStyle.Unsort); fileIndex = Int32.Parse(config["file_index"]); if (fileIndex >= files.Count || fileIndex < 0) { fileIndex = 0; config["file_index"] = "0"; config.Save(); } data = new TrackerData(new FileReader(files[FileIndex], SortingStyle.Validate)); tracker = new TrackerCore(data); } /* * catch (Exception e) * { * Console.WriteLine("Startup Error: " + e.Message); * } */ try { Application.Run(new InputWindow()); } catch (Exception e) { Console.WriteLine(e.Message); Console.WriteLine(e.StackTrace); } if (config.ContainsKey("debug") && config["debug"] == "1") { Console.Read(); } }