示例#1
0
        private static void Obj_AI_Base_OnPlaceItemInSlot(Obj_AI_Base sender, Obj_AI_BasePlaceItemInSlotEventArgs args)
        {
            if (!sender.IsMe)
            {
                return;
            }

            int itemid = (int)args.Id;

            foreach (CoreItem item in Lists.Items)
            {
                if (item.Id == itemid)
                {
                    if (!Lists.BoughtItems.Contains(item))
                    {
                        if (item.Category.Any())
                        {
                            Game.OnUpdate += item.OnTick;
                        }

                        if (item.Category.Any(t => t == MenuType.Gapcloser))
                        {
                            AntiGapcloser.OnEnemyGapcloser += item.OnEnemyGapcloser;
                        }

                        Lists.BoughtItems.Add(item);
                        //Game.PrintChat("<b>Activator#</b> - <font color=\"#FFF280\">" + item.Name + "</font> active!");
                        FrozenGJ.Info("K活化剂", MultiLanguage._(item.Name) + "已经激活。。。");
                    }
                }
            }
        }
示例#2
0
        private static object NewInstance(Type type)
        {
            try
            {
                ConstructorInfo target  = type.GetConstructor(Type.EmptyTypes);
                DynamicMethod   dynamic = new DynamicMethod(string.Empty, type, new Type[0], target.DeclaringType);
                ILGenerator     il      = dynamic.GetILGenerator();

                il.DeclareLocal(target.DeclaringType);
                il.Emit(OpCodes.Newobj, target);
                il.Emit(OpCodes.Stloc_0);
                il.Emit(OpCodes.Ldloc_0);
                il.Emit(OpCodes.Ret);

                Func <object> method = (Func <object>)dynamic.CreateDelegate(typeof(Func <object>));
                return(method());
            }

            catch (Exception e)
            {
                Console.WriteLine(e);
                //Game.PrintChat("Exception thrown at <font color=\"#FFF280\">Activator.NewInstance</font>");
                FrozenGJ.Info("K活化剂", "新实例异常!");
                return(null);
            }
        }
示例#3
0
        private static void NewSpell(CoreSpell spell, Menu parent)
        {
            try
            {
                if (Player.GetSpellSlot(spell.Name) != SpellSlot.Unknown)
                {
                    Lists.Spells.Add(spell.CreateMenu(parent));
                }
            }

            catch (Exception e)
            {
                Console.WriteLine(e);
                //Game.PrintChat("Exception thrown at <font color=\"#FFF280\">Activator.NewSpell</font>");
                FrozenGJ.Info("K活化剂", "新技能异常!");
            }
        }
示例#4
0
        private static void NewItem(CoreItem item, Menu parent)
        {
            try
            {
                if (item.Maps.Contains((MapType)MapId) ||
                    item.Maps.Contains(MapType.Common))
                {
                    Lists.Items.Add(item.CreateMenu(parent));
                }
            }

            catch (Exception e)
            {
                Console.WriteLine(e);
                //Game.PrintChat("Exception thrown at <font color=\"#FFF280\">Activator.NewItem</font>");
                FrozenGJ.Info("K活化剂", "新物品异常!");
            }
        }
示例#5
0
        public static void OnLoad(EventArgs args)
        {
            try
            {
                var plugins =
                    Assembly.GetExecutingAssembly()
                    .GetTypes()
                    .Where(x => typeof(IPlugin).IsAssignableFrom(x) && !x.IsInterface)
                    .Select(x => GetActivator <IPlugin>(x.GetConstructors().First())(null));

                FrozenGJ.Info("EL工具集");

                var menu = new Menu("ElUtilitySuite", "ElUtilitySuite", true).SetFontStyle(FontStyle.Bold, Color.GreenYellow);

                foreach (var plugin in plugins)
                {
                    plugin.CreateMenu(menu);
                    plugin.Load();
                }

                foreach (var ally in HeroManager.Allies)
                {
                    IncomingDamageManager.AddChampion(ally);
                    Console.ForegroundColor = ConsoleColor.Green;
                    Console.WriteLine(@"[ELUTILITYSUITE] loaded champions: {0}", ally.ChampionName);
                }
                Console.ForegroundColor = ConsoleColor.White;

                menu.AddItem(new MenuItem("seperator1", ""));
                menu.AddItem(new MenuItem("usecombo", "Combo (Active)").SetValue(new KeyBind(32, KeyBindType.Press)));
                menu.AddItem(new MenuItem("seperator", ""));
                menu.AddItem(new MenuItem("Versionnumber", $"Version: {ScriptVersion}"));
                menu.AddItem(new MenuItem("by.jQuery", "jQuery / ChewyMoon"));
                menu.AddToMainMenu();

                Menu = menu;
            }
            catch (Exception e)
            {
                Console.WriteLine(@"An error occurred: '{0}'", e);
            }
        }
示例#6
0
        private static void NewSumm(CoreSum summoner, Menu parent)
        {
            try
            {
                if (summoner.Name.Contains("smite") && SmiteInGame)
                {
                    Lists.Summoners.Add(summoner.CreateMenu(parent));
                }

                if (!summoner.Name.Contains("smite") && Player.GetSpellSlot(summoner.Name) != SpellSlot.Unknown)
                {
                    Lists.Summoners.Add(summoner.CreateMenu(parent));
                }
            }

            catch (Exception e)
            {
                Console.WriteLine(e);
                //Game.PrintChat("Exception thrown at <font color=\"#FFF280\">Activator.NewSumm</font>");
                FrozenGJ.Info("K活化剂", "新召唤师技能异常!");
            }
        }
示例#7
0
        private static List <Type> GetItemGroup(string nspace)
        {
            try
            {
                Type[] allowedTypes = new[] { typeof(CoreItem), typeof(CoreSpell), typeof(CoreSum) };

                return
                    (Assembly.GetExecutingAssembly()
                     .GetTypes()
                     .Where(
                         t =>
                         t.IsClass && t.Namespace == "Activator." + nspace && !t.Name.Contains("Core") &&
                         allowedTypes.Any(x => x.IsAssignableFrom(t)))
                     .ToList());
            }

            catch (Exception e)
            {
                Console.WriteLine(e);
                //Game.PrintChat("Exception thrown at <font color=\"#FFF280\">Activator.GetItemGroup</font>");
                FrozenGJ.Info("K活化剂", "新物品组异常!");
                return(null);
            }
        }
示例#8
0
        private static void Events_OnLoad(object sender, EventArgs e)
        {
            if (Player.ChampionName != "Ezreal")
            {
                return;
            }
            Orbwalker = Variables.Orbwalker;
            Variables.Orbwalker.Enabled = true;

            //Q = new Spell(SpellSlot.Q, 1170);
            //W = new Spell(SpellSlot.W, 950);
            //E = new Spell(SpellSlot.E, 475);
            //R = new Spell(SpellSlot.R, 3000f);

            Q = new Spell(SpellSlot.Q, 1160);
            W = new Spell(SpellSlot.W, 930);
            E = new Spell(SpellSlot.E, 475);
            R = new Spell(SpellSlot.R, 3000f);

            Q.SetSkillshot(0.25f, 60f, 2000f, true, SkillshotType.SkillshotLine);
            W.SetSkillshot(0.25f, 80f, 1600f, false, SkillshotType.SkillshotLine);
            R.SetSkillshot(1.1f, 160f, 2000f, false, SkillshotType.SkillshotLine);

            FrozenGJ.Info("云Ezreal [SDK]");

            EzMenu = new Menu("云Ezreal", "云Ezreal", true).Attach();

            SpellMenu = EzMenu.Add(new Menu("技能设置", "技能设置"));
            SpellMenu.Add(new MenuBool("EKs", "E抢人头", true));
            SpellMenu.Add(new MenuKeyBind("SemiCastR", "半手动R", Keys.Alt | Keys.R, KeyBindType.Press));
            SpellMenu.Add(new MenuSlider("minR", "R最小距离", 780, 0, 5000));
            SpellMenu.Add(new MenuSlider("maxR", "R最大距离", 3500, 0, 5000));

            JungleStealerMenu = EzMenu.Add(new Menu("抢野怪设置", "抢野怪设置"));
            JungleStealerMenu.Add(new MenuBool("Rjungle", "R抢野", true));
            JungleStealerMenu.Add(new MenuKeyBind("ForceJungle", "强制抢野键", Keys.J, KeyBindType.Press));
            JungleStealerMenu.Add(new MenuBool("Rdragon", "小龙", true));
            JungleStealerMenu.Add(new MenuBool("Rbaron", "大龙", true));
            JungleStealerMenu.Add(new MenuBool("Rred", "红Buff", true));
            JungleStealerMenu.Add(new MenuBool("Rblue", "蓝BUff", true));

            AntiMeleeMenu = EzMenu.Add(new Menu("防近身设置", "防近身设置"));
            AntiMeleeMenu.Add(new MenuBool("AntiMelee", "防止以下敌人近身", true));
            foreach (var enemyHero in GameObjects.EnemyHeroes)
            {
                AntiMeleeMenu.Add(new MenuBool(enemyHero.ChampionName, enemyHero.ChampionName));
            }

            DrawMenu = EzMenu.Add(new Menu("显示设置", "显示设置"));
            DrawMenu.Add(new MenuBool("Qrange", "显示Q范围", true));

            EzMenu.Add(new MenuButton("ResetMenu", "重置菜单", "重置")
            {
                Action = ResetMenu
            });

            Game.OnUpdate  += Game_OnUpdate;
            Drawing.OnDraw += Drawing_OnDraw;
            Variables.Orbwalker.OnAction += Orbwalker_OnAction;
            Obj_AI_Base.OnBuffAdd        += Obj_AI_Base_OnBuffAdd;
            Events.OnGapCloser           += Events_OnGapCloser;
        }
示例#9
0
        private static void Game_OnGameLoad(EventArgs args)
        {
            try
            {
                Player = ObjectManager.Player;
                MapId  = (int)Utility.Map.GetMap().Type;
                Rand   = new Random();

                GetSpellsInGame();
                GetSmiteSlot();
                GetGameTroysInGame();
                GetAurasInGame();
                GetHeroesInGame();
                GetComboDamage();

                Origin = new Menu("Activator", "activator", true);

                Menu cmenu = new Menu("Cleansers", "cmenu");
                CreateSubMenu(cmenu, false);
                GetItemGroup("Items.Cleansers").ForEach(t => NewItem((CoreItem)NewInstance(t), cmenu));
                Origin.AddSubMenu(cmenu);

                Menu dmenu = new Menu("Defensives", "dmenu");
                CreateSubMenu(dmenu, false);
                GetItemGroup("Items.Defensives").ForEach(t => NewItem((CoreItem)NewInstance(t), dmenu));
                Origin.AddSubMenu(dmenu);

                Menu smenu = new Menu("Summoners", "smenu");
                GetItemGroup("Summoners").ForEach(t => NewSumm((CoreSum)NewInstance(t), smenu));
                CreateSubMenu(smenu, true, true);
                Origin.AddSubMenu(smenu);

                Menu omenu = new Menu("Offensives", "omenu");
                CreateSubMenu(omenu, true);
                GetItemGroup("Items.Offensives").ForEach(t => NewItem((CoreItem)NewInstance(t), omenu));
                Origin.AddSubMenu(omenu);

                Menu imenu = new Menu("Consumables", "imenu");
                GetItemGroup("Items.Consumables").ForEach(t => NewItem((CoreItem)NewInstance(t), imenu));
                Origin.AddSubMenu(imenu);

                Menu amenu = new Menu("Auto Spells", "amenu");
                CreateSubMenu(amenu, false);
                GetItemGroup("Spells.Evaders").ForEach(t => NewSpell((CoreSpell)NewInstance(t), amenu));
                GetItemGroup("Spells.Shields").ForEach(t => NewSpell((CoreSpell)NewInstance(t), amenu));
                GetItemGroup("Spells.Health").ForEach(t => NewSpell((CoreSpell)NewInstance(t), amenu));
                GetItemGroup("Spells.Slows").ForEach(t => NewSpell((CoreSpell)NewInstance(t), amenu));
                GetItemGroup("Spells.Heals").ForEach(t => NewSpell((CoreSpell)NewInstance(t), amenu));
                Origin.AddSubMenu(amenu);

                Menu zmenu = new Menu("Misc/Settings", "settings");

                if (SmiteInGame)
                {
                    Menu ddmenu = new Menu("Drawings", "drawings");
                    ddmenu.AddItem(new MenuItem("drawsmitet", "Draw Smite Text")).SetValue(true);
                    ddmenu.AddItem(new MenuItem("drawfill", "Draw Smite Fill")).SetValue(true);
                    ddmenu.AddItem(new MenuItem("drawsmite", "Draw Smite Range")).SetValue(true);
                    zmenu.AddSubMenu(ddmenu);
                }

                zmenu.AddItem(new MenuItem("acdebug", "Debug")).SetValue(false);
                zmenu.AddItem(new MenuItem("autolevelup", "Auto Level Ultimate")).SetValue(true).SetTooltip("Level 6 Only");
                zmenu.AddItem(new MenuItem("autotrinket", "Auto Upgrade Trinket")).SetValue(false);
                zmenu.AddItem(new MenuItem("healthp", "Ally Priority:")).SetValue(new StringList(new[] { "Low HP", "Most AD/AP", "Most HP" }, 1));
                zmenu.AddItem(new MenuItem("weightdmg", "Weight Income Damage (%)"))
                .SetValue(new Slider(115, 100, 150))
                .SetTooltip("Make Activator# think you are taking more damage than calulated.");
                zmenu.AddItem(new MenuItem("usecombo", "Combo (active)")).SetValue(new KeyBind(32, KeyBindType.Press, true));

                Menu uumenu = new Menu("Spell Database", "evadem");
                LoadSpellMenu(uumenu);
                zmenu.AddSubMenu(uumenu);

                Origin.AddSubMenu(zmenu);
                Origin.AddToMainMenu();

                // drawings
                Drawings.Init();

                // handlers
                Projections.Init();
                Trinkets.Init();

                // tracks dangerous or lethal buffs/auras
                Buffs.StartOnUpdate();

                // tracks gameobjects
                Gametroys.StartOnUpdate();

                // on bought item
                Obj_AI_Base.OnPlaceItemInSlot += Obj_AI_Base_OnPlaceItemInSlot;

                // on level up
                Obj_AI_Base.OnLevelUp += Obj_AI_Base_OnLevelUp;

                //Game.PrintChat("<b><font color=\"#FF3366\">Activator#</font></b> - Loaded!");
                //Updater.UpdateCheck();

                FrozenGJ.Info("K活化剂");

                // init valid auto spells
                foreach (CoreSpell autospell in Lists.Spells)
                {
                    if (Player.GetSpellSlot(autospell.Name) != SpellSlot.Unknown)
                    {
                        Game.OnUpdate += autospell.OnTick;
                    }
                }

                // init valid summoners
                foreach (CoreSum summoner in Lists.Summoners)
                {
                    if (summoner.Slot != SpellSlot.Unknown ||
                        summoner.ExtraNames.Any(x => Player.GetSpellSlot(x) != SpellSlot.Unknown))
                    {
                        Game.OnUpdate += summoner.OnTick;
                    }
                }

                // find items (if F5)
                foreach (CoreItem item in Lists.Items)
                {
                    if (!LeagueSharp.Common.Items.HasItem(item.Id))
                    {
                        continue;
                    }

                    if (!Lists.BoughtItems.Contains(item))
                    {
                        if (item.Category.Any())
                        {
                            Game.OnUpdate += item.OnTick;
                        }

                        if (item.Category.Any(t => t == MenuType.Gapcloser))
                        {
                            AntiGapcloser.OnEnemyGapcloser += item.OnEnemyGapcloser;
                        }

                        Lists.BoughtItems.Add(item);
                        //Game.PrintChat("<b>Activator#</b> - <font color=\"#FFF280\">" + item.Name + "</font> active!");

                        FrozenGJ.Info("K活化剂", MultiLanguage._(item.Name) + "已激活。。。");
                    }
                }
            }

            catch (Exception e)
            {
                Console.WriteLine(e);
                //Game.PrintChat("Exception thrown at <font color=\"#FFF280\">Activator.OnGameLoad</font>");

                FrozenGJ.Info("K活化剂", "OnGameLoad异常");
            }
        }
示例#10
0
        private static void GameOnOnGameLoad(EventArgs args)
        {
            TextBold = new Font(Drawing.Direct3DDevice, new FontDescription
            {
                FaceName = "Impact", Height = 30, Weight = FontWeight.Normal, OutputPrecision = FontPrecision.Default, Quality = FontQuality.ClearType
            });

            enemySpawn = ObjectManager.Get <Obj_SpawnPoint>().FirstOrDefault(x => x.IsEnemy);
            Q          = new Spell(SpellSlot.Q);
            E          = new Spell(SpellSlot.E);
            W          = new Spell(SpellSlot.W);
            R          = new Spell(SpellSlot.R);

            Config = new Menu("OneKeyToWin AIO", "OneKeyToWin_AIO" + ObjectManager.Player.ChampionName, true);

            #region MENU ABOUT OKTW
            Config.SubMenu("About OKTW©").AddItem(new MenuItem("debug", "Debug").SetValue(false));
            Config.SubMenu("About OKTW©").AddItem(new MenuItem("debugChat", "Debug Chat").SetValue(false));
            Config.SubMenu("About OKTW©").AddItem(new MenuItem("0", "OneKeyToWin© by Sebby"));
            Config.SubMenu("About OKTW©").AddItem(new MenuItem("1", "visit joduska.me"));
            Config.SubMenu("About OKTW©").AddItem(new MenuItem("2", "DONATE: [email protected]"));
            Config.SubMenu("About OKTW©").AddItem(new MenuItem("print", "OKTW NEWS in chat").SetValue(true));
            #endregion

            Config.AddItem(new MenuItem("AIOmode", "AIO mode", true).SetValue(new StringList(new[] { "Utility and champion", "Only Champion", "Only Utility" }, 0)));

            AIOmode = Config.Item("AIOmode", true).GetValue <StringList>().SelectedIndex;

            //var targetSelectorMenu = new Menu("Target Selector", "Target Selector");
            //TargetSelector.AddToMenu(targetSelectorMenu);
            //Config.AddSubMenu(targetSelectorMenu);

            if (AIOmode != 2)
            {
                if (Player.ChampionName != "MissFortune")
                {
                    new Core.OktwTs().LoadOKTW();
                }
                Config.AddSubMenu(new Menu("Orbwalking", "Orbwalking"));
                Orbwalker = new SebbyLib.Orbwalking.Orbwalker(Config.SubMenu("Orbwalking"));
            }

            if (AIOmode != 1)
            {
                Config.SubMenu("Utility, Draws OKTW©").SubMenu("GankTimer").AddItem(new MenuItem("timer", "GankTimer").SetValue(true));
                Config.SubMenu("Utility, Draws OKTW©").SubMenu("GankTimer").AddItem(new MenuItem("1", "RED - be careful"));
                Config.SubMenu("Utility, Draws OKTW©").SubMenu("GankTimer").AddItem(new MenuItem("2", "ORANGE - you have time"));
                Config.SubMenu("Utility, Draws OKTW©").SubMenu("GankTimer").AddItem(new MenuItem("3", "GREEN - jungler visable"));
                Config.SubMenu("Utility, Draws OKTW©").SubMenu("GankTimer").AddItem(new MenuItem("4", "CYAN jungler dead - take objectives"));
            }

            Config.SubMenu("Prediction MODE").AddItem(new MenuItem("PredictionMODE", "Prediction MODE", true).SetValue(new StringList(new[] { "Common prediction", "OKTW© PREDICTION", "SPediction press F5 if not loaded", "SDK" }, 1)));
            Config.SubMenu("Prediction MODE").AddItem(new MenuItem("HitChance", "Hit Chance", true).SetValue(new StringList(new[] { "Very High", "High", "Medium" }, 0)));
            Config.SubMenu("Prediction MODE").AddItem(new MenuItem("debugPred", "Draw Aiming OKTW© PREDICTION").SetValue(false));

            if (Config.Item("PredictionMODE", true).GetValue <StringList>().SelectedIndex == 2)
            {
                SPrediction.Prediction.Initialize(Config.SubMenu("Prediction MODE"));
                SPredictionLoad = true;
                Config.SubMenu("Prediction MODE").AddItem(new MenuItem("322", "SPREDICTION LOADED"));
            }
            else
            {
                Config.SubMenu("Prediction MODE").AddItem(new MenuItem("322", "SPREDICTION NOT LOADED"));
            }

            if (AIOmode != 2)
            {
                Config.SubMenu("Extra settings OKTW©").AddItem(new MenuItem("supportMode", "Support Mode", true).SetValue(false));
                Config.SubMenu("Extra settings OKTW©").AddItem(new MenuItem("comboDisableMode", "Disable auto-attack in combo mode", true).SetValue(false));
                Config.SubMenu("Extra settings OKTW©").AddItem(new MenuItem("manaDisable", "Disable mana manager in combo", true).SetValue(false));
                Config.SubMenu("Extra settings OKTW©").AddItem(new MenuItem("collAA", "Disable auto-attack if Yasuo wall collision", true).SetValue(true));
                Config.SubMenu("Extra settings OKTW©").SubMenu("Anti-Melee Positioning Assistant OKTW©").AddItem(new MenuItem("positioningAssistant", "Anti-Melee Positioning Assistant OKTW©").SetValue(false));

                foreach (var enemy in HeroManager.Enemies.Where(enemy => enemy.IsMelee))
                {
                    Config.SubMenu("Extra settings OKTW©").SubMenu("Anti-Melee Positioning Assistant OKTW©").SubMenu("Positioning Assistant:").AddItem(new MenuItem("posAssistant" + enemy.ChampionName, enemy.ChampionName).SetValue(true));
                }
                Config.SubMenu("Extra settings OKTW©").SubMenu("Anti-Melee Positioning Assistant OKTW©").AddItem(new MenuItem("positioningAssistantDraw", "Show notification").SetValue(true));
                Config.SubMenu("Extra settings OKTW©").AddItem(new MenuItem("harassLaneclear", "Skill-Harass in lane clear").SetValue(true));
                Config.Item("supportMode", true).SetValue(false);

                #region LOAD CHAMPIONS

                switch (Player.ChampionName)
                {
                case "Jinx":
                    new Jinx().LoadOKTW();
                    break;

                case "Sivir":
                    new Sivir().LoadOKTW();
                    break;

                case "Ezreal":
                    new Ezreal().LoadOKTW();
                    break;

                case "KogMaw":
                    new KogMaw().LoadOKTW();
                    break;

                case "Annie":
                    new Annie().LoadOKTW();
                    break;

                case "Ashe":
                    new Ashe().LoadOKTW();
                    break;

                case "MissFortune":
                    new MissFortune().LoadOKTW();
                    break;

                case "Quinn":
                    new Quinn().LoadOKTW();
                    break;

                case "Kalista":
                    new Kalista().LoadOKTW();
                    break;

                case "Caitlyn":
                    new Caitlyn().LoadOKTW();
                    break;

                case "Graves":
                    new Graves().LoadOKTW();
                    break;

                case "Urgot":
                    new Urgot().LoadOKTW();
                    break;

                case "Anivia":
                    new Anivia().LoadOKTW();
                    break;

                case "Orianna":
                    new Orianna().LoadOKTW();
                    break;

                case "Ekko":
                    new Ekko().LoadOKTW();
                    break;

                case "Vayne":
                    new Vayne().LoadOKTW();
                    break;

                case "Lucian":
                    new Lucian().LoadOKTW();
                    break;

                case "Darius":
                    new Champions.Darius().LoadOKTW();
                    break;

                case "Blitzcrank":
                    new Champions.Blitzcrank().LoadOKTW();
                    break;

                case "Corki":
                    new Champions.Corki().LoadOKTW();
                    break;

                case "Varus":
                    new Champions.Varus().LoadOKTW();
                    break;

                case "Twitch":
                    new Champions.Twitch().LoadOKTW();
                    break;

                case "Tristana":
                    new Champions.Tristana().LoadMenuOKTW();
                    break;

                case "Xerath":
                    new Champions.Xerath().LoadOKTW();
                    break;

                case "Jayce":
                    new Champions.Jayce().LoadOKTW();
                    break;

                case "Kayle":
                    new Champions.Kayle().LoadOKTW();
                    break;

                case "Thresh":
                    new Champions.Thresh().LoadOKTW();
                    break;

                case "Draven":
                    new Champions.Draven().LoadOKTW();
                    break;

                case "Evelynn":
                    new Champions.Evelynn().LoadOKTW();
                    break;

                case "Ahri":
                    new Champions.Ahri().LoadOKTW();
                    break;

                case "Brand":
                    new Champions.Brand().LoadOKTW();
                    break;

                case "Morgana":
                    new Morgana().LoadOKTW();
                    break;

                case "Lux":
                    new Champions.Lux().LoadOKTW();
                    break;

                case "Malzahar":
                    new Champions.Malzahar().LoadOKTW();
                    break;

                case "Karthus":
                    new Champions.Karthus().LoadOKTW();
                    break;

                case "Swain":
                    new Champions.Swain().LoadOKTW();
                    break;

                case "TwistedFate":
                    new Champions.TwistedFate().LoadOKTW();
                    break;

                case "Syndra":
                    new Champions.Syndra().LoadOKTW();
                    break;

                case "Velkoz":
                    new Champions.Velkoz().LoadOKTW();
                    break;

                case "Jhin":
                    new Champions.Jhin().LoadOKTW();
                    break;

                case "Kindred":
                    new Champions.Kindred().LoadOKTW();
                    break;

                case "Braum":
                    new Champions.Braum().LoadOKTW();
                    break;
                }
                #endregion

                Config.SubMenu(Player.ChampionName).SubMenu("Farm").SubMenu("SPELLS FARM TOGGLE").AddItem(new MenuItem("spellFarm", "OKTW spells farm").SetValue(true)).Show();
                Config.SubMenu(Player.ChampionName).SubMenu("Farm").SubMenu("SPELLS FARM TOGGLE").AddItem(new MenuItem("spellFarmMode", "SPELLS FARM TOGGLE MODE").SetValue(new StringList(new[] { "Scroll down", "Scroll press", "Key toggle", "Disable" }, 1)));
                Config.SubMenu(Player.ChampionName).SubMenu("Farm").SubMenu("SPELLS FARM TOGGLE").AddItem(new MenuItem("spellFarmKeyToggle", "Key toggle").SetValue(new KeyBind("N".ToCharArray()[0], KeyBindType.Toggle)));
                Config.SubMenu(Player.ChampionName).SubMenu("Farm").SubMenu("SPELLS FARM TOGGLE").AddItem(new MenuItem("showNot", "Show notification").SetValue(true));
                Config.Item("spellFarm").Permashow(true);
            }

            foreach (var hero in HeroManager.Enemies)
            {
                if (hero.IsEnemy && hero.Team != Player.Team)
                {
                    if (IsJungler(hero))
                    {
                        jungler = hero;
                    }
                }
            }

            if (Config.Item("debug").GetValue <bool>())
            {
                new Core.OKTWlab().LoadOKTW();
            }

            if (AIOmode != 1)
            {
                new Activator().LoadOKTW();
                new Core.OKTWward().LoadOKTW();
                new Core.AutoLvlUp().LoadOKTW();
                new Core.OKTWtracker().LoadOKTW();
                new Core.OKTWdraws().LoadOKTW();
            }

            new Core.OKTWtracker().LoadOKTW();

            Config.AddItem(new MenuItem("aiomodes", "!!! PRESS F5 TO RELOAD MODE !!!"));
            //new Core.OKTWtargetSelector().LoadOKTW();
            if (AIOmode != 2)
            {
                //new Core.OKTWfarmLogic().LoadOKTW();
            }
            //new AfkMode().LoadOKTW();
            Config.AddToMainMenu();
            Game.OnUpdate += OnUpdate;
            SebbyLib.Orbwalking.BeforeAttack += Orbwalking_BeforeAttack;
            Drawing.OnDraw += OnDraw;
            Game.OnWndProc += Game_OnWndProc;

            //if (Config.Item("print").GetValue<bool>())
            //{
            //    Game.PrintChat("<font size='30'>OneKeyToWin</font> <font color='#b756c5'>by Sebby</font>");
            //    Game.PrintChat("<font color='#b756c5'>OKTW NEWS: </font>Ashe Q reset AA");
            //}

            FrozenGJ.Info("OKTW合集");
        }
示例#11
0
        private void OnDraw(EventArgs args)
        {
            try
            {
                if (this.Player.IsDead)
                {
                    return;
                }

                var smiteActive = this.Menu.Item("ElSmite.Activated").GetValue <KeyBind>().Active;
                var drawSmite   = this.Menu.Item("ElSmite.Draw.Range").GetValue <Circle>();
                var drawText    = this.Menu.Item("ElSmite.Draw.Text").IsActive();
                var playerPos   = Drawing.WorldToScreen(this.Player.Position);
                var drawDamage  = this.Menu.Item("ElSmite.Draw.Damage").IsActive();

                if (smiteActive && this.SmiteSpell != null)
                {
                    if (drawText && this.Player.Spellbook.CanUseSpell(this.SmiteSpell.Slot) == SpellState.Ready)
                    {
                        //Drawing.DrawText(
                        //    playerPos.X - 70,
                        //    playerPos.Y + 40,
                        //    System.Drawing.Color.GhostWhite,
                        //    "Smite active");
                        FrozenGJ.DrawText("惩戒已启用",
                                          playerPos.X - 70,
                                          playerPos.Y + 40,
                                          System.Drawing.Color.GhostWhite);
                    }

                    if (drawText && this.Player.Spellbook.CanUseSpell(this.SmiteSpell.Slot) != SpellState.Ready)
                    {
                        //Drawing.DrawText(playerPos.X - 70, playerPos.Y + 40, System.Drawing.Color.Red, "Smite cooldown");
                        FrozenGJ.DrawText("惩戒CD中",
                                          playerPos.X - 70,
                                          playerPos.Y + 40,
                                          System.Drawing.Color.Red);
                    }

                    if (drawDamage && this.SmiteDamage() != 0)
                    {
                        var minions =
                            ObjectManager.Get <Obj_AI_Minion>()
                            .Where(
                                m =>
                                m.Team == GameObjectTeam.Neutral && m.IsValidTarget());

                        foreach (var minion in minions.Where(m => m.IsHPBarRendered))
                        {
                            var hpBarPosition = minion.HPBarPosition;
                            var maxHealth     = minion.MaxHealth;
                            var sDamage       = this.SmiteDamage();
                            //SmiteDamage : MaxHealth = x : 100
                            //Ratio math for this ^
                            var x        = this.SmiteDamage() / maxHealth;
                            var barWidth = 0;

                            /*
                             * DON'T STEAL THE OFFSETS FOUND BY ASUNA DON'T STEAL THEM JUST GET OUT WTF MAN.
                             * EL SMITE IS THE BEST SMITE ASSEMBLY ON LEAGUESHARP AND YOU WILL NOT FIND A BETTER ONE.
                             * THE DRAWINGS ACTUALLY MAKE F*****G SENSE AND THEY ARE F*****G GOOD
                             * GTFO HERE SERIOUSLY OR I CALL DETUKS FOR YOU GUYS
                             * NO STEAL OR DMC F*****G A REPORT.
                             * HELLO COPYRIGHT BY ASUNA 2015 ALL AUSTRALIAN RIGHTS RESERVED BY UNIVERSAL GTFO SERIOUSLY THO
                             * NO ALSO NO CREDITS JUST GET OUT DUDE GET OUTTTTTTTTTTTTTTTTTTTTTTT
                             */

                            switch (minion.CharData.BaseSkinName)
                            {
                            case "SRU_RiftHerald":
                                barWidth = 145;
                                Drawing.DrawLine(
                                    new Vector2(hpBarPosition.X + 3 + barWidth * x, hpBarPosition.Y + 17),
                                    new Vector2(hpBarPosition.X + 3 + barWidth * x, hpBarPosition.Y + 30),
                                    2f,
                                    System.Drawing.Color.Chartreuse);
                                Drawing.DrawText(
                                    hpBarPosition.X - 22 + barWidth * x,
                                    hpBarPosition.Y - 5,
                                    System.Drawing.Color.Chartreuse,
                                    sDamage.ToString(CultureInfo.InvariantCulture));
                                break;

                            case "SRU_Dragon_Air":
                            case "SRU_Dragon_Water":
                            case "SRU_Dragon_Fire":
                            case "SRU_Dragon_Elder":
                            case "SRU_Dragon_Earth":
                                barWidth = 145;
                                Drawing.DrawLine(
                                    new Vector2(hpBarPosition.X + 3 + barWidth * x, hpBarPosition.Y + 22),
                                    new Vector2(hpBarPosition.X + 3 + barWidth * x, hpBarPosition.Y + 30),
                                    2f,
                                    System.Drawing.Color.Orange);
                                Drawing.DrawText(
                                    hpBarPosition.X - 22 + barWidth * x,
                                    hpBarPosition.Y - 5,
                                    System.Drawing.Color.Chartreuse,
                                    sDamage.ToString(CultureInfo.InvariantCulture));
                                break;

                            case "SRU_Red":
                            case "SRU_Blue":
                                barWidth = 145;
                                Drawing.DrawLine(
                                    new Vector2(hpBarPosition.X + 3 + barWidth * x, hpBarPosition.Y + 20),
                                    new Vector2(hpBarPosition.X + 3 + barWidth * x, hpBarPosition.Y + 30),
                                    2f,
                                    System.Drawing.Color.Orange);
                                Drawing.DrawText(
                                    hpBarPosition.X - 22 + barWidth * x,
                                    hpBarPosition.Y - 5,
                                    System.Drawing.Color.Chartreuse,
                                    sDamage.ToString(CultureInfo.InvariantCulture));
                                break;

                            case "SRU_Baron":
                                barWidth = 194;
                                Drawing.DrawLine(
                                    new Vector2(hpBarPosition.X + 18 + barWidth * x, hpBarPosition.Y + 20),
                                    new Vector2(hpBarPosition.X + 18 + barWidth * x, hpBarPosition.Y + 35),
                                    2f,
                                    System.Drawing.Color.Chartreuse);
                                Drawing.DrawText(
                                    hpBarPosition.X - 22 + barWidth * x,
                                    hpBarPosition.Y - 3,
                                    System.Drawing.Color.Chartreuse,
                                    sDamage.ToString(CultureInfo.InvariantCulture));
                                break;

                            case "SRU_Gromp":
                                barWidth = 87;
                                Drawing.DrawLine(
                                    new Vector2(hpBarPosition.X + barWidth * x, hpBarPosition.Y + 11),
                                    new Vector2(hpBarPosition.X + barWidth * x, hpBarPosition.Y + 4),
                                    2f,
                                    System.Drawing.Color.Chartreuse);
                                Drawing.DrawText(
                                    hpBarPosition.X + barWidth * x,
                                    hpBarPosition.Y - 15,
                                    System.Drawing.Color.Chartreuse,
                                    sDamage.ToString(CultureInfo.InvariantCulture));
                                break;

                            case "SRU_Murkwolf":
                                barWidth = 75;
                                Drawing.DrawLine(
                                    new Vector2(hpBarPosition.X + barWidth * x, hpBarPosition.Y + 11),
                                    new Vector2(hpBarPosition.X + barWidth * x, hpBarPosition.Y + 4),
                                    2f,
                                    System.Drawing.Color.Chartreuse);
                                Drawing.DrawText(
                                    hpBarPosition.X + barWidth * x,
                                    hpBarPosition.Y - 15,
                                    System.Drawing.Color.Chartreuse,
                                    sDamage.ToString(CultureInfo.InvariantCulture));
                                break;

                            case "Sru_Crab":
                                barWidth = 61;
                                Drawing.DrawLine(
                                    new Vector2(hpBarPosition.X + barWidth * x, hpBarPosition.Y + 8),
                                    new Vector2(hpBarPosition.X + barWidth * x, hpBarPosition.Y + 4),
                                    2f,
                                    System.Drawing.Color.Chartreuse);
                                Drawing.DrawText(
                                    hpBarPosition.X + barWidth * x,
                                    hpBarPosition.Y - 15,
                                    System.Drawing.Color.Chartreuse,
                                    sDamage.ToString(CultureInfo.InvariantCulture));
                                break;

                            case "SRU_Razorbeak":
                                barWidth = 75;
                                Drawing.DrawLine(
                                    new Vector2(hpBarPosition.X + barWidth * x, hpBarPosition.Y + 11),
                                    new Vector2(hpBarPosition.X + barWidth * x, hpBarPosition.Y + 4),
                                    2f,
                                    System.Drawing.Color.Chartreuse);
                                Drawing.DrawText(
                                    hpBarPosition.X + barWidth * x,
                                    hpBarPosition.Y - 15,
                                    System.Drawing.Color.Chartreuse,
                                    sDamage.ToString(CultureInfo.InvariantCulture));
                                break;

                            case "SRU_Krug":
                                barWidth = 81;
                                Drawing.DrawLine(
                                    new Vector2(hpBarPosition.X + barWidth * x, hpBarPosition.Y + 11),
                                    new Vector2(hpBarPosition.X + barWidth * x, hpBarPosition.Y + 4),
                                    2f,
                                    System.Drawing.Color.Chartreuse);
                                Drawing.DrawText(
                                    hpBarPosition.X + barWidth * x,
                                    hpBarPosition.Y - 15,
                                    System.Drawing.Color.Chartreuse,
                                    sDamage.ToString(CultureInfo.InvariantCulture));
                                break;
                            }
                        }
                    }
                }
                else
                {
                    if (drawText && this.SmiteSpell != null)
                    {
                        //Drawing.DrawText(
                        //    playerPos.X - 70,
                        //    playerPos.Y + 40,
                        //    System.Drawing.Color.Red,
                        //    "Smite not active!");
                        FrozenGJ.DrawText("没有启用惩戒",
                                          playerPos.X - 70,
                                          playerPos.Y + 40,
                                          System.Drawing.Color.Red);
                    }
                }

                var smiteSpell = this.SmiteSpell;
                if (smiteSpell != null)
                {
                    if (smiteActive && drawSmite.Active &&
                        this.Player.Spellbook.CanUseSpell(smiteSpell.Slot) == SpellState.Ready)
                    {
                        Render.Circle.DrawCircle(this.Player.Position, SmiteRange, System.Drawing.Color.Green);
                    }

                    if (drawSmite.Active && this.Player.Spellbook.CanUseSpell(smiteSpell.Slot) != SpellState.Ready)
                    {
                        Render.Circle.DrawCircle(this.Player.Position, SmiteRange, System.Drawing.Color.Red);
                    }
                }
            }
            catch (Exception e)
            {
                Console.WriteLine($"An error occurred: {e}");
            }
        }