Exemplo n.º 1
0
        internal static void CheckR(Obj_AI_Base target)
        {
            if (target.IsValidTarget(Base.R.Range + 100))
            {
                if (!Base.R.IsReady() || Base.UltOn || !Base.GetBool("user"))
                {
                    return;
                }

                if (Base.GetList("ultwhen") == 0)
                {
                    if (Base.ComboDamage >= target.Health)
                    {
                        if (Base.CleaveCount <= 1 && Base.Q.IsReady())
                        {
                            Base.R.Cast();
                        }
                    }
                }

                if (Base.GetList("ultwhen") == 1)
                {
                    if (Base.ComboDamage * 1.7 >= target.Health)
                    {
                        if (Base.CleaveCount <= 1 && Base.Q.IsReady())
                        {
                            Base.R.Cast();
                        }
                    }
                }

                if (Base.GetList("wsmode") == 1)
                {
                    var targetList
                        = ObjectManager.Get <Obj_AI_Hero>().Where(hero => hero.IsValidTarget(900));

                    var enemies = targetList as Obj_AI_Hero[] ?? targetList.ToArray();
                    if (enemies.Any(huro => Base.ComboDamage >= huro.Health))
                    {
                        if (Base.CleaveCount <= 1 && Base.Q.IsReady())
                        {
                            Base.R.Cast();
                        }
                    }

                    if (enemies.Count() >= 3 && Base.CleaveCount <= 1 && Base.Q.IsReady())
                    {
                        Base.R.Cast();
                    }
                }
            }
        }
Exemplo n.º 2
0
        internal static void Windslash()
        {
            // windslash
            if (Base.UltOn && Base.GetBool("usews") && Base.R.IsReady())
            {
                foreach (var target in ObjectManager.Get <Obj_AI_Hero>().Where(h => h.IsValidTarget(Base.R.Range + 100)))
                {
                    var de = Base.R.GetPrediction(target, true);
                    if (Base.GetList("wsmode") == 1)
                    {
                        if ((int)(GetDmg("R") / target.MaxHealth * 100) >= target.Health / target.MaxHealth * 100)
                        {
                            if (de.Hitchance >= HitChance.Low && Base.CanWS && Base.R.IsReady())
                            {
                                Base.R.Cast(de.CastPosition);
                            }
                        }

                        if (target.Health < GetDmg("R", true) + GetDmg("P", true) * 1 + GetDmg("Q", true) * 2 &&
                            target.Distance(Base.Me.ServerPosition) <= Base.TrueRange + 100)
                        {
                            if (de.Hitchance >= HitChance.Low && Base.CanWS && Base.R.IsReady())
                            {
                                Base.R.Cast(de.CastPosition);
                            }
                        }
                    }

                    if (GetDmg("R") >= Combo.Target.Health && Base.CanWS)
                    {
                        var po = Base.R.GetPrediction(target, true);
                        if (po.Hitchance >= HitChance.Low)
                        {
                            Base.R.Cast(po.CastPosition);
                        }
                    }
                }
            }
        }
Exemplo n.º 3
0
        internal static void OnGameUpdate()
        {
            Target = TargetSelector.GetTarget(1200f, TargetSelector.DamageType.Physical);
            if (Target == null)
            {
                return;
            }

            // combo
            if (!Base.Settings.Item("combokey").GetValue <KeyBind>().Active)
            {
                return;
            }

            var ignote = Base.Me.GetSpellSlot("summonerdot");

            if (Base.Me.Spellbook.CanUseSpell(ignote) == SpellState.Ready)
            {
                if (Target.Distance(Base.Me.ServerPosition) <= 600 * 600 && Base.CleaveCount <= 1 &&
                    Base.Q.IsReady())
                {
                    var combo = Helpers.GetDmg("P") * 3 + Helpers.GetDmg("Q") * 3 + Helpers.GetDmg("W") +
                                Helpers.GetDmg("ITEMS") + Helpers.GetDmg("I") + Helpers.GetDmg("R");

                    if (Base.GetBool("useignote") && combo >= Target.Health)
                    {
                        Base.Me.Spellbook.CastSpell(ignote, Target);
                    }

                    else if (Base.GetBool("useignote") && Base.ComboDamage >= Target.Health && Base.R.IsReady())
                    {
                        Base.Me.Spellbook.CastSpell(ignote, Target);
                    }
                }
            }

            Base.OrbTo(Target);
            if (!Target.IsValidTarget(Base.R.Range * 2))
            {
                return;
            }

            // valor
            // engage if target is out of aa range
            if (Base.E.IsReady() && Base.CanE && Base.GetBool("usecomboe") &&
                (Target.Distance(Base.Me.ServerPosition, true) > Math.Pow(Base.TrueRange + 30, 2) ||
                 Base.Me.Health / Base.Me.MaxHealth * 100 <= Base.GetSlider("vhealth")))
            {
                // item handler
                if (Base.GetBool("useitems"))
                {
                    if (Items.HasItem(3142) && Items.CanUseItem(3142))
                    {
                        Items.UseItem(3142);
                    }
                    if (Items.HasItem(3144) && Items.CanUseItem(3144))
                    {
                        Items.UseItem(3144, Target);
                    }
                    if (Items.HasItem(3153) && Items.CanUseItem(3153))
                    {
                        Items.UseItem(3153, Target);
                    }
                }

                if (Base.GetBool("usecomboe"))
                {
                    Base.E.Cast(Target.ServerPosition);
                }

                // after dash event
                if (Base.GetList("engage") == 1)
                {
                    if (Base.CanHD && Base.HasHD)
                    {
                        if (Base.W.IsReady() && !Base.CanBurst)
                        {
                            Items.UseItem(3077);
                            Items.UseItem(3074);
                            Utility.DelayAction.Add(
                                100, () => Helpers.CheckR(Target));
                        }

                        // used hydra or dont own
                        else
                        {
                            Helpers.CheckR(Target);
                        }
                    }
                }

                else
                {
                    Helpers.CheckR(Target);
                }
            }

            // kiburst
            // use w if in range
            else if (Base.W.IsReady() && Base.CanW && Base.GetBool("usecombow") &&
                     Target.Distance(Base.Me.ServerPosition, true) <= Math.Pow(Base.W.Range + 25, 2))
            {
                // item handler
                if (Base.GetBool("useitems"))
                {
                    if (Items.HasItem(3142) && Items.CanUseItem(3142))
                    {
                        Items.UseItem(3142);
                    }

                    if (Target.Distance(Base.Me.ServerPosition, true) <= 450 * 450)
                    {
                        if (Items.HasItem(3144) && Items.CanUseItem(3144))
                        {
                            Items.UseItem(3144, Target);
                        }
                        if (Items.HasItem(3153) && Items.CanUseItem(3153))
                        {
                            Items.UseItem(3153, Target);
                        }
                    }
                }

                if (Base.GetList("engage") == 0)
                {
                    Helpers.CheckR(Target);

                    if (Base.GetBool("usecombow"))
                    {
                        Base.W.Cast();
                    }

                    // hydra after
                    if (Base.CanHD && Base.HasHD)
                    {
                        Items.UseItem(3077);
                        Items.UseItem(3074);
                    }
                }

                else if (Base.GetList("engage") == 1)
                {
                    // hydra before
                    if (Base.CanHD && Base.HasHD && !Base.CanBurst)
                    {
                        Items.UseItem(3077);
                        Items.UseItem(3074);
                        if (Base.GetBool("usecombow"))
                        {
                            Utility.DelayAction.Add(250, () => Base.W.Cast());
                        }
                    }

                    // used hydra or dont own
                    else
                    {
                        Helpers.CheckR(Target);
                        if (Base.GetBool("usecombow"))
                        {
                            Base.W.Cast();
                        }
                    }
                }
            }

            // broken wings
            // use q if in range
            else if (Base.Q.IsReady() && Base.GetBool("usecomboq") &&
                     Target.Distance(Base.Me.ServerPosition, true) <= Math.Pow(Base.Q.Range + 30, 2))
            {
                // item handler
                if (Base.GetBool("useitems"))
                {
                    if (Items.HasItem(3142) && Items.CanUseItem(3142))
                    {
                        Items.UseItem(3142);
                    }

                    if (Target.Distance(Base.Me.ServerPosition, true) <= 450 * 450)
                    {
                        if (Items.HasItem(3144) && Items.CanUseItem(3144))
                        {
                            Items.UseItem(3144, Target);
                        }
                        if (Items.HasItem(3153) && Items.CanUseItem(3153))
                        {
                            Items.UseItem(3153, Target);
                        }
                    }
                }

                // check ultimate
                Helpers.CheckR(Target);

                if (Base.GetList("engage") == 0 ||
                    Helpers.GetDmg("P", true) * 2 + Helpers.GetDmg("Q", true) * 1 + Helpers.GetDmg("R") >= Target.Health)
                {
                    if (Items.CanUseItem(3077) || Items.CanUseItem(3074))
                    {
                        return;
                    }
                }

                if (Base.CanQ && Base.GetBool("usecomboq"))
                {
                    Base.Q.Cast(Target.ServerPosition);
                }
            }

            // gapclose
            else if (Target.Distance(Base.Me.ServerPosition, true) >
                     Math.Pow(Base.TrueRange + 100, 2) && Base.GetBool("qgap"))
            {
                if (!Base.E.IsReady() && Environment.TickCount - Base.LastQ >= 1100 && !Base.DidAA)
                {
                    if (Base.Q.IsReady() && Environment.TickCount - Base.LastE >= 700)
                    {
                        Base.Q.Cast(Target.ServerPosition);
                    }
                }
            }
        }