Пример #1
0
 public static void Spellbook_OnCastSpell(Spellbook sender, SpellbookCastSpellEventArgs args)
 {
     if (args.Slot == SpellSlot.W || args.Slot == SpellSlot.E)
     {
         OrbHelper.ResetAutoAttackTimer();
         Orbwalker.ResetAutoAttack();
     }
 }
Пример #2
0
        public static void Obj_AI_Base_OnSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
        {
            if (!sender.IsMe || !args.SData.IsAutoAttack())
            {
                return;
            }
            if (sender.IsMe && args.SData.IsAutoAttack())
            {
                qtarg  = args.Target as Obj_AI_Base;
                lastaa = Core.GameTickCount;
                didaa  = false;
            }

            if (sender.IsMe && args.SData.IsAutoAttack())
            {
                var aiHero = args.Target as AIHeroClient;

                if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LaneClear) || Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.JungleClear))
                {
                    var aiMob = args.Target as Obj_AI_Minion;
                    var unit  = args.Target as AttackableUnit;
                    if (unit != null && !EntityManager.Heroes.Enemies.Any(x => x.IsValidTarget(1200)))
                    {
                        if (SpellManager.Q.IsReady() && !didaa)
                        {
                            Player.CastSpell(SpellSlot.Q, unit.Position);
                        }
                    }
                }

                if (getKeyBindItem(miscMenu, "shycombo"))
                {
                    if (EventManager.riventarget().IsValidTarget() && !EventManager.riventarget().IsZombie&&
                        !EventManager.riventarget().HasBuff("kindredrnodeathbuff"))
                    {
                        if (shy() && EventManager.CheckUlt())
                        {
                            if (EventManager.riventarget().HasBuffOfType(BuffType.Stun))
                            {
                                SpellManager.R2.Cast(EventManager.riventarget().ServerPosition);
                            }

                            var p = SpellManager.R2.GetPrediction(EventManager.riventarget());
                            if (p.HitChance == EloBuddy.SDK.Enumerations.HitChance.Medium && !EventManager.riventarget().HasBuffOfType(BuffType.Stun))
                            {
                                SpellManager.R2.Cast(p.CastPosition);
                            }
                        }
                    }
                }

                if (getKeyBindItem(comboMenu, "combokey") || getKeyBindItem(miscMenu, "shycombo"))
                {
                    if (SpellManager.E.IsReady() && EventManager.riventarget().IsValidTarget(SpellManager.E.Range + 200))
                    {
                        if (player.Health / player.MaxHealth * 100 <= getSliderItem(comboMenu, "vhealth"))
                        {
                            if (getCheckBoxItem(comboMenu, "usecomboe") && !didaa)
                            {
                                if (aiHero != null && aiHero.IsValidTarget(600))
                                {
                                    Player.CastSpell(SpellSlot.E, aiHero.ServerPosition);
                                }
                            }
                        }
                    }
                    if (getCheckBoxItem(comboMenu, "ComboEGap") && SpellManager.E.IsReady() && aiHero.IsValidTarget(600) && aiHero.DistanceToPlayer() > OrbHelper.GetRealAutoAttackRange(Me) + 50)
                    {
                        Player.CastSpell(SpellSlot.E, aiHero.Position);
                    }
                }

                if (getKeyBindItem(comboMenu, "combokey") && aiHero.IsValidTarget())
                {
                    if (SpellManager.W.IsReady() && EventManager.riventarget().Distance(player.ServerPosition) <= SpellManager.W.Range)
                    {
                        if (getCheckBoxItem(comboMenu, "usecombow") && !didaa)
                        {
                            if (!EventManager.fightingLogic || (EventManager.fightingLogic && !EventManager.wrektAny()) || getCheckBoxItem(comboMenu, "w" + aiHero.ChampionName))
                            {
                                if (Core.GameTickCount - lasthd < 1000)
                                {
                                    SpellManager.W.Cast();
                                }

                                if (aiHero.HealthPercent < player.HealthPercent ||
                                    (int)aiHero.HealthPercent == (int)player.HealthPercent)
                                {
                                    if (Qcount >= 2 || !SpellManager.Q.IsReady() || player.Distance(aiHero) > truerange)
                                    {
                                        SpellManager.W.Cast();
                                    }
                                }
                                else
                                {
                                    SpellManager.W.Cast();
                                }
                            }
                        }
                    }

                    if (SpellManager.Q.IsReady() && EventManager.riventarget().Distance(player.ServerPosition) <= SpellManager.Q.Range + 100)
                    {
                        if (getBoxItem(comboMenu, "wsmode") == 1 && EventManager.IsLethal(EventManager.riventarget()))
                        {
                            if (Qcount == 2 && SpellManager.E.IsReady() && !didaa)
                            {
                                Player.CastSpell(SpellSlot.E, EventManager.riventarget().ServerPosition);
                            }
                        }

                        if (getCheckBoxItem(comboMenu, "safeq"))
                        {
                            var endq = player.Position.Extend(EventManager.riventarget().Position, SpellManager.Q.Range + 35);
                            if (endq.CountEnemyChampionsInRange(200) <= 2)
                            {
                                Player.CastSpell(SpellSlot.Q, EventManager.riventarget().ServerPosition);
                            }
                        }

                        else
                        {
                            Player.CastSpell(SpellSlot.Q, EventManager.riventarget().ServerPosition);
                        }
                    }
                }
            }

            if (sender.IsMe && args.SData.IsAutoAttack())
            {
                EventManager.SemiQ();
            }
        }
Пример #3
0
        public static void ComboTarget(AIHeroClient target)
        {
            var ende       = player.Position.Extend(target.Position, SpellManager.E.Range + 35);
            var catchRange = SpellManager.E.IsReady() ? SpellManager.E.Range + truerange + SpellManager.W.Range : truerange + SpellManager.W.Range;

            if (target.Distance(player.ServerPosition) <= SpellManager.E.Range + 100 && SpellManager.Q.IsReady())
            {
                if (Core.GameTickCount - lastw < 500 && Core.GameTickCount - lasthd < 1000)
                {
                    if (target.Distance(player.ServerPosition) <= SpellManager.E.Range + 100 && SpellManager.Q.IsReady())
                    {
                        EventManager.DoOneQ(target.ServerPosition);
                    }
                }
            }

            if (Qcount == 2 &&
                target.Distance(player) >= player.AttackRange &&
                target.Distance(player) <= 650 &&
                getCheckBoxItem(comboMenu, "Q3Wall") &&
                SpellManager.E.IsReady())
            {
                var wallPoint = FleeManager.GetFirstWallPoint(player.Position, player.Position.Extend(target.Position, 650).To3DWorld());

                player.GetPath(wallPoint);

                if (!SpellManager.E.IsReady() || wallPoint.Distance(player.Position) > SpellManager.E.Range || !wallPoint.IsValid())
                {
                    return;
                }
                Player.CastSpell(SpellSlot.E, wallPoint);

                Core.DelayAction(() => Player.CastSpell(SpellSlot.Q, wallPoint), 190); //Q.Cast(wallPoint));

                if (wallPoint.Distance(player.Position) <= 100)
                {
                    Player.CastSpell(SpellSlot.Q, wallPoint);
                }
            }

            if (SpellManager.E.IsReady() && getCheckBoxItem(comboMenu, "usecomboe") &&
                target.Distance(player.ServerPosition) > truerange + 100 &&
                (target.Distance(player.ServerPosition) <= SpellManager.E.Range + SpellManager.W.Range ||
                 EventManager.CheckUlt() && target.Distance(player.ServerPosition) > truerange + 200) ||
                target.Distance(player.ServerPosition) <= SpellManager.E.Range + SpellManager.W.Range + SpellManager.Q.Range / 2f && SpellManager.R.IsReady() &&
                (Qcount == 2 && EventManager.IsLethal(target) || Qcount == 2 && target.CountEnemyChampionsInRange(SpellManager.W.Range + 35) >= 2))
            {
                if (!didaa)
                {
                    if (getCheckBoxItem(comboMenu, "safee"))
                    {
                        if (ende.CountEnemyChampionsInRange(200) <= 2)
                        {
                            Player.CastSpell(SpellSlot.E, target.ServerPosition);
                        }
                    }

                    else
                    {
                        Player.CastSpell(SpellSlot.E, target.ServerPosition);
                    }

                    if (target.Distance(player.ServerPosition) <= SpellManager.E.Range + SpellManager.W.Range)
                    {
                        EventManager.checkr();

                        if (!canburst() && EventManager.CheckUlt() && Qcount != 2)
                        {
                            if (Item.CanUseItem(3077))
                            {
                                Item.UseItem(3077);
                            }
                            if (Item.CanUseItem(3074))
                            {
                                Item.UseItem(3074);
                            }
                        }
                    }

                    if (!canburst() && Qcount != 2)
                    {
                        if (Item.CanUseItem(3077))
                        {
                            Item.UseItem(3077);
                        }
                        if (Item.CanUseItem(3074))
                        {
                            Item.UseItem(3074);
                        }
                    }
                }
            }

            if (SpellManager.W.IsReady() && getCheckBoxItem(comboMenu, "usecombow") && target.Distance(player.ServerPosition) <= SpellManager.W.Range)
            {
                if (Core.GameTickCount - lasthd > 1500)
                {
                    EventManager.checkr();

                    if (getCheckBoxItem(comboMenu, "usecombow") && !didaa)
                    {
                        if (!EventManager.fightingLogic ||
                            (EventManager.fightingLogic && !EventManager.wrektAny()) ||
                            getCheckBoxItem(comboMenu, "w" + target.ChampionName))
                        {
                            if (target.HealthPercent < player.HealthPercent ||
                                (int)target.HealthPercent == (int)player.HealthPercent)
                            {
                                if (Qcount >= 2 || !SpellManager.Q.IsReady() || player.Distance(target) > truerange)
                                {
                                    SpellManager.W.Cast();
                                }
                            }
                            else
                            {
                                SpellManager.W.Cast();
                            }
                        }
                    }
                    if (getCheckBoxItem(comboMenu, "ComboWLogic") && SpellManager.W.IsReady() && target.IsValidTarget(SpellManager.W.Range))
                    {
                        if (Qcount == 0 && SpellManager.W.Cast())
                        {
                            return;
                        }

                        if (SpellManager.Q.IsReady() && Qcount > 1 && SpellManager.W.Cast())
                        {
                            return;
                        }

                        if (Me.HasBuff("RivenFeint") && SpellManager.W.Cast())
                        {
                            return;
                        }

                        if (!target.IsFacing(Me) && SpellManager.W.Cast())
                        {
                            return;
                        }
                    }
                }
            }

            if (getCheckBoxItem(comboMenu, "useQgap") /*&& !SpellManager.E.IsReady()*/ && SpellManager.Q.IsReady() && (target.Distance(player.ServerPosition) > catchRange || target.Distance(player.ServerPosition) < 300))
            {
                if (Core.GameTickCount - lastq >= getSliderItem(comboMenu, "gaptimeQ") * 10)
                {
                    if (SpellManager.Q.IsReady() && Core.GameTickCount - laste >= 1000)
                    {
                        Player.CastSpell(SpellSlot.Q, EventManager.riventarget().ServerPosition);
                    }
                }
                if (target.Distance(player.ServerPosition) < SpellManager.E.Range + 150 && SpellManager.E.IsReady() && Core.GameTickCount - lastq >= 2000 && Qcount < 3 && Qcount >= 1)
                {
                    Player.CastSpell(SpellSlot.E, EventManager.riventarget().ServerPosition);
                }
            }
            else
            {
                if (target.Distance(player.ServerPosition) <= SpellManager.E.Range + SpellManager.W.Range)
                {
                    EventManager.checkr();
                }
            }

            if (getCheckBoxItem(comboMenu, "useQgap") && SpellManager.Q.IsReady() && Core.GameTickCount - lastq > 3600 && !Me.IsDashing() &&
                target.IsValidTarget(480) && target.DistanceToPlayer() > OrbHelper.GetRealAutoAttackRange(Me) + 50)
            {
                var pred = SpellManager.Q.GetPrediction(target);

                if (pred.UnitPosition != Vector3.Zero &&
                    (pred.UnitPosition.DistanceToPlayer() < target.DistanceToPlayer() ||
                     pred.UnitPosition.Distance(target.Position) <= target.DistanceToPlayer()) && EventManager.CastQ(target))
                {
                    return;
                }
            }
        }
Пример #4
0
        public static Obj_AI_Base qtarg; // semi q target

        public static void OnPlayAnimation(Obj_AI_Base sender, GameObjectPlayAnimationEventArgs args)
        {
            if (!sender.IsMe)
            {
                return;
            }
            switch (args.Animation)
            {
            case "Spell1a":
                Core.DelayAction(() =>
                {
                    Chat.Say("/d");
                    OrbHelper.ResetAutoAttackTimer();
                    Orbwalker.ResetAutoAttack();
                    Player.IssueOrder(GameObjectOrder.MoveTo, player.Position.Extend(Game.CursorPos, +10).To3DWorld());
                }, 291);
                break;

            case "Spell1b":
                Core.DelayAction(() =>
                {
                    Chat.Say("/d");
                    OrbHelper.ResetAutoAttackTimer();
                    Orbwalker.ResetAutoAttack();
                    Player.IssueOrder(GameObjectOrder.MoveTo, player.Position.Extend(Game.CursorPos, +10).To3DWorld());
                }, 291);
                break;

            case "Spell1c":
                Core.DelayAction(() =>
                {
                    Chat.Say("/d");
                    OrbHelper.ResetAutoAttackTimer();
                    Orbwalker.ResetAutoAttack();
                    Player.IssueOrder(GameObjectOrder.MoveTo, player.Position.Extend(Game.CursorPos, +10).To3DWorld());
                }, (getCheckBoxItem(comboMenu, "TheshyQ") ? 0 : 391));
                break;

            /*
             * case "Spell2":
             * Core.DelayAction(() =>
             * {
             *  Chat.Print("aaa");
             *  Chat.Say("/d");
             *  Orbwalker.ResetAutoAttack();
             *  Player.IssueOrder(GameObjectOrder.MoveTo, player.Position.Extend(Game.CursorPos, +10).To3DWorld());
             * }, (getSliderItem(comboMenu, "QD") * 10) + 1);
             * break;
             * case "Spell3":
             * Core.DelayAction(() =>
             * {
             *  Chat.Print("aaa");
             *  Chat.Say("/d");
             *  Orbwalker.ResetAutoAttack();
             *  Player.IssueOrder(GameObjectOrder.MoveTo, player.Position.Extend(Game.CursorPos, +10).To3DWorld());
             * }, (getSliderItem(comboMenu, "QD") * 10) + 1);
             * break;//*/
            case "Spell4a":
                lastr = Core.GameTickCount;
                break;
            }
        }