Пример #1
0
        public float GetCurrentPos(float target, byte ADDR = SMC_Controller_Model.ADDR)
        {
            float current;

            Ult.SMC_GetMotorPosition(ADDR, axisType, out current);
            return(current - target);// Math.Abs();
        }
Пример #2
0
        //相对运动
        public void MoveTo(float delt, byte ADDR = SMC_Controller_Model.ADDR)
        {
            Ult.SMC_MotorMove(ADDR, axisType, delt);
            //如果满足精度要求 退出

            //下面是如果不满足精度要求的补偿措施
            //TODO:..
        }
Пример #3
0
        //激活轴
        public void Activate()
        {
            int rev;

            rev = Ult.SMC_SetMotorDriveDiv(SMC_Controller_Model.ADDR, axisType, driveDiv);
            rev = Ult.SMC_SetMotorPitch(SMC_Controller_Model.ADDR, axisType, pitch);
            rev = Ult.SMC_SetMotorAcc(SMC_Controller_Model.ADDR, axisType, acc);
            rev = Ult.SMC_SetMotorDec(SMC_Controller_Model.ADDR, axisType, dec);
            rev = Ult.SMC_SetMotorMaxSpeed(SMC_Controller_Model.ADDR, axisType, maxSpeed);
            rev = Ult.SMC_SetMotorMinSpeed(SMC_Controller_Model.ADDR, axisType, minSpeed);
        }
Пример #4
0
        //复位
        public void Reset(byte ADDR = SMC_Controller_Model.ADDR)
        {
            if (axisType == AXIS_TYPE_E.AXIS_Y)
            {
                Ult.SMC_ManualRightMove(ADDR, axisType);//连续左行
            }
            else
            {
                Ult.SMC_ManualLeftMove(ADDR, axisType);//连续左行
            }
            byte Zero = 0;

            switch (axisType)
            {
            case
                AXIS_TYPE_E.AXIS_X:
                Zero = SMC_Controller_Model.XZERO;
                break;

            case
                AXIS_TYPE_E.AXIS_Y:
                Zero = SMC_Controller_Model.YZERO;
                break;

            case
                AXIS_TYPE_E.AXIS_Z:
                Zero = SMC_Controller_Model.ZZERO;
                break;
            }
            while (!SMC.Controller.SMCController.IsZERO(ADDR, Zero))
            {
                System.Threading.Thread.Sleep(5);
            }
            Ult.SMC_QuickStopMotor(ADDR, AXIS_TYPE_E.AXIS_X);//停止X轴
            //TODO:降低电机速度
            if (axisType == AXIS_TYPE_E.AXIS_Y)
            {
                Ult.SMC_ManualLeftMove(ADDR, axisType);//连续左行
            }
            else
            {
                Ult.SMC_ManualRightMove(ADDR, axisType);//连续左行
            }
            while (!SMC.Controller.SMCController.IsZERO(ADDR, Zero))
            {
                System.Threading.Thread.Sleep(5);
            }

            Ult.SMC_QuickStopMotor(ADDR, axisType);     //停止X轴
            Ult.SMC_ClearMotorPosition(ADDR, axisType); //清除坐标
        }
Пример #5
0
 public static void OnDraw(EventArgs args)
 {
     if (E_Menu.Item("draw").GetValue <bool>())
     {
         Drawing.DrawCircle(HeroManager.Player.Position, E.bellyslam.Range, System.Drawing.Color.Yellow);
     }
     if (barrel.Item("draw").GetValue <bool>())
     {
         Drawing.DrawCircle(HeroManager.Player.Position, Q.barrel.Range, System.Drawing.Color.Orange);
         Drawing.DrawCircle(Q.qPosition, 300, System.Drawing.Color.Orange);
     }
     if (Ult.Item("draw").GetValue <bool>())
     {
         Drawing.DrawCircle(HeroManager.Player.Position, R.ult.Range, System.Drawing.Color.Red);
     }
 }
Пример #6
0
        private static void Init()
        {
            switch (ObjectManager.Player.ChampionName)
            {
                case "Kayle":
                    _ult = new Ult(UltType.Invincible, SpellSlot.E, 900);
                    break;

                case "Lissandra":
                    _ult = new Ult(UltType.Invincible, SpellSlot.R, 0);
                    break;

                case "Lulu":
                    _ult = new Ult(UltType.Invincible, SpellSlot.R, 900);
                    break;

                case "Shen":
                    _ult = new Ult(UltType.Global, SpellSlot.R, 90000);
                    break;

                case "Soraka":
                    _ult = new Ult(UltType.Global, SpellSlot.R, 90000);
                    break;

                case "Tryndamere":
                    _ult = new Ult(UltType.Invincible, SpellSlot.R, 0, false);
                    break;

                case "Yorick":
                    _ult = new Ult(UltType.Invincible, SpellSlot.R, 900);
                    break;

                case "Zilean":
                    _ult = new Ult(UltType.Invincible, SpellSlot.R, 900);
                    break;

                default:
                    return;
            }
        }
Пример #7
0
        private static void Init()
        {
            switch (ObjectManager.Player.ChampionName)
            {
                case "Kayle":
                    _ult = new Ult(UltType.Invincible, SpellSlot.E, 900);
                    break;

                case "Lissandra":
                    _ult = new Ult(UltType.Invincible, SpellSlot.R, 0);
                    break;

                case "Lulu":
                    _ult = new Ult(UltType.Invincible, SpellSlot.R, 900);
                    break;

                case "Shen":
                    _ult = new Ult(UltType.Global, SpellSlot.R, 90000);
                    break;

                case "Soraka":
                    _ult = new Ult(UltType.Global, SpellSlot.R, 90000);
                    break;

                case "Tryndamere":
                    _ult = new Ult(UltType.Invincible, SpellSlot.R, 0, false);
                    break;

                case "Yorick":
                    _ult = new Ult(UltType.Invincible, SpellSlot.R, 900);
                    break;

                case "Zilean":
                    _ult = new Ult(UltType.Invincible, SpellSlot.R, 900);
                    break;

                default:
                    return;
            }
        }
Пример #8
0
 //设置轴当前为原点
 public void ClearMotorPosition()
 {
     Ult.SMC_ClearMotorPosition(SMC_Controller_Model.ADDR, axisType);
 }
Пример #9
0
 //向左运动(负方向)
 public void MoveLeft()
 {
     Ult.SMC_ManualLeftMove(SMC_Controller_Model.ADDR, axisType);
 }
Пример #10
0
 //向右运动(正方向)
 public void MoveRight()
 {
     Ult.SMC_ManualRightMove(SMC_Controller_Model.ADDR, axisType);
 }
Пример #11
0
 //停止
 public void StopMove()
 {
     Ult.SMC_QuickStopMotor(SMC_Controller_Model.ADDR, axisType);
 }
Пример #12
0
        static void Game_OnGameLoad()
        {
            menu = new Menu("Original Gragas", "menu", true);

            Menu TargetMenu = menu.AddSubMenu(new Menu("Target Selector", "ts"));

            TargetMenu.AddItem(new MenuItem("DamageType", "AD Gragas or AP Gragas").SetValue(new StringList(new[] { "Physical Damage", "Magical Damage" }, 1)));

            Menu OrbwalkerMenu = menu.AddSubMenu(new Menu("Orbwalker", "Orbwalker"));

            orbwalker = new Orbwalking.Orbwalker(OrbwalkerMenu);

            List <string> list = new List <string> {
                "Target Selector"
            };
            int i = 1;

            foreach (AIHeroClient unit in HeroManager.Enemies)
            {
                list.Add(unit.ChampionName);
                i = i + 1;
            }

            W_Menu = menu.AddSubMenu(new Menu("Gragas W", "W"));

            W_Menu.AddItem(new MenuItem("useW", "Let script use gragas W").SetValue(true));
            W_Menu.AddItem(new MenuItem("jungleW", "Clear jungle with W").SetValue(true));
            W_Menu.AddItem(new MenuItem("laneclearW", "Laneclear with w").SetValue(true));
            W_Menu.AddItem(new MenuItem("num_w", "Number of minions to W").SetValue(new Slider(2, 1, 4)));
            W_Menu.AddItem(new MenuItem("comboW", "Use W in combo").SetValue(true));

            E_Menu = menu.AddSubMenu(new Menu("Gragas E", "E"));

            E_Menu.AddItem(new MenuItem("useE", "Let script use gragas E").SetValue(true));
            E_Menu.AddItem(new MenuItem("draw", "Draw Gragas E range").SetValue(true));
            E_Menu.AddItem(new MenuItem("focus_unit", "Force bellyslam unit").SetValue(new StringList(list.ToArray(), 0)));
            E_Menu.AddItem(new MenuItem("jungleE", "Clear jungle with E").SetValue(true));

            barrel = menu.AddSubMenu(new Menu("Gragas Q", "Q"));

            barrel.AddItem(new MenuItem("draw", "Draw Q range").SetValue(true));

            Q_LANECLEAR = barrel.AddSubMenu(new Menu("Q Laneclear settings", "QLaneClear"));
            Q_LANECLEAR.AddItem(new MenuItem("useQ", "Use Q in lane and jungle clear").SetValue(true));
            Q_LANECLEAR.AddItem(new MenuItem("min_num", "Only Q x minions").SetValue(new Slider(3, 1, 7)));

            Q_Auto = barrel.AddSubMenu(new Menu("Auto Detonate Q", "QSecondCast"));
            Q_Auto.AddItem(new MenuItem("useQ", "Automatically detonate Q").SetValue(true));
            Q_Auto.AddItem(new MenuItem("combo", "Auto detonate in combo").SetValue(true));
            Q_Auto.AddItem(new MenuItem("farm", "Auto detonate Q in farming").SetValue(true));
            Q_Auto.AddItem(new MenuItem("num_farm", "Number of minions to farm lasthit").SetValue(new Slider(2, 1, 7)));
            Q_Auto.AddItem(new MenuItem("num_clear", "Number of minions to hit clear").SetValue(new Slider(5, 1, 7)));

            Ult = menu.AddSubMenu(new Menu("Gragas ult", "R"));

            Ult.AddItem(new MenuItem("draw", "Draw ult range").SetValue(true));

            R_Insec = Ult.AddSubMenu(new Menu("Insec settings", "R_Insec"));
            R_Insec.AddItem(new MenuItem("min_num", "Only ult x enemies").SetValue(new Slider(2, 1, 5)));
            R_Insec.AddItem(new MenuItem("force_key", "Force insec key").SetValue(new KeyBind("T".ToCharArray()[0], KeyBindType.Press)));
            R_Insec.AddItem(new MenuItem("focus_unit", "Force insec unit").SetValue(new StringList(list.ToArray(), 0)));
            R_Insec.AddItem(new MenuItem("barrel_use", "Do ult barrel in combo").SetValue(true));

            R_Barrel = Ult.AddSubMenu(new Menu("Q -> R combo settings", "R_Barrel"));
            R_Barrel.AddItem(new MenuItem("focus_unit", "Force windygragas combo unit").SetValue(new StringList(list.ToArray(), 0)));
            R_Barrel.AddItem(new MenuItem("auto_combo", "Automatically perform combo if will kill").SetValue(true));

            menu.AddToMainMenu();

            Game.OnUpdate       += OnUpdate;
            Drawing.OnDraw      += OnDraw;
            GameObject.OnCreate += OnCreateObj;
            GameObject.OnDelete += OnDeleteObj;

            E.bellyslam.SetSkillshot(0, E.hitradius, 1300, true, SkillshotType.SkillshotLine);
            Q.barrel.SetSkillshot(0, 300, 550, false, SkillshotType.SkillshotCircle);
        }
Пример #13
0
        private static void Game_OnStart(EventArgs args)
        {
            QSS = new Item(ItemId.Quicksilver_Sash);
            if (Game.MapId == GameMapId.CrystalScar)
            {
                Mercurial = new Item(ItemId.Dervish_Blade);
            }
            else
            {
                Mercurial = new Item(ItemId.Mercurial_Scimitar);
            }

            Menu = MainMenu.AddMenu("PreStun", "PreStun");
            CC   = Menu.AddSubMenu("QSS Manager", "qsmg");
            Ult  = Menu.AddSubMenu("Ults Manager", "ults");

            Menu.Add("keybind", new KeyBind("Auto QSS", false, KeyBind.BindTypes.PressToggle, 'L'));
            Menu.Add("drawk", new CheckBox("Draw Keybind"));
            Menu.Add("buffduration", new Slider("Min duration to QSS", 0, 0, 4));
            Menu.Add("minbuff", new Slider("Min buffs to QSS", 1, 1, 4));

            Menu.AddLabel("(You can increase / decrease the min buffs without pressing shift)");
            Menu.AddSeparator();
            var a = Menu.Add("increase", new KeyBind("Increase the min buffs to QSS", false, KeyBind.BindTypes.HoldActive, 'J'));
            var b = Menu.Add("decrease", new KeyBind("Decrease the min buffs to QSS", false, KeyBind.BindTypes.HoldActive, 'N'));

            a.OnValueChange += delegate
                               (ValueBase <bool> sender, ValueBase <bool> .ValueChangeArgs Aargs)
            {
                if (Aargs.NewValue)
                {
                    Menu["minbuff"].Cast <Slider>().CurrentValue++;
                }
            };
            b.OnValueChange += delegate
                               (ValueBase <bool> sender, ValueBase <bool> .ValueChangeArgs Aargs)
            {
                if (Aargs.NewValue)
                {
                    Menu["minbuff"].Cast <Slider>().CurrentValue--;
                }
            };
            CC.AddGroupLabel("AutoQSS if :");
            CC.Add("Taunt", new CheckBox("Taunt"));
            CC.Add("Stun", new CheckBox("Stun"));
            CC.Add("Snare", new CheckBox("Snare"));
            CC.Add("Polymorph", new CheckBox("Polymorph"));
            CC.Add("Blind", new CheckBox("Blind", false));
            CC.Add("Fear", new CheckBox("Fear"));
            CC.Add("Charm", new CheckBox("Charm"));
            CC.Add("Suppression", new CheckBox("Suppression"));
            CC.Add("Silence", new CheckBox("Silence", false));
            CC.Add("CCDelay", new Slider("Delay for CC", 400, 0, 2000));

            Ult.AddGroupLabel("Ults");
            Ult.Add("ZedUlt", new CheckBox("Zed Ult"));
            Ult.Add("VladUlt", new CheckBox("Vlad Ult"));
            Ult.Add("FizzUlt", new CheckBox("Fizz Ult"));
            Ult.Add("MordUlt", new CheckBox("Mordekaiser Ult"));
            Ult.Add("PoppyUlt", new CheckBox("Poppy Ult"));
            Ult.Add("UltDelay", new Slider("Delay for Ults", 1000, 0, 3000));


            Obj_AI_Base.OnBuffGain += OnBuffGain;
            Obj_AI_Base.OnBuffLose += OnBuffLose;
            Drawing.OnDraw         += Game_OnDraw;
        }