public override void OnLoad() { base.OnLoad(); var heroMenu = new Menu("SpiritBreaker", "zaioSpiritBreaker", false, "npc_dota_hero_spirit_breaker", true); heroMenu.AddItem(new MenuItem("zaioSpiritBreakerAbilitiesText", "Supported Abilities")); var supportedStuff = new MenuItem("zaioSpiritBreakerAbilities", string.Empty); supportedStuff.SetValue(new AbilityToggler(SupportedAbilities.ToDictionary(x => x, y => true))); heroMenu.AddItem(supportedStuff); OnLoadMenuItems(supportedStuff); _chargeAwayKey = new MenuItem("zaioSpiritBreakerChargeAway", "Charge Away").SetValue(new KeyBind(0, KeyBindType.Press)); _chargeAwayKey.Tooltip = "Hotkey for charging away."; _chargeAwayKey.ValueChanged += _chargeAwayKey_ValueChanged; heroMenu.AddItem(_chargeAwayKey); ZaioMenu.LoadHeroSettings(heroMenu); _chargeAbility = MyHero.GetAbilityById(AbilityId.spirit_breaker_charge_of_darkness); _ultAbility = MyHero.GetAbilityById(AbilityId.spirit_breaker_nether_strike); _chargeAway = new Combo(ChargeAwayFunc, KeyInterop.KeyFromVirtualKey((int)_chargeAwayKey.GetValue <KeyBind>().Key)); _chargeAway.Activate(); }
public override void OnLoad() { base.OnLoad(); var heroMenu = new Menu("Tiny", "zaioTiny", false, "npc_dota_hero_tiny", true); heroMenu.AddItem(new MenuItem("zaioTinyAbilitiesText", "Supported Abilities")); var supportedStuff = new MenuItem("zaioTinyAbilities", string.Empty); supportedStuff.SetValue(new AbilityToggler(SupportedAbilities.ToDictionary(x => x, y => true))); heroMenu.AddItem(supportedStuff); OnLoadMenuItems(supportedStuff); _throwBackComboKey = new MenuItem("zaioTinyThrowBack", "Throw Back").SetValue(new KeyBind(0, KeyBindType.Press)); _throwBackComboKey.Tooltip = "Throws an enemy back to your allies or under your tower."; _throwBackComboKey.ValueChanged += _throwBackComboKey_ValueChanged; heroMenu.AddItem(_throwBackComboKey); _throwBackHeroCount = new MenuItem("zaioTinyThrowBackHeroCount", "Throw Back Hero Count").SetValue(new Slider(2, 1, 4)); _throwBackHeroCount.Tooltip = "How many allied heroes must be close to throw back an enemy."; heroMenu.AddItem(_throwBackHeroCount); ZaioMenu.LoadHeroSettings(heroMenu); _avalancheAbility = MyHero.GetAbilityById(AbilityId.tiny_avalanche); _tossAbility = MyHero.GetAbilityById(AbilityId.tiny_toss); _throwBackCombo = new Combo(ThrowBack, KeyInterop.KeyFromVirtualKey((int)_throwBackComboKey.GetValue <KeyBind>().Key)); _throwBackCombo.Activate(); }