Ejemplo n.º 1
0
        public void OnKeyPressed()
        {
            if (!Enabled)
            {
                return;
            }

            if (_spellConfig.W.Ready && _spellConfig.IsFirst(_spellConfig.W) && _wardTracker.IsWardReady())
            {
                var cursorDist = (int)Global.Player.Distance(Game.CursorPos);
                var dist       = cursorDist <= _spellConfig.WardRange ? cursorDist : _spellConfig.WardRange;
                _wardManager.WardJump(Game.CursorPos, dist);
            }
        }
Ejemplo n.º 2
0
        public void OnGapcloser(Obj_AI_Hero sender, GapcloserArgs args)
        {
            if (sender.IsMe ||
                !sender.IsEnemy ||
                !_spellConfig.W.Ready ||
                !_spellConfig.IsFirst(_spellConfig.W) ||
                !_wardTracker.IsWardReady() ||
                args.EndPosition.Distance(Global.Player) > 425)
            {
                return;
            }

            _wardManager.WardJump(Game.CursorPos, _spellConfig.WardRange);
        }
Ejemplo n.º 3
0
        public void OnUpdate()
        {
            var target = Global.TargetSelector.GetTarget(1600);

            if (!target.IsValidTarget())
            {
                return;
            }

            var distance = target.Distance(Global.Player);

            if (spellConfig.Q.Ready && this.Q1Enabled)
            {
                if (distance > 1300)
                {
                    return;
                }

                if (spellConfig.IsQ2())
                {
                    if (this.TurretCheckEnabled && target.IsUnderEnemyTurret() || !this.Q2Enabled)
                    {
                        return;
                    }

                    if (spellConfig.QAboutToEnd || distance >= Global.Player.AttackRange + 100)
                    {
                        spellConfig.Q.Cast();
                    }
                }
                else if (target.IsValidTarget(spellConfig.Q.Range))
                {
                    spellConfig.QSmite(target);
                    spellConfig.Q.Cast(target);
                }
            }

            if (spellConfig.R.Ready && spellConfig.Q.Ready && this.Q1Enabled && distance <= 550 && target.Health <= Global.Player.GetSpellDamage(target, SpellSlot.R) +
                Global.Player.GetSpellDamage(target, SpellSlot.Q) + Global.Player.GetSpellDamage(target, SpellSlot.Q, DamageStage.SecondCast))
            {
                spellConfig.R.CastOnUnit(target);
                spellConfig.Q.Cast(target);
            }

            if (spellConfig.E.Ready && this.EEnabled && spellConfig.IsFirst(spellConfig.E) && distance <= 350)
            {
                if (Items.CanUseTiamat())
                {
                    Items.CastTiamat(false);
                    DelayAction.Queue(50, () => spellConfig.E.Cast(target));
                }
                else
                {
                    spellConfig.E.Cast(target);
                }
            }

            if (spellConfig.W.Ready && spellConfig.IsFirst(spellConfig.W) && wardTracker.IsWardReady() && this.WEnabled && this.WardEnabled &&
                distance > (spellConfig.Q.Ready ? 1000 : spellConfig.WardRange))
            {
                if (Game.TickCount - spellConfig.Q.LastCastAttemptT <= 3000 || target.Position.CountEnemyHeroesInRange(2000) > 1)
                {
                    return;
                }

                wardManager.WardJump(target.Position, spellConfig.WardRange);
            }
        }