Exemplo n.º 1
0
        private static void WardJump(AIHeroClient target)
        {
            var pred = SpellManager.W1.GetPrediction(target);

            if (WardManager.CanWardJump && pred.HitChancePercent >= 30f)
            {
                var gapclosepos = pred.CastPosition + (pred.CastPosition - ExpectedEndPosition).Normalized() * DistanceBetween;
                if (Extensions.Distance(gapclosepos, Util.myHero, true) <= Math.Pow(WardManager.WardRange, 2) && Extensions.Distance(gapclosepos, target, true) <= Math.Pow(SpellManager.R.Range, 2) && Extensions.Distance(gapclosepos, target, true) < Extensions.Distance(gapclosepos, ExpectedEndPosition, true))
                {
                    if (Orbwalker.CanMove)
                    {
                        LastGapcloseAttempt = Game.Time;
                        Orbwalker.MoveTo(gapclosepos + (gapclosepos - ExpectedEndPosition).Normalized() * (DistanceBetween + Util.myHero.BoundingRadius / 2));
                    }
                    AllySelected                = null;
                    PositionSelected            = EndPosition;
                    LastSetPositionTime         = Game.Time;
                    TargetSelector.ForcedTarget = target;
                    var obj = Champion.GetBestObjectNearTo(gapclosepos);
                    if (obj != null && Extensions.Distance(obj, target, true) < Extensions.Distance(obj, ExpectedEndPosition, true))
                    {
                        SpellManager.CastW1(obj);
                    }
                    else
                    {
                        WardManager.CastWardTo(gapclosepos);
                    }
                }
            }
        }
Exemplo n.º 2
0
 public static void Execute()
 {
     if (SpellManager.CanCastW1)
     {
         var obj = Champion.GetBestObjectNearTo(Util.MousePos);
         if (obj != null && Menu.GetCheckBoxValue("W"))
         {
             SpellManager.CastW1(obj);
         }
         else if (Menu.GetCheckBoxValue("WardJump"))
         {
             if (WardManager.CanCastWard)
             {
                 WardManager.CastWardTo(Util.MousePos);
             }
         }
     }
 }
Exemplo n.º 3
0
 public static void GapCloseWithWard(Obj_AI_Base target)
 {
     if (SpellManager.CanCastW1)
     {
         var obj = GetBestObjectNearTo(target.Position);
         if (obj != null && Extensions.Distance(Util.myHero, target, true) > Extensions.Distance(obj, target, true))
         {
             SpellManager.CastW1(obj);
         }
         else if (WardManager.CanCastWard)
         {
             var pred = SpellManager.W1.GetPrediction(target);
             if (pred.HitChancePercent >= 50f)
             {
                 WardManager.CastWardTo(pred.CastPosition);
             }
         }
     }
 }
Exemplo n.º 4
0
 public static void GapCloseWithWard(Obj_AI_Base target)
 {
     if (SpellManager.CanCastW1)
     {
         var obj = GetBestObjectNearTo(target.Position);
         if (obj != null && Util.MyHero.Distance(target, true) > obj.Distance(target, true))
         {
             SpellManager.CastW1(obj);
         }
         else if (WardManager.CanCastWard)
         {
             var pred = SpellManager.W1.GetPrediction(target);
             if (pred.HitChance >= HitChance.AveragePoint)
             {
                 WardManager.CastWardTo(pred.CastPosition);
             }
         }
     }
 }