public void Run() { MenuActivator InterfaceMenuActivator = new MenuActivator(BuildMenuWithInterfaceNotificationMode()); MainMenu DelegateMainMenu = BuildMenuWithDelegateNotificationMode(); ////by delegates Console.WriteLine("Starting first menu (inteface mode)"); InterfaceMenuActivator.ActiveMenu(); Console.WriteLine("Starting second menu (delegate mode)"); DelegateMainMenu.Show(); }
public static void Game_OnGameLoad() { Config = MainMenu.AddMenu("Marksman", "Marksman"); ChampionClass = new Marksman.Champions.Champion(); Common.CommonGeometry.Init(); var BaseType = ChampionClass.GetType(); /* 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 "gnar": ChampionClass = new Gnar(); break; case "graves": ChampionClass = new Graves(); 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 "sivir": ChampionClass = new Sivir(); break; case "missfortune": ChampionClass = new MissFortune(); break; /* * case "quinn": * ChampionClass = new Quinn(); * 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; */ } Config.DisplayName = "Marksman Lite"; ChampionClass.Config = Config; MenuExtraTools = Config.AddSubMenu("Extra Tools", "ExtraTools"); { MenuExtraTools.AddLabel("Press F5 for Load Extra Tools!"); MenuExtraTools.Add("ExtraTools.Prediction", new ComboBox("Prediction:", 0, "LeagueSharp Common", "SPrediction (Synx)")); MenuExtraTools.Add("ExtraTools.AutoLevel", new CheckBox("Auto Leveler:", false)); MenuExtraTools.Add("ExtraTools.AutoBush", new CheckBox("Auto Bush Ward:", false)); MenuExtraTools.Add("ExtraTools.AutoPink", new CheckBox("Auto Pink Ward:", false)); MenuExtraTools.Add("ExtraTools.Emote", new CheckBox("Emote:", false)); MenuExtraTools.Add("ExtraTools.BuffTimer", new CheckBox("Buff Time Manager:", false)); MenuExtraTools.Add("ExtraTools.Potition", new CheckBox("Potition Manager:", false)); MenuExtraTools.Add("ExtraTools.Summoners", new CheckBox("Summoner Manager:", false)); MenuExtraTools.Add("ExtraTools.Tracker", new CheckBox("Tracker:", false)); } Common.CommonSettings.Init(Config); MenuActivator = Config.AddSubMenu("Activator", "Activator"); { MenuActivator.Add("BOTRK", new CheckBox("BOTRK")); MenuActivator.Add("GHOSTBLADE", new CheckBox("Ghostblade")); MenuActivator.Add("SWORD", new CheckBox("Sword of the Divine")); MenuActivator.Add("MURAMANA", new CheckBox("Muramana")); MenuActivator.Add("UseItemsMode", new ComboBox("Use items on", 2, "No", "Mixed mode", "Combo mode", "Both")); if (MenuExtraTools["ExtraTools.AutoLevel"].Cast <CheckBox>().CurrentValue) { Common.CommonAutoLevel.Init(MenuActivator); } if (MenuExtraTools["ExtraTools.AutoPink"].Cast <CheckBox>().CurrentValue) { Common.CommonAutoPink.Initialize(MenuActivator); } if (MenuExtraTools["ExtraTools.AutoBush"].Cast <CheckBox>().CurrentValue) { Common.CommonAutoBush.Init(MenuActivator); } if (MenuExtraTools["ExtraTools.Emote"].Cast <CheckBox>().CurrentValue) { Common.CommonEmote.Init(MenuActivator); } } // If Champion is supported draw the extra menus if (BaseType != ChampionClass.GetType()) { SetSmiteSlot(); combo = Config.AddSubMenu("Combo", "Combo"); if (ChampionClass.ComboMenu(combo)) { if (SmiteSlot != SpellSlot.Unknown) { combo.Add("ComboSmite", new CheckBox("Use Smite")); } } harass = Config.AddSubMenu("Harass", "Harass"); if (ChampionClass.HarassMenu(harass)) { harass.Add("HarassMana", new Slider("Min. Mana Percent", 50, 0, 100)); } laneclear = Config.AddSubMenu("Lane Mode", "LaneClear"); if (ChampionClass.LaneClearMenu(laneclear)) { laneclear.Add("Lane.Enabled", new KeyBind(":: Enable Lane Farm!", true, KeyBind.BindTypes.PressToggle, 'L')); laneclear.AddGroupLabel("Min. Mana Settings"); { laneclear.Add("LaneMana.Alone", new Slider("If I'm Alone %:", 30, 0, 100)); laneclear.Add("LaneMana.Enemy", new Slider("If Enemy Close %:", 60, 0, 100)); } } jungleClear = Config.AddSubMenu("Jungle Mode", "JungleClear"); if (ChampionClass.JungleClearMenu(jungleClear)) { jungleClear.AddGroupLabel("Min. Mana Settings"); { jungleClear.Add("Jungle.Mana.Ally", new Slider("Ally Mobs %:", 50, 0, 100)); jungleClear.Add("Jungle.Mana.Enemy", new Slider("Enemy Mobs %:", 30, 0, 100)); jungleClear.Add("Jungle.Mana.BigBoys", new Slider("Baron/Dragon %:", 70, 0, 100)); } jungleClear.Add("Jungle.Items", new ComboBox(":: Use Items:", 3, "Off", "Use for Baron", "Use for Baron", "Both")); jungleClear.Add("Jungle.Enabled", new KeyBind(":: Enable Jungle Farm!", true, KeyBind.BindTypes.PressToggle, 'J')); } /*----------------------------------------------------------------------------------------------------------*/ 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) { menuAllies = Config.AddSubMenu("Ally Combo", "Ally.Combo"); { AIHeroClient Leona = HeroManager.Allies.Find(e => e.ChampionName.ToLower() == "leona"); if (Leona != null) { menuAllies.Add("Leona.ComboBuff", new CheckBox("Force Focus Marked Enemy for Bonus Damage")); } AIHeroClient Lux = HeroManager.Allies.Find(e => e.ChampionName.ToLower() == "lux"); if (Lux != null) { menuAllies.Add("Lux.ComboBuff", new CheckBox("Force Focus Marked Enemy for Bonus Damage")); } AIHeroClient Shen = HeroManager.Allies.Find(e => e.ChampionName.ToLower() == "shen"); if (Shen != null) { menuAllies.Add("Shen.ComboBuff", new CheckBox("Force Focus Q Marked Enemy Objects for Heal")); menuAllies.Add("Shen.ComboBuff", new Slider("Minimum Heal:", 80)); } AIHeroClient Tahm = HeroManager.Allies.Find(e => e.ChampionName.ToLower() == "Tahm"); if (Tahm != null) { menuAllies.Add("Tahm.ComboBuff", new CheckBox("Force Focus Marked Enemy for Stun")); } AIHeroClient Sona = HeroManager.Allies.Find(e => e.ChampionName.ToLower() == "Sona"); if (Sona != null) { menuAllies.Add("Sona.ComboBuff", new CheckBox("Force Focus to Marked Enemy")); } AIHeroClient Lulu = HeroManager.Allies.Find(e => e.ChampionName.ToLower() == "Lulu"); if (Lulu != null) { menuAllies.Add("Lulu.ComboBuff", new CheckBox("Force Focus to Enemy If I have E buff")); } AIHeroClient Nami = HeroManager.Allies.Find(e => e.ChampionName.ToLower() == "nami"); if (Nami != null) { menuAllies.Add("Nami.ComboBuff", new CheckBox("Force Focus to Enemy If I have E Buff")); } } } /*----------------------------------------------------------------------------------------------------------*/ misc = Config.AddSubMenu("Misc", "Misc"); if (ChampionClass.MiscMenu(misc)) { misc.Add("Misc.SaveManaForUltimate", new CheckBox("Save Mana for Ultimate", false)); } marksmanDrawings = Config.AddSubMenu("Drawings", "MDrawings"); if (ChampionClass.DrawingMenu(marksmanDrawings)) { //marksmanDrawings.AddSubMenu(drawing); } marksmanDrawings.AddGroupLabel("Global"); { marksmanDrawings.Add("Draw.TurnOff", new ComboBox("Drawings", 1, "Disable", "Enable", "Disable on Combo Mode", "Disable on Lane/Jungle Mode", "Both")); marksmanDrawings.Add("Draw.KillableEnemy", new CheckBox("Killable Enemy Text", false)); marksmanDrawings.Add("Draw.MinionLastHit", new ComboBox("Minion Last Hit", 2, "Off", "On", "Just Out of AA Range Minions")); marksmanDrawings.Add("Draw.DrawMinion", new CheckBox("Draw Minions Sprite", false)); marksmanDrawings.Add("Draw.DrawTarget", new CheckBox("Draw Target Sprite")); marksmanDrawings.AddGroupLabel("Compare me with"); { string[] strCompare = new string[HeroManager.Enemies.Count + 1]; strCompare[0] = "Off"; var i = 1; foreach (var e in HeroManager.Enemies) { strCompare[i] = e.ChampionName; i += 1; } marksmanDrawings.Add("Marksman.Compare.Set", new ComboBox("Set", 1, "Off", "Auto Compare at Startup")); marksmanDrawings.Add("Marksman.Compare", new ComboBox("Compare me with", 0, strCompare)); } } } ChampionClass.MainMenu(Config); Drawing.OnDraw += Drawing_OnDraw; Game.OnUpdate += Game_OnGameUpdate; Game.OnUpdate += eventArgs => { if (ChampionClass.LaneClearActive) { ExecuteLaneClear(); } if (ChampionClass.JungleClearActive) { ExecuteJungleClear(); } PermaActive(); }; Orbwalker.OnPostAttack += Orbwalking_AfterAttack; Orbwalker.OnPreAttack += Orbwalking_BeforeAttack; GameObject.OnCreate += OnCreateObject; GameObject.OnDelete += OnDeleteObject; Obj_AI_Base.OnBuffGain += Obj_AI_Base_OnBuffAdd; Obj_AI_Base.OnBuffLose += Obj_AI_Base_OnBuffRemove; Spellbook.OnCastSpell += Spellbook_OnCastSpell; Obj_AI_Base.OnProcessSpellCast += Obj_AI_Base_OnProcessSpellCast; Console.Clear(); }
public MenuActivatorAttribute(MenuActivator.ActivationTypeEnum activationType) { _activationType = activationType; }