Esempio n. 1
0
 private static void Game_OnTick(EventArgs args)
 {
     if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo))
     {
         StateLogic.Combo();
     }
     if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Harass))
     {
         StateLogic.Harass();
     }
     if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LastHit))
     {
         StateLogic.LastHit();
     }
     if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LaneClear))
     {
         StateLogic.LaneClear();
     }
     if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.JungleClear))
     {
         StateLogic.Jungle();
     }
     if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Flee))
     {
         StateLogic.Flee();
     }
     Auto();
     if (ComboMenu["BurstBox"].Cast <KeyBind>().CurrentValue)
     {
         Burst();
     }
     if (ComboMenu["BurstKor"].Cast <KeyBind>().CurrentValue)
     {
         BurstFlash();
     }
 }
Esempio n. 2
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);
                }
            }
        }