Пример #1
0
 private void Gapcloser_OnGapCloser(ActiveGapcloser gapcloser)
 {
     if (!Enable)
     {
         return;
     }
     if (gapcloser.Sender.IsEnemy && Orbwalking.InAutoAttackRange(gapcloser.Sender))
     {
         if (HasGold)
         {
             Player.IssueOrder(GameObjectOrder.AttackUnit, gapcloser.Sender);
         }
     }
 }
Пример #2
0
 private void InterruptableSpell_OnInterruptableTarget(Obj_AI_Hero sender, Interrupter2.InterruptableTargetEventArgs args)
 {
     if (!Enable)
     {
         return;
     }
     if (sender.IsEnemy && Orbwalking.InAutoAttackRange(sender))
     {
         if (HasGold)
         {
             Player.IssueOrder(GameObjectOrder.AttackUnit, sender);
         }
     }
 }
Пример #3
0
 private void Game_OnUpdate(EventArgs args)
 {
     if (!Enable)
     {
         Utility.HpBarDamageIndicator.Enabled = false;
         CustomDamageIndicator.Enabled        = false;
         return;
     }
     if ((IsCombo || IsHarass) && Orbwalking.CanMove(Orbwalking.Orbwalker._config.Item("ExtraWindup").GetValue <Slider>().Value) &&
         (Q.IsReady() || E.IsReady()))
     {
         Orbwalker.SetAttack(false);
     }
     else
     {
         Orbwalker.SetAttack(true);
     }
     if (autokillsteal && !activeAssasin)
     {
         killstealUpdate();
     }
     if (IsCombo)
     {
         comboupdate();
     }
     if (IsHarass && Player.ManaPercent >= manaharass)
     {
         harassupdate();
     }
     if (IsClear && Player.ManaPercent >= manaclear)
     {
         ClearOnUpdate();
     }
     if (activeAssasin)
     {
         AssasinMode();
     }
 }
Пример #4
0
        private void Orbwalking_BeforeAttack(Orbwalking.BeforeAttackEventArgs args)
        {
            if (!Enable)
            {
                return;
            }
            var mode = new Orbwalking.OrbwalkingMode[] { Orbwalking.OrbwalkingMode.Mixed, Orbwalking.OrbwalkingMode.Combo };

            if (IsPickingCard && mode.Contains(Orbwalker.ActiveMode))
            {
                args.Process = false;
            }
            else if (HasACard != "none" && !HeroManager.Enemies.Contains(args.Target) && Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Mixed)
            {
                args.Process = false;
                var target = TargetSelector.GetTarget(Orbwalking.GetRealAutoAttackRange(Player), TargetSelector.DamageType.Magical);
                if (target.IsValidTarget() && !target.IsZombie)
                {
                    Player.IssueOrder(GameObjectOrder.AttackUnit, target);
                }
            }
            else if (HasACard != "none" && HasRed && Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LaneClear)
            {
                args.Process = false;
                IDictionary <Obj_AI_Minion, int> creeps = new Dictionary <Obj_AI_Minion, int>();
                foreach (var x in ObjectManager.Get <Obj_AI_Minion>().Where(x => x.Team != Player.Team && x.Team != GameObjectTeam.Neutral && Orbwalking.InAutoAttackRange(x)))
                {
                    creeps.Add(x, ObjectManager.Get <Obj_AI_Minion>().Count(y => y.Team != Player.Team && y.Team != GameObjectTeam.Neutral && y.IsValidTarget() && y.Distance(x.Position) <= 300));
                }
                foreach (var x in ObjectManager.Get <Obj_AI_Minion>().Where(x => x.Team == GameObjectTeam.Neutral && Orbwalking.InAutoAttackRange(x)))
                {
                    creeps.Add(x, ObjectManager.Get <Obj_AI_Minion>().Count(y => y.Team == GameObjectTeam.Neutral && y.IsValidTarget() && y.Distance(x.Position) <= 300));
                }
                var minion = creeps.OrderByDescending(x => x.Value).FirstOrDefault();
                Player.IssueOrder(GameObjectOrder.AttackUnit, minion.Key);
            }
        }
Пример #5
0
        private static void AssasinMode()
        {
            var target = TargetSelector.GetSelectedTarget();

            if (Orbwalking.CanMove(Orbwalking.Orbwalker._config.Item("ExtraWindup").GetValue <Slider>().Value))
            {
                Player.IssueOrder(GameObjectOrder.MoveTo, Game.CursorPos);
            }
            if (target.IsValidTarget() && !target.IsZombie)
            {
                var targetpos = Prediction.GetPrediction(target, 0.25f).UnitPosition.To2D();
                var distance  = targetpos.Distance(Player.Position.To2D());
                if (Ignite.IsReady() && target.IsValidTarget(450))
                {
                    Player.Spellbook.CastSpell(Ignite, target);
                }
                if (!R.IsReady(3000) || Player.IsDashing())
                {
                    if (W.IsReady() && Player.Distance(target.Position) <= W.Range)
                    {
                        W.Cast();
                    }
                }
                if (R.IsReady() && AhriOrbReturn == null && AhriOrb == null && Utils.GameTimeTickCount - Rcount >= 500)
                {
                    Vector2 intersec = new Vector2();
                    for (int i = 450; i >= 0; i = i - 50)
                    {
                        for (int j = 50; j <= 600; j = j + 50)
                        {
                            var vectors = Geometry.CircleCircleIntersection(Player.Position.To2D(), targetpos, i, j);
                            foreach (var x in vectors)
                            {
                                if (!Collide(x, target) && !x.IsWall())
                                {
                                    intersec = x;
                                    goto ABC;
                                }
                            }
                        }
                    }
ABC:
                    if (intersec.IsValid())
                    {
                        R.Cast(intersec.To3D());
                    }
                }
                else if (R.IsReady() && AhriOrbReturn != null &&
                         Player.Distance(targetpos) < Player.Distance(AhriOrbReturn.Position.To2D()) &&
                         Utils.GameTimeTickCount - Rcount >= 0)
                {
                    var     Orb     = AhriOrbReturn.Position.To2D();
                    var     dis     = Orb.Distance(targetpos);
                    Vector2 castpos = new Vector2();
                    for (int i = 450; i >= 200; i = i - 50)
                    {
                        if (Orb.Extend(targetpos, dis + i).Distance(Player.Position.To2D()) <= R.Range &&
                            !Orb.Extend(targetpos, dis + i).IsWall())
                        {
                            castpos = Orb.Extend(targetpos, dis + i);
                            break;
                        }
                    }
                    if (castpos.IsValid())
                    {
                        R.Cast(castpos.To3D());
                    }
                }
                if (Orbwalking.CanAttack() && Orbwalking.InAutoAttackRange(target))
                {
                    Player.IssueOrder(GameObjectOrder.AttackUnit, target);
                    Orbwalking.LastAACommandTick = Utils.GameTimeTickCount - 4;
                }
            }
        }
Пример #6
0
 private void Orbwalking_BeforeAttack(Orbwalking.BeforeAttackEventArgs args)
 {
     if (!Enable)
         return;
     var mode = new Orbwalking.OrbwalkingMode[] { Orbwalking.OrbwalkingMode.Mixed, Orbwalking.OrbwalkingMode.Combo };
     if (IsPickingCard && mode.Contains(Orbwalker.ActiveMode)) args.Process = false;
     else if (HasACard != "none" && !HeroManager.Enemies.Contains(args.Target) && Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Mixed)
     {
         args.Process = false;
         var target = TargetSelector.GetTarget(Orbwalking.GetRealAutoAttackRange(Player), TargetSelector.DamageType.Magical);
         if (target.IsValidTarget() && !target.IsZombie)
             Player.IssueOrder(GameObjectOrder.AttackUnit, target);
     }
     else if (HasACard != "none" && HasRed && Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LaneClear)
     {
         args.Process = false;
         IDictionary<Obj_AI_Minion, int> creeps = new Dictionary<Obj_AI_Minion, int>();
         foreach (var x in ObjectManager.Get<Obj_AI_Minion>().Where(x => x.Team != Player.Team && x.Team != GameObjectTeam.Neutral  && Orbwalking.InAutoAttackRange(x)))
         {
             creeps.Add(x, ObjectManager.Get<Obj_AI_Minion>().Count(y => y.Team != Player.Team && y.Team != GameObjectTeam.Neutral && y.IsValidTarget() && y.Distance(x.Position) <= 300));
         }
         foreach (var x in ObjectManager.Get<Obj_AI_Minion>().Where(x => x.Team == GameObjectTeam.Neutral && Orbwalking.InAutoAttackRange(x)))
         {
             creeps.Add(x, ObjectManager.Get<Obj_AI_Minion>().Count(y => y.Team == GameObjectTeam.Neutral && y.IsValidTarget() && y.Distance(x.Position) <= 300));
         }
         var minion = creeps.OrderByDescending(x => x.Value).FirstOrDefault();
         Player.IssueOrder(GameObjectOrder.AttackUnit, minion.Key);
     }
 }
Пример #7
0
        private static void Clear()
        {
            if (Q.IsReady() && clearq && Player.ManaPercent >= clearmana)
            {
                var farm = Q.GetLineFarmLocation(MinionManager.GetMinions(Q.Range, MinionTypes.All));
                if (farm.MinionsHit >= clearqhit)
                {
                    Q.Cast(farm.Position);
                }
            }
            if (W.IsReady() && clearw)
            {
                var target = ObjectManager.Get <Obj_AI_Minion>().Where(x => x.Team != Player.Team && x.IsValidTarget() && Orbwalking.InAutoAttackRange(x));
                if (target.Any())
                {
                    if (!IsPickingCard && PickACard && Utils.GameTimeTickCount - cardtick >= 500 && Player.ManaPercent >= clearmana)
                    {
                        cardtick = Utils.GameTimeTickCount;
                        W.Cast();
                    }
                    if (IsPickingCard)
                    {
                        if (clearwmana > Player.Mana * 100 / Player.MaxMana)
                        {
                            if (BlueCard)
                            {
                                W.Cast();
                            }
                        }
                        else
                        {
                            switch (clearwcolor)
                            {
                            case 0:
                                if (BlueCard)
                                {
                                    W.Cast();
                                }
                                break;

                            case 1:
                                if (RedCard)
                                {
                                    W.Cast();
                                }
                                break;
                            }
                        }
                    }
                }
            }
        }