示例#1
0
文件: Lucian.cs 项目: volder1/PortAIO
        private void CastE(Obj_AI_Base target)
        {
            // TODO check possible wall dashes :^)
            if (!Variables.Spell[Variables.Spells.E].IsReady() || !getCheckBoxItem(MenuGenerator.comboOptions, "com.ilucian.combo.e") || target == null || ObjectManager.Player.HasBuff("LucianR"))
            {
                return;
            }

            var dashRange = getSliderItem(MenuGenerator.comboOptions, "com.ilucian.combo.eRange");

            switch (getBoxItem(MenuGenerator.comboOptions, "com.ilucian.combo.eMode"))
            {
            case 0:     // kite
                var hypotheticalPosition = ObjectManager.Player.ServerPosition.LSExtend(
                    Game.CursorPos,
                    Variables.Spell[Variables.Spells.E].Range);
                if (ObjectManager.Player.HealthPercent <= 70 &&
                    target.HealthPercent >= ObjectManager.Player.HealthPercent)
                {
                    if (ObjectManager.Player.Position.LSDistance(ObjectManager.Player.ServerPosition) >= 35 &&
                        target.LSDistance(ObjectManager.Player.ServerPosition)
                        < target.LSDistance(ObjectManager.Player.Position) &&
                        hypotheticalPosition.IsSafe(Variables.Spell[Variables.Spells.E].Range))
                    {
                        Variables.Spell[Variables.Spells.E].Cast(hypotheticalPosition);
                    }
                }

                if (hypotheticalPosition.IsSafe(Variables.Spell[Variables.Spells.E].Range) &&
                    hypotheticalPosition.LSDistance(target.ServerPosition)
                    <= Orbwalking.GetRealAutoAttackRange(null) &&
                    (hypotheticalPosition.LSDistance(target.ServerPosition) > 400) && !Variables.HasPassive())
                {
                    Variables.Spell[Variables.Spells.E].Cast(hypotheticalPosition);
                }

                break;

            case 1:     // side
                Variables.Spell[Variables.Spells.E].Cast(
                    Deviation(ObjectManager.Player.Position.LSTo2D(), target.Position.LSTo2D(), dashRange).To3D());
                break;

            case 2:     // Cursor
                if (Game.CursorPos.IsSafe(475))
                {
                    Variables.Spell[Variables.Spells.E].Cast(
                        ObjectManager.Player.Position.LSExtend(Game.CursorPos, dashRange));
                }

                break;

            case 3:     // Enemy
                Variables.Spell[Variables.Spells.E].Cast(
                    ObjectManager.Player.Position.LSExtend(target.Position, dashRange));
                break;

            case 4:
                Variables.Spell[Variables.Spells.E].Cast(
                    Deviation(ObjectManager.Player.Position.LSTo2D(), target.Position.LSTo2D(), 65f).To3D());
                break;

            case 5:     // Smart E Credits to ASUNOOO
                var ePosition    = new EPosition();
                var bestPosition = ePosition.GetEPosition();
                if (bestPosition != Vector3.Zero &&
                    bestPosition.LSDistance(target.ServerPosition) < Orbwalking.GetRealAutoAttackRange(target))
                {
                    Variables.Spell[Variables.Spells.E].Cast(bestPosition);
                }

                break;
            }
        }
示例#2
0
        private void CastE(Obj_AI_Base target)
        {
            // TODO check possible wall dashes :^)
            if (!Variables.Spell[Variables.Spells.E].IsReady() || !getCheckBoxItem(MenuGenerator.comboOptions, "com.ilucian.combo.e") || target == null || ObjectManager.Player.HasBuff("LucianR"))
            {
                return;
            }

            var dashRange = getSliderItem(MenuGenerator.comboOptions, "com.ilucian.combo.eRange");

            switch (getBoxItem(MenuGenerator.comboOptions, "com.ilucian.combo.eMode"))
            {
                case 0: // kite
                    var hypotheticalPosition = ObjectManager.Player.ServerPosition.LSExtend(
                        Game.CursorPos,
                        Variables.Spell[Variables.Spells.E].Range);
                    if (ObjectManager.Player.HealthPercent <= 70
                        && target.HealthPercent >= ObjectManager.Player.HealthPercent)
                    {
                        if (ObjectManager.Player.Position.LSDistance(ObjectManager.Player.ServerPosition) >= 35
                            && target.LSDistance(ObjectManager.Player.ServerPosition)
                            < target.LSDistance(ObjectManager.Player.Position)
                            && hypotheticalPosition.IsSafe(Variables.Spell[Variables.Spells.E].Range))
                        {
                            Variables.Spell[Variables.Spells.E].Cast(hypotheticalPosition);
                        }
                    }

                    if (hypotheticalPosition.IsSafe(Variables.Spell[Variables.Spells.E].Range)
                        && hypotheticalPosition.LSDistance(target.ServerPosition)
                        <= Orbwalking.GetRealAutoAttackRange(null)
                        && (hypotheticalPosition.LSDistance(target.ServerPosition) > 400) && !Variables.HasPassive())
                    {
                        Variables.Spell[Variables.Spells.E].Cast(hypotheticalPosition);
                    }

                    break;

                case 1: // side
                    Variables.Spell[Variables.Spells.E].Cast(
                        Deviation(ObjectManager.Player.Position.LSTo2D(), target.Position.LSTo2D(), dashRange).To3D());
                    break;

                case 2: // Cursor
                    if (Game.CursorPos.IsSafe(475))
                    {
                        Variables.Spell[Variables.Spells.E].Cast(
                            ObjectManager.Player.Position.LSExtend(Game.CursorPos, dashRange));
                    }

                    break;

                case 3: // Enemy
                    Variables.Spell[Variables.Spells.E].Cast(
                        ObjectManager.Player.Position.LSExtend(target.Position, dashRange));
                    break;
                case 4:
                    Variables.Spell[Variables.Spells.E].Cast(
                        Deviation(ObjectManager.Player.Position.LSTo2D(), target.Position.LSTo2D(), 65f).To3D());
                    break;
                case 5: // Smart E Credits to ASUNOOO
                    var ePosition = new EPosition();
                    var bestPosition = ePosition.GetEPosition();
                    if (bestPosition != Vector3.Zero
                        && bestPosition.LSDistance(target.ServerPosition) < Orbwalking.GetRealAutoAttackRange(target))
                    {
                        Variables.Spell[Variables.Spells.E].Cast(bestPosition);
                    }

                    break;
            }
        }