private static void OnLoad(object sender, EventArgs e) { var plugin = Type.GetType("BadaoAIO.Plugin." + Player.ChampionName); if (plugin == null) { AddUI.Notif(Player.ChampionName + ": Not Supported !", 10000); return; } AddUI.Notif(Player.ChampionName + ": Loaded !", 10000); Bootstrap.Init(null); if (Player.ChampionName == "Rammus") { LeagueSharp.SDK.Core.Orbwalker.Enabled = false; Menu Orb = new Menu("Orbwalker", "Orbwalker", true).Attach(); Orbwalker.Orbwalker.Initialize(Orb); } Bilgewater = new Items.Item(ItemId.Bilgewater_Cutlass, 550); BotRK = new Items.Item(ItemId.Blade_of_the_Ruined_King, 550); Youmuu = new Items.Item(ItemId.Youmuus_Ghostblade, 0); Tiamat = new Items.Item(ItemId.Tiamat_Melee_Only, 400); Hydra = new Items.Item(ItemId.Ravenous_Hydra_Melee_Only, 400); Sheen = new Items.Item(ItemId.Sheen, 0); LichBane = new Items.Item(ItemId.Lich_Bane, 0); TrinityForce = new Items.Item(ItemId.Trinity_Force, 0); IcebornGauntlet = new Items.Item(ItemId.Iceborn_Gauntlet, 0); LudensEcho = new Items.Item(ItemId.Ludens_Echo, 0); foreach (var spell in Player.Spellbook.Spells.Where( i => i.Name.ToLower().Contains("smite") && (i.Slot == SpellSlot.Summoner1 || i.Slot == SpellSlot.Summoner2))) { Smite = spell.Slot; } Ignite = Player.GetSpellSlot("summonerdot"); Flash = Player.GetSpellSlot("summonerflash"); MainMenu = new Menu("BadaoAIO", "BadaoAIO", true, Player.ChampionName); AddUI.Bool(MainMenu, "Enable", Player.ChampionName + " Enable", true); MainMenu.Attach(); MainMenu.MenuValueChanged += MainMenu_MenuValueChanged; NewInstance(plugin); }
private static void MainMenu_MenuValueChanged(object sender, LeagueSharp.SDK.Core.UI.IMenu.MenuValueChangedEventArgs e) { var boolean = sender as MenuBool; if (boolean != null) { if (boolean.Name.Equals("Enable")) { enabled = boolean.Value; if (boolean.Value) { AddUI.Notif(Player.ChampionName + ": Enabled !", 4000); } else { AddUI.Notif(Player.ChampionName + ": Disabled !", 4000); } } } }