public static void OrbwalkLRCLK_ValueChanged(object sender, OnValueChangeEventArgs e) { if (e.GetNewValue<KeyBind>().Active) { LastClickPoint = Game.CursorPos.To2D(); } }
private static void Changed(object sender, OnValueChangeEventArgs e) { lastbeep = 0; test = Game.Time + 5; textx = xx.GetValue<Slider>().Value; texty = yy.GetValue<Slider>().Value; }
private static void OnChange(object sender, OnValueChangeEventArgs e) { if (e.GetNewValue<bool>()) AutoLevel.Enable(); else AutoLevel.Disable(); }
private void SwitchMode(object sender, OnValueChangeEventArgs e) { Program.Menu.Item("useModus_Mode") .SetValue(Program.Menu.Item("useModus_Mode").GetValue<StringList>().SelectedIndex == 0 ? new StringList(new[] { "Teamfight", "Insec" }, 1) : new StringList(new[] { "Teamfight", "Insec" })); }
public static void OnValueChanged(object sender, OnValueChangeEventArgs args) { var oldOne = args.GetOldValue<KeyBind>().Active; var newOne = args.GetNewValue<KeyBind>().Active; if (oldOne == newOne) return; if (newOne) { _effect?.Dispose(); _effect = Members.MyHero.AddParticleEffect("materials/ensage_ui/particles/line.vpcf"); var frontPoint = Members.MyHero.InFront(1200); _effect.SetControlPoint(1, Members.MyHero.Position); _effect.SetControlPoint(2, frontPoint); _effect.SetControlPoint(3, new Vector3(255, 50, 0)); _effect.SetControlPoint(4, new Vector3(255, 255, 255)); } else try { _tks.Cancel(); _effect?.Dispose(); } catch (Exception) { // ignored } }
private void configChanged(object sender, OnValueChangeEventArgs args) { pm.pc.color = _config.Item("color").GetValue<Circle>().Color; pm.pc.circleDetail = _config.Item("circleSegments").GetValue<Slider>().Value; pm.pc.lineDetail = _config.Item("lineSegments").GetValue<Slider>().Value; pm.pc.update(); }
private static void AutoPriorityItemValueChanged(object sender, OnValueChangeEventArgs e) { if (!e.GetNewValue<bool>()) return; LoadEnemyPriorityData(); }
static void EnablerValueChanged(object sender, OnValueChangeEventArgs e) { Notifications.AddNotification( e.GetNewValue<bool>() ? new Notification("Logging enabled", 1000) : new Notification("Logging dissabled", 1000)); }
private static void Slider_ValueChanged(object sender, OnValueChangeEventArgs e) { var player = ObjectMgr.LocalPlayer; if ((player == null) || (player.Team == Team.Observer)) return; ZoomVar.SetValue(e.GetNewValue<Slider>().Value); renderVar.SetValue(2*(e.GetNewValue<Slider>().Value)); }
// ReSharper disable once InconsistentNaming private static void Item_ValueChanged(object sender, OnValueChangeEventArgs e) { foreach (var particleEffect in Effects.Values) { particleEffect.Dispose(); } Effects.Clear(); }
// ReSharper disable once InconsistentNaming private static void MenuItem_ValueChanged(object sender, OnValueChangeEventArgs e) { var item = sender as MenuItem; // ReSharper disable once PossibleNullReferenceException if (item.Name == "ownTowers") ownTowers = e.GetNewValue<bool>(); else enemyTowers = e.GetNewValue<bool>(); HandleTowers(); }
private static void Slider_ValueChanged(object sender, OnValueChangeEventArgs e) { var player = ObjectManager.LocalPlayer; if ((player == null) || (player.Team == Team.Observer)) { return; } ZoomVar.SetValue(e.GetNewValue <Slider>().Value); renderVar.SetValue(2 * (e.GetNewValue <Slider>().Value)); }
public static void OnChange(object sender, OnValueChangeEventArgs e) { if (e.GetNewValue <bool>()) { GetInstance().Load(); } else { GetInstance().UnLoad(); } }
private static void menuItem_ValueChanged(object sender, OnValueChangeEventArgs e) { int oldValue = _menuMap[((MenuItem)sender)]; int newValue = e.GetNewValue <Slider>().Value; if (oldValue != newValue) { _menuMap[((MenuItem)sender)] = newValue; ParseMenu(); } }
public static void BkbToggler(object sender, OnValueChangeEventArgs args) { var oldOne = args.GetOldValue <KeyBind>().Active; var newOne = args.GetNewValue <KeyBind>().Active; if (oldOne == newOne) { return; } _useBkb = newOne; }
private void ItemOnValueChanged(object sender, OnValueChangeEventArgs args) { if (args.GetNewValue <bool>()) { Game.OnFireEvent += Game_OnFireEvent; } else { Game.OnFireEvent -= Game_OnFireEvent; } }
private void autoPriorityItem_ValueChanged(object sender, OnValueChangeEventArgs e) { if (!e.GetNewValue <bool>()) { return; } foreach (var enemy in ObjectManager.Get <Obj_AI_Hero>().Where(hero => hero.Team != ObjectManager.Player.Team)) { config.Item("WorstSelector" + enemy.ChampionName + "Priority").SetValue(new Slider(GetPriorityFromDb(enemy.ChampionName), 5, 1)); } }
private void PriorityChanger(object sender, OnValueChangeEventArgs e) { if (!e.GetNewValue <bool>()) { return; } foreach (var Obj in ObjectManager.Get <Obj_AI_Hero>().Where(i => i.IsEnemy)) { Config.SubMenu("TS").Item("TS_Prior" + Obj.ChampionName).SetValue(new Slider(GetPriority(Obj.ChampionName), 1, 5)); } }
private void OnActiveValueChanged(object sender, OnValueChangeEventArgs args) { if (args.GetNewValue <bool>()) { this.Activate(); } else { this.Deactivate(); } }
private static void Export(object sender, OnValueChangeEventArgs e) { if (((MenuItem)sender).GetValue<KeyBind>().Active) { return; } string s = "Spots=new List<FlashSpot>{"; foreach (FlashSpot spot in Spots) { s += spot.getConstructor() + ","; } s += "};"; Console.WriteLine(s); }
private static void Program_ValueChanged(object sender, OnValueChangeEventArgs e) { if (e.GetNewValue<KeyBind>().Active) { cache.Set("HeroName", HeroManager.Player.ChampionName); cache.Set("MoveSpeed", HeroManager.Player.MoveSpeed); cache.Set("IsMe", HeroManager.Player.IsMe); cache.Save(); } }
private static void autoPriorityItem_ValueChanged(object sender, OnValueChangeEventArgs e) { if (!e.GetNewValue <bool>()) { return; } foreach (var enemy in HeroManager.Enemies) { _configMenu.Item("TargetSelector" + enemy.ChampionName + "Priority") .SetValue(new Slider(GetPriorityFromDb(enemy.ChampionName), 5, 1)); } }
private void Ahri_ValueChanged(object sender, OnValueChangeEventArgs e) { if (!Enable) { return; } if (sender != null) { Utility.HpBarDamageIndicator.Enabled = e.GetNewValue <bool>(); CustomDamageIndicator.Enabled = e.GetNewValue <bool>(); } }
private void Ahri_ValueChanged(object sender, OnValueChangeEventArgs e) { if (!Enable) { return; } if (sender != null) { //LeagueSharp.Common.Utility.HpBar//DamageIndicator.Enabled = e.GetNewValue<bool>(); //Custom//DamageIndicator.Enabled = e.GetNewValue<bool>(); } }
private static void OnValueChanged(object sender, OnValueChangeEventArgs onValueChangeEventArgs) { if (onValueChangeEventArgs.GetNewValue <bool>()) { CurrentPosition = new Render.Circle(ObjectManager.Player.Position, 100, Color.Red, 2); CurrentPosition.Add(); } else { CurrentPosition.Remove(); } }
private static void resetSmallText(object sender, OnValueChangeEventArgs e) { gPower.text = ""; ePower.text = ""; aDmg.text = ""; eDmg.text = ""; aHealt.text = ""; eHealt.text = ""; versus.text = ""; eNum.text = ""; aNum.text = ""; }
private static void autoPriorityItem_ValueChanged(object sender, OnValueChangeEventArgs e) { if (e.GetNewValue <bool>()) { foreach ( var enemy in ObjectManager.Get <Obj_AI_Hero>().Where(hero => hero.Team != ObjectManager.Player.Team)) { _config.Item("AdvancedTS" + enemy.ChampionName + "Priority") .SetValue(new Slider(GetPriorityFromDb(enemy.ChampionName), 5, 1)); } } }
private void TwistedFate_ValueChanged(object sender, OnValueChangeEventArgs e) { if (!Enable) { return; } if (sender != null) { LeagueSharp.Common.Utility.HpBarDamageIndicator.Enabled = e.GetNewValue <bool>(); CustomDamageIndicator.Enabled = e.GetNewValue <bool>(); } }
private static void Program_ValueChanged(object sender, OnValueChangeEventArgs e) { foreach (var ward in ObjectManager.Get <Obj_AI_Base>() .Where(o => o.CharData.BaseSkinName.Contains("ward")) .Where( ward => !Config.Item("WardOwn").IsActive() || ward.Buffs.Any(b => b.SourceName.Equals(ObjectManager.Player.ChampionName)))) { ward.SetSkin(ward.CharData.BaseSkinName, Convert.ToInt32(e.GetNewValue <StringList>().SelectedValue)); } }
private static void SwitchSequence(object sender, OnValueChangeEventArgs e) { if (!e.GetNewValue <bool>()) { return; } var item = (MenuItem)sender; foreach (var lvlsequence in LevelsequenceList.Where(sequence => sequence.ChampionName == PUC.Player.ChampionName).Where(lvlsequence => item.Name != "lvl_sequence_" + lvlsequence.SequenceName.Replace(" ", "_"))) { PUC.Menu.Item("lvl_sequence_" + lvlsequence.SequenceName.Replace(" ", "_")).SetValue(false); } }
private void FarmkeyChanged(object sender, OnValueChangeEventArgs e) { var keyCode = e.GetNewValue <KeyBind>().Key; if (keyCode == e.GetOldValue <KeyBind>().Key) { return; } Config.Key.Item.ValueChanged -= FarmSDKkeyChanged; Config.Key.Item.SetValue(new KeyBind(keyCode)); Config.Key.Item.ValueChanged += FarmSDKkeyChanged; }
private void HotkeyChanged(object sender, OnValueChangeEventArgs e) { var keyCode = e.GetNewValue <KeyBind>().Key; if (keyCode == e.GetOldValue <KeyBind>().Key) { return; } var key = KeyInterop.KeyFromVirtualKey((int)keyCode); Mode.Key = key; Log.Info("new hotkey: " + key); }
private static void Weather_ValueChanged(object sender, OnValueChangeEventArgs e) { var t = e.GetNewValue <StringList>().SelectedIndex; if (!Game.IsInGame) { return; } var var = Game.GetConsoleVar("cl_weather"); var.RemoveFlags(ConVarFlags.Cheat); var.SetValue(t); }
private void ItemOnValueChanged(object sender, OnValueChangeEventArgs args) { if (args.GetNewValue <bool>()) { EntityManager <Item> .EntityAdded += OnEntityAdded; Entity.OnInt32PropertyChange += OnInt32PropertyChange; } else { EntityManager <Item> .EntityAdded -= OnEntityAdded; Entity.OnInt32PropertyChange -= OnInt32PropertyChange; } }
private void ItemOnValueChanged(object sender, OnValueChangeEventArgs args) { if (args.GetNewValue <bool>()) { EntityManager <Hero> .EntityAdded += OnEntityAdded; UpdateManager.Subscribe(OnUpdate, 1000); } else { EntityManager <Hero> .EntityAdded -= OnEntityAdded; UpdateManager.Unsubscribe(OnUpdate); } }
private void EnabledValueChanged(object sender, OnValueChangeEventArgs args) { if (args.GetNewValue <bool>()) { UpdateManager.Subscribe(OnUpdate, 5000, enabled); EntityManager <Item> .EntityAdded += OnEntityAdded; } else { UpdateManager.Unsubscribe(OnUpdate); EntityManager <Item> .EntityAdded -= OnEntityAdded; } }
private void KeyPressed(object sender, OnValueChangeEventArgs onValueChangeEventArgs) { if (onValueChangeEventArgs.GetNewValue <KeyBind>()) { creeps.Clear(); config.Key.Item.ValueChanged -= KeyPressed; Game.ExecuteCommand("cl_fullupdate"); ObjectManager.OnAddEntity += OnAddEntity; Drawing.OnEndScene += OnEndScene; Drawing.OnDraw += OnDraw; UpdateManager.BeginInvoke(End, 1000 + config.TimeToShow); } }
private void OnValueChanged(object sender, OnValueChangeEventArgs onValueChangeEventArgs) { switch (onValueChangeEventArgs.GetNewValue <StringList>().SelectedIndex) { case 0: E.SetSkillshot(1.2f, 25f, float.MaxValue, false, SkillshotType.SkillshotCircle); break; case 1: E.SetSkillshot(0.85f, 50f, float.MaxValue, false, SkillshotType.SkillshotCircle); break; } }
private void HotkeyChanged(object sender, OnValueChangeEventArgs e) { var keyCode = e.GetNewValue <KeyBind>().Key; if (keyCode == e.GetOldValue <KeyBind>().Key) { return; } var key = KeyInterop.KeyFromVirtualKey((int)keyCode); this.OrbwalkerMode.Key = key; }
private void ComboKeyChanged(object sender, OnValueChangeEventArgs e) { var keyCode = e.GetNewValue <KeyBind>().Key; if (keyCode == e.GetOldValue <KeyBind>().Key) { return; } var key = KeyInterop.KeyFromVirtualKey((int)keyCode); VisageOrbwalking.Key = key; }
private static void MenuItem_ValueChanged(object sender, OnValueChangeEventArgs e) { var item = sender as MenuItem; if (item.Name == "menurange_dagger") menurange_dagger = e.GetNewValue<bool>(); if (item.Name == "menurange_aura") menurange_aura = e.GetNewValue<bool>(); if (item.Name == "menurange_exp") menurange_exp = e.GetNewValue<bool>(); if (item.Name == "menurange_atck") menurange_atck = e.GetNewValue<bool>(); if (item.Name == "menurange_coil") menurange_coil = e.GetNewValue<bool>(); }
private void EnabledValueChanged(object sender, OnValueChangeEventArgs args) { if (args.GetNewValue <bool>()) { UpdateManager.Subscribe(OnUpdate, 5000, enabled); Unit.OnModifierAdded += OnModifierAdded; } else { UpdateManager.Unsubscribe(OnUpdate); Unit.OnModifierAdded -= OnModifierAdded; } }
private void KeyPressed(object sender, OnValueChangeEventArgs onValueChangeEventArgs) { updateHandler.IsEnabled = onValueChangeEventArgs.GetNewValue <KeyBind>(); if (!config.CenterCamera) { return; } const string Command = "dota_camera_center_on_hero"; Game.ExecuteCommand((updateHandler.IsEnabled ? "+" : "-") + Command); }
private void HotkeyChanged(object sender, OnValueChangeEventArgs e) { var KeyCode = e.GetNewValue <KeyBind>().Key; if (KeyCode == e.GetOldValue <KeyBind>().Key) { return; } var Key = KeyInterop.KeyFromVirtualKey((int)KeyCode); Combo.Key = Key; }
public static void OnValueChanged(object sender, OnValueChangeEventArgs args) { var oldOne = args.GetOldValue<KeyBind>().Active; var newOne = args.GetNewValue<KeyBind>().Active; if (oldOne == newOne || newOne) return; try { _tks.Cancel(); _globalTarget = null; } catch (Exception) { // ignored } }
private static void OnValueChanged(object sender, OnValueChangeEventArgs onValueChangeEventArgs) { if (onValueChangeEventArgs.GetNewValue<bool>()) { CurrentPosition = new Render.Circle(ObjectManager.Player.Position, 100, Color.Red, 2); CurrentPosition.Add(); Text = new Render.Text(new Vector2(50, 50), "MODE: " + CurrentMode, 30, new ColorBGRA(255, 0, 0, 255)) { OutLined = true }; Text.Add(); } else { CurrentPosition.Remove(); Text.Remove(); } }
// ReSharper disable once InconsistentNaming private static void Hotkey_ValueChanged(object sender, OnValueChangeEventArgs e) { var newVal = e.GetNewValue<KeyBind>().Active; if (newVal != e.GetOldValue<KeyBind>().Active) { // Deactivate script if (!newVal) { pullCreep = null; } else { // Activate script var player = ObjectMgr.LocalPlayer; if (player == null || player.Team == Team.Observer) return; switch (player.Team) { case Team.Radiant: startTime = StartTimeRadiant; attackTime = AttackTimeRadiant; route = StackRouteRadiant; break; case Team.Dire: startTime = StartTimeDire; attackTime = AttackTimeDire; route = StackRouteDire; break; default: e.Process = false; return; } var units = player.Selection.ToList(); pullCreep = (Unit)units.FirstOrDefault(unit => unit is Unit && ((Unit)unit).IsControllable && ((Unit)unit).IsRanged); if (pullCreep != null) { pullCreep.Move(route.Last()); orderState = -1; } else e.Process = false; } } }
public static void OnValueChanged(object sender, OnValueChangeEventArgs args) { var oldOne = args.GetOldValue<KeyBind>().Active; var newOne = args.GetNewValue<KeyBind>().Active; if (oldOne == newOne || newOne) return; try { _tks.Cancel(); } catch (Exception) { // ignored } /*var oldOne = args.GetOldValue<KeyBind>().Key; var newOne = args.GetNewValue<KeyBind>().Key; if (oldOne == newOne) return; if (_myLittleCombo == null) return; _myLittleCombo.Dispose(); _myLittleCombo = new Combo(ComboFunction, (Key) newOne); Printer.Print($"[Key]: {(Key) newOne} | {newOne} | {(int)Key.D}");*/ }
private void OnEvadeModeChange(object sender, OnValueChangeEventArgs e) { var mode = e.GetNewValue<StringList>().SelectedValue; if (mode == "Very Smooth") { menu.Item("FastEvadeActivationTime").SetValue(new Slider(0, 0, 500)); menu.Item("RejectMinDistance").SetValue(new Slider(0, 0, 100)); menu.Item("ExtraCPADistance").SetValue(new Slider(0, 0, 150)); menu.Item("ExtraPingBuffer").SetValue(new Slider(40, 0, 200)); } else if (mode == "Smooth") { menu.Item("FastEvadeActivationTime").SetValue(new Slider(65, 0, 500)); menu.Item("RejectMinDistance").SetValue(new Slider(10, 0, 100)); menu.Item("ExtraCPADistance").SetValue(new Slider(10, 0, 150)); menu.Item("ExtraPingBuffer").SetValue(new Slider(65, 0, 200)); } }
//Menu berubah private static void MenuItem_ValueChanged(object sender, OnValueChangeEventArgs e) { var item = sender as MenuItem; if (item.Name == "ownTowers") ownTowers = e.GetNewValue<bool>(); else if (item.Name == "jarSer") jarSer = e.GetNewValue<bool>(); else enemyTowers = e.GetNewValue<bool>(); DisplayRange(); }
private static void Program_ValueChanged(object sender, OnValueChangeEventArgs e) { Throw.MinHitChance = GetHitChance(); }
private static void Program_ValueChanged1(object sender, OnValueChangeEventArgs e) { Throw.Range = 2500f - e.GetNewValue<Slider>().Value; }
private static void SwitchMisaya(object sender, OnValueChangeEventArgs e) { if (e.GetNewValue<bool>()) Config.Item("Normalcombo").SetValue(false); }
private static void ComboEModeChanged(object sender, OnValueChangeEventArgs e) { var mode = GetValue<StringList>("Combo", "EMode").SelectedIndex; GetItem("Combo", "EMode") .SetValue(new StringList(GetValue<StringList>("Combo", "EMode").SList, mode == 2 ? 0 : mode + 1)); }
private static void MultiLanguage_ValueChanged(object sender, OnValueChangeEventArgs e) { ChangeLanguage(e.GetNewValue<StringList>().SelectedIndex); }
private void AutoLevel_ValueChanged(object sender, OnValueChangeEventArgs ev) { if (isMenuEnabled("ALAct") && !aLInit) { var AutoLevel_I = new AutoLevel( getSequence( Menu.Item("ALSeq").GetValue<StringList>().SList[ Menu.Item("ALSeq").GetValue<StringList>().SelectedIndex])); aLInit = true; } AutoLevel.Enabled(ev.GetNewValue<bool>()); }
private void SliderRadiusValueChanged(object sender, OnValueChangeEventArgs e) { _previewCircle.SetRadius(e.GetNewValue<Slider>().Value); }
private void OnLoadPingTesterChange(object sender, OnValueChangeEventArgs e) { e.Process = false; if (pingTester == null) { pingTester = new PingTester(); } }
private void OnLoadSpellTesterChange(object sender, OnValueChangeEventArgs e) { e.Process = false; if (spellTester == null) { spellTester = new SpellTester(); } }
private static void autoPriorityItem_ValueChanged(object sender, OnValueChangeEventArgs e) { if (e.GetNewValue<bool>()) { foreach ( var enemy in ObjectManager.Get<Obj_AI_Hero>().Where(hero => hero.Team != ObjectManager.Player.Team)) { _config.Item("SimpleTS" + enemy.ChampionName + "Priority") .SetValue(new Slider(GetPriorityFromDb(enemy.ChampionName), 5, 1)); } } }