Example #1
0
        public override void OnLoad()
        {
            base.OnLoad();
            var heroMenu = new Menu("Naga", "zaioNaga", false, "npc_dota_hero_naga_siren", true);

            heroMenu.AddItem(new MenuItem("zaioNagaAbilitiesText", "Supported Abilities"));
            var supportedStuff = new MenuItem("zaioNagaAbilities", string.Empty);

            supportedStuff.SetValue(new AbilityToggler(SupportedAbilities.ToDictionary(x => x, y => true)));
            heroMenu.AddItem(supportedStuff);

            heroMenu.AddItem(new MenuItem("zaioNagaKillstealAbilitiesText", "Supported Killsteal Abilities"));
            var supportedKillsteal = new MenuItem("zaioNagaKillstealAbilities", string.Empty);

            supportedKillsteal.SetValue(new AbilityToggler(KillstealAbilities.ToDictionary(x => x, y => true)));
            heroMenu.AddItem(supportedKillsteal);

            OnLoadMenuItems(supportedStuff, supportedKillsteal);

            _functionWheelItem =
                new MenuItem("zaioNagaFunctionWheel", "Function Wheel").SetValue(new KeyBind(0, KeyBindType.Press));
            _functionWheelItem.Tooltip       = "Hotkey for showing the function wheel.";
            _functionWheelItem.ValueChanged += _functionWheelItem_ValueChanged;
            heroMenu.AddItem(_functionWheelItem);

            _stackAnctientsItem = new MenuItem("zaioNagaStackAncients", "Stack Ancients?").SetValue(false);
            heroMenu.AddItem(_stackAnctientsItem);

            ZaioMenu.LoadHeroSettings(heroMenu);

            _illuAbility    = MyHero.GetAbilityById(AbilityId.naga_siren_mirror_image);
            _rootAbility    = MyHero.GetAbilityById(AbilityId.naga_siren_ensnare);
            _ripTideAbility = MyHero.GetAbilityById(AbilityId.naga_siren_rip_tide);

            _stackJungleEntry = new WheelEntry("Stack Jungle", StackJungle, false);
            _farmJungleEntry  = new WheelEntry("Farm Jungle", FarmJungleFunc);
            _pushLaneEntry    = new WheelEntry("Push Lanes", PushLanesFunc);
            _mixedModeEntry   = new WheelEntry("Mixed Mode", MixedMode);

            var key = KeyInterop.KeyFromVirtualKey((int)_functionWheelItem.GetValue <KeyBind>().Key);

            _functionWheel = new FunctionWheel(key)
            {
                _mixedModeEntry,
                _pushLaneEntry,
                _farmJungleEntry,
                _stackJungleEntry
            };

            _availableCamps = new List <JungleCamp>(JungleCamps.GetCamps);
            Log.Debug($"Init jungle camps! {_availableCamps.Count}");

            if (MyHero.Team == Team.Dire)
            {
                Log.Debug($"using radiant to dire creep lanes");
                _enemyCreepRouteTop    = _radiantToDireTop;
                _enemyCreepRouteMid    = _radiantToDireMid;
                _enemyCreepRouteBottom = _radiantToDireBot;
            }
            else
            {
                Log.Debug($"using reversed radiant to dire creep lanes");
                _enemyCreepRouteTop    = new List <Vector3>(_radiantToDireTop);
                _enemyCreepRouteMid    = new List <Vector3>(_radiantToDireMid);
                _enemyCreepRouteBottom = new List <Vector3>(_radiantToDireBot);

                _enemyCreepRouteTop.Reverse();
                _enemyCreepRouteMid.Reverse();
                _enemyCreepRouteBottom.Reverse();
            }
            Game.OnIngameUpdate += Game_OnIngameUpdate;
        }
Example #2
0
File: Meepo.cs Project: Mej0/a
        public override void OnLoad()
        {
            base.OnLoad();
            var heroMenu = new Menu("Meepo", "zaioMeepo", false, "npc_dota_hero_meepo", true);

            heroMenu.AddItem(new MenuItem("zaioMeepoAbilitiesText", "Supported Abilities"));
            var supportedStuff = new MenuItem("zaioMeepoAbilities", string.Empty);

            supportedStuff.SetValue(new AbilityToggler(SupportedAbilities.ToDictionary(x => x, y => true)));
            heroMenu.AddItem(supportedStuff);

            heroMenu.AddItem(new MenuItem("zaioMeepoKillstealAbilitiesText", "Supported Killsteal Abilities"));
            var supportedKillsteal = new MenuItem("zaioMeepoKillstealAbilities", string.Empty);

            supportedKillsteal.SetValue(new AbilityToggler(KillstealAbilities.ToDictionary(x => x, y => true)));
            heroMenu.AddItem(supportedKillsteal);

            this.OnLoadMenuItems(supportedStuff, supportedKillsteal);

            this._functionWheelItem =
                new MenuItem("zaioMeepoFunctionWheel", "Function Wheel").SetValue(new KeyBind(0, KeyBindType.Press));
            this._functionWheelItem.Tooltip       = "Hotkey for showing the function wheel.";
            this._functionWheelItem.ValueChanged += this._functionWheelItem_ValueChanged;
            heroMenu.AddItem(this._functionWheelItem);

            ZaioMenu.LoadHeroSettings(heroMenu);

            this._qAbility = this.MyHero.GetAbilityById(AbilityId.meepo_earthbind);
            this._wAbility = this.MyHero.GetAbilityById(AbilityId.meepo_poof);

            this._stackJungleEntry = new WheelEntry("Stack Jungle", this.StackJungle, false);
            this._farmJungleEntry  = new WheelEntry("Farm Jungle", this.FarmJungleFunc);
            this._pushLaneEntry    = new WheelEntry("Push Lanes", this.PushLanesFunc);
            this._mixedModeEntry   = new WheelEntry("Mixed Mode", this.MixedMode);

            var key = KeyInterop.KeyFromVirtualKey((int)this._functionWheelItem.GetValue <KeyBind>().Key);

            this._functionWheel = new FunctionWheel(key)
            {
                this._mixedModeEntry,
                this._pushLaneEntry,
                this._farmJungleEntry,
                this._stackJungleEntry
            };

            this._availableCamps = new List <JungleCamp>(JungleCamps.GetCamps);
            Log.Debug($"Init jungle camps! {this._availableCamps.Count}");

            if (this.MyHero.Team == Team.Dire)
            {
                Log.Debug($"using radiant to dire creep lanes");
                this._enemyCreepRouteTop    = this._radiantToDireTop;
                this._enemyCreepRouteMid    = this._radiantToDireMid;
                this._enemyCreepRouteBottom = this._radiantToDireBot;
            }
            else
            {
                Log.Debug($"using reversed radiant to dire creep lanes");
                this._enemyCreepRouteTop    = new List <Vector3>(this._radiantToDireTop);
                this._enemyCreepRouteMid    = new List <Vector3>(this._radiantToDireMid);
                this._enemyCreepRouteBottom = new List <Vector3>(this._radiantToDireBot);

                this._enemyCreepRouteTop.Reverse();
                this._enemyCreepRouteMid.Reverse();
                this._enemyCreepRouteBottom.Reverse();
            }

            Game.OnIngameUpdate += this.Game_OnIngameUpdate;
        }