public static void Game_OnGameLoad() { Config = new Menu("Marksman", "Marksman", true).SetFontStyle(FontStyle.Regular, SharpDX.Color.GreenYellow); ChampionClass = new Marksman.Champions.Champion(); CommonGeometry.Init(); var baseType = ChampionClass.GetType(); igniteSlot = ObjectManager.Player.GetSpellSlot("summonerdot"); /* Update this with Activator.CreateInstance or Invoke * http://stackoverflow.com/questions/801070/dynamically-invoking-any-function-by-passing-function-name-as-string * For now stays cancer. */ var championName = ObjectManager.Player.ChampionName.ToLowerInvariant(); switch (championName) { case "ashe": ChampionClass = new Ashe(); break; case "caitlyn": ChampionClass = new Caitlyn(); break; case "corki": ChampionClass = new Corki(); break; case "draven": ChampionClass = new Draven(); break; case "ezreal": ChampionClass = new Ezreal(); break; case "graves": ChampionClass = new Graves(); break; case "gnar": ChampionClass = new Champions.Gnar(); break; case "jhin": ChampionClass = new Jhin(); break; case "jinx": ChampionClass = new Jinx(); break; case "kalista": ChampionClass = new Kalista(); break; case "kindred": ChampionClass = new Kindred(); break; case "kogmaw": ChampionClass = new Kogmaw(); break; case "lucian": ChampionClass = new Lucian(); break; case "missfortune": ChampionClass = new MissFortune(); break; case "quinn": ChampionClass = new Quinn(); break; case "sivir": ChampionClass = new Sivir(); break; case "teemo": ChampionClass = new Teemo(); break; case "tristana": ChampionClass = new Tristana(); break; case "twitch": ChampionClass = new Twitch(); break; case "urgot": ChampionClass = new Urgot(); break; case "vayne": ChampionClass = new Vayne(); break; case "varus": ChampionClass = new Varus(); break; default: Chat.Print(ObjectManager.Player.CharData.BaseSkinName + " Doesn't support from Marksman!"); break; } //Config.DisplayName = "Marksman Lite | " + CultureInfo.CurrentCulture.TextInfo.ToTitleCase(championName); Config.DisplayName = "Marksman II - " + ObjectManager.Player.ChampionName; ChampionClass.Id = ObjectManager.Player.CharData.BaseSkinName; ChampionClass.Config = Config; ChampionClass.MenuLane = MenuLane; ChampionClass.MenuJungle = MenuJungle; MenuExtraTools = new Menu("Marksman II - Tools", "ExtraTools", true).SetFontStyle(FontStyle.Regular, SharpDX.Color.GreenYellow); { var nMenuExtraToolsPackets = new Menu("Available Tools", "MenuExtraTools.Available"); nMenuExtraToolsPackets.AddItem(new MenuItem("ExtraTools.Orbwalker", "Orbwalker:")).SetValue(new StringList(new[] { "LeagueSharp Common", "Marksman Orbwalker (With Attack Speed Limiter)" })).SetFontStyle(FontStyle.Regular, SharpDX.Color.Gray); nMenuExtraToolsPackets.AddItem(new MenuItem("ExtraTools.Prediction", "Prediction:")).SetValue(new StringList(new[] { "LeagueSharp Common", "SPrediction (Synx)" })).SetFontStyle(FontStyle.Regular, SharpDX.Color.Gray); nMenuExtraToolsPackets.AddItem(new MenuItem("ExtraTools.AutoLevel", "Auto Leveller:")).SetValue(true); nMenuExtraToolsPackets.AddItem(new MenuItem("ExtraTools.AutoBush", "Auto Bush Ward:")).SetValue(true); nMenuExtraToolsPackets.AddItem(new MenuItem("ExtraTools.AutoPink", "Auto Pink Ward:")).SetValue(true).SetTooltip("For rengar / vayne / shaco etc."); nMenuExtraToolsPackets.AddItem(new MenuItem("ExtraTools.WarningSpells", "Warning Spells [NEW]:")).SetValue(true).SetTooltip("For Rengar R / Shaco Q etc.").SetFontStyle(FontStyle.Regular, SharpDX.Color.GreenYellow); nMenuExtraToolsPackets.AddItem(new MenuItem("ExtraTools.Skin", "Skin Manager:")).SetValue(true); nMenuExtraToolsPackets.AddItem(new MenuItem("ExtraTools.Emote", "Emote:")).SetValue(true); nMenuExtraToolsPackets.AddItem(new MenuItem("ExtraTools.AllySupport", "Ally Support:")).SetValue(true); nMenuExtraToolsPackets.AddItem(new MenuItem("ExtraTools.BuffTimer", "Buff Time Manager:")).SetValue(false).SetFontStyle(FontStyle.Regular, SharpDX.Color.Gray); nMenuExtraToolsPackets.AddItem(new MenuItem("ExtraTools.Potition", "Potition Manager:")).SetValue(false).SetFontStyle(FontStyle.Regular, SharpDX.Color.Gray); nMenuExtraToolsPackets.AddItem(new MenuItem("ExtraTools.Summoners", "Summoner Manager:")).SetValue(false).SetFontStyle(FontStyle.Regular, SharpDX.Color.Gray); nMenuExtraToolsPackets.AddItem(new MenuItem("ExtraTools.Tracker", "Tracker:")).SetValue(false).SetFontStyle(FontStyle.Regular, SharpDX.Color.Gray); nMenuExtraToolsPackets.AddItem(new MenuItem("ExtraTools.Reload", "Press F5 for Load Extra Tools!")).SetFontStyle(FontStyle.Bold, SharpDX.Color.GreenYellow); MenuExtraTools.AddSubMenu(nMenuExtraToolsPackets); MenuExtraToolsActivePackets = new Menu("Installed Tools", "MenuExtraTools.Installed").SetFontStyle(FontStyle.Regular, SharpDX.Color.GreenYellow); MenuExtraTools.AddSubMenu(MenuExtraToolsActivePackets); } CommonSettings.Init(Config); OrbWalking = Config.AddSubMenu(new Menu("Orbwalking", "Orbwalking")); ChampionClass.Orbwalker = new Orbwalking.Orbwalker(OrbWalking); MenuActivator = new Menu("Activator", "Activator").SetFontStyle(FontStyle.Regular, SharpDX.Color.Aqua); { if (MenuExtraTools.Item("ExtraTools.AutoLevel").GetValue <bool>()) { CommonAutoLevel.Init(MenuExtraToolsActivePackets); } if (MenuExtraTools.Item("ExtraTools.AutoPink").GetValue <bool>()) { CommonAutoPink.Initialize(MenuExtraToolsActivePackets); } if (MenuExtraTools.Item("ExtraTools.WarningSpells").GetValue <bool>()) { CommonWarningSpelss.Initialize(MenuExtraToolsActivePackets); } if (MenuExtraTools.Item("ExtraTools.AutoBush").GetValue <bool>()) { CommonAutoBush.Init(MenuExtraToolsActivePackets); } if (MenuExtraTools.Item("ExtraTools.Skin").GetValue <bool>()) { CommonSkinManager.Init(MenuExtraToolsActivePackets); } if (MenuExtraTools.Item("ExtraTools.Emote").GetValue <bool>()) { CommonEmote.Init(MenuExtraToolsActivePackets); } if (MenuExtraTools.Item("ExtraTools.AllySupport").GetValue <bool>()) { CommonAlly.Init(MenuExtraToolsActivePackets); } /* Menu Items */ var items = MenuActivator.AddSubMenu(new Menu("Items", "Items")); items.AddItem(new MenuItem("BOTRK", "BOTRK").SetValue(true)); items.AddItem(new MenuItem("GHOSTBLADE", "Ghostblade").SetValue(true)); items.AddItem(new MenuItem("SWORD", "Sword of the Divine").SetValue(true)); items.AddItem(new MenuItem("MURAMANA", "Muramana").SetValue(true)); items.AddItem(new MenuItem("UseItemsMode", "Use items on").SetValue(new StringList(new[] { "No", "Mixed mode", "Combo mode", "Both" }, 2))); } Config.AddSubMenu(MenuActivator); // If Champion is supported draw the extra menus if (baseType != ChampionClass.GetType()) { SetSmiteSlot(); var combo = new Menu("Combo", "Combo").SetFontStyle(FontStyle.Regular, SharpDX.Color.GreenYellow); if (ChampionClass.ComboMenu(combo)) { if (SmiteSlot != SpellSlot.Unknown) { combo.AddItem(new MenuItem("ComboSmite", "Use Smite").SetValue(true)); } Config.AddSubMenu(combo); } var harass = new Menu("Harass", "Harass"); if (ChampionClass.HarassMenu(harass)) { harass.AddItem(new MenuItem("HarassMana", "Min. Mana Percent").SetValue(new Slider(50, 100, 0))); Config.AddSubMenu(harass); } var menuClear = new Menu("Farm / Jungle", "Mode.Clear"); { MenuLane = new Menu("Lane", "Mode.Lane"); { if (ChampionClass.LaneClearMenu(MenuLane)) { MenuLane.AddItem(new MenuItem("Lane.Min.Mana", ":: Min. Mana %:").SetValue(new Slider(60, 100, 0))); } menuClear.AddSubMenu(MenuLane); } MenuJungle = new Menu("Jungle", "Mode.Jungle"); { if (ChampionClass.JungleClearMenu(MenuJungle)) { MenuJungle.AddItem(new MenuItem("Jungle.Min.Mana", ":: Min. Mana %:").SetValue(new Slider(30, 100, 0))); MenuJungle.AddItem(new MenuItem("Jungle.Items", ":: Use Items:").SetValue(new StringList(new[] { "Off", "Use for Baron", "Use for Baron", "Both" }, 3))); menuClear.AddSubMenu(MenuJungle); } } menuClear.AddItem(new MenuItem("Farm.Active", ":: Farm Active!").SetValue(new KeyBind("J".ToCharArray()[0], KeyBindType.Toggle, true))).Permashow(true, "Marksman | Farm", SharpDX.Color.Aqua); menuClear.AddItem(new MenuItem("Farm.Min.Mana.Control", ":: Min. Mana Control!").SetValue(new KeyBind("M".ToCharArray()[0], KeyBindType.Toggle, true))).Permashow(true, "Marksman | Farm Min. Mana Control", SharpDX.Color.Aqua); Config.AddSubMenu(menuClear); } //var laneclear = new Menu("Lane Mode", "LaneClear"); //if (ChampionClass.LaneClearMenu(laneclear)) //{ // laneclear.AddItem(new MenuItem("Lane.Enabled", ":: Enable Lane Farm!").SetValue(new KeyBind("L".ToCharArray()[0],KeyBindType.Toggle, true))).Permashow(true, "Marksman | Enable Lane Farm", SharpDX.Color.Aqua); // var minManaMenu = new Menu("Min. Mana Settings", "Lane.MinMana.Title"); // { // minManaMenu.AddItem(new MenuItem("LaneMana.Alone", "If I'm Alone %:").SetValue(new Slider(30, 100, 0))).SetFontStyle(FontStyle.Regular, SharpDX.Color.LightSkyBlue); // minManaMenu.AddItem(new MenuItem("LaneMana.Enemy", "If Enemy Close %:").SetValue(new Slider(60, 100, 0))).SetFontStyle(FontStyle.Regular, SharpDX.Color.IndianRed); // laneclear.AddSubMenu(minManaMenu); // } // Config.AddSubMenu(laneclear); //} //var jungleClear = new Menu("Jungle Mode", "JungleClear"); //if (ChampionClass.JungleClearMenu(jungleClear)) //{ // var minManaMenu = new Menu("Min. Mana Settings", "Jungle.MinMana.Title"); // { // minManaMenu.AddItem(new MenuItem("Jungle.Mana.Ally", "Ally Mobs %:").SetValue(new Slider(50, 100, 0))).SetFontStyle(FontStyle.Regular, SharpDX.Color.LightSkyBlue); // minManaMenu.AddItem(new MenuItem("Jungle.Mana.Enemy", "Enemy Mobs %:").SetValue(new Slider(30, 100, 0))).SetFontStyle(FontStyle.Regular, SharpDX.Color.IndianRed); // minManaMenu.AddItem(new MenuItem("Jungle.Mana.BigBoys", "Baron/Dragon %:").SetValue(new Slider(70, 100, 0))).SetFontStyle(FontStyle.Regular, SharpDX.Color.HotPink); // jungleClear.AddSubMenu(minManaMenu); // } // jungleClear.AddItem(new MenuItem("Jungle.Items", ":: Use Items:").SetValue(new StringList(new[] {"Off", "Use for Baron", "Use for Baron", "Both"}, 3))); // jungleClear.AddItem(new MenuItem("Jungle.Enabled", ":: Enable Jungle Farm!").SetValue(new KeyBind("J".ToCharArray()[0], KeyBindType.Toggle, true))).Permashow(true, "Marksman | Enable Jungle Farm", SharpDX.Color.Aqua); // Config.AddSubMenu(jungleClear); //} /*----------------------------------------------------------------------------------------------------------*/ //Obj_AI_Base ally = (from aAllies in HeroManager.Allies // from aSupportedChampions in // new[] // { // "janna", "tahm", "leona", "lulu", "lux", "nami", "shen", "sona", "braum", "bard" // } // where aSupportedChampions == aAllies.ChampionName.ToLower() // select aAllies).FirstOrDefault(); //if (ally != null) //{ // var menuAllies = new Menu("Ally Combo", "Ally.Combo").SetFontStyle(FontStyle.Regular, Color.Crimson); // { // AIHeroClient leona = HeroManager.Allies.Find(e => e.ChampionName.ToLower() == "leona"); // if (leona != null) // { // var menuLeona = new Menu("Leona", "Leona"); // menuLeona.AddItem(new MenuItem("Leona.ComboBuff", "Force Focus Marked Enemy for Bonus Damage").SetValue(true)); // menuAllies.AddSubMenu(menuLeona); // } // AIHeroClient Lux = HeroManager.Allies.Find(e => e.ChampionName.ToLower() == "lux"); // if (Lux != null) // { // var menuLux = new Menu("Lux", "Lux"); // menuLux.AddItem(new MenuItem("Lux.ComboBuff", "Force Focus Marked Enemy for Bonus Damage").SetValue(true)); // menuAllies.AddSubMenu(menuLux); // } // AIHeroClient Shen = HeroManager.Allies.Find(e => e.ChampionName.ToLower() == "shen"); // if (Shen != null) // { // var menuShen = new Menu("Shen", "Shen"); // menuShen.AddItem(new MenuItem("Shen.ComboBuff", "Force Focus Q Marked Enemy Objects for Heal").SetValue(true)); // menuShen.AddItem(new MenuItem("Shen.ComboBuff", "Minimum Heal:").SetValue(new Slider(80))); // menuAllies.AddSubMenu(menuShen); // } // AIHeroClient Tahm = HeroManager.Allies.Find(e => e.ChampionName.ToLower() == "Tahm"); // if (Tahm != null) // { // var menuTahm = new Menu("Tahm", "Tahm"); // menuTahm.AddItem(new MenuItem("Tahm.ComboBuff", "Force Focus Marked Enemy for Stun").SetValue(true)); // menuAllies.AddSubMenu(menuTahm); // } // AIHeroClient Sona = HeroManager.Allies.Find(e => e.ChampionName.ToLower() == "Sona"); // if (Sona != null) // { // var menuSona = new Menu("Sona", "Sona"); // menuSona.AddItem(new MenuItem("Sona.ComboBuff", "Force Focus to Marked Enemy").SetValue(true)); // menuAllies.AddSubMenu(menuSona); // } // AIHeroClient Lulu = HeroManager.Allies.Find(e => e.ChampionName.ToLower() == "Lulu"); // if (Lulu != null) // { // var menuLulu = new Menu("Lulu", "Lulu"); // menuLulu.AddItem(new MenuItem("Lulu.ComboBuff", "Force Focus to Enemy If I have E buff").SetValue(true)); // menuAllies.AddSubMenu(menuLulu); // } // AIHeroClient Nami = HeroManager.Allies.Find(e => e.ChampionName.ToLower() == "nami"); // if (Nami != null) // { // var menuNami = new Menu("Nami", "Nami"); // menuNami.AddItem(new MenuItem("Nami.ComboBuff", "Force Focus to Enemy If I have E Buff").SetValue(true)); // menuAllies.AddSubMenu(menuNami); // } // } // Config.AddSubMenu(menuAllies); //} /*----------------------------------------------------------------------------------------------------------*/ var misc = new Menu("Misc", "Misc").SetFontStyle(FontStyle.Regular, SharpDX.Color.DarkOrange); if (ChampionClass.MiscMenu(misc)) { misc.AddItem(new MenuItem("Misc.SaveManaForUltimate", "Save Mana for Ultimate").SetValue(false)); Config.AddSubMenu(misc); } /* * var extras = new Menu("Extras", "Extras"); * if (ChampionClass.ExtrasMenu(extras)) * { * Config.AddSubMenu(extras); * } */ var marksmanDrawings = new Menu("Drawings", "MDrawings"); Config.AddSubMenu(marksmanDrawings); var drawing = new Menu(CultureInfo.CurrentCulture.TextInfo.ToTitleCase(championName), "Drawings").SetFontStyle(FontStyle.Regular, SharpDX.Color.Aquamarine); if (ChampionClass.DrawingMenu(drawing)) { marksmanDrawings.AddSubMenu(drawing); } var globalDrawings = new Menu("Global", "GDrawings"); { marksmanDrawings.AddItem(new MenuItem("Draw.TurnOff", "Drawings").SetValue(new StringList(new[] { "Disable", "Enable", "Disable on Combo Mode", "Disable on Lane/Jungle Mode", "Both" }, 1))); globalDrawings.AddItem(new MenuItem("Draw.MinionLastHit", "Minion Last Hit").SetValue(new StringList(new[] { "Off", "On", "Just Out of AA Range Minions" }, 2))); globalDrawings.AddItem(new MenuItem("Draw.KillableEnemy", "Killable Enemy Text").SetValue(false)); //GlobalDrawings.AddItem(new MenuItem("Draw.JunglePosition", "Jungle Farm Position").SetValue(new StringList(new[] { "Off", "If I'm Close to Mobs", "If Jungle Clear Active" }, 2))); marksmanDrawings.AddSubMenu(globalDrawings); } //CreateButtons(); } ChampionClass.MainMenu(Config); ChampionClass.ToolsMenu(MenuExtraTools); //Evade.Evade.Initiliaze(); //Config.AddSubMenu(Evade.Config.Menu); //var y = new Common.CommonObjectDetector(); Config.AddToMainMenu(); MenuExtraTools.AddToMainMenu(); foreach (var i in Config.Children.SelectMany(GetChildirens)) { i.DisplayName = ":: " + i.DisplayName; } foreach (var i in MenuExtraTools.Children.SelectMany(GetChildirens)) { i.DisplayName = ":: " + i.DisplayName; } //CheckAutoWindUp(); Drawing.OnDraw += Drawing_OnDraw; Drawing.OnEndScene += eventArgs => { //DrawButtons(); if (Config.Item("Draw.KillableEnemy").GetValue <bool>()) { foreach (var e in HeroManager.Enemies.Where(e => e.IsValidTarget(Orbwalking.GetRealAutoAttackRange(null) * 2))) { var x = (int)Math.Ceiling(e.Health / ObjectManager.Player.GetAutoAttackDamage(e)); //Utils.Utils.DrawText(CommonGeometry.Text, $"{x} x AA = Kill", (int)e.HPBarPosition.X + 20, (int)e.HPBarPosition.Y + 17, SharpDX.Color.White); CommonGeometry.Text.DrawTextLeft(string.Format("{0} x AA Kill", x), (int)e.HPBarPosition.X + 5, (int)e.HPBarPosition.Y + 25, SharpDX.Color.White); } //var t = KillableEnemyAa; //if (t.Key != null && t.Key.IsValidTarget(Orbwalking.GetRealAutoAttackRange(null) + 1000) && // t.Value > 0) //{ // Utils.Utils.DrawText(CommonGeometry.Text, string.Format("{0} x AA Damage = Kill", t.Value), (int)t.Key.HPBarPosition.X + 30, (int)t.Key.HPBarPosition.Y + 5, SharpDX.Color.White); //} } }; Game.OnUpdate += GameOnUpdate; Game.OnUpdate += delegate(EventArgs eventArgs) { ChampionClass.GameOnUpdate(eventArgs); }; Game.OnUpdate += eventArgs => { if (ChampionClass.ComboActive) { ChampionClass.ExecuteCombo(); } if (ChampionClass.LaneClearActive) { ChampionClass.ExecuteLane(); } if (ChampionClass.JungleClearActive) { ChampionClass.ExecuteJungle(); } ChampionClass.PermaActive(); }; Orbwalking.OnAttack += (unit, target) => {// // if (unit.IsMe) // Chat.Print("Attack"); }; Orbwalking.AfterAttack += (unit, target) => { ChampionClass.Orbwalking_AfterAttack(unit, target); }; Orbwalking.BeforeAttack += (eventArgs) => { ChampionClass.Orbwalking_BeforeAttack(eventArgs); }; GameObject.OnCreate += (sender, eventArgs) => { ChampionClass.OnCreateObject(sender, eventArgs); }; GameObject.OnDelete += (sender, eventArgs) => { ChampionClass.OnDeleteObject(sender, eventArgs); }; Drawing.OnEndScene += eventArgs => { ChampionClass.DrawingOnEndScene(eventArgs); }; Obj_AI_Base.OnBuffGain += (sender, eventArgs) => { ChampionClass.Obj_AI_Base_OnBuffAdd(sender, eventArgs); }; Obj_AI_Base.OnBuffLose += (sender, eventArgs) => { ChampionClass.Obj_AI_Base_OnBuffLose(sender, eventArgs); }; Obj_AI_Base.OnProcessSpellCast += (sender, eventArgs) => { ChampionClass.Obj_AI_Base_OnProcessSpellCast(sender, eventArgs); }; Obj_AI_Base.OnPlayAnimation += (sender, eventArgs) => { ChampionClass.Obj_AI_Base_OnPlayAnimation(sender, eventArgs); }; AntiGapcloser.OnEnemyGapcloser += (gapcloser) => { ChampionClass.AntiGapcloser_OnEnemyGapcloser(gapcloser); }; Spellbook.OnCastSpell += (sender, eventArgs) => { ChampionClass.Spellbook_OnCastSpell(sender, eventArgs); }; Interrupter2.OnInterruptableTarget += (sender, eventArgs) => { ChampionClass.Interrupter2_OnInterruptableTarget(sender, eventArgs); }; Obj_AI_Base.OnPlayAnimation += (sender, eventArgs) => { ChampionClass.Obj_AI_Base_OnPlayAnimation(sender, eventArgs); }; Console.Clear(); }