コード例 #1
0
ファイル: KurisuMorgana.cs プロジェクト: meimeiiiww/Port
        private static void Harass(bool useq, bool usew)
        {
            if (useq && _q.IsReady())
            {
                var qtarget = TargetSelector.GetTargetNoCollision(_q);
                if (qtarget.IsValidTargetLS())
                {
                    if (Me.ManaPercent >= _menu.Item("harassmana").GetValue <Slider>().Value)
                    {
                        var poutput = _q.GetPrediction(qtarget);
                        if (poutput.Hitchance >= (HitChance)_menu.Item("hitchanceq").GetValue <Slider>().Value + 2)
                        {
                            _q.Cast(poutput.CastPosition);
                        }
                    }
                }
            }

            if (usew && _w.IsReady())
            {
                var wtarget = TargetSelector.GetTarget(_w.Range + 200, TargetSelector.DamageType.Magical);
                if (wtarget.IsValidTargetLS())
                {
                    if (Me.ManaPercent >= _menu.Item("harassmana").GetValue <Slider>().Value)
                    {
                        if (!_menu.Item("waitfor").GetValue <bool>() || _mw * 1 >= wtarget.Health)
                        {
                            var poutput = _w.GetPrediction(wtarget);
                            if (poutput.Hitchance >= (HitChance)_menu.Item("hitchancew").GetValue <Slider>().Value + 2)
                            {
                                _w.Cast(poutput.CastPosition);
                            }
                        }
                    }
                }
            }
        }
コード例 #2
0
ファイル: KurisuMorgana.cs プロジェクト: meimeiiiww/Port
        private static void Combo(bool useq, bool usew, bool user)
        {
            if (useq && _q.IsReady())
            {
                var qtarget = TargetSelector.GetTargetNoCollision(_q);
                if (qtarget.IsValidTargetLS())
                {
                    var poutput = _q.GetPrediction(qtarget);
                    if (poutput.Hitchance >= (HitChance)_menu.Item("hitchanceq").GetValue <Slider>().Value + 2)
                    {
                        _q.Cast(poutput.CastPosition);
                    }
                }
            }

            if (usew && _w.IsReady())
            {
                var wtarget = TargetSelector.GetTarget(_w.Range + 10, TargetSelector.DamageType.Magical);
                if (wtarget.IsValidTargetLS())
                {
                    if (!_menu.Item("waitfor").GetValue <bool>() || _mw * 1 >= wtarget.Health)
                    {
                        var poutput = _w.GetPrediction(wtarget);
                        if (poutput.Hitchance >= (HitChance)_menu.Item("hitchancew").GetValue <Slider>().Value + 2)
                        {
                            _w.Cast(poutput.CastPosition);
                        }
                    }
                }
            }

            if (user && _r.IsReady())
            {
                var ticks = _menu.Item("calcw").GetValue <Slider>().Value;

                var rtarget = TargetSelector.GetTarget(_r.Range, TargetSelector.DamageType.Magical);
                if (rtarget.IsValidTargetLS() && _menu.Item("rkill").GetValue <bool>())
                {
                    if (_mr + _mq + _mw * ticks + _ma * 3 + _mi + _guise >= rtarget.Health)
                    {
                        if (rtarget.Health > _mr + _ma * 2 + _mw * 2 && !rtarget.IsZombie)
                        {
                            if (_e.IsReady())
                            {
                                _e.CastOnUnit(Me);
                            }
                            _r.Cast();
                        }
                    }

                    if (Me.CountEnemiesInRange(_r.Range) >= _menu.Item("rcount").GetValue <Slider>().Value)
                    {
                        if (_e.IsReady())
                        {
                            _e.CastOnUnit(Me);
                        }

                        _r.Cast();
                    }
                }
            }
        }