Пример #1
0
        private static void KillStealEvent()
        {
            try
            {
                if (isCastingUlt && !KillStealMenu["FlowersKatarina.KillStealMenu.CancelR"].Enabled)
                {
                    return;
                }

                if (Me.CountEnemyHeroesInRange(E.Range) == 0)
                {
                    return;
                }

                foreach (
                    var target in
                    GameObjects.EnemyHeroes.Where(x => !x.IsDead && x.IsValidTarget(E.Range + 300))
                    .OrderBy(x => x.Health))
                {
                    if (target.IsValidTarget(E.Range + 300))
                    {
                        if (KillStealMenu["FlowersKatarina.KillStealMenu.Q"].Enabled && target.Health < Q.GetDamage(target) && Q.Ready &&
                            target.IsValidTarget(Q.Range))
                        {
                            if (isCastingUlt)
                            {
                                MyExtraManager.CancelUlt(true);
                                Q.CastOnUnit(target);
                                return;
                            }
                            Q.CastOnUnit(target);
                            return;
                        }

                        if (KillStealMenu["FlowersKatarina.KillStealMenu.E"].Enabled && target.Health < E.GetDamage(target) && E.Ready)
                        {
                            if (target.DistanceToPlayer() <= E.Range + 130)
                            {
                                var pos = Me.Position.Extend(target.Position, target.DistanceToPlayer() + 130);
                                if (isCastingUlt)
                                {
                                    MyExtraManager.CancelUlt(true);
                                    E.Cast(pos);
                                    return;
                                }
                                E.Cast(pos);
                                return;
                            }

                            if (target.IsValidTarget(E.Range))
                            {
                                if (isCastingUlt)
                                {
                                    MyExtraManager.CancelUlt(true);
                                    E.Cast(target);
                                    return;
                                }
                                E.Cast(target);
                                return;
                            }
                        }

                        if (KillStealMenu["FlowersKatarina.KillStealMenu.Q"].Enabled && target.Health < Q.GetDamage(target) + E.GetDamage(target) &&
                            KillStealMenu["FlowersKatarina.KillStealMenu.E"].Enabled && Q.Ready && E.Ready &&
                            target.IsValidTarget(E.Range))
                        {
                            if (isCastingUlt)
                            {
                                MyExtraManager.CancelUlt(true);
                                Q.CastOnUnit(target);
                                E.Cast(target);
                                return;
                            }
                            Q.CastOnUnit(target);
                            E.Cast(target);
                            return;
                        }

                        if (target.Health < MyExtraManager.GetKataPassiveDamage(target) + E.GetDamage(target) &&
                            KillStealMenu["FlowersKatarina.KillStealMenu.E"].Enabled && E.Ready &&
                            Daggers.Any(
                                x =>
                                x.obj.IsValid &&
                                x.pos.Distance(target.Position) <= PassiveRange &&
                                x.pos.DistanceToPlayer() <= E.Range))
                        {
                            foreach (
                                var obj in
                                Daggers.Where(x => x.pos.Distance(target.Position) <= PassiveRange)
                                .OrderBy(x => x.pos.Distance(target.Position)))
                            {
                                if (obj.obj != null && obj.obj.IsValid && obj.pos.DistanceToPlayer() <= E.Range)
                                {
                                    if (isCastingUlt)
                                    {
                                        MyExtraManager.CancelUlt(true);
                                        E.Cast(obj.pos);
                                        MyDelayAction.Queue(100 + Game.Ping, () => E.Cast(target));
                                        return;
                                    }
                                    E.Cast(obj.pos);
                                    MyDelayAction.Queue(100 + Game.Ping, () => E.Cast(target));
                                    return;
                                }
                            }
                        }

                        if (target.Health < R.GetDamage(target) * 0.6 && KillStealMenu["FlowersKatarina.KillStealMenu.R"].Enabled &&
                            R.Ready && target.IsValidTarget(R.Range) && target.Health > 50 * target.Level)
                        {
                            R.Cast();
                            return;
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine("Error in MyEventManager.KillStealEvent." + ex);
            }
        }
Пример #2
0
        private static void OnUpdate()
        {
            try
            {
                Daggers.RemoveAll(x => Game.TickCount - x.time > 3850);

                if (Me.IsDead || Me.IsRecalling())
                {
                    return;
                }

                if (FleeMenu["FlowersKatarina.FleeMenu.Key"].As <MenuKeyBind>().Enabled)
                {
                    FleeEvent();
                }

                if (MiscMenu["FlowersKatarina.MiscMenu.OneKeyEW"].As <MenuKeyBind>().Enabled&& E.Ready && W.Ready)
                {
                    SemiEW();
                }

                KillStealEvent();

                if (isCastingUlt)
                {
                    Orbwalker.AttackingEnabled = false;
                    Orbwalker.MovingEnabled    = false;

                    if (MiscMenu["FlowersKatarina.MiscMenu.AutoCancelR"].Enabled)
                    {
                        MyExtraManager.CancelUlt();
                    }

                    return;
                }

                Orbwalker.AttackingEnabled = true;
                Orbwalker.MovingEnabled    = true;

                switch (Orbwalker.Mode)
                {
                case OrbwalkingMode.Combo:
                    ComboEvent();
                    break;

                case OrbwalkingMode.Mixed:
                    HarassEvent();
                    break;

                case OrbwalkingMode.Laneclear:
                    ClearEvent();
                    break;

                case OrbwalkingMode.Lasthit:
                    LastHitEvent();
                    break;
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine("Error in MyEventManager.OnUpdate." + ex);
            }
        }
Пример #3
0
        private static void OnUpdate()
        {
            try
            {
                Daggers.RemoveAll(x => Variables.GameTimeTickCount - x.CreateTime > 3850);

                if (Me.IsDead || Me.IsRecalling())
                {
                    return;
                }

                if (FleeMenu["FlowersKatarina.FleeMenu.Key"].GetValue <MenuKeyBind>().Active)
                {
                    FleeEvent();
                }

                if (MiscMenu["FlowersKatarina.MiscMenu.OneKeyEW"].GetValue <MenuKeyBind>().Active&& E.IsReady() && W.IsReady())
                {
                    SemiEW();
                }

                KillStealEvent();

                if (isCastingUlt)
                {
                    Chat.Print("IS CASTING R");
                    Orbwalker.AttackState   = false;
                    Orbwalker.MovementState = false;

                    if (MiscMenu["FlowersKatarina.MiscMenu.AutoCancelR"].GetValue <MenuBool>().Enabled)
                    {
                        MyExtraManager.CancelUlt();
                    }

                    return;
                }

                Orbwalker.AttackState   = true;
                Orbwalker.MovementState = true;

                switch (Orbwalker.ActiveMode)
                {
                case OrbwalkerMode.Combo:
                    ComboEvent();
                    break;

                case OrbwalkerMode.Harass:
                    HarassEvent();
                    break;

                case OrbwalkerMode.LaneClear:
                    ClearEvent();
                    break;

                case OrbwalkerMode.LastHit:
                    LastHitEvent();
                    break;
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine("Error in MyEventManager.OnUpdate." + ex);
            }
        }