Пример #1
0
        private static void OnFarm(Orbwalker.OrbwalkerActionArgs e)
        {
            return;
            //TODO Redo this using OnNonKillableMinion
            //TODO Reenable once GetSpellDamage for Vayne is bik
            if (spells[SpellSlot.Q].IsEnabledAndReady(OrbwalkerMode.LaneClear))
            {
                //TODO Change here
                var minionsInRange = GameObjects.EnemyMinions.Where(m => m.DistanceSquared(ObjectManager.Player.ServerPosition) <= ObjectManager.Player.AttackRange * ObjectManager.Player.AttackRange && m.Health <= ObjectManager.Player.GetAutoAttackDamage(m) + SpellSlot.Q.GetVHRSpellDamage(m)).ToList();

                if (!minionsInRange.Any())
                {
                    return;
                }

                if (minionsInRange.Count > 1)
                {
                    var firstMinion = minionsInRange.OrderBy(m => m.HealthPercent).First();
                    UseTumble(firstMinion);
                }
            }
        }
Пример #2
0
 private static void Orbwalker_OnAction(object sender, Orbwalker.OrbwalkerActionArgs e)
 {
     switch (e.Type)
     {
         case OrbwalkerType.AfterAttack:
             //AfterAttack Delegate. Q Spells Usage Here.
             OnAfterAttack(e);
             break;
         case OrbwalkerType.BeforeAttack:
             //BeforeAttack Delegate, focus target with W stacks here.
             OnBeforeAttack(e);
             break;
     }
 }
Пример #3
0
        private static void OnAfterAttack(Orbwalker.OrbwalkerActionArgs e)
        {
            if (e.Target.IsValidTarget() && (e.Target is Obj_AI_Base))
            {
                switch (Orbwalker.ActiveMode)
                {
                    case OrbwalkerMode.Orbwalk:
                        if (e.Target is Obj_AI_Hero)
                        {
                            PreliminaryQCheck((Obj_AI_Hero)e.Target, OrbwalkerMode.Orbwalk);
                        }
                        break;
                    case OrbwalkerMode.Hybrid:
                        if (e.Target is Obj_AI_Hero)
                        {
                            PreliminaryQCheck((Obj_AI_Hero)e.Target, OrbwalkerMode.Hybrid);
                        }
                        TryEThird((Obj_AI_Base) e.Target);
                        break;
                    case OrbwalkerMode.LaneClear:
                        OnFarm(e);
                        break;
                }

                if (VHRMenu["dz191.vhr.misc"]["dz191.vhr.misc.condemn"]["enextauto"].GetValue<MenuKeyBind>().Active && spells[SpellSlot.E].IsReady() && (e.Target is Obj_AI_Hero))
                {
                    spells[SpellSlot.E].Cast((Obj_AI_Hero) e.Target);
                    VHRMenu["dz191.vhr.misc"]["dz191.vhr.misc.condemn"]["enextauto"].Toggled = false;
                }
            }
        }
Пример #4
0
 private static void OnBeforeAttack(Orbwalker.OrbwalkerActionArgs e)
 {
 }
Пример #5
0
 private static void OnAfterAttack(Orbwalker.OrbwalkerActionArgs e)
 {
     if (e.Target.IsValidTarget() && (e.Target is Obj_AI_Base))
     {
         switch (Orbwalker.ActiveMode)
         {
             case OrbwalkerMode.Orbwalk:
                 PreliminaryQCheck((Obj_AI_Base) e.Target, OrbwalkerMode.Orbwalk);
                 break;
             case OrbwalkerMode.Hybrid:
                 PreliminaryQCheck((Obj_AI_Base) e.Target, OrbwalkerMode.Hybrid);
                 break;
         }
     }
 }
Пример #6
0
 private static void OnBeforeAttack(Orbwalker.OrbwalkerActionArgs e)
 {
     /**
     if (VHRMenu["dz191.vhr.misc.general"]["specialfocus"].GetValue<MenuBool>().Value)
     {
         var currentTarget = e.Target;
         if (currentTarget is Obj_AI_Hero)
         {
             var target = (Obj_AI_Hero) currentTarget;
             var TwoStacksTarget = VHRExtensions.GetHeroWith2WStacks();
             if (TwoStacksTarget != null && TwoStacksTarget != target)
             {
                 Orbwalker.OrbwalkTarget = TwoStacksTarget;
             }
         }
     }
      * */
 }
Пример #7
0
 static void Orbwalker_OnAction(object sender, Orbwalker.OrbwalkerActionArgs e)
 {
     // Called continuously during a Orbwalker action.
     // Use event to update logic!
     switch(Orbwalker.ActiveMode)
     {
         case OrbwalkerMode.Hybrid:
             break;
         case OrbwalkerMode.LaneClear:
             break;
         case OrbwalkerMode.LaneFreeze:
             break;
         case OrbwalkerMode.LastHit:
             break;
         case OrbwalkerMode.None:
             break;
         case OrbwalkerMode.Orbwalk:
             break;
     }
 }
Пример #8
0
        private static void OnAction(object sender, Orbwalker.OrbwalkerActionArgs orbwalk)
        {
            var target = TargetSelector.GetTarget(Q.Range * 2);
            if (Player.IsWindingUp)
                return;

            var UseE = Config["combo"]["UseE"].GetValue<MenuBool>().Value;
            var UseQ = Config["combo"]["UseQ"].GetValue<MenuBool>().Value;
            var harrQ = Config["harass"]["harrQ"].GetValue<MenuBool>().Value;
            var harrE = Config["harass"]["harrE"].GetValue<MenuBool>().Value;
            var gapclose = Config["spell"]["qgapcloseonly"].GetValue<MenuBool>().Value;

            if (orbwalk.Type == OrbwalkerType.AfterAttack && Q1 == 1 && Orbwalker.ActiveMode == OrbwalkerMode.Orbwalk && UseE && !target.IsDead ||
                orbwalk.Type == OrbwalkerType.AfterAttack && Q1 == 1 && Orbwalker.ActiveMode == OrbwalkerMode.Hybrid && harrE)
            {
                E.Cast();
                Player.IssueOrder(GameObjectOrder.AutoAttack, target);
            }
            if (orbwalk.Type == OrbwalkerType.AfterAttack && Q1 == 1 && Orbwalker.ActiveMode == OrbwalkerMode.Orbwalk && !E.IsReady())
            {
                Q1 = 0;
            }
            if (Q1 == 0 && !E.IsReady() && Orbwalker.ActiveMode == OrbwalkerMode.Orbwalk && Qcast2() && orbwalk.Type == OrbwalkerType.AfterAttack && !gapclose && UseQ ||
                Q1 == 0 && !E.IsReady() && Orbwalker.ActiveMode == OrbwalkerMode.Hybrid && Qcast2() && orbwalk.Type == OrbwalkerType.AfterAttack && !gapclose && harrQ)
            {
                Q.Cast(target);
                Player.IssueOrder(GameObjectOrder.AutoAttack, target);
            }
            if (orbwalk.Type == OrbwalkerType.AfterAttack && Q1 == 0 && !Q.IsReady() && Orbwalker.ActiveMode == OrbwalkerMode.Orbwalk && UseE && !target.IsDead||
                orbwalk.Type == OrbwalkerType.AfterAttack && Q1 == 0 && !Q.IsReady() && Orbwalker.ActiveMode == OrbwalkerMode.Hybrid && harrE)
            {
                E.Cast();
            }
            if (orbwalk.Type == OrbwalkerType.AfterAttack && !E.IsReady() &&
                !Q.IsReady() && Orbwalker.ActiveMode == OrbwalkerMode.Orbwalk && Config["spell"]["forceR"].GetValue<MenuKeyBind>().Active)
            {
                R.Cast(target);
            }
        }
Пример #9
0
        private static void Game_OnGameStart(EventArgs args)
        {
            if (Player.ChampionName != "Thresh") return;

            _logger = new StreamWriter(AppDomain.CurrentDomain.BaseDirectory + @"\log.txt") { AutoFlush = true };

            _q = new Spell(SpellSlot.Q, 1100);
            _q.SetSkillshot(true, SkillshotType.SkillshotLine);

            _config = new Menu("Prediction", "Prediction", true);
            _orbwalker = new Orbwalker();
            Menu settings = new Menu("Settings", "Settings");
            settings.Add(new MenuKeyBind("Write", "Write Last Cast information to log", System.Windows.Forms.Keys.L,
                KeyBindType.Press));
            settings.Add(new MenuSeparator("Info", "Log files are located in %appdata%"));
            _config.Add(settings);
            _config.Attach();

            Game.OnUpdate += Game_OnUpdate;
            Drawing.OnDraw += Drawing_OnDraw;
        }
Пример #10
0
 private static void Orbwalker_OnAction(object sender, Orbwalker.OrbwalkerActionArgs e)
 {
     switch (e.Type)
     {
         case OrbwalkerType.BeforeAttack:
             if (ObjectManager.Player.GetBuffCount("talentreaperdisplay") == 0 && Orbwalker.ActiveMode == OrbwalkerMode.Hybrid)
             {
                 e.Process = false;
             }
             break;
         case OrbwalkerType.AfterAttack:
             //TODO
             break;
     }
 }
Пример #11
0
        private static void OnAction(object sender, Orbwalker.OrbwalkerActionArgs e)
        {
            if (e.Target == null) return;
            if (e.Target.Type == GameObjectType.obj_AI_Turret || e.Target.Type == GameObjectType.obj_Barracks || e.Target.Type == GameObjectType.obj_BarracksDampener) return;
            var target = (Obj_AI_Base)e.Target;
            {
                if (e.Type == OrbwalkerType.BeforeAttack)
                {
                    if (target == null) return;
                    if (_config["Combo"]["ComboW"].GetValue<MenuBool>().Value && Spells.W.IsReady() &&
                        Orbwalker.ActiveMode == OrbwalkerMode.Orbwalk ||
                        _config["Harass"]["HarassW"].GetValue<MenuBool>().Value && Spells.W.IsReady() &&
                        Orbwalker.ActiveMode == OrbwalkerMode.Hybrid && target.Type == GameObjectType.obj_AI_Hero ||
                        _config["LaneClear"]["LaneClearW"].GetValue<MenuBool>().Value && Spells.W.IsReady() &&
                        target.Type == GameObjectType.obj_AI_Minion)
                        Spells.W.Cast();

                    if (_config["Killsteal"]["KillstealQ"].GetValue<MenuBool>().Value &&
                        Spells.Q.IsReady() && target.Type != GameObjectType.obj_AI_Minion &&
                        Damage.DamageQ(target) >= target.Health)
                        Spells.Q.Cast();
                }
            }

            if (e.Type != OrbwalkerType.OnAttack) return;
            if (target == null) return;
            if ((!_config["Combo"]["ComboQ"].GetValue<MenuBool>().Value || !Spells.Q.IsReady() ||
                 Orbwalker.ActiveMode != OrbwalkerMode.Orbwalk) &&
                (!_config["Harass"]["HarassQ"].GetValue<MenuBool>().Value || !Spells.Q.IsReady() ||
                 Orbwalker.ActiveMode != OrbwalkerMode.Hybrid || target.Type != GameObjectType.obj_AI_Hero) &&
                (!_config["LaneClear"]["LaneClearQ"].GetValue<MenuBool>().Value || !Spells.Q.IsReady() ||
                 Orbwalker.ActiveMode != OrbwalkerMode.LaneClear)) return;
            var aaDelay = Player.AttackDelay * 100 + Game.Ping / 2f;
            DelayAction.Add(aaDelay, () => Spells.Q.Cast());
        }