Exemplo n.º 1
0
        private void CheckBurst()
        {
            if (Orbwalker.ActiveModesFlags != Orbwalker.ActiveModes.Combo || !RivenMenu.Combo["burstKey"].Cast <KeyBind>().CurrentValue)
            {
                return;
            }

            var target = TargetSelector.SelectedTarget;

            if (target == null || !target.IsValidTarget() || target.IsZombie || target.IsInvulnerable)
            {
                return;
            }

            if (!Spells.R1.IsReady() || !Spells.E.IsReady() || !Spells.W.IsReady() ||
                Player.Instance.Spellbook.GetSpell(SpellSlot.R).Name != "RivenFengShuiEngine")
            {
                return;
            }

            if (Spells.Flash.IsReady())
            {
                if (me.Distance(target.Position) > 700 || me.Distance(target) < Spells.E.Range + me.AttackRange)
                {
                    return;
                }

                Spells.E.Cast(target.Position);
                Spells.ForceR1();
                Core.DelayAction(() =>
                {
                    var targett = TargetSelector.SelectedTarget;
                    if (target == null || !target.IsValidTarget() || target.IsZombie || target.IsInvulnerable)
                    {
                        return;
                    }

                    Core.DelayAction(() => Spells.ForceFlash(targett.Position.To2D()), 10);
                    //Core.DelayAction(Spells.ForceItem, 11);
                }, 180);
            }
            else if (target.Distance(me) <= Spells.E.Range + Spells.W.Range / 2f)
            {
                Spells.E.Cast(target.Position);
                Spells.ForceR1();
                //Core.DelayAction(Spells.ForceItem, 1);
            }
        }
Exemplo n.º 2
0
        private void DashOnOnDash(Obj_AI_Base sender, Dash.DashEventArgs dashEventArgs)
        {
            if (!sender.IsMe)
            {
                return;
            }

            var slot = !Spells.E.IsReady() ? SpellSlot.E : SpellSlot.Q;

            CastType currentCastType = CastType.NONE;

            if (slot == SpellSlot.Q)
            {
                LastQ           = Environment.TickCount;
                currentCastType = CastType.Q;
            }
            if (slot == SpellSlot.E)
            {
                currentCastType = CastType.E;
            }

            CastType?nextCast = RivenMenu.GetNextCastTyoe(currentCastType);

            if (nextCast == null || GetTarget == null)
            {
                return;
            }

            switch (nextCast)
            {
            case CastType.Q: Spells.ForceQ(GetTarget.Position.To2D()); break;

            case CastType.W: Spells.ForceW(); break;

            case CastType.E: Spells.ForceE(GetTarget.Position.To2D()); break;

            case CastType.R1: Spells.ForceR1(); break;

            case CastType.R2: TryR2Cast(); break;

            case CastType.H: Spells.ForceItem(); break;

            case CastType.F: Spells.ForceFlash(TargetSelector.SelectedTarget.Position.To2D()); break;
            }
        }
Exemplo n.º 3
0
        private void OnSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
        {
            if (!sender.IsMe)
            {
                return;
            }

            CastType currentCastType = CastType.NONE;

            if (args.SData.Name.Contains("BasicAttack"))
            {
                currentCastType = CastType.AA;

                if (ObjectManager.Get <Obj_AI_Turret>().Any(x => me.Distance(x) <= me.GetAutoAttackRange() + x.BoundingRadius + 200))
                {
                    Spells.ForceQ();
                }

                if (me.GetAutoAttackDamage(args.Target as Obj_AI_Base) >= (args.Target as Obj_AI_Base).Health)
                {
                    return;
                }
            }
            if (args.Slot == SpellSlot.W)
            {
                currentCastType = CastType.W;
            }
            if (args.SData.Name.Contains("RivenFengShuiEngine")) //firstR
            {
                currentCastType = CastType.R1;
                LastRTick       = Environment.TickCount;
            }
            if (args.SData.Name.Contains("RivenIzunaBlade")) //secondR
            {
                currentCastType = CastType.R2;
                RivenMenu.Combo["burstKey"].Cast <KeyBind>().CurrentValue = false;
            }
            if (args.SData.Name.Contains("ItemTiamatCleave"))
            {
                currentCastType = CastType.H;
            }
            if (args.SData.Name.ToLower().Contains("flash"))
            {
                currentCastType = CastType.F;
            }

            if (currentCastType == CastType.NONE)
            {
                return;
            }

            if (GetTarget == null)
            {
                return;
            }

            CastType?nextCast = RivenMenu.GetNextCastTyoe(currentCastType);

            if (nextCast == null)
            {
                return;
            }

            switch (nextCast)
            {
            case CastType.Q: Spells.ForceQ(GetTarget.Position.To2D()); break;

            case CastType.W: Spells.ForceW(); break;

            case CastType.E: Spells.ForceE(GetTarget.Position.To2D()); break;

            case CastType.R1: Spells.ForceR1(); break;

            case CastType.R2: TryR2Cast(); break;

            case CastType.H: Spells.ForceItem(); break;

            case CastType.F: Spells.ForceFlash(TargetSelector.SelectedTarget.Position.To2D()); break;
            }
        }