Example #1
0
        public static void CastR2(Obj_AI_Base target)
        {
            var r2 = new Spell(SpellSlot.R, 900);

            r2.SetSkillshot(0.25f, 45, 1200, false, SkillshotType.SkillshotCone);
            SmoothMouse.addMouseEvent(target.Position);
            r2.Cast(target);
        }
Example #2
0
 public static void CastFlash(Vector3 pos)
 {
     if (!SummonerDictionary[SummonerSpell.Flash].IsReady())
     {
         return;
     }
     SmoothMouse.addMouseEvent(pos);
     Player.Spellbook.CastSpell(SummonerDictionary[SummonerSpell.Flash], pos);
 }
Example #3
0
        public static void CastIgnite(Obj_AI_Hero target)
        {
            if (!SummonerDictionary[SummonerSpell.Ignite].IsReady())
            {
                return;
            }

            SmoothMouse.addMouseEvent(target.Position);
            Player.Spellbook.CastSpell(SummonerDictionary[SummonerSpell.Ignite], target);
        }
Example #4
0
 private static void Flash()
 {
     if (!S.SummonerDictionary[SpellHandler.SummonerSpell.Flash].IsReady() || !FlashPos.IsValid())
     {
         Queue.Remove("Flash");
         return;
     }
     SmoothMouse.addMouseEvent(FlashPos);
     SpellHandler.CastFlash(FlashPos);
 }
Example #5
0
 private static void Aa()
 {
     if (StateHandler.Target == null || StateHandler.Target.Distance(Player) > Orbwalking.GetRealAutoAttackRange(Player) + 100 || CheckHandler.MidAa)
     {
         Remove("AA");
         return;
     }
     Player.IssueOrder(GameObjectOrder.AttackUnit, StateHandler.Target);
     SmoothMouse.addMouseEvent(Game.CursorPos, true);
 }
Example #6
0
        public static void Jump()
        {
            if (CheckHandler.QCount != 2)
            {
                SpellHandler.CastQ();
                return;
            }

            if (InitJump && SelectedPos != null && !Jumping)
            {
                Jumping = true;
                if (!SpellHandler.Spells[SpellSlot.E].IsReady())
                {
                    SmoothMouse.addMouseEvent(SelectedPos.DirectionPos, true);
                    ObjectManager.Player.IssueOrder(GameObjectOrder.MoveTo, SelectedPos.DirectionPos);
                    Utility.DelayAction.Add(
                        100 + Game.Ping / 2,
                        () => { SmoothMouse.addMouseEvent(SelectedPos.JumpPos, true); ObjectManager.Player.IssueOrder(GameObjectOrder.MoveTo, SelectedPos.JumpPos); });
                    Utility.DelayAction.Add(
                        300 + Game.Ping / 2, () =>
                    {
                        SpellHandler.CastQ();
                        Jumping = false;
                    });
                }
                else
                {
                    SmoothMouse.addMouseEvent(SelectedPos.DirectionPos);
                    ObjectManager.Player.IssueOrder(GameObjectOrder.MoveTo, SelectedPos.DirectionPos);
                    Utility.DelayAction.Add(100 + Game.Ping / 2, () => { SpellHandler.CastE(SelectedPos.JumpPos); });
                    Utility.DelayAction.Add(
                        200 + Game.Ping / 2, () =>
                    {
                        SpellHandler.CastQ();
                        Jumping = false;
                    });
                }

                InitJump = false;
            }

            if (InitJump || Jumping)
            {
                return;
            }

            SelectedPos = null;
            foreach (var jumpPos in AllJumpPos.Where(jumpPos => ObjectManager.Player.Distance(jumpPos.JumpPos) < 80))
            {
                SelectedPos = jumpPos;
                InitJump    = true;
                break;
            }
        }
Example #7
0
        public static void CastE(Vector3 pos)
        {
            if (!Spells[SpellSlot.E].IsReady())
            {
                return;
            }

            SmoothMouse.addMouseEvent(pos);

            Spells[SpellSlot.E].Cast(pos);
        }
Example #8
0
 public static void CastQ(Obj_AI_Base target = null)
 {
     if (!Spells[SpellSlot.Q].IsReady())
     {
         return;
     }
     if (target != null)
     {
         SmoothMouse.addMouseEvent(target.Position);
     }
     Spells[SpellSlot.Q].Cast(target != null ? target.Position : Game.CursorPos, true);
 }
Example #9
0
        private static void Qr()
        {
            if (!S.Spells[SpellSlot.Q].IsReady() || C.RState)
            {
                Queue.Remove("R");
                return;
            }

            if (S.Spells[SpellSlot.R].IsReady())
            {
                S.CastR();
                SmoothMouse.addMouseEvent(Player.Position.Extend(Game.CursorPos, 300), false);
            }
        }
Example #10
0
        public static void AnimCancel(Obj_AI_Base target)
        {
            if (!CheckHandler.CanMove || MenuHandler.Config.Item("flee").GetValue <KeyBind>().Active ||
                MenuHandler.Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.None)
            {
                return;
            }

            var pos2 = Player.Position.Extend(Game.CursorPos, 400);

            if (target.IsValidTarget())
            {
                pos2 = Player.Position.Extend(target.ServerPosition, 540);
                SmoothMouse.addMouseEvent(pos2, true);
            }


            Player.IssueOrder(GameObjectOrder.MoveTo, pos2);
        }
Example #11
0
        private static void Qe()
        {
            if (!CheckHandler.MidAa)
            {
                return;
            }

            if (!S.Spells[SpellSlot.E].IsReady() || !EPos.IsValid())
            {
                Queue.Remove("E");
                return;
            }

            if (S.Spells[SpellSlot.E].IsReady())
            {
                S.CastE(StateHandler.Target.IsValidTarget() ? StateHandler.Target.Position : EPos);
                SmoothMouse.addMouseEvent(StateHandler.Target.IsValidTarget() ? StateHandler.Target.Position : EPos, false);
            }
        }
Example #12
0
        private static void Qw()
        {
            if (!CheckHandler.MidAa)
            {
                return;
            }

            if (!S.Spells[SpellSlot.W].IsReady())
            {
                Queue.Remove("W");
                return;
            }

            if (S.Spells[SpellSlot.W].IsReady())
            {
                S.CastW(StateHandler.Target);
                SmoothMouse.addMouseEvent(Game.CursorPos);
            }
        }
Example #13
0
        private static void Qq()
        {
            if (!CheckHandler.MidAa)
            {
                return;
            }

            if (!S.Spells[SpellSlot.Q].IsReady())
            {
                Queue.Remove("Q");
                return;
            }

            if (S.Spells[SpellSlot.Q].IsReady())
            {
                S.CastQ(StateHandler.Target);
                SmoothMouse.addMouseEvent(Player.Position.Extend(Game.CursorPos, 300));
            }
        }
Example #14
0
        private static void Qr2()
        {
            if (!S.Spells[SpellSlot.R].IsReady() || R2Target == null)
            {
                Queue.Remove("R2");
                return;
            }

            if (!S.Spells[SpellSlot.R].IsReady() || !C.RState || !R2Target.IsValidTarget())
            {
                return;
            }

            var r2 = new Spell(SpellSlot.R, 900);

            r2.SetSkillshot(0.25f, 45, 1200, false, SkillshotType.SkillshotCone);
            r2.Cast(R2Target);

            SmoothMouse.addMouseEvent(R2Target.Position, false);
        }
Example #15
0
        public static void Obj_AI_Hero_OnProcessSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
        {
            var spell = args.SData;

            if (!sender.IsMe)
            {
                return;
            }

            if (spell.Name == "ItemTiamatCleave")
            {
                LastTiamat = Environment.TickCount;
            }

            if (!MidQ && spell.Name.Contains("RivenBasicAttack"))
            {
                LastAa           = Environment.TickCount;
                LastTiamatCancel = Environment.TickCount + (int)ObjectManager.Player.AttackCastDelay;
                LastPassive      = Environment.TickCount;
                if (PassiveStacks >= 1)
                {
                    PassiveStacks = PassiveStacks - 1;
                }

                MidAa   = true;
                CanMove = false;
                CanAa   = false;
                SmoothMouse.addMouseEvent(args.Target.Position, true);
            }

            if (spell.Name.Contains("RivenTriCleave"))
            {
                Queuer.Remove("Q");
                LastQ            = Environment.TickCount;
                LastPassive      = Environment.TickCount;
                LastECancelSpell = Environment.TickCount + 50;
                if (PassiveStacks <= 2)
                {
                    PassiveStacks = PassiveStacks + 1;
                }

                if (QCount <= 1)
                {
                    LastQ2 = Environment.TickCount;
                    QCount = QCount + 1;
                }
                else if (QCount == 2)
                {
                    QCount = 0;
                }

                Utility.DelayAction.Add(350, Orbwalking.ResetAutoAttackTimer);
                Utility.DelayAction.Add(40, () => SH.AnimCancel(StateHandler.Target));

                MidQ           = true;
                CanMove        = false;
                CanQ           = false;
                FullComboState = 0;
                BurstFinished  = true;
            }

            if (spell.Name.Contains("RivenMartyr"))
            {
                Queuer.Remove("W");
                Utility.DelayAction.Add(40, () => SH.AnimCancel(StateHandler.Target));
                LastW            = Environment.TickCount;
                LastPassive      = Environment.TickCount;
                LastECancelSpell = Environment.TickCount + 50;
                LastTiamatCancel = Environment.TickCount + (int)ObjectManager.Player.AttackCastDelay;
                if (LastPassive <= 2)
                {
                    PassiveStacks = PassiveStacks + 1;
                }

                MidW           = true;
                CanW           = false;
                FullComboState = 2;
            }

            if (spell.Name.Contains("RivenFeint"))
            {
                Queuer.Remove("E");
                Queuer.EPos      = new Vector3();
                LastE            = Environment.TickCount;
                PassiveStacks    = Environment.TickCount;
                LastTiamatCancel = Environment.TickCount + 50;
                if (LastPassive <= 2)
                {
                    PassiveStacks = PassiveStacks + 1;
                }

                MidE = true;
                CanE = false;
            }

            if (spell.Name.Contains("RivenFengShuiEngine"))
            {
                RState = true;
                Queuer.Remove("R");
                LastFr           = Environment.TickCount;
                LastPassive      = Environment.TickCount;
                LastECancelSpell = Environment.TickCount + 50;
                if (PassiveStacks <= 2)
                {
                    PassiveStacks = PassiveStacks + 1;
                }

                FullComboState = 1;
            }

            if (spell.Name.Contains("rivenizunablade"))
            {
                RState = false;
                Queuer.Remove("R2");
                Queuer.R2Target = null;
                LastPassive     = Environment.TickCount;
                if (PassiveStacks <= 2)
                {
                    PassiveStacks = PassiveStacks + 1;
                }

                LastR2         = Environment.TickCount;
                CanSr          = false;
                FullComboState = 3;
            }
        }