Example #1
0
        public static void Combo()
        {
            EnableR = false;
            if (Orbwalker.IsAutoAttacking)
            {
                return;
            }

            var target = TargetSelector.GetTarget(Riven.E.Range + Riven.W.Range + 200, DamageType.Physical);

            if (Riven.R2.IsReady() && Player.Instance.HasBuff("RivenFengShuiEngine") &&
                Riven.ComboMenu["Combo.R2"].Cast <CheckBox>().CurrentValue)
            {
                if (DamageLogic.RDamage(target, target.Health) * 0.95 >= target.Health)
                {
                    var RPred = Riven.R2.GetPrediction(target);
                    if (RPred.HitChance >= HitChance.High)
                    {
                        Riven.R2.Cast(RPred.UnitPosition);
                    }
                }


                {
                    return;
                }
            }


            if (target == null)
            {
                return;
            }

            if (Riven.ComboMenu["Combo.R"].Cast <CheckBox>().CurrentValue&& Riven.R1.IsReady() && !Player.Instance.HasBuff("RivenFengShuiEngine"))
            {
                if (Riven.ComboMenu["Combo.RCombo"].Cast <CheckBox>().CurrentValue&&
                    target.Health > Player.Instance.GetAutoAttackDamage(target, true) * 2 ||
                    Riven.ComboMenu["Combo.RPeople"].Cast <CheckBox>().CurrentValue&&
                    Player.Instance.CountEnemiesInRange(1000) > 1 || Riven.IsRActive)
                {
                    if (Riven.E.IsReady() && Riven.W.IsReady() && Riven.Q.IsReady())
                    {
                        EnableR = true;
                        ForceR();
                        Player.CastSpell(SpellSlot.R);
                    }
                }
            }

            if (Riven.ComboMenu["Combo.E"].Cast <CheckBox>().CurrentValue&& (target.Distance(Player.Instance) > Riven.W.Range || Riven.IsRActive && Riven.R2.IsReady()) && Riven.E.IsReady())
            {
                Riven.Youmu.Cast();


                Player.CastSpell(SpellSlot.E, target.Position);
                return;
            }
        }
Example #2
0
        private static void Drawing_OnEndScene(EventArgs args)
        {
            if (_Player.IsDead)
            {
                return;
            }
            if (!MiscMenu["DamageIndicator"].Cast <CheckBox>().CurrentValue)
            {
                return;
            }
            foreach (var aiHeroClient in EntityManager.Heroes.Enemies)
            {
                if (!aiHeroClient.IsHPBarRendered || !aiHeroClient.VisibleOnScreen)
                {
                    continue;
                }
                {
                    if (aiHeroClient.Distance(_Player) < 1500)
                    {
                        foreach (var enemy in EntityManager.Heroes.Enemies.Where(a => !a.IsDead && a.IsHPBarRendered))
                        {
                            var damage        = DamageLogic.FastComboDamage(enemy);
                            var damagepercent = (enemy.TotalShieldHealth() - damage > 0 ? enemy.TotalShieldHealth() - damage : 0) /
                                                (enemy.MaxHealth + enemy.AllShield + enemy.AttackShield + enemy.MagicShield);
                            var hppercent = enemy.TotalShieldHealth() /
                                            (enemy.MaxHealth + enemy.AllShield + enemy.AttackShield + enemy.MagicShield);
                            var start = new Vector2((int)(enemy.HPBarPosition.X + Offset.X + damagepercent * 104),
                                                    (int)(enemy.HPBarPosition.Y + Offset.Y) - -9);
                            var end = new Vector2((int)(enemy.HPBarPosition.X + Offset.X + hppercent * 104) + 2,
                                                  (int)(enemy.HPBarPosition.Y + Offset.Y) - -9);

                            Drawing.DrawLine(start, end, 9, System.Drawing.Color.Chartreuse);
                        }
                    }
                }
            }
        }
Example #3
0
        public static void LastHitAfterAa(Obj_AI_Base target)
        {
            var unitHp = target.Health - Player.Instance.GetAutoAttackDamage(target, true);

            if (unitHp > 0)
            {
                if (Riven.FarmMenu["LastHit.Q"].Cast <CheckBox>().CurrentValue&& Riven.Q.IsReady() &&
                    Player.Instance.CalculateDamageOnUnit(target, DamageType.Physical, DamageLogic.QDamage()) >
                    unitHp)
                {
                    Player.CastSpell(SpellSlot.Q, target.Position);
                    return;
                }
                if (Riven.FarmMenu["LastHit.W"].Cast <CheckBox>().CurrentValue&& Riven.W.IsReady() &&
                    Riven.W.IsInRange(target) &&
                    Player.Instance.CalculateDamageOnUnit(target, DamageType.Physical, DamageLogic.WDamage()) >
                    unitHp)
                {
                    Player.CastSpell(SpellSlot.W);
                }
            }
        }
Example #4
0
 public static void ComboAfterAa(Obj_AI_Base target)
 {
     if (Player.Instance.HasBuff("RivenFengShuiEngine") && Riven.R2.IsReady() &&
         Riven.ComboMenu["Combo.R2"].Cast <CheckBox>().CurrentValue)
     {
         if (Player.Instance.CalculateDamageOnUnit(target, DamageType.Physical, DamageLogic.RDamage(target)) + Player.Instance.GetAutoAttackDamage(target, true) > target.Health)
         {
             Riven.R2.Cast(target);
             return;
         }
     }
     if (Riven.ComboMenu["Combo.Q"].Cast <CheckBox>().CurrentValue&& Riven.Q.IsReady())
     {
         Player.CastSpell(SpellSlot.E, target.Position);
         Player.CastSpell(SpellSlot.Q, target.Position);
         return;
     }
     if (ItemLogic.Hydra != null && ItemLogic.Hydra.IsReady())
     {
         ItemLogic.Hydra.Cast();
     }
     if (Riven.ComboMenu["Combo.W"].Cast <CheckBox>().CurrentValue&& Riven.W.IsReady() &&
         Riven.W.IsInRange(target))
     {
         Player.CastSpell(SpellSlot.W);
         return;
     }
 }
Example #5
0
        public static void LastHit()
        {
            Orbwalker.ForcedTarget = null;
            if (Orbwalker.IsAutoAttacking)
            {
                return;
            }

            foreach (
                var minion in EntityManager.MinionsAndMonsters.EnemyMinions.Where(a => a.IsValidTarget(Riven.W.Range)))
            {
                if (Riven.FarmMenu["LastHit.Q"].Cast <CheckBox>().CurrentValue&& Riven.Q.IsReady() &&
                    minion.Health <=
                    Player.Instance.CalculateDamageOnUnit(minion, DamageType.Physical, DamageLogic.QDamage()))
                {
                    Player.CastSpell(SpellSlot.Q, minion.Position);
                    return;
                }
                if (Riven.FarmMenu["LastHit.W"].Cast <CheckBox>().CurrentValue&& Riven.W.IsReady() &&
                    minion.Health <=
                    Player.Instance.CalculateDamageOnUnit(minion, DamageType.Physical, DamageLogic.WDamage()))
                {
                    Player.CastSpell(SpellSlot.W);
                    return;
                }
            }
        }
Example #6
0
        private static void Obj_AI_Base_OnSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
        {
            if (!sender.IsMe)
            {
                return;
            }
            var target = args.Target as Obj_AI_Base;

            // Hydra
            if (args.SData.Name.ToLower().Contains("itemtiamatcleave"))
            {
                Orbwalker.ResetAutoAttack();
                if (Riven.W.IsReady())
                {
                    var target2 = TargetSelector.GetTarget(Riven.W.Range, DamageType.Physical);
                    if (target2 != null || Orbwalker.ActiveModesFlags != Orbwalker.ActiveModes.None)
                    {
                        Player.CastSpell(SpellSlot.W);
                    }
                }
                return;
            }

            //W
            if (args.SData.Name.ToLower().Contains(Riven.W.Name.ToLower()))
            {
                if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo))
                {
                    if (Player.Instance.HasBuff("RivenFengShuiEngine") && Riven.R2.IsReady() &&
                        Riven.ComboMenu["Combo.R2"].Cast <CheckBox>().CurrentValue)
                    {
                        var target2 = TargetSelector.GetTarget(Riven.R2.Range, DamageType.Physical);
                        if (target2 != null &&
                            (target2.Distance(Player.Instance) < Riven.W.Range &&
                             target2.Health >
                             Player.Instance.CalculateDamageOnUnit(target2, DamageType.Physical, DamageLogic.WDamage()) ||
                             target2.Distance(Player.Instance) > Riven.W.Range) &&
                            Player.Instance.CalculateDamageOnUnit(target2, DamageType.Physical,
                                                                  DamageLogic.RDamage(target2) + DamageLogic.WDamage()) > target2.Health)
                        {
                            Riven.R2.Cast(target2);
                        }
                    }
                }

                target = (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo) ||
                          Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Harass))
                    ? TargetSelector.GetTarget(Riven.E.Range + Riven.W.Range, DamageType.Physical)
                    : (Obj_AI_Base)Orbwalker.LastTarget;
                if (Riven.Q.IsReady() && Orbwalker.ActiveModesFlags != Orbwalker.ActiveModes.None && target != null)
                {
                    Player.CastSpell(SpellSlot.Q, target.Position);
                    return;
                }
                return;
            }

            //E
            if (args.SData.Name.ToLower().Contains(Riven.E.Name.ToLower()))
            {
                if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo))
                {
                    if (Player.Instance.HasBuff("RivenFengShuiEngine") && Riven.R2.IsReady() &&
                        Riven.ComboMenu["Combo.R2"].Cast <CheckBox>().CurrentValue)
                    {
                        var target2 = TargetSelector.GetTarget(Riven.R2.Range, DamageType.Physical);
                        if (target2 != null &&
                            Player.Instance.CalculateDamageOnUnit(target2, DamageType.Physical,
                                                                  (DamageLogic.RDamage(target2))) > target2.Health)
                        {
                            Riven.R2.Cast(target2);
                            return;
                        }
                    }
                    if ((Riven.IsRActive || StateLogic.EnableR) && Riven.R1.IsReady() &&
                        !Player.Instance.HasBuff("RivenFengShuiEngine") &&
                        Riven.ComboMenu["Combo.R"].Cast <CheckBox>().CurrentValue)
                    {
                        Player.CastSpell(SpellSlot.R);
                    }
                    target = TargetSelector.GetTarget(Riven.W.Range, DamageType.Physical);
                    if (target != null && Player.Instance.Distance(target) < Riven.W.Range)
                    {
                        Player.CastSpell(SpellSlot.W);
                        return;
                    }
                }
            }

            //Q
            if (args.SData.Name.ToLower().Contains(Riven.Q.Name.ToLower()))
            {
                if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo))
                {
                    if (Player.Instance.HasBuff("RivenFengShuiEngine") && Riven.R2.IsReady() &&
                        Riven.ComboMenu["Combo.R2"].Cast <CheckBox>().CurrentValue)
                    {
                        var target2 = TargetSelector.GetTarget(Riven.R2.Range, DamageType.Physical);
                        if (target2 != null &&
                            (target2.Distance(Player.Instance) < 300 &&
                             target2.Health >
                             Player.Instance.CalculateDamageOnUnit(target2, DamageType.Physical, DamageLogic.QDamage()) ||
                             target2.Distance(Player.Instance) > 300) &&
                            Player.Instance.CalculateDamageOnUnit(target2, DamageType.Physical,
                                                                  DamageLogic.RDamage(target2) + DamageLogic.QDamage()) > target2.Health)
                        {
                            Riven.R2.Cast(target2);
                        }
                    }
                }
                return;
            }

            if (args.SData.IsAutoAttack() && target != null)
            {
                if (Riven.ComboMenu["HumanizerDelay"].Cast <Slider>().CurrentValue == 0)
                {
                    if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo))
                    {
                        StateLogic.ComboAfterAa(target);
                    }

                    if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Harass))
                    {
                        StateLogic.HarassAfterAa(target);
                    }

                    if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.JungleClear) && target.IsJungleMinion())
                    {
                        StateLogic.JungleAfterAa(target);
                    }

                    if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LastHit) && target.IsLaneMinion())
                    {
                        StateLogic.LastHitAfterAa(target);
                    }

                    if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LaneClear) && target.IsLaneMinion())
                    {
                        StateLogic.LaneClearAfterAa(target);
                    }
                }
                else
                {
                    Core.DelayAction(() =>
                    {
                        if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo))
                        {
                            StateLogic.ComboAfterAa(target);
                        }

                        if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Harass))
                        {
                            StateLogic.HarassAfterAa(target);
                        }

                        if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.JungleClear) &&
                            target.IsJungleMinion())
                        {
                            StateLogic.JungleAfterAa(target);
                        }

                        if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LastHit) && target.IsLaneMinion())
                        {
                            StateLogic.LastHitAfterAa(target);
                        }

                        if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LaneClear) && target.IsLaneMinion())
                        {
                            StateLogic.LaneClearAfterAa(target);
                        }
                    }, Riven.ComboMenu["HumanizerDelay"].Cast <Slider>().CurrentValue);
                }
            }
        }