Beispiel #1
0
        private Vector3 GetGrabableObjectPos(bool onlyOrbs)
        {
            if (!onlyOrbs)
            {
                foreach (var minion in ObjectManager.Get <Obj_AI_Minion>().Where(minion => minion.IsValidTarget(W.Range))
                         )
                {
                    return(minion.ServerPosition);
                }
            }

            return(OrbManager.GetOrbToGrab((int)W.Range));
        }
Beispiel #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.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;
             }
         }
     }
 }
Beispiel #3
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;
             }
         }
     }
 }
Beispiel #4
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, false, true);
            }

            //E
            if (DeathWalker.now - W.LastCastAttemptT > Game.Ping + 150 && E.IsReady() && useE)
            {
                foreach (var enemy in ObjectManager.Get <Obj_AI_Hero>())
                {
                    if (enemy.IsValidTarget(EQ.Range))
                    {
                        UseE(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() && Utils.TickCount - W.LastCastAttemptT > Game.Ping + 300 &&
                        Utils.TickCount - E.LastCastAttemptT > Game.Ping + 600)
                    {
                        W.Cast(gObjectPos);
                        W.LastCastAttemptT = Utils.TickCount;
                    }
                }
                else if (wTarget != null && player.Spellbook.GetSpell(SpellSlot.W).ToggleState != 1 && W.IsReady() &&
                         Utils.TickCount - W.LastCastAttemptT > Game.Ping + 100)
                {
                    if (OrbManager.WObject(false) != null)
                    {
                        W.From = OrbManager.WObject(false).ServerPosition;
                        W.Cast(wTarget, false, true);
                    }
                }
            }

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

            //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 && OrbManager.WObject(true) != null)
            {
                EQ.Delay = 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(player.ServerPosition.To2D().Extend(prediction.CastPosition.To2D(), Q.Range - 100));
                    WEComboT = DeathWalker.now;
                }
            }
        }