Esempio n. 1
0
        public void reachWithQ(Obj_AI_Base target)
        {
            if (!Q.IsReady() || player.IsDashing())
            {
                return;
            }

            float trueAARange = player.AttackRange + target.BoundingRadius + 20;
            float trueQRange  = target.BoundingRadius + Q.Range + 30;

            float   dist    = player.Distance(target);
            Vector2 walkPos = new Vector2();

            if (target.IsMoving && target.Path.Count() != 0)
            {
                Vector2 tpos = target.Position.To2D();
                Vector2 path = target.Path[0].To2D() - tpos;
                path.Normalize();
                walkPos = tpos + (path * 100);
            }
            float targ_ms     = (target.IsMoving && player.Distance(walkPos) > dist) ? target.MoveSpeed : 0;
            float msDif       = (player.MoveSpeed - targ_ms) == 0 ? 0.0001f : (player.MoveSpeed - targ_ms);
            float timeToReach = (dist - trueAARange) / msDif;

            if ((dist > trueAARange && dist < trueQRange) || rushDown)
            {
                if (timeToReach > 2.5 || timeToReach < 0.0f || rushDown)
                {
                    Vector2 to = player.Position.To2D().Extend(target.Position.To2D(), 50);
                    // Player.IssueOrder(GameObjectOrder.MoveTo,to.To3D());
                    Q.Cast(target.ServerPosition);
                    Aggresivity.addAgresiveMove(new AgresiveMove(30, 3000));
                }
            }
        }
Esempio n. 2
0
        void AutoUlt()
        {
            return;//FOR NOW UNTIL WE FIX THE CRASH ISSUE.

            var comboR = 2;

            if (comboR > 0 && R.IsReady())
            {
                int enemiesHit   = 0;
                int killableHits = 0;

                foreach (AIHeroClient enemy in EntityManager.Heroes.Enemies)
                {
                    var prediction = R.GetPrediction(enemy);

                    if (prediction != null && prediction.UnitPosition.Distance(ObjectManager.Player.ServerPosition) <= R.Range)
                    {
                        enemiesHit++;
                        if (ObjectManager.Player.GetSpellDamage(enemy, SpellSlot.W) >= enemy.Health)
                        {
                            killableHits++;
                        }
                    }
                }

                if (enemiesHit >= comboR ||
                    (killableHits >= 1 && ObjectManager.Player.Health / ObjectManager.Player.MaxHealth <= 0.1))
                {
                    Aggresivity.addAgresiveMove(new AgresiveMove(105, 4000, true));
                    CastR();
                }
            }
        }
Esempio n. 3
0
        void CastQ(Vector3 Pos, Obj_AI_Base target, bool customPos = false)
        {
            if (!Q.IsReady() || !target.IsValidTarget())
            {
                return;
            }

            var ManaC       = 0;
            var EnMin       = 1;
            var EnemiesList =
                ObjectManager.Get <Obj_AI_Hero>()
                .Where(h => h.IsValid && !h.IsDead && h.Distance(player.Position) <= 900 && h.IsEnemy).ToList();

            if (R.IsReady() && EnemiesList.Count >= EnMin)
            {
                Aggresivity.addAgresiveMove(new AgresiveMove(160, 10000, true));
                R.Cast();
            }
            if (!customPos)
            {
                CastTumble(target);
            }
            else
            {
                CastTumble(Pos, target);
            }
        }
Esempio n. 4
0
        public override void useSpells()
        {
            if (ObjectManager.Player.Spellbook.IsChanneling)
            {
                return;
            }

            var tar = ARAMTargetSelector.getBestTarget(Q.Range);

            if (tar != null)
            {
                useQ(tar);
            }
            tar = ARAMTargetSelector.getBestTarget(W.Range);
            if (tar != null)
            {
                useW(tar);
            }
            tar = ARAMTargetSelector.getBestTarget(E.Range);
            if (tar != null)
            {
                useE(tar);
            }
            var obj = EntityManager.Heroes.Allies.Where(i => !i.IsMe && i.IsValidTarget(R.Range, false) && i.HealthPercent < 35 && i.CountEnemiesInRange(E.Range) > 0).OrderBy(i => i.Health).FirstOrDefault();

            if (R.IsReady())
            {
                if (obj != null)
                {
                    R.Cast(obj);
                    Aggresivity.addAgresiveMove(new AgresiveMove(105, 6000, true));
                }
            }
        }
Esempio n. 5
0
 public void useRSmart(Obj_AI_Base target, bool rrAA = false)
 {
     if (!R.IsReady())
     {
         return;
     }
     if (!ultIsOn() && !E.IsReady() && target.Distance(player.ServerPosition) < (Q.Range + target.BoundingRadius))
     {
         R.Cast();
         Aggresivity.addAgresiveMove(new AgresiveMove(150, 8000));
         if (rrAA)
         {
             player.IssueOrder(GameObjectOrder.MoveTo, target.Position);
             //Utility.DelayAction.Add(50, delegate { DeathWalker.resetAutoAttackTimer(true); } );
         }
     }
     else if (canUseWindSlash() && target is Obj_AI_Hero && (!(E.IsReady() && player.IsDashing()) || player.Distance(target) > 150))
     {
         var targ            = target as Obj_AI_Hero;
         PredictionOutput po = R.GetPrediction(targ, true);
         if (getTrueRDmgOn(targ) > ((targ.Health)) || rushDown)
         {
             if (po.Hitchance > HitChance.Medium && player.Distance(po.UnitPosition) > 30)
             {
                 R.Cast(player.Distance(po.UnitPosition) < 150 ? target.Position : po.UnitPosition);
             }
         }
     }
 }
Esempio n. 6
0
        public void useESmart(Obj_AI_Base target)
        {
            if (!E.IsReady())
            {
                return;
            }

            float trueAARange = player.AttackRange + target.BoundingRadius;
            float trueERange  = target.BoundingRadius + E.Range;



            float dist = player.Distance(target);

            var path = player.GetPath(target.Position);

            if (!target.IsMoving && dist < trueERange)
            {
                player.IssueOrder(GameObjectOrder.MoveTo, target.Position);
                E.Cast(path.Count() > 1 ? path[1] : target.ServerPosition);
                Aggresivity.addAgresiveMove(new AgresiveMove(80, 3000));
            }
            if ((dist > trueAARange && dist < trueERange) || rushDown)
            {
                E.Cast(path.Count() > 1 ? path[1] : target.ServerPosition);
                Aggresivity.addAgresiveMove(new AgresiveMove(80, 3000));
            }
        }
Esempio n. 7
0
        void AutoUlt()
        {
            var comboR = 2;

            if (comboR > 0 && R.IsReady())
            {
                int enemiesHit   = 0;
                int killableHits = 0;

                foreach (Obj_AI_Hero enemy in ObjectManager.Get <Obj_AI_Hero>().Where(he => he.IsEnemy && he.IsValidTarget(R.Range)))
                {
                    var prediction = Prediction.GetPrediction(enemy, R.Delay);

                    if (prediction != null && prediction.UnitPosition.Distance(ObjectManager.Player.ServerPosition) <= R.Range)
                    {
                        enemiesHit++;

                        if (ObjectManager.Player.GetSpellDamage(enemy, SpellSlot.W) >= enemy.Health)
                        {
                            killableHits++;
                        }
                    }
                }

                if (enemiesHit >= comboR ||
                    (killableHits >= 1 && ObjectManager.Player.Health / ObjectManager.Player.MaxHealth <= 0.1))
                {
                    Aggresivity.addAgresiveMove(new AgresiveMove(105, 4000, true));
                    CastR();
                }
            }
        }
Esempio n. 8
0
 private void beforeAttack(DeathWalker.BeforeAttackEventArgs args)
 {
     if (args.Unit.IsMe && args.Target is Obj_AI_Hero && Q.IsReady())
     {
         Q.Cast();
         Aggresivity.addAgresiveMove(new AgresiveMove(105, 3500, true));
     }
 }
Esempio n. 9
0
 public override void useW(Obj_AI_Base target)
 {
     if (W.IsReady())
     {
         W.Cast();
         Aggresivity.addAgresiveMove(new AgresiveMove(50, 2500, true));
     }
 }
Esempio n. 10
0
 private void DeathWalkerOnAfterAttack(AttackableUnit unit, AttackableUnit target)
 {
     if (target is Obj_AI_Hero)
     {
         Q.Cast(target.Position);
         Aggresivity.addAgresiveMove(new AgresiveMove(30, 3000));
     }
 }
Esempio n. 11
0
 public override void useQ(Obj_AI_Base target)
 {
     if (Q.IsReady() && !GarenE)
     {
         Q.Cast();
         Aggresivity.addAgresiveMove(new AgresiveMove(100, 2500, true));
     }
 }
Esempio n. 12
0
 private void DeathWalkerOnAfterAttack(AttackableUnit target, EventArgs args)
 {
     if (target is AIHeroClient)
     {
         Q.Cast(target.Position);
         Aggresivity.addAgresiveMove(new AgresiveMove(30, 3000));
     }
 }
Esempio n. 13
0
 private void beforeAttack(AttackableUnit target, Orbwalker.PreAttackArgs args)
 {
     if (target.IsMe && args.Target is AIHeroClient && Q.IsReady())
     {
         Q.Cast();
         Aggresivity.addAgresiveMove(new AgresiveMove(105, 3500, true));
     }
 }
Esempio n. 14
0
 public override void useR(Obj_AI_Base target)
 {
     if (R.CanCast(target) && !Q.IsKillable(target))
     {
         R.CastOnUnit(target);
         Aggresivity.addAgresiveMove(new AgresiveMove(100, 8000));
     }
 }
Esempio n. 15
0
 public override void useQ(Obj_AI_Base target)
 {
     if (!Q.IsReady() || target == null)
     {
         return;
     }
     Q.Cast(target);
     Aggresivity.addAgresiveMove(new AgresiveMove(50, 1200, true));
 }
Esempio n. 16
0
 public override void useQ(Obj_AI_Base target)
 {
     if (Q.IsReady() && !GarenE)
     {
         Q.Cast();
         Aggresivity.addAgresiveMove(new AgresiveMove(100, 2500, true));
         Core.DelayAction(() => Player.IssueOrder(GameObjectOrder.AttackUnit, target), 100);
     }
 }
Esempio n. 17
0
 public override void useW(Obj_AI_Base target)
 {
     if (!W.IsReady())
     {
         return;
     }
     W.Cast();
     Aggresivity.addAgresiveMove(new AgresiveMove(20, 2000));
 }
Esempio n. 18
0
 public override void useQ(Obj_AI_Base target)
 {
     if (!Q.IsReady())
     {
         return;
     }
     Q.Cast();
     Aggresivity.addAgresiveMove(new AgresiveMove(90));
 }
Esempio n. 19
0
 public override void useE(Obj_AI_Base target)
 {
     if (!E.IsReady() || target == null)
     {
         return;
     }
     E.Cast();
     Aggresivity.addAgresiveMove(new AgresiveMove(100, 1000));
 }
Esempio n. 20
0
 public override void useE(Obj_AI_Base target)
 {
     if (!E.IsReady() || target == null || player.HasBuff("KennenLightningRush"))
     {
         return;
     }
     E.Cast();
     Aggresivity.addAgresiveMove(new AgresiveMove(60, 3500, true));
 }
Esempio n. 21
0
 public override void useE(Obj_AI_Base target)
 {
     if (!E.IsReady() || target == null || GarenE)
     {
         return;
     }
     E.Cast();
     Aggresivity.addAgresiveMove(new AgresiveMove(150, 3000, true));
 }
Esempio n. 22
0
 private void AfterAttack(AttackableUnit unit, AttackableUnit target)
 {
     if (unit.IsMe && target is AIHeroClient && Q.IsReady() && !GarenE)
     {
         Q.Cast();
         Aggresivity.addAgresiveMove(new AgresiveMove(1000, 2500, true));
         EloBuddy.Player.IssueOrder(GameObjectOrder.AutoAttack, target);
     }
 }
Esempio n. 23
0
 public override void useW(Obj_AI_Base target)
 {
     if (!W.IsReady() || target == null)
     {
         return;
     }
     W.Cast();
     Aggresivity.addAgresiveMove(new AgresiveMove(160, 800, true));
 }
Esempio n. 24
0
        private void OnPlayAnimation(GameObject sender, GameObjectPlayAnimationEventArgs args)
        {
            if (sender.IsMe && args.Animation != "Run")
            {
                if (args.Animation.Contains("pell"))
                {
                    Core.DelayAction(() =>
                    {
                        cancelAnim(args.Animation.Contains("Spell1"));
                    }, Game.Ping);
                }

                var targ = (Obj_AI_Base)Orbwalker.GetTarget();
                if (targ != null && targ is Obj_AI_Base)
                {
                    if (args.Animation == "Spell3" && R.IsReady())
                    {
                        UseRSmart(targ);
                        Core.DelayAction(() =>
                        {
                            UseRSmart(targ);
                        }, 10);
                    }

                    if (sender.IsMe && args.Animation == "Spell3" &&
                        Q.IsReady())
                    {
                        Console.WriteLine("force W");
                        Core.DelayAction(() =>
                        {
                            useWSmart(targ);
                        }, 30);
                        //Q.Cast(targ.Position);
                        //forceQ = true;
                        //timer = new System.Threading.Timer(obj => { Player.IssueOrder(GameObjectOrder.MoveTo, difPos()); }, null, (long)100, System.Threading.Timeout.Infinite);
                    }

                    if (sender.IsMe && args.Animation == "Spell2" &&
                        Q.IsReady())
                    {
                        Core.DelayAction(() =>
                        {
                            Q.Cast(targ.Position);
                        }, 30);
                        Aggresivity.addAgresiveMove(new AgresiveMove(30, 3000));
                        //Console.WriteLine("force q");

                        // Riven.forceQ = true;
                        // Riven.timer = new System.Threading.Timer(obj => { Riven.Player.IssueOrder(GameObjectOrder.MoveTo, Riven.difPos()); }, null, (long)100, System.Threading.Timeout.Infinite);
                    }


                    // useHydra(Obj_AI_Base target)
                }
            }
        }
Esempio n. 25
0
 public override void useQ(Obj_AI_Base target)
 {
     if (!Q.IsReady())
     {
         return;
     }
     Q.Cast();
     Aggresivity.addAgresiveMove(new AgresiveMove(90));
     Player.IssueOrder(GameObjectOrder.AttackUnit, target);
 }
Esempio n. 26
0
 public override void useQ(Obj_AI_Base target)
 {
     if (!Q.IsReady() || target == null)
     {
         return;
     }
     if (Q.Cast(target) == Spell.CastStates.SuccessfullyCasted && target.InAutoAttackRange())
     {
         Aggresivity.addAgresiveMove(new AgresiveMove(50, 1000, true));
     }
 }
Esempio n. 27
0
 public override void useR(Obj_AI_Base target)
 {
     if (!R.IsReady() || target == null)
     {
         return;
     }
     if (R.Cast())
     {
         Aggresivity.addAgresiveMove(new AgresiveMove(565, 6000, true));
     }
 }
Esempio n. 28
0
 public override void useQ(Obj_AI_Base target)
 {
     if (!Q.IsReady() || target == null)
     {
         return;
     }
     if (Q.Cast(target) && player.IsInAutoAttackRange(target))
     {
         Aggresivity.addAgresiveMove(new AgresiveMove(50, 1000, true));
     }
 }
Esempio n. 29
0
 public override void useR(Obj_AI_Base target)
 {
     if (!R.IsReady() || target == null)
     {
         return;
     }
     if ((safeGap(target) && player.Mana > 100) || GetComboDamage(target) * 0.8f > target.Health)
     {
         R.Cast(target);
         Aggresivity.addAgresiveMove(new AgresiveMove(50, 2500, true));
     }
 }
Esempio n. 30
0
 public override void useR(Obj_AI_Base target)
 {
     if (!E.IsReady() || target == null)
     {
         return;
     }
     if (player.CountEnemiesInRange(500) >= 2)
     {
         R.Cast(target.Position);
         Aggresivity.addAgresiveMove(new AgresiveMove(1200, 8000));
     }
 }