예제 #1
0
파일: BaseUlt.cs 프로젝트: 568123745/CN-1
        public BaseUlt()
        {
            (Menu = new Menu("【初见汉化】基地大招3", "BaseUlt3", true)).AddToMainMenu();
            Menu.AddItem(new MenuItem("showRecalls", "显示回城").SetValue(true));
            Menu.AddItem(new MenuItem("baseUlt", "泉水大招").SetValue(true));
            Menu.AddItem(new MenuItem("checkCollision", "碰撞检测").SetValue(true));
            Menu.AddItem(new MenuItem("panicKey", "禁用大招按键").SetValue(new KeyBind(107, KeyBindType.Press)));         //32 == space
            Menu.AddItem(new MenuItem("regardlessKey", "任何时候 (保持)").SetValue(new KeyBind(109, KeyBindType.Press))); //17 == ctrl
            Menu.AddSubMenu(new Menu("初见汉化", "by chujian"));
            Menu.SubMenu("by chujian").AddItem(new MenuItem("qunhao", "汉化群:386289593"));
            Menu.SubMenu("by chujian").AddItem(new MenuItem("qunhao1", "交流群:333399"));
            Heroes  = ObjectManager.Get <Obj_AI_Hero>().ToList();
            Enemies = Heroes.Where(x => x.IsEnemy).ToList();
            Allies  = Heroes.Where(x => x.IsAlly).ToList();

            EnemyInfo = Enemies.Select(x => new EnemyInfo(x)).ToList();

            bool compatibleChamp = IsCompatibleChamp(ObjectManager.Player.ChampionName);

            TeamUlt           = Menu.AddSubMenu(new Menu("基地大招团队", "TeamUlt"));
            DisabledChampions = Menu.AddSubMenu(new Menu("可击杀目标", "DisabledChampions"));

            if (compatibleChamp)
            {
                foreach (Obj_AI_Hero champ in Allies.Where(x => !x.IsMe && IsCompatibleChamp(x.ChampionName)))
                {
                    TeamUlt.AddItem(new MenuItem(champ.ChampionName, "队友使用基地大招: " + champ.ChampionName).SetValue(false).DontSave());
                }

                foreach (Obj_AI_Hero champ in Enemies)
                {
                    DisabledChampions.AddItem(new MenuItem(champ.ChampionName, "不使用基地大招: " + champ.ChampionName).SetValue(false).DontSave());
                }
            }

            var NotificationsMenu = Menu.AddSubMenu(new Menu("通知", "Notifications"));

            NotificationsMenu.AddItem(new MenuItem("notifRecFinished", "回城完成").SetValue(true));
            NotificationsMenu.AddItem(new MenuItem("notifRecAborted", "回城终止").SetValue(true));

            EnemySpawnPos = ObjectManager.Get <Obj_SpawnPoint>().FirstOrDefault(x => x.IsEnemy).Position; //ObjectManager.Get<GameObject>().FirstOrDefault(x => x.Type == GameObjectType.obj_SpawnPoint && x.IsEnemy).Position;

            Map = Utility.Map.GetMap().Type;

            Ultimate = new Spell(SpellSlot.R);

            Text = new Font(Drawing.Direct3DDevice, new FontDescription {
                FaceName = "Calibri", Height = 13, Width = 6, OutputPrecision = FontPrecision.Default, Quality = FontQuality.Default
            });

            Obj_AI_Base.OnTeleport += Obj_AI_Base_OnTeleport;
            Drawing.OnPreReset     += Drawing_OnPreReset;
            Drawing.OnPostReset    += Drawing_OnPostReset;
            Drawing.OnDraw         += Drawing_OnDraw;
            AppDomain.CurrentDomain.DomainUnload += CurrentDomain_DomainUnload;
            AppDomain.CurrentDomain.ProcessExit  += CurrentDomain_DomainUnload;

            if (compatibleChamp)
            {
                Game.OnGameUpdate += Game_OnGameUpdate;
            }

            ShowNotification("BaseUlt3 by Beaving - Loaded", NotificationColor, 3000);
        }
예제 #2
0
        public BaseUlt()
        {
            (Menu = new Menu("BaseUlt3", "BaseUlt3", true)).AddToMainMenu();
            Menu.AddItem(new MenuItem("showRecalls", "Show Recalls").SetValue(true));
            Menu.AddItem(new MenuItem("baseUlt", "Base Ult").SetValue(true));
            Menu.AddItem(new MenuItem("checkCollision", "Check Collision").SetValue(true));
            Menu.AddItem(new MenuItem("panicKey", "No Ult while SBTW").SetValue(new KeyBind(32, KeyBindType.Press)));        //32 == space
            Menu.AddItem(new MenuItem("regardlessKey", "No timelimit (hold)").SetValue(new KeyBind(17, KeyBindType.Press))); //17 == ctrl

            Heroes  = ObjectManager.Get <Obj_AI_Hero>().ToList();
            Enemies = Heroes.Where(x => x.IsEnemy).ToList();
            Allies  = Heroes.Where(x => x.IsAlly).ToList();

            EnemyInfo = Enemies.Select(x => new EnemyInfo(x)).ToList();

            bool compatibleChamp = IsCompatibleChamp(ObjectManager.Player.ChampionName);

            TeamUlt           = Menu.AddSubMenu(new Menu("Team Baseult Friends", "TeamUlt"));
            DisabledChampions = Menu.AddSubMenu(new Menu("Disabled Champion targets", "DisabledChampions"));

            if (compatibleChamp)
            {
                foreach (Obj_AI_Hero champ in Allies.Where(x => !x.IsMe && IsCompatibleChamp(x.ChampionName)))
                {
                    TeamUlt.AddItem(new MenuItem(champ.ChampionName, "Ally with baseult: " + champ.ChampionName).SetValue(false).DontSave());
                }

                foreach (Obj_AI_Hero champ in Enemies)
                {
                    DisabledChampions.AddItem(new MenuItem(champ.ChampionName, "Don't shoot: " + champ.ChampionName).SetValue(false).DontSave());
                }
            }

            var NotificationsMenu = Menu.AddSubMenu(new Menu("Notifications", "Notifications"));

            NotificationsMenu.AddItem(new MenuItem("notifRecFinished", "Recall finished").SetValue(true));
            NotificationsMenu.AddItem(new MenuItem("notifRecAborted", "Recall aborted").SetValue(true));

            EnemySpawnPos = ObjectManager.Get <Obj_SpawnPoint>().FirstOrDefault(x => x.IsEnemy).Position; //ObjectManager.Get<GameObject>().FirstOrDefault(x => x.Type == GameObjectType.obj_SpawnPoint && x.IsEnemy).Position;

            Map = Utility.Map.GetMap().Type;

            Ultimate = new Spell(SpellSlot.R);

            Text = new Font(Drawing.Direct3DDevice, new FontDescription {
                FaceName = "Calibri", Height = 13, Width = 6, OutputPrecision = FontPrecision.Default, Quality = FontQuality.Default
            });

            Obj_AI_Base.OnTeleport += Obj_AI_Base_OnTeleport;
            Drawing.OnPreReset     += Drawing_OnPreReset;
            Drawing.OnPostReset    += Drawing_OnPostReset;
            Drawing.OnDraw         += Drawing_OnDraw;
            AppDomain.CurrentDomain.DomainUnload += CurrentDomain_DomainUnload;
            AppDomain.CurrentDomain.ProcessExit  += CurrentDomain_DomainUnload;

            if (compatibleChamp)
            {
                Game.OnGameUpdate += Game_OnGameUpdate;
            }

            ShowNotification("BaseUlt3 by Beaving - Loaded", NotificationColor, 3000);
        }
예제 #3
0
        void Combo()
        {
            var comboQ = _menu.Item("comboQ" + ObjectManager.Player.ChampionName).GetValue <StringList>().SelectedIndex;
            var comboW = _menu.Item("comboW" + ObjectManager.Player.ChampionName).GetValue <bool>();
            var comboE = _menu.Item("comboE" + ObjectManager.Player.ChampionName).GetValue <bool>();
            var comboR = _menu.Item("comboR" + ObjectManager.Player.ChampionName).GetValue <Slider>().Value;

            if (comboQ > 0 && _spellQ.IsReady())
            {
                if (_spellR.IsReady() && comboR > 0) //search unit that provides most targets hit by ult. prioritize hero target unit
                {
                    int         maxTargetsHit      = 0;
                    Obj_AI_Base unitMostTargetsHit = null;

                    foreach (Obj_AI_Base unit in ObjectManager.Get <Obj_AI_Base>().Where(x => x.IsValidTarget(_spellQ.Range) && _spellQ.GetPrediction(x).Hitchance >= HitChance.High)) //causes troubles?
                    {
                        int targetsHit = unit.CountEnemiesInRange((int)_spellR.Range);                                                                                                 //unitposition might not reflect where you land with Q

                        if (targetsHit > maxTargetsHit || (unitMostTargetsHit != null && targetsHit >= maxTargetsHit && unit.Type == GameObjectType.obj_AI_Hero))
                        {
                            maxTargetsHit      = targetsHit;
                            unitMostTargetsHit = unit;
                        }
                    }

                    if (maxTargetsHit >= comboR)
                    {
                        CastQ(unitMostTargetsHit);
                    }
                }

                Obj_AI_Base target = TargetSelector.GetTarget(_spellQ.Range, TargetSelector.DamageType.Magical);

                if (target != null)
                {
                    if (comboQ == 1 || (comboQ == 2 && !Orbwalking.InAutoAttackRange(target)))
                    {
                        CastQ(target);
                    }
                }
            }

            if (comboW && _spellW.IsReady())
            {
                var target = TargetSelector.GetTarget(_spellW.Range, TargetSelector.DamageType.Magical);

                if (target != null)
                {
                    var enoughMana = GetManaPercent() >= _menu.Item("comboWPercent" + ObjectManager.Player.ChampionName).GetValue <Slider>().Value;

                    if (ObjectManager.Player.Spellbook.GetSpell(SpellSlot.W).ToggleState == 1)
                    {
                        if (ObjectManager.Player.Distance(target.ServerPosition) <= _spellW.Range && enoughMana)
                        {
                            _comboW = true;
                            _spellW.Cast();
                        }
                    }
                    else if (!enoughMana)
                    {
                        RegulateWState(true);
                    }
                }
                else
                {
                    RegulateWState();
                }
            }

            if (comboE && _spellE.IsReady())
            {
                CastE(Program.Helper.EnemyTeam.OrderBy(x => x.Distance(ObjectManager.Player)).FirstOrDefault());
            }
        }