コード例 #1
0
        private static void OnDoCastLc(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
        {
            if (!sender.IsMe || !Orbwalking.IsAutoAttack(args.SData.Name))
            {
                return;
            }
            Logic._qtarget = (Obj_AI_Base)args.Target;

            if (args.Target is Obj_AI_Minion)
            {
                if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LaneClear))
                {
                    var minions = MinionManager.GetMinions(800f).FirstOrDefault();
                    if (minions == null)
                    {
                        return;
                    }

                    if (Spells._e.IsReady() && MenuConfig.LaneE)
                    {
                        Spells._e.Cast(minions.ServerPosition);
                    }

                    if (Spells._q.IsReady() && MenuConfig.LaneQ && !MenuConfig.FastC)
                    {
                        Spells._q.Cast(Logic.GetCenterMinion());
                        Logic.CastHydra();
                    }

                    if (Spells._q.IsReady() && MenuConfig.LaneQ && MenuConfig.FastC)
                    {
                        Logic.CastHydra();
                        Utility.DelayAction.Add(1, () => Logic.ForceCastQ(minions));
                    }

                    if (Spells._w.IsReady() && MenuConfig.LaneW)
                    {
                        var minion = MinionManager.GetMinions(Player.Position, Spells._w.Range);
                        foreach (var m in minion)
                        {
                            if (m.Health < Spells._w.GetDamage(m) && minion.Count > 2)
                            {
                                Spells._w.Cast(m);
                            }
                        }
                    }
                }
            }
        }
コード例 #2
0
        private static void OnDoCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
        {
            var spellName = args.SData.Name;

            if (!sender.IsMe || !Orbwalking.IsAutoAttack(spellName))
            {
                return;
            }

            if (args.Target is Obj_AI_Minion)
            {
                Lane.LaneLogic();
            }

            var @base = args.Target as Obj_AI_Turret;

            if (@base != null)
            {
                if (@base.IsValid && args.Target != null && Spells._q.IsReady() && MenuConfig.LaneQ &&
                    Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LaneClear))
                {
                    Spells._q.Cast(@base);
                }
            }

            var hero = args.Target as AIHeroClient;

            if (hero == null)
            {
                return;
            }
            var target = hero;

            if (Spells._r.IsReady() && Spells._r.Instance.Name == IsSecondR)
            {
                if (target.Health < Dmg.Rdame(target, target.Health) + Player.GetAutoAttackDamage(target) &&
                    target.Health > Player.GetAutoAttackDamage(target))
                {
                    Spells._r.Cast(target.Position);
                }
            }
            if (Spells._w.IsReady())
            {
                if (target.Health < Spells._w.GetDamage(target) + Player.GetAutoAttackDamage(target) &&
                    target.Health > Player.GetAutoAttackDamage(target))
                {
                    Spells._w.Cast();
                }
            }
            if (Spells._q.IsReady())
            {
                if (target.Health < Spells._q.GetDamage(target) + Player.GetAutoAttackDamage(target) &&
                    target.Health > Player.GetAutoAttackDamage(target))
                {
                    Spells._q.Cast(target);
                }
            }

            if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo))
            {
                if (Spells._e.IsReady())
                {
                    Spells._e.Cast(target.Position);
                }

                if (Spells._w.IsReady() && Logic.InWRange(target))
                {
                    Spells._w.Cast();
                }

                if (Spells._q.IsReady())
                {
                    Logic.ForceItem();
                    Utility.DelayAction.Add(0, () => Logic.ForceCastQ(target));
                }
            }


            if (MenuConfig.fastHKey)
            {
                if (HasTitan())
                {
                    CastTitan();
                    return;
                }
                if (Spells._w.IsReady() && Logic.InWRange(target))
                {
                    Logic.ForceItem();
                    Utility.DelayAction.Add(1, Logic.ForceW);
                    Utility.DelayAction.Add(2, () => Logic.ForceCastQ(target));
                }
                else if (Spells._q.IsReady())
                {
                    Logic.ForceItem();
                    Utility.DelayAction.Add(1, () => Logic.ForceCastQ(target));
                }
                else if (Spells._e.IsReady() && !Orbwalking.InAutoAttackRange(target) && !Logic.InWRange(target))
                {
                    Spells._e.Cast(target.Position);
                }
            }

            if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Harass))
            {
                if (HasTitan())
                {
                    CastTitan();
                    return;
                }
                if (_qstack == 2 && Spells._q.IsReady())
                {
                    Logic.ForceItem();
                    Utility.DelayAction.Add(1, () => Logic.ForceCastQ(target));
                }
            }

            if (!MenuConfig.burstKey)
            {
                if (HasTitan())
                {
                    CastTitan();
                    return;
                }
                if (Spells._w.IsReady())
                {
                    Spells._w.Cast(target.Position);
                }
                if (Spells._r.IsReady() && Spells._r.Instance.Name == IsSecondR)
                {
                    Logic.ForceItem();
                    Utility.DelayAction.Add(1, Logic.ForceR2);
                }
                else if (Spells._q.IsReady())
                {
                    Logic.ForceItem();
                    Utility.DelayAction.Add(1, () => Logic.ForceCastQ(target));
                }
            }
        }