Exemplo n.º 1
0
        public WorstOrbwalker(Menu menu)
        {
            _config = menu;

            /* TargetSelector menu */
            var ts = new Menu("Target Selector", "_worstorbwalker_targetselector");

            ts.AddItem(new MenuItem("_worstorbwalker_targetselector_targetingmode_select", "Priority")).SetValue(new StringList(new[] { "Low HP", "Most AD", "Most AP", "Closest", "Near Mouse", "Priority", "Less Attack", "Less Cast" }));
            ts.AddItem(new MenuItem("_worstorbwalker_targetselector_spacer0", ""));
            worstSelector = new WorstSelector(_gRange, WorstSelector.TargetingMode.PRIORITY);
            worstSelector.AddToMenu(ts);
            _config.AddSubMenu(ts);

            /* Drawings menu */
            var drawings = new Menu("Drawings", "_worstorbwalker_drawings");

            drawings.AddItem(new MenuItem("_worstorbwalker_drawings_aacircle", "Attack Range")).SetValue(new Circle(true, Color.Purple));
            drawings.AddItem(new MenuItem("_worstorbwalker_drawings_aaenemycircle", "Enemy Attack Range")).SetValue(new Circle(true, Color.Purple));
            drawings.AddItem(new MenuItem("_worstorbwalker_drawings_selectedtarget", "Selected Target")).SetValue(new Circle(true, Color.White));
            drawings.AddItem(new MenuItem("_worstorbwalker_drawings_lasthitminion", "Last Hit Minion")).SetValue(new Circle(false, Color.FromArgb(255, 205, 92, 92)));
            _config.AddSubMenu(drawings);

            /* Misc menu */
            var misc = new Menu("Miscellaneous", "_worstorbwalker_miscellaneous");

            misc.AddItem(new MenuItem("_worstorbwalker_miscellaneous_priorizefarm", "Priorize farm over harass").SetValue(true));
            misc.AddItem(new MenuItem("_worstorbwalker_miscellaneous_holdposradius", "Hold Position Radius")).SetValue(new Slider(80, 150, 0));
            misc.AddItem(new MenuItem("_worstorbwalker_miscellaneous_humanizerdelay", "Humanizer Delay")).SetValue(new Slider(50, 100, 0));
            misc.AddItem(new MenuItem("_worstorbwalker_miscellaneous_extrawinduptime", "Extra Windup Time")).SetValue(new Slider(80, 200, 0));
            misc.AddItem(new MenuItem("_worstorbwalker_miscellaneous_selectedtargetfocus", "Enable selected target focus")).SetValue(true);
            misc.AddItem(new MenuItem("_worstorbwalker_miscellaneous_harassturret", "Harass under turret")).SetValue(false);
            misc.AddItem(new MenuItem("_worstorbwalker_miscellaneous_mixedlaneclear", "Mixed lane clear")).SetValue(false);
            misc.AddItem(new MenuItem("_worstorbwalker_miscellaneous_farmdelay", "Farm Delay")).SetValue(new Slider(0, 200, 0));
            _config.AddSubMenu(misc);

            /* Main menu */
            MenuItem[] menuItem = { (new MenuItem("_worstorbwalker_keybinds_lasthit",   "Last hit").SetValue(new KeyBind("X".ToCharArray()[0],   KeyBindType.Press, false))),
                                    (new MenuItem("_worstorbwalker_keybinds_mixed",     "Mixed").SetValue(new KeyBind("C".ToCharArray()[0],      KeyBindType.Press, false))),
                                    (new MenuItem("_worstorbwalker_keybinds_laneclear", "Lane clear").SetValue(new KeyBind("V".ToCharArray()[0], KeyBindType.Press, false))),
                                    (new MenuItem("_worstorbwalker_keybinds_flee",      "Flee").SetValue(new KeyBind("A".ToCharArray()[0],       KeyBindType.Press, false))),
                                    (new MenuItem("_worstorbwalker_keybinds_combo",     "Combo").SetValue(new KeyBind(32,                        KeyBindType.Press, false))) };

            _config.AddItem(new MenuItem("_worstorbwalker_spacer0", ""));
            foreach (var mi in menuItem)
            {
                if (mi != null)
                {
                    _config.AddItem(mi);
                }
            }

            Game.OnGameUpdate += OnGameUpdate;
        }
Exemplo n.º 2
0
        private void OnGameUpdate(EventArgs args)
        {
            // Fix for new summoners rift
            if ((Utility.Map.GetMap()._MapType == Utility.Map.MapType.SummonersRift && Game.Time >= 23.135f && !srFix) || (Utility.Map.GetMap()._MapType != Utility.Map.MapType.SummonersRift))
            {
                Drawing.OnDraw += OnDraw;
                Obj_AI_Base.OnProcessSpellCast += OnProcessSpell;
                GameObject.OnCreate            += Obj_SpellMissile_OnCreate;
                Game.OnGameProcessPacket       += OnProcessPacket;
                Player = ObjectManager.Player;
                srFix  = true;
            }

            if (worstSelector.GetTargetingMode() != WorstSelector.IntToTargetingMode(_config.Item("_worstorbwalker_targetselector_targetingmode_select").GetValue <StringList>().SelectedIndex))
            {
                switch (_config.Item("_worstorbwalker_targetselector_targetingmode_select").GetValue <StringList>().SelectedIndex)
                {
                case 0:
                    worstSelector.SetTargetingMode(WorstSelector.TargetingMode.LOW_HP);
                    break;

                case 1:
                    worstSelector.SetTargetingMode(WorstSelector.TargetingMode.MOST_AD);
                    break;

                case 2:
                    worstSelector.SetTargetingMode(WorstSelector.TargetingMode.MOST_AP);
                    break;

                case 3:
                    worstSelector.SetTargetingMode(WorstSelector.TargetingMode.CLOSEST);
                    break;

                case 4:
                    worstSelector.SetTargetingMode(WorstSelector.TargetingMode.NEAR_MOUSE);
                    break;

                case 5:
                    worstSelector.SetTargetingMode(WorstSelector.TargetingMode.PRIORITY);
                    break;

                case 6:
                    worstSelector.SetTargetingMode(WorstSelector.TargetingMode.LESS_ATTACK);
                    break;

                case 7:
                    worstSelector.SetTargetingMode(WorstSelector.TargetingMode.LESS_CAST);
                    break;

                default: worstSelector.SetTargetingMode(WorstSelector.TargetingMode.PRIORITY);
                    break;
                }
            }

            if (ActiveMode == MODE.NONE)
            {
                return;
            }

            //Prevent canceling important channeled spells like Miss Fortunes R.
            if (Player.IsChannelingImportantSpell())
            {
                return;
            }

            gTarget = GetTarget();
            Orbwalk(gTarget, (_orbwalkingPoint.To2D().IsValid()) ? _orbwalkingPoint : Game.CursorPos, _config.Item("_worstorbwalker_miscellaneous_extrawinduptime").GetValue <Slider>().Value, _config.Item("_worstorbwalker_miscellaneous_holdposradius").GetValue <Slider>().Value);
        }