示例#1
0
文件: Program.cs 项目: xy593239347/CN
        private static void Game_OnGameUpdate(EventArgs args)
        {
            CheckChampionBuff();
            //Update the combo and harass values.
            CClass.ComboActive = CClass.Config.Item("Orbwalk").GetValue <KeyBind>().Active;

            var existsMana = ObjectManager.Player.MaxMana / 100 * Config.Item("HarassMana").GetValue <Slider>().Value;

            CClass.HarassActive = CClass.Config.Item("Farm").GetValue <KeyBind>().Active&&
                                  ObjectManager.Player.Mana >= existsMana;

            CClass.LaneClearActive = CClass.Config.Item("LaneClear").GetValue <KeyBind>().Active;
            CClass.Game_OnGameUpdate(args);

            var useItemModes = Config.Item("UseItemsMode").GetValue <StringList>().SelectedIndex;

            //Items
            if (
                !((CClass.Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo &&
                   (useItemModes == 2 || useItemModes == 3))
                  ||
                  (CClass.Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Mixed &&
                   (useItemModes == 1 || useItemModes == 3))))
            {
                return;
            }

            var botrk      = Config.Item("BOTRK").GetValue <bool>();
            var ghostblade = Config.Item("GHOSTBLADE").GetValue <bool>();
            var target     = CClass.Orbwalker.GetTarget();

            if (botrk)
            {
                if (target != null && target.Type == ObjectManager.Player.Type &&
                    target.ServerPosition.Distance(ObjectManager.Player.ServerPosition) < 450)
                {
                    var hasCutGlass = Items.HasItem(3144);
                    var hasBotrk    = Items.HasItem(3153);

                    if (hasBotrk || hasCutGlass)
                    {
                        var itemId = hasCutGlass ? 3144 : 3153;
                        var damage = ObjectManager.Player.GetItemDamage(target, Damage.DamageItems.Botrk);
                        if (hasCutGlass || ObjectManager.Player.Health + damage < ObjectManager.Player.MaxHealth)
                        {
                            Items.UseItem(itemId, target);
                        }
                    }
                }
            }

            if (ghostblade && target != null && target.Type == ObjectManager.Player.Type &&
                Orbwalking.InAutoAttackRange(target))
            {
                Items.UseItem(3142);
            }
        }
示例#2
0
        private static void Game_OnGameUpdate(EventArgs args)
        {
            if (Items.HasItem(3139) || Items.HasItem(3140))
            {
                CheckChampionBuff();
            }

            //Update the combo and harass values.
            CClass.ComboActive = CClass.Config.Item("Orbwalk").GetValue <KeyBind>().Active;

            var vHarassManaPer = Config.Item("HarassMana").GetValue <Slider>().Value;

            CClass.HarassActive = CClass.Config.Item("Farm").GetValue <KeyBind>().Active&&
                                  ObjectManager.Player.ManaPercent >= vHarassManaPer;

            CClass.ToggleActive = ObjectManager.Player.ManaPercent >= vHarassManaPer;

            var vLaneClearManaPer = Config.Item("LaneClearMana").GetValue <Slider>().Value;

            CClass.LaneClearActive = CClass.Config.Item("LaneClear").GetValue <KeyBind>().Active &
                                     ObjectManager.Player.ManaPercent >= vLaneClearManaPer;

            CClass.Game_OnGameUpdate(args);

            UseSummoners();
            var useItemModes = Config.Item("UseItemsMode").GetValue <StringList>().SelectedIndex;

            //Items
            if (
                !((CClass.Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo &&
                   (useItemModes == 2 || useItemModes == 3))
                  ||
                  (CClass.Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Mixed &&
                   (useItemModes == 1 || useItemModes == 3))))
            {
                return;
            }

            var botrk      = Config.Item("BOTRK").GetValue <bool>();
            var ghostblade = Config.Item("GHOSTBLADE").GetValue <bool>();
            var sword      = Config.Item("SWORD").GetValue <bool>();
            var muramana   = Config.Item("MURAMANA").GetValue <bool>();
            var target     = CClass.Orbwalker.GetTarget() as Obj_AI_Base;

            if (botrk)
            {
                if (target != null && target.Type == ObjectManager.Player.Type &&
                    target.ServerPosition.Distance(ObjectManager.Player.ServerPosition) < 550)
                {
                    var hasCutGlass = Items.HasItem(3144);
                    var hasBotrk    = Items.HasItem(3153);

                    if (hasBotrk || hasCutGlass)
                    {
                        var itemId = hasCutGlass ? 3144 : 3153;
                        var damage = ObjectManager.Player.GetItemDamage(target, Damage.DamageItems.Botrk);
                        if (hasCutGlass || ObjectManager.Player.Health + damage < ObjectManager.Player.MaxHealth)
                        {
                            Items.UseItem(itemId, target);
                        }
                    }
                }
            }

            if (ghostblade && target != null && target.Type == ObjectManager.Player.Type &&
                !ObjectManager.Player.HasBuff("ItemSoTD", true) && /*if Sword of the divine is not active */
                Orbwalking.InAutoAttackRange(target))
            {
                Items.UseItem(3142);
            }

            if (sword && target != null && target.Type == ObjectManager.Player.Type &&
                !ObjectManager.Player.HasBuff("spectralfury", true) && /*if ghostblade is not active*/
                Orbwalking.InAutoAttackRange(target))
            {
                Items.UseItem(3131);
            }

            if (muramana && Items.HasItem(3042))
            {
                if (target != null && CClass.ComboActive &&
                    target.Position.Distance(ObjectManager.Player.Position) < 1200)
                {
                    if (!ObjectManager.Player.HasBuff("Muramana", true))
                    {
                        Items.UseItem(3042);
                    }
                }
                else
                {
                    if (ObjectManager.Player.HasBuff("Muramana", true))
                    {
                        Items.UseItem(3042);
                    }
                }
            }
        }
示例#3
0
        private static void Game_OnGameUpdate(EventArgs args)
        {
            CheckChampionBuff();
            //Update the combo and harass values.
            CClass.ComboActive = CClass.Config.Item("Orbwalk").GetValue <KeyBind>().Active;

            var harassExistsMana = ObjectManager.Player.MaxMana / 100 * Config.Item("HarassMana").GetValue <Slider>().Value;

            CClass.HarassActive = CClass.Config.Item("Farm").GetValue <KeyBind>().Active&&
                                  ObjectManager.Player.Mana >= harassExistsMana;

            CClass.ToggleActive = ObjectManager.Player.Mana >= harassExistsMana;

            var laneExistsMana = ObjectManager.Player.MaxMana / 100 * Config.Item("LaneClearMana").GetValue <Slider>().Value;

            CClass.LaneClearActive = CClass.Config.Item("LaneClear").GetValue <KeyBind>().Active &
                                     ObjectManager.Player.Mana >= laneExistsMana;

            CClass.Game_OnGameUpdate(args);

            var useItemModes = Config.Item("UseItemsMode").GetValue <StringList>().SelectedIndex;

            //Items
            if (
                !((CClass.Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo &&
                   (useItemModes == 2 || useItemModes == 3))
                  ||
                  (CClass.Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Mixed &&
                   (useItemModes == 1 || useItemModes == 3))))
            {
                return;
            }

            var botrk      = Config.Item("BOTRK").GetValue <bool>();
            var ghostblade = Config.Item("GHOSTBLADE").GetValue <bool>();
            var sword      = Config.Item("SWORD").GetValue <bool>();
            var muramana   = Config.Item("MURAMANA").GetValue <bool>();
            var igniteSlot = ObjectManager.Player.GetSpellSlot("SummonerDot");
            var target     = CClass.Orbwalker.GetTarget();

            if (botrk)
            {
                if (target != null && target.Type == ObjectManager.Player.Type &&
                    target.ServerPosition.Distance(ObjectManager.Player.ServerPosition) < 450)
                {
                    var hasCutGlass = Items.HasItem(3144);
                    var hasBotrk    = Items.HasItem(3153);

                    if (hasBotrk || hasCutGlass)
                    {
                        var itemId = hasCutGlass ? 3144 : 3153;
                        var damage = ObjectManager.Player.GetItemDamage(target, Damage.DamageItems.Botrk);
                        if (hasCutGlass || ObjectManager.Player.Health + damage < ObjectManager.Player.MaxHealth)
                        {
                            Items.UseItem(itemId, target);
                        }
                    }
                }
            }

            if (ghostblade && target != null && target.Type == ObjectManager.Player.Type &&
                !ObjectManager.Player.HasBuff("ItemSoTD", true) && /*if Sword of the divine is not active */
                Orbwalking.InAutoAttackRange(target))
            {
                Items.UseItem(3142);
            }

            if (sword && target != null && target.Type == ObjectManager.Player.Type &&
                !ObjectManager.Player.HasBuff("spectralfury", true) && /*if ghostblade is not active*/
                Orbwalking.InAutoAttackRange(target))
            {
                Items.UseItem(3131);
            }

            if (muramana && Items.HasItem(3042))
            {
                if (target != null && CClass.ComboActive &&
                    target.Position.Distance(ObjectManager.Player.Position) < 1200)
                {
                    if (!ObjectManager.Player.HasBuff("Muramana", true))
                    {
                        Items.UseItem(3042);
                    }
                }
                else
                {
                    if (ObjectManager.Player.HasBuff("Muramana", true))
                    {
                        Items.UseItem(3042);
                    }
                }
            }

            if (target != null && igniteSlot != SpellSlot.Unknown &&
                ObjectManager.Player.SummonerSpellbook.CanUseSpell(igniteSlot) == SpellState.Ready)
            {
                if (ObjectManager.Player.Distance(target) < 650 &&
                    ObjectManager.Player.GetSummonerSpellDamage(target, Damage.SummonerSpell.Ignite) >= target.Health)
                {
                    ObjectManager.Player.SummonerSpellbook.CastSpell(igniteSlot, target);
                }
            }
        }
示例#4
0
        private static void Game_OnGameUpdate(EventArgs args)
        {
            if (Items.HasItem(3139) || Items.HasItem(3140))
            {
                CheckChampionBuff();
            }
            //Update the combo and harass values.
            CClass.ComboActive = DeathWalker.CurrentMode == DeathWalker.Mode.Combo;

            var vHarassManaPer = Config.Item("HarassMana").GetValue <Slider>().Value;

            CClass.HarassActive = DeathWalker.CurrentMode == DeathWalker.Mode.Harass &&
                                  ObjectManager.Player.ManaPercent >= vHarassManaPer;

            CClass.ToggleActive = ObjectManager.Player.ManaPercent >= vHarassManaPer;

            var vLaneClearManaPer = Config.Item("LaneClearMana").GetValue <Slider>().Value;

            CClass.LaneClearActive = DeathWalker.CurrentMode == DeathWalker.Mode.LaneClear &&
                                     ObjectManager.Player.ManaPercent >= vLaneClearManaPer;

            CClass.Game_OnGameUpdate(args);

            UseSummoners();
            var useItemModes = Config.Item("UseItemsMode").GetValue <StringList>().SelectedIndex;

            //Items
            if (
                !((DeathWalker.Mode.Combo == DeathWalker.CurrentMode &&
                   (useItemModes == 2 || useItemModes == 3))
                  ||
                  (DeathWalker.Mode.LaneClear == DeathWalker.CurrentMode &&
                   (useItemModes == 1 || useItemModes == 3))))
            {
                return;
            }

            var botrk      = Config.Item("BOTRK").GetValue <bool>();
            var ghostblade = Config.Item("GHOSTBLADE").GetValue <bool>();
            var sword      = Config.Item("SWORD").GetValue <bool>();
            var muramana   = Config.Item("MURAMANA").GetValue <bool>();
            var target     = DeathWalker.getBestTarget() as Obj_AI_Base;

            var smiteReady = (SmiteSlot != SpellSlot.Unknown &&
                              ObjectManager.Player.Spellbook.CanUseSpell(SmiteSlot) == SpellState.Ready);

            if (target != null && smiteReady && DeathWalker.CurrentMode == DeathWalker.Mode.Combo)
            {
                Smiteontarget(target as Obj_AI_Hero);
            }

            if (botrk)
            {
                if (target != null && target.Type == ObjectManager.Player.Type &&
                    target.ServerPosition.Distance(ObjectManager.Player.ServerPosition) < 550)
                {
                    var hasCutGlass = Items.HasItem(3144);
                    var hasBotrk    = Items.HasItem(3153);

                    if (hasBotrk || hasCutGlass)
                    {
                        var itemId = hasCutGlass ? 3144 : 3153;
                        var damage = ObjectManager.Player.GetItemDamage(target, Damage.DamageItems.Botrk);
                        if (hasCutGlass || ObjectManager.Player.Health + damage < ObjectManager.Player.MaxHealth)
                        {
                            Items.UseItem(itemId, target);
                        }
                    }
                }
            }

            if (ghostblade && target != null && target.Type == ObjectManager.Player.Type &&
                !ObjectManager.Player.HasBuff("ItemSoTD", true) && /*if Sword of the divine is not active */
                DeathWalker.inAutoAttackRange(target))
            {
                Items.UseItem(3142);
            }

            if (sword && target != null && target.Type == ObjectManager.Player.Type &&
                !ObjectManager.Player.HasBuff("spectralfury", true) && /*if ghostblade is not active*/
                DeathWalker.inAutoAttackRange(target))
            {
                Items.UseItem(3131);
            }

            if (muramana && Items.HasItem(3042))
            {
                if (target != null && CClass.ComboActive &&
                    target.Position.Distance(ObjectManager.Player.Position) < 1200)
                {
                    if (!ObjectManager.Player.HasBuff("Muramana", true))
                    {
                        Items.UseItem(3042);
                    }
                }
                else
                {
                    if (ObjectManager.Player.HasBuff("Muramana", true))
                    {
                        Items.UseItem(3042);
                    }
                }
            }
        }
示例#5
0
        private static void Game_OnGameUpdate(EventArgs args)
        {
            //Update the combo and harass values.
            ChampionClass.ComboActive = ChampionClass.Config.Item("Orbwalk").GetValue <KeyBind>().Active;

            var vHarassManaPer = Config.Item("HarassMana").GetValue <Slider>().Value;

            ChampionClass.HarassActive = ChampionClass.Config.Item("Farm").GetValue <KeyBind>().Active&&
                                         ObjectManager.Player.ManaPercent >= vHarassManaPer;

            ChampionClass.ToggleActive = ObjectManager.Player.ManaPercent >= vHarassManaPer && ChampionClass.Orbwalker.ActiveMode != Orb.Orbwalking.OrbwalkingMode.Combo && !ObjectManager.Player.IsRecalling();

            var vLaneClearManaPer = HeroManager.Enemies.Find(e => e.IsValidTarget(2000) && !e.IsZombie) == null
                ? Config.Item("LaneMana.Alone").GetValue <Slider>().Value
                : Config.Item("LaneMana.Enemy").GetValue <Slider>().Value;

            ChampionClass.LaneClearActive = ChampionClass.Config.Item("LaneClear").GetValue <KeyBind>().Active&& ObjectManager.Player.ManaPercent >= vLaneClearManaPer && Config.Item("Lane.Enabled").GetValue <KeyBind>().Active;

            ChampionClass.JungleClearActive = false;
            if (ChampionClass.Config.Item("LaneClear").GetValue <KeyBind>().Active&& Config.Item("Jungle.Enabled").GetValue <KeyBind>().Active)
            {
                List <Obj_AI_Base> mobs = MinionManager.GetMinions(ObjectManager.Player.Position, 1000, MinionTypes.All, MinionTeam.Neutral);

                if (mobs.Count > 0)
                {
                    var minMana = Config.Item("Jungle.Mana.Enemy").GetValue <Slider>().Value;

                    if (mobs[0].SkinName.ToLower().Contains("baron") || mobs[0].SkinName.ToLower().Contains("dragon") || mobs[0].Team() == Jungle.GameObjectTeam.Neutral)
                    {
                        minMana = Config.Item("Jungle.Mana.BigBoys").GetValue <Slider>().Value;
                    }

                    else if (mobs[0].Team() == (Jungle.GameObjectTeam)ObjectManager.Player.Team)
                    {
                        minMana = Config.Item("Jungle.Mana.Ally").GetValue <Slider>().Value;
                    }

                    else if (mobs[0].Team() != (Jungle.GameObjectTeam)ObjectManager.Player.Team)
                    {
                        minMana = Config.Item("Jungle.Mana.Enemy").GetValue <Slider>().Value;
                    }

                    if (ObjectManager.Player.ManaPercent >= minMana)
                    {
                        ChampionClass.JungleClearActive = true;
                    }
                }
            }
            //ChampionClass.JungleClearActive = ChampionClass.Config.Item("LaneClear").GetValue<KeyBind>().Active && ObjectManager.Player.ManaPercent >= Config.Item("Jungle.Mana").GetValue<Slider>().Value;

            ChampionClass.Game_OnGameUpdate(args);

            UseSummoners();
            var useItemModes = Config.Item("UseItemsMode").GetValue <StringList>().SelectedIndex;

            //Items
            if (
                !((ChampionClass.Orbwalker.ActiveMode == Orb.Orbwalking.OrbwalkingMode.Combo &&
                   (useItemModes == 2 || useItemModes == 3))
                  ||
                  (ChampionClass.Orbwalker.ActiveMode == Orb.Orbwalking.OrbwalkingMode.Mixed &&
                   (useItemModes == 1 || useItemModes == 3))))
            {
                return;
            }

            var botrk      = Config.Item("BOTRK").GetValue <bool>();
            var ghostblade = Config.Item("GHOSTBLADE").GetValue <bool>();
            var sword      = Config.Item("SWORD").GetValue <bool>();
            var muramana   = Config.Item("MURAMANA").GetValue <bool>();
            var target     = ChampionClass.Orbwalker.GetTarget() as Obj_AI_Base;

            var smiteReady = (SmiteSlot != SpellSlot.Unknown &&
                              ObjectManager.Player.Spellbook.CanUseSpell(SmiteSlot) == SpellState.Ready);

            if (smiteReady && ChampionClass.Orbwalker.ActiveMode == Orb.Orbwalking.OrbwalkingMode.Combo)
            {
                Smiteontarget(target as Obj_AI_Hero);
            }

            if (botrk)
            {
                if (target != null && target.Type == ObjectManager.Player.Type &&
                    target.ServerPosition.Distance(ObjectManager.Player.ServerPosition) < 550)
                {
                    var hasCutGlass = Items.HasItem(3144);
                    var hasBotrk    = Items.HasItem(3153);

                    if (hasBotrk || hasCutGlass)
                    {
                        var itemId = hasCutGlass ? 3144 : 3153;
                        var damage = ObjectManager.Player.GetItemDamage(target, Damage.DamageItems.Botrk);
                        if (hasCutGlass || ObjectManager.Player.Health + damage < ObjectManager.Player.MaxHealth)
                        {
                            Items.UseItem(itemId, target);
                        }
                    }
                }
            }

            if (ghostblade && target != null && target.Type == ObjectManager.Player.Type &&
                !ObjectManager.Player.HasBuff("ItemSoTD") && /*if Sword of the divine is not active */
                Orb.Orbwalking.InAutoAttackRange(target))
            {
                Items.UseItem(3142);
            }

            if (sword && target != null && target.Type == ObjectManager.Player.Type &&
                !ObjectManager.Player.HasBuff("spectralfury") && /*if ghostblade is not active*/
                Orb.Orbwalking.InAutoAttackRange(target))
            {
                Items.UseItem(3131);
            }

            if (muramana && Items.HasItem(3042))
            {
                if (target != null && ChampionClass.ComboActive &&
                    target.Position.Distance(ObjectManager.Player.Position) < 1200)
                {
                    if (!ObjectManager.Player.HasBuff("Muramana"))
                    {
                        Items.UseItem(3042);
                    }
                }
                else
                {
                    if (ObjectManager.Player.HasBuff("Muramana"))
                    {
                        Items.UseItem(3042);
                    }
                }
            }
        }