Beispiel #1
0
        private static void Game_OnGameUpdate(EventArgs args)
        {
            //Program.debug(""+BallPos.Distance(Player.Position));
            if (Player.HasBuff("Recall") || Player.IsDead)
            {
                return;
            }

            if (R.IsReady())
            {
                LogicR();
            }

            bool hadrCC = true;

            if (Program.LagFree(0))
            {
                SetMana();
                hadrCC = getCheckBoxItem(eMenu, "hadrCC");
            }

            best = Player;

            foreach (var ally in Program.Allies.Where(ally => ally.IsValid && !ally.IsDead))
            {
                if (ally.HasBuff("orianaghostself") || ally.HasBuff("orianaghost"))
                {
                    BallPos = ally.ServerPosition;
                }

                if (Program.LagFree(3))
                {
                    if (E.IsReady() && Player.Mana > RMANA + EMANA && ally.Distance(Player.Position) < E.Range)
                    {
                        var countEnemy = ally.CountEnemiesInRange(800);
                        if (ally.Health < countEnemy * ally.Level * 25)
                        {
                            E.CastOnUnit(ally);
                        }
                        else if (HardCC(ally) && hadrCC && countEnemy > 0)
                        {
                            E.CastOnUnit(ally);
                        }
                        else if (ally.HasBuffOfType(BuffType.Poison))
                        {
                            E.CastOnUnit(ally);
                        }
                    }
                    if (W.IsReady() && Player.Mana > RMANA + WMANA && BallPos.Distance(ally.ServerPosition) < 240 &&
                        ally.Health < ally.CountEnemiesInRange(600) * ally.Level * 20)
                    {
                        W.Cast();
                    }

                    if ((ally.Health < best.Health || ally.CountEnemiesInRange(300) > 0) &&
                        ally.Distance(Player.Position) < E.Range && ally.CountEnemiesInRange(700) > 0)
                    {
                        best = ally;
                    }
                }
                if (Program.LagFree(1) && E.IsReady() && Player.Mana > RMANA + EMANA &&
                    ally.Distance(Player.Position) < E.Range &&
                    ally.CountEnemiesInRange(R.Width) >= getSliderItem(rMenu, "rCount") &&
                    0 != getSliderItem(rMenu, "rCount"))
                {
                    E.CastOnUnit(ally);
                }
            }

            /*
             * foreach (var ally in HeroManager.Allies.Where(ally => ally.IsValid && ally.Distance(Player.Position) < 1000))
             * {
             *  foreach (var buff in ally.Buffs)
             *  {
             *          Program.debug(buff.Name);
             *  }
             *
             * }
             */
            if ((getKeyBindItem(rMenu, "smartR") || Rsmart) && R.IsReady())
            {
                Rsmart = true;
                var target = TargetSelector.GetTarget(Q.Range + 100, DamageType.Magical);
                if (target.IsValidTarget())
                {
                    if (CountEnemiesInRangeDeley(BallPos, R.Width, R.Delay) > 1)
                    {
                        R.Cast();
                    }
                    else if (Q.IsReady())
                    {
                        QR.Cast(target, true, true);
                    }
                    else if (CountEnemiesInRangeDeley(BallPos, R.Width, R.Delay) > 0)
                    {
                        R.Cast();
                    }
                }
                else
                {
                    Rsmart = false;
                }
            }
            else
            {
                Rsmart = false;
            }

            if (Program.LagFree(1))
            {
                LogicQ();
                LogicFarm();
            }

            if (Program.LagFree(2) && W.IsReady())
            {
                LogicW();
            }

            if (Program.LagFree(4) && E.IsReady())
            {
                LogicE(best);
            }
        }
Beispiel #2
0
        private void Game_OnGameUpdate(EventArgs args)
        {
            if (Player.HasBuff("Recall") || Player.IsDead)
            {
                return;
            }

            bool hadrCC = true, poison = true;

            if (Program.LagFree(0))
            {
                SetMana();
                hadrCC = Config.Item("hadrCC").GetValue <bool>();
                poison = Config.Item("poison").GetValue <bool>();
            }

            Obj_AI_Hero best = Player;

            foreach (var ally in Program.Allies.Where(ally => ally.IsValid && !ally.IsDead))
            {
                if (ally.HasBuff("orianaghostself") || ally.HasBuff("orianaghost"))
                {
                    BallPos = ally.ServerPosition;
                }

                if (Program.LagFree(4))
                {
                    if (E.IsReady() && Player.Mana > RMANA + EMANA && ally.Distance(Player.Position) < E.Range)
                    {
                        if (ally.Health < ally.CountEnemiesInRange(600) * ally.Level * 20)
                        {
                            E.CastOnUnit(ally);
                        }
                        else if (HardCC(ally) && hadrCC)
                        {
                            E.CastOnUnit(ally);
                        }
                        else if (ally.HasBuffOfType(BuffType.Poison))
                        {
                            E.CastOnUnit(ally);
                        }
                    }
                    if (W.IsReady() && Player.Mana > RMANA + WMANA && BallPos.Distance(ally.ServerPosition) < 240 && ally.Health < ally.CountEnemiesInRange(600) * ally.Level * 20)
                    {
                        W.Cast();
                    }

                    if ((ally.Health < best.Health || ally.CountEnemiesInRange(300) > 0) && ally.Distance(Player.Position) < E.Range && ally.CountEnemiesInRange(700) > 0)
                    {
                        best = ally;
                    }

                    if (Program.LagFree(1) && E.IsReady() && Player.Mana > RMANA + EMANA && ally.Distance(Player.Position) < E.Range && ally.CountEnemiesInRange(R.Width) >= Config.Item("rCount").GetValue <Slider>().Value)
                    {
                        E.CastOnUnit(ally);
                    }
                }
            }

            /*
             * foreach (var ally in HeroManager.Allies.Where(ally => ally.IsValid && ally.Distance(Player.Position) < 1000))
             * {
             *  foreach (var buff in ally.Buffs)
             *  {
             *          Program.debug(buff.Name);
             *  }
             *
             * }
             */
            if ((Config.Item("smartR").GetValue <KeyBind>().Active || Rsmart) && R.IsReady())
            {
                Rsmart = true;
                var target = TargetSelector.GetTarget(Q.Range + 100, TargetSelector.DamageType.Physical);
                if (target.IsValidTarget())
                {
                    if (CountEnemiesInRangeDeley(BallPos, R.Width, R.Delay) > 1)
                    {
                        R.Cast();
                    }
                    else if (Q.IsReady())
                    {
                        QR.Cast(target, true, true);
                    }
                    else if (CountEnemiesInRangeDeley(BallPos, R.Width, R.Delay) > 0)
                    {
                        R.Cast();
                    }
                }
                else
                {
                    Rsmart = false;
                }
            }
            else
            {
                Rsmart = false;
            }

            if (Program.LagFree(1))
            {
                LogicQ();
                LogicFarm();
            }
            if (Program.LagFree(2) && R.IsReady())
            {
                LogicR();
            }
            if (Program.LagFree(3) && W.IsReady())
            {
                LogicW();
            }
            if (Program.LagFree(4) && E.IsReady())
            {
                LogicE(best);
            }
        }