示例#1
0
 private static void Game_OnGameUpdate(EventArgs args)
 {
     ComboModeSwitch();
     //if (Helper.CanShield())
     //Chat.Print(Helper.CanShield().ToString());
     //Chat.Print(Helper.BonusMana.ToString());
     //Chat.Print(Helper.Qstack().ToString());
     //Chat.Print(Player.ManaPercent.ToString());
     if (_orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.None && AutoTear && Player.ManaPercent >= AutoTearM &&
         Player.CountEnemiesInRange(1500) == 0)
     {
         if (ItemData.Tear_of_the_Goddess.GetItem().IsOwned() || ItemData.Archangels_Staff.GetItem().IsOwned() ||
             ItemData.Manamune.GetItem().IsOwned())
         {
             if (_q.IsReady())
             {
                 _q.Cast(Player.Position);
             }
         }
     }
     if (_orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo)
     {
         var target = _orbwalker.GetTarget();
         if ((_w.IsReady() || (Player.Mana >= _q.ManaCost + _e.ManaCost)) && BlockAA &&
             target.IsValidTarget() && (!target.IsValidTarget(350) || Player.CountEnemiesInRange(800) >= 2) ||
             !target.IsValidTarget())
         {
             _orbwalker.SetAttack(false);
         }
         else
         {
             _orbwalker.SetAttack(true);
         }
     }
     else
     {
         _orbwalker.SetAttack(true);
     }
     foreach (var hero in HeroManager.Enemies.Where(x => x.IsValidTarget(_q.Range) && !x.IsZombie))
     {
         if (_q.IsReady() && Helper.Qdamage(hero) >= hero.Health)
         {
             Helper.CastQTarget(hero);
         }
         if (_w.IsReady() && Helper.Wdamge(hero) >= hero.Health)
         {
             _w.Cast(hero);
         }
         if (_e.IsReady() && Helper.Edamge(hero) >= hero.Health)
         {
             _e.Cast(hero);
         }
     }
 }
示例#2
0
文件: Lane.cs 项目: volder1/PortAIO
        private static void Game_OnUpdate(EventArgs args)
        {
            if (!(Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LaneClear) || Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.JungleClear)))
            {
                return;
            }

            if (Player.Mana * 100 / Player.MaxMana > Program.ManaLaneClear)
            {
                var tarqs = ObjectManager.Get <Obj_AI_Minion>().Where(x => x.IsEnemy && x.IsValidTarget() && x.IsMinion && x.Distance(Player.Position) <= Program._q.Range);
                var tars  = tarqs.Where(x => x.Distance(Player.Position) <= Program._e.Range);
                if (tarqs.Count() <= 2 || Player.Mana <= Program._e.ManaCost * 2 + Program._q.ManaCost)
                {
                    //Game.PrintChat("case 1");
                    var targetq = MinionManager.GetMinions(Player.Position, Program._q.Range, MinionTypes.All, MinionTeam.Enemy, MinionOrderTypes.Health).FirstOrDefault();
                    var target  = MinionManager.GetMinions(Player.Position, 600, MinionTypes.All, MinionTeam.Enemy, MinionOrderTypes.Health).FirstOrDefault();
                    if (Program._q2.IsReady() && Program.QlaneClear)
                    {
                        if (targetq != null)
                        {
                            Program._q2.Cast(targetq);
                        }
                    }
                    else if (Program._e.IsReady() && Program.ElaneClear)
                    {
                        if (target != null)
                        {
                            Program._e.Cast(target);
                        }
                    }
                    else if (Program._w.IsReady() && Program.WlaneClear)
                    {
                        if (target != null)
                        {
                            Program._w.Cast(targetq);
                        }
                    }
                }
                else
                {
                    //Game.PrintChat("case 2");
                    Obj_AI_Minion MainTarget = null;
                    int           AoEcount   = 0;

                    // in investigation
                    var tarqss  = tarqs;
                    var tarqsss = tarqs;
                    MainTarget = tarqss.FirstOrDefault(x => Helper.HasEBuff(x) && Program._q.GetPrediction(x).HitChance >= EloBuddy.SDK.Enumerations.HitChance.Low && Program._q.IsReady() &&
                                                       Program.QlaneClear &&
                                                       tarqs.Count(y => Helper.HasEBuff(y) && y.Distance(x.Position) <= 300) >= 2 &&
                                                       tarqs.Where(y => Helper.HasEBuff(y) && tarqsss.Count(z => Helper.HasEBuff(z) && z.Distance(y.Position) <= 300) >= 2).Count() >= 3);
                    if (MainTarget != null)
                    {
                        Program._q.Cast(Program._q.GetPrediction(MainTarget).UnitPosition);
                    }

                    MainTarget = tars.FirstOrDefault(x => Helper.HasEBuff(x) && Program._e.IsReady() && Program.ElaneClear &&
                                                     tarqs.Where(y => y.Distance(x.Position) <= 300).Count() >= 3);
                    if (MainTarget != null)
                    {
                        Program._e.Cast(MainTarget);
                    }

                    MainTarget = tars.FirstOrDefault(x => x.Health <= Helper.Edamge(x) && Program._e.IsReady() && Program.ElaneClear &&
                                                     tarqs.Where(y => y.Distance(x.Position) <= 300).Count() >= 3);
                    if (MainTarget != null)
                    {
                        if (Program._e.IsReady() && Program.ElaneClear)
                        {
                            Program._e.Cast(MainTarget);
                        }
                        if (Program._w.IsReady() && Program.WlaneClear && Helper.HasEBuff(MainTarget) && MainTarget.Health <= Helper.Wdamge(MainTarget))
                        {
                            Program._w.Cast(MainTarget);
                        }
                    }

                    MainTarget = tars.FirstOrDefault(x => x.Health <= Helper.Wdamge(x) && Program._w.IsReady() && Program.WlaneClear &&
                                                     Helper.HasEBuff(x) && tarqs.Where(y => y.Distance(x.Position) <= 300).Count() >= 3);
                    if (MainTarget != null)
                    {
                        //Game.PrintChat("2");
                        if (Program._w.IsReady() && Program.WlaneClear)
                        {
                            Program._w.Cast(MainTarget);
                        }
                    }

                    MainTarget = tars.FirstOrDefault(x => x.Health <= Helper.Qdamage(x) && Program._q.IsReady() && Program.QlaneClear &&
                                                     Helper.HasEBuff(x) && Program._q.GetPrediction(x).HitChance >= EloBuddy.SDK.Enumerations.HitChance.Low &&
                                                     tarqs.Where(y => y.Distance(x.Position) <= 300).Count() >= 3);
                    if (MainTarget != null)
                    {
                        if (Program._q.IsReady() && Program.QlaneClear)
                        {
                            Program._q.Cast(Program._q.GetPrediction(MainTarget).UnitPosition);
                        }
                    }

                    MainTarget = tars.FirstOrDefault(x => x.Health <= Helper.Edamge(x) + Helper.Wdamge(x) && Program._e.IsReady() && Program.ElaneClear && Program._w.IsReady() && Program.WlaneClear &&
                                                     tarqs.Where(y => y.Distance(x.Position) <= 300).Count() >= 3);
                    if (MainTarget != null)
                    {
                        if (Program._e.IsReady() && Program.ElaneClear && Program._w.IsReady() && Program.WlaneClear)
                        {
                            Program._e.Cast(MainTarget);
                        }
                    }

                    MainTarget = tars.FirstOrDefault(x => x.Health <= Helper.Edamge(x) + Helper.Qdamage(x, true) && Program._e.IsReady() && Program.ElaneClear && Program._q.IsReady() && Program.QlaneClear &&
                                                     Program._q.GetPrediction(x).HitChance >= EloBuddy.SDK.Enumerations.HitChance.Low &&
                                                     tarqs.Where(y => y.Distance(x.Position) <= 300).Count() >= 3);
                    if (MainTarget != null)
                    {
                        if (Program._e.IsReady() && Program.ElaneClear && Program._q.IsReady() && Program.QlaneClear)
                        {
                            Program._e.Cast(MainTarget);
                            Program._q.Cast(Program._q.GetPrediction(MainTarget).UnitPosition);
                        }
                    }

                    foreach (var tar in tars)
                    {
                        int count = tarqs.Where(x => x.Distance(tar.Position) <= 300).Count();
                        if (count > AoEcount)
                        {
                            AoEcount   = count;
                            MainTarget = tar;
                        }
                    }
                    if (AoEcount < 3)
                    {
                        //Game.PrintChat("case 3");
                        var targetq = MinionManager.GetMinions(Player.Position, Program._q.Range, MinionTypes.All, MinionTeam.Enemy, MinionOrderTypes.Health).FirstOrDefault();
                        var target  = MinionManager.GetMinions(Player.Position, 600, MinionTypes.All, MinionTeam.Enemy, MinionOrderTypes.Health).FirstOrDefault();
                        if (Program._q2.IsReady() && Program.QlaneClear)
                        {
                            if (targetq != null)
                            {
                                Program._q2.Cast(targetq);
                            }
                        }
                        else if (Program._e.IsReady() && Program.ElaneClear)
                        {
                            if (target != null)
                            {
                                Program._e.Cast(target);
                            }
                        }
                        else if (Program._w.IsReady() && Program.WlaneClear)
                        {
                            if (target != null)
                            {
                                Program._w.Cast(targetq);
                            }
                        }
                    }
                    if (MainTarget != null)
                    {
                        Program._e.Cast(MainTarget);
                    }
                }
            }
        }
示例#3
0
 private static void Game_OnUpdate(EventArgs args)
 {
     if (Program._orbwalker.ActiveMode != Orbwalking.OrbwalkingMode.LastHit)
     {
         return;
     }
     if (Player.Mana * 100 / Player.MaxMana > Program.ManaLastHit)
     {
         var targetq = MinionManager.GetMinions(Player.Position, Program._q.Range, MinionTypes.All, MinionTeam.Enemy, MinionOrderTypes.Health).FirstOrDefault();
         if (Program._q.IsReady() && Program.QlastHit && targetq != null && Orbwalking.CanMove(100) && targetq.Health < Helper.Qdamage(targetq))
         {
             Program._q.Cast(targetq);
         }
     }
 }