Пример #1
0
 private void UseE(Obj_AI_Base enemy)
 {
     foreach (var orb in OrbManager.GetOrbs(true))
     {
         if (player.Distance(orb) < E.Range + 100)
         {
             var startPoint = orb.To2D().Extend(player.ServerPosition.To2D(), 100);
             var endPoint   = player.ServerPosition.To2D()
                              .Extend(orb.To2D(), player.Distance(orb) > 200 ? 1300 : 1000);
             EQ.Delay = E.Delay + player.Distance(orb) / E.Speed;
             EQ.From  = orb;
             var enemyPred = EQ.GetPrediction(enemy);
             if (enemyPred.Hitchance >= HitChance.High &&
                 enemyPred.UnitPosition.To2D().Distance(startPoint, endPoint, false) <
                 EQ.Width + enemy.BoundingRadius)
             {
                 E.Cast(orb, true);
                 W.LastCastAttemptT = DeathWalker.now;
                 return;
             }
         }
     }
 }
Пример #2
0
 private void UseE(Obj_AI_Base enemy)
 {
     foreach (var orb in OrbManager.GetOrbs(true))
     {
         if (player.Distance(orb) < E.Range + 100)
         {
             var startPoint = orb.To2D().Extend(player.ServerPosition.To2D(), 100);
             var endPoint   = player.ServerPosition.To2D()
                              .Extend(orb.To2D(), player.Distance(orb) > 200 ? 1300 : 1000);
             //EQ.CastDelay = 670 + Player.Instance.Distance(orb) / E.Speed;
             //EQ.From = orb;
             var enemyPred = EQ.GetPrediction(enemy);
             if (enemyPred.HitChance >= HitChance.High &&
                 enemyPred.UnitPosition.To2D().Distance(startPoint, endPoint, false) <
                 EQ.Width + enemy.BoundingRadius)
             {
                 E.Cast(orb);
                 //W.LastCastFailure = ;
                 return;
             }
         }
     }
 }
Пример #3
0
        private void useSyndraSpells(bool useQ, bool useW, bool useE, bool useR, bool useQE, bool useIgnite, bool isHarass)
        {
            var qTarget     = ARAMTargetSelector.getBestTarget(Q.Range + (isHarass ? Q.Width / 3 : Q.Width));
            var wTarget     = ARAMTargetSelector.getBestTarget(W.Range + W.Width);
            var rTarget     = ARAMTargetSelector.getBestTarget(R.Range);
            var qeTarget    = ARAMTargetSelector.getBestTarget(EQ.Range);
            var comboDamage = rTarget != null?GetComboDamage(rTarget) : 0;

            //Q
            if (qTarget != null && useQ)
            {
                Q.Cast(qTarget);
            }

            //E
            if (E.IsReady() && useE)
            {
                foreach (var enemy in ObjectManager.Get <AIHeroClient>())
                {
                    if (enemy.IsValidTarget(EQ.Range))
                    {
                        E.Cast(enemy);
                    }
                }
            }

            //W
            if (useW)
            {
                if (player.Spellbook.GetSpell(SpellSlot.W).ToggleState == 1 && W.IsReady() && qeTarget != null)
                {
                    var gObjectPos = GetGrabableObjectPos(wTarget == null);

                    if (gObjectPos.To2D().IsValid())
                    {
                        W.Cast(wTarget);
                        //W.LastCastFailure = Utils.TickCount;
                    }
                }
                else if (wTarget != null && player.Spellbook.GetSpell(SpellSlot.W).ToggleState != 1 && W.IsReady())
                {
                    if (OrbManager.GetOrbs(false) != null)
                    {
                        //W.From = OrbManager.WObject(false).ServerPosition;
                        W.Cast(wTarget);
                    }
                }
            }

            if (rTarget != null)
            {
                useR = true;//Config.Item("DontUlt" + rTarget.BaseSkinName) != null &&
            }
            //R
            if (rTarget != null && useR && R.IsReady() && !Q.IsReady())
            {
                if (comboDamage > rTarget.Health)
                {
                    R.Cast(rTarget);
                }
            }


            //QE
            if (qeTarget != null && Q.IsReady() && E.IsReady() && useQE && player.Mana > 150)
            {
                UseQE(qeTarget);
            }

            //WE
            if (qeTarget != null && E.IsReady() && useE)
            {
                EQ.CastDelay = 250 + 820 / W.Speed;
                //EQ.CastDelay = E.Delay + Q.Range / W.Speed;
                //EQ.From = player.ServerPosition.To2D().Extend(qeTarget.ServerPosition.To2D(), Q.Range).To3D();
                var prediction = EQ.GetPrediction(qeTarget);
                if (prediction.HitChance >= HitChance.High)
                {
                    W.Cast(qeTarget.Position);
                    //WEComboT = DeathWalker.now;
                }
            }
        }