コード例 #1
0
        private static void KillSteal()
        {
            var target    = TargetSelector.GetTarget(2000, TargetSelector.DamageType.Physical);
            var igniteDmg = _player.GetSummonerSpellDamage(target, Damage.SummonerSpell.Ignite);

            if (target.IsValidTarget() && _config.Item("UseIgnitekill").GetValue <bool>() && _igniteSlot != SpellSlot.Unknown &&
                _player.Spellbook.CanUseSpell(_igniteSlot) == SpellState.Ready)
            {
                if (igniteDmg > target.Health && _player.Distance(target.ServerPosition) <= 600)
                {
                    _player.Spellbook.CastSpell(_igniteSlot, target);
                }
            }
            if (target.IsValidTarget() && _q.IsReady() && _config.Item("UseQM").GetValue <bool>() && _q.GetDamage(target) > target.Health)
            {
                if (_player.Distance(target.ServerPosition) <= _q.Range)
                {
                    _q.Cast(target);
                }
                else if (WShadow != null && WShadow.Distance(target.ServerPosition) <= _q.Range)
                {
                    _q.UpdateSourcePosition(WShadow.ServerPosition, WShadow.ServerPosition);
                    _q.Cast(target);
                }
                else if (RShadow != null && RShadow.Distance(target.ServerPosition) <= _q.Range)
                {
                    _q.UpdateSourcePosition(RShadow.ServerPosition, RShadow.ServerPosition);
                    _q.Cast(target);
                }
            }

            if (target.IsValidTarget() && _q.IsReady() && _config.Item("UseQM").GetValue <bool>() && _q.GetDamage(target) > target.Health)
            {
                if (_player.Distance(target.ServerPosition) <= _q.Range)
                {
                    _q.Cast(target);
                }
                else if (WShadow != null && WShadow.Distance(target.ServerPosition) <= _q.Range)
                {
                    _q.UpdateSourcePosition(WShadow.ServerPosition, WShadow.ServerPosition);
                    _q.Cast(target);
                }
            }
            if (_e.IsReady() && _config.Item("UseEM").GetValue <bool>())
            {
                var t = TargetSelector.GetTarget(_e.Range, TargetSelector.DamageType.Physical);
                if (_e.GetDamage(t) > t.Health && (_player.Distance(t.ServerPosition) <= _e.Range || WShadow.Distance(t.ServerPosition) <= _e.Range))
                {
                    _e.Cast();
                }
            }
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: top9xy/EnsoulSharp-2
        private static void KillSteal()
        {
            var target = TargetSelector.GetTarget(2000);

            if (target.IsValidTarget() && _q.IsReady() && _misc.Qks.Enabled && _q.GetDamage(target) > target.Health)
            {
                if (_player.Distance(target.Position) <= _q.Range)
                {
                    _q.Cast(target);
                }
                else if (WShadow != null && WShadow.Distance(target.Position) <= _q.Range)
                {
                    _q.UpdateSourcePosition(WShadow.Position, WShadow.Position);
                    _q.Cast(target);
                }
                else if (RShadow != null && RShadow.Distance(target.Position) <= _q.Range)
                {
                    _q.UpdateSourcePosition(RShadow.Position, RShadow.Position);
                    _q.Cast(target);
                }
            }
            if (target.IsValidTarget() && _q.IsReady() && _misc.Qks.Enabled && _q.GetDamage(target) > target.Health)
            {
                if (_player.Distance(target.Position) <= _q.Range)
                {
                    _q.Cast(target);
                }
                else if (WShadow != null && WShadow.Distance(target.Position) <= _q.Range)
                {
                    _q.UpdateSourcePosition(WShadow.Position, WShadow.Position);
                    _q.Cast(target);
                }
            }
            if (_e.IsReady() && _misc.Eks.Enabled)
            {
                var t = TargetSelector.GetTarget(_e.Range);
                if (_e.GetDamage(t) > t.Health && (_player.Distance(t.Position) <= _e.Range || WShadow.Distance(t.Position) <= _e.Range))
                {
                    _e.Cast();
                }
            }
        }
コード例 #3
0
ファイル: Zed.cs プロジェクト: xeni884/Ensoulsharp.Sayuto
        private static void KillSteal()
        {
            var target = TargetSelector.GetTarget(2000);

            if (target == null)
            {
                return;
            }
            var igniteDmg = _player.GetSummonerSpellDamage(target, SummonerSpell.Ignite);

            if (target.IsValidTarget() && _config["Misc"].GetValue <MenuBool>("UseIgnitekill") && _igniteSlot != SpellSlot.Unknown &&
                _player.Spellbook.CanUseSpell(_igniteSlot) == SpellState.Ready)
            {
                if (igniteDmg > target.Health && _player.Distance(target.Position) <= 600)
                {
                    _player.Spellbook.CastSpell(_igniteSlot, target);
                }
            }
            if (target.IsValidTarget() && _q.IsReady() && _config["Misc"].GetValue <MenuBool>("UseQM") && _q.GetDamage(target) > target.Health)
            {
                if (_player.Distance(target.Position) <= _q.Range)
                {
                    _q.Cast(target);
                }
                else if (WShadow != null && WShadow.Distance(target.Position) <= _q.Range)
                {
                    _q.UpdateSourcePosition(WShadow.Position, WShadow.Position);
                    _q.Cast(target);
                }
                else if (RShadow != null && RShadow.Distance(target.Position) <= _q.Range)
                {
                    _q.UpdateSourcePosition(RShadow.Position, RShadow.Position);
                    _q.Cast(target);
                }
            }

            if (target.IsValidTarget() && _q.IsReady() && _config["Misc"].GetValue <MenuBool>("UseQM") && _q.GetDamage(target) > target.Health)
            {
                if (_player.Distance(target.Position) <= _q.Range)
                {
                    _q.Cast(target);
                }
                else if (WShadow != null && WShadow.Distance(target.Position) <= _q.Range)
                {
                    _q.UpdateSourcePosition(WShadow.Position, WShadow.Position);
                    _q.Cast(target);
                }
            }
            if (_e.IsReady() && _config["Misc"].GetValue <MenuBool>("UseEM"))
            {
                var t = TargetSelector.GetTarget(_e.Range);
                if (t == null)
                {
                    return;
                }
                if (_e.GetDamage(t) > t.Health && (_player.Distance(t.Position) <= _e.Range || WShadow.Distance(t.Position) <= _e.Range))
                {
                    _e.Cast();
                }
            }
        }
コード例 #4
0
ファイル: Zed.cs プロジェクト: betw01/xsalice22
        private void Cast_E(Obj_AI_Hero forceTarget = null)
        {
            var target  = SimpleTs.GetTarget(E.Range + W.Range, SimpleTs.DamageType.Physical);
            var eTarget = SimpleTs.GetTarget(E.Range + W.Range, SimpleTs.DamageType.Physical);

            float range = E.Range + W.Range;

            if (GetTargetFocus(range) != null)
            {
                target = GetTargetFocus(range);
            }

            if (GetMarked() != null)
            {
                target  = GetMarked();
                eTarget = GetMarked();
            }
            if (forceTarget != null)
            {
                target  = forceTarget;
                eTarget = forceTarget;
            }
            if (target == null || !E.IsReady())
            {
                return;
            }

            if (WShadow != null && RShadow != null && _currentRShadow != Vector3.Zero && _currentWShadow != Vector3.Zero)
            {
                var predW = GetPCircle(WShadow.ServerPosition, E, target, true);
                var predR = GetPCircle(RShadow.ServerPosition, E, target, true);
                var pred  = E.GetPrediction(target, true);

                if (pred.Hitchance >= HitChance.High && Player.Distance(target) < E.Range)
                {
                    E.Cast(packets());
                }

                if (predW.Hitchance >= HitChance.High && WShadow.Distance(target) < E.Range)
                {
                    E.Cast(packets());
                }

                if (predR.Hitchance >= HitChance.High && RShadow.Distance(target) < E.Range)
                {
                    E.Cast(packets());
                }
            }
            else if (WShadow != null && _currentWShadow != Vector3.Zero)
            {
                var predW = GetPCircle(WShadow.ServerPosition, E, target, true);
                var pred  = E.GetPrediction(target, true);

                if (predW.Hitchance >= HitChance.High && WShadow.Distance(target) < E.Range)
                {
                    E.Cast(packets());
                }

                if (pred.Hitchance >= HitChance.High && Player.Distance(target) < E.Range)
                {
                    E.Cast(packets());
                }
            }
            else if (RShadow != null && _currentRShadow != Vector3.Zero)
            {
                var predR = GetPCircle(RShadow.ServerPosition, E, target, true);
                var pred  = E.GetPrediction(target, true);

                if (pred.Hitchance >= HitChance.High && Player.Distance(target) < E.Range)
                {
                    E.Cast(packets());
                }

                if (predR.Hitchance >= HitChance.High && RShadow.Distance(target) < E.Range)
                {
                    E.Cast(packets());
                }
            }
            else if (eTarget != null)
            {
                if (E.GetPrediction(eTarget).Hitchance >= HitChance.High && Player.Distance(eTarget) < E.Range)
                {
                    E.Cast(packets());
                }
            }
        }