public override int GetHashCode() { int hash = 1; if (EventId.Length != 0) { hash ^= EventId.GetHashCode(); } if (parameters_ != null) { hash ^= Parameters.GetHashCode(); } if (UserId.Length != 0) { hash ^= UserId.GetHashCode(); } if (Username.Length != 0) { hash ^= Username.GetHashCode(); } if (Score_ != 0) { hash ^= Score_.GetHashCode(); } if (FullCombo != false) { hash ^= FullCombo.GetHashCode(); } if (Color.Length != 0) { hash ^= Color.GetHashCode(); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
public static void Game_OnUpdate(EventArgs args) { if (!OnUpdateChecks.CanUpdate()) { return; } MyHeroInfo.UpdatePosition(); var enemyHeroes = EnemyHeroes.UsableHeroes; var allyHeroes = AllyHeroes.UsableHeroes; GankDamage.UpdateDamage(enemyHeroes, allyHeroes); if (!Me.IsAlive || Me.IsChanneling() || Me.HasModifier("modifier_spirit_breaker_charge_of_darkness") || (MyAbilities.ChargeOfDarkness != null && MyAbilities.ChargeOfDarkness.IsValid && MyAbilities.ChargeOfDarkness.IsInAbilityPhase) || !Utils.SleepCheck("Ability#.Sleep")) { return; } var keyDown = Game.IsKeyDown(MainMenu.ComboKeysMenu.Item("abilityKey1").GetValue <KeyBind>().Key); if (Utils.SleepCheck("cancelorder") || !keyDown) { if (lastOrderPosition != Vector3.Zero && lastActivity == NetworkActivity.Move) { var ctarget = TargetSelector.ClosestToMouse(Me, 150); if (ctarget != null && ctarget.IsValid) { Me.Attack(ctarget); } else { Me.Move(lastOrderPosition); } lastOrderPosition = Vector3.Zero; } } else { lastActivity = Me.NetworkActivity; lastOrderPosition = Game.MousePosition; } var ping = Game.Ping; var invisible = Me.IsInvisible() && Me.ClassID != ClassID.CDOTA_Unit_Hero_Riki && (!Me.HasModifier("modifier_templar_assassin_meld") || !Orbwalking.CanCancelAnimation()); if (!invisible && MainMenu.Menu.Item("Ability#.EnableAutoUsage").GetValue <bool>() && MyAbilities.DefensiveAbilities.Any() && Utils.SleepCheck("casting")) { if (Utils.SleepCheck("Orbwalk.Attack") && allyHeroes.Any(allyHero => FullCombo.DeffensiveAutoUsage(allyHero, Me, enemyHeroes, ping))) { return; } } var targetLock = MainMenu.ComboKeysMenu.Item("Ability.KeyCombo.TargetLock").GetValue <StringList>().SelectedIndex; if (!keyDown) { target = null; } if (Game.IsChatOpen) { return; } var meMissingHp = Me.MaximumHealth - Me.Health; var meMana = Me.Mana; ManageAutoAttack.UpdateAutoAttack(); if (keyDown) { if (Utils.SleepCheck("UpdateTarget") && (target == null || !target.IsValid || !target.IsAlive || !target.IsVisible || (target.IsVisible && targetLock <= 1))) { var mode = MainMenu.ComboKeysMenu.Item("Ability.KeyCombo.Target").GetValue <StringList>().SelectedIndex; target = mode == 0 ? TargetSelector.ClosestToMouse(Me, 2000) : EnemyHeroes.UsableHeroes.Where(x => x.Distance2D(Me) < 2000) .MaxOrDefault(x => x.GetDoableDamage()); Utils.Sleep(250, "UpdateTarget"); } var selectedCombo = MainMenu.ComboKeysMenu.Item("abilityComboType").GetValue <StringList>().SelectedIndex; var combo = false; if (!invisible && target != null && Orbwalking.CanCancelAnimation() && Utils.SleepCheck("Orbwalk.Attack")) { combo = FullCombo.Execute( target, enemyHeroes, ping, selectedCombo == 2, selectedCombo == 1, Me, meMana, selectedCombo == 3); } if (!combo && (target == null || (target.Distance2D(MyHeroInfo.Position) > 500 && Me.HasModifier("modifier_pudge_rot") && !target.HasModifier("modifier_pudge_meat_hook"))) && AllyHeroes.AbilityDictionary.ContainsKey(Me.StoredName())) { foreach (var ability in AllyHeroes.AbilityDictionary[Me.StoredName()].Where(x => x.IsToggled)) { var handle = ability.Handle.ToString(); if (!Utils.SleepCheck(handle)) { continue; } ability.ToggleAbility(); Utils.Sleep(500 + Game.Ping, handle); return; } } if (Me.ClassID == ClassID.CDOTA_Unit_Hero_TemplarAssassin && target != null && target.IsVisible) { var meld = Me.Spellbook.SpellW; if (meld.ManaCost <= meMana && meld.Cooldown >= 0 && meld.Cooldown < UnitDatabase.GetAttackRate(Me) && target.Health > Dictionaries.HitDamageDictionary[target.Handle] * 2) { if (!Utils.SleepCheck("Ability.Move")) { return; } Me.Move(Game.MousePosition); Utils.Sleep(100, "Ability.Move"); return; } } if (combo || !Utils.SleepCheck("GlobalCasting") || (!(Game.MousePosition.Distance2D(Me) > MainMenu.ComboKeysMenu.Item("Ability.KeyCombo.NoMoveRange").GetValue <Slider>().Value) && (target == null || !(Me.Distance2D(target) <= MyHeroInfo.AttackRange() + 100)))) { return; } MoveMode(target); } if (!invisible && MainMenu.Menu.Item("Ability#.EnableAutoKillSteal").GetValue <bool>() && Utils.SleepCheck("casting")) { Variables.Killsteal.FindTarget(enemyHeroes, Me); if (Variables.Killsteal.TryKillsteal(Me, ping, enemyHeroes)) { return; } } if (!invisible && MainMenu.Menu.Item("Ability#.EnableAutoUsage").GetValue <bool>() && Utils.SleepCheck("Orbwalk.Attack") && enemyHeroes.Any( enemyHero => Variables.AutoUsage.Try(enemyHero, enemyHeroes, meMissingHp, ping, Me, meMana))) { return; } }
private static void Menus() { Br = MainMenu.AddMenu("Brand", "Brand"); // Pre = Br.AddSubMenu("Prediction"); Pre.AddLabel("Predictions"); Pre.Add("Qp", new Slider("Prediction [Q]", 75, 1)); Pre.Add("Wp", new Slider("Prediction [W]", 50, 1)); // Comb = Br.AddSubMenu("Combo"); Comb.Add("Qc", new CheckBox("Use [Q]")); Comb.Add("Wc", new CheckBox("Use [W]")); Comb.Add("Ec", new CheckBox("Use [E]")); Comb.AddSeparator(); Comb.AddLabel("Settings [R] Combo"); Comb.Add("Rc", new CheckBox("Use [R]")); Comb.Add("En", new Slider("Max Range Radiun Enemys > %", 2, 1, 5)); Comb.Add("stack", new CheckBox("Use Stack Passive", false)); // Hara = Br.AddSubMenu("AutoHarass"); Hara.Add("AutoW", new CheckBox("Use Auto[W]")); Hara.AddSeparator(); Hara.AddLabel("Mana Percent"); Hara.Add("Mana", new Slider("Mana Percent Auto [W] > %", 50, 1)); // FullCombo = Br.AddSubMenu("FullCombo"); FullCombo.Add("Eb", new CheckBox("Use FullCombo")); // Lane = Br.AddSubMenu("LaneClear"); Lane.Add("Ql", new CheckBox("Use [Q] Lane", false)); Lane.Add("Wl", new CheckBox("Use [W] Lane")); Lane.Add("El", new CheckBox("Use [E] Lane")); Lane.AddSeparator(); Lane.AddLabel("Mana Percent"); Lane.Add("manal", new Slider("Mana Percent > %", 50, 1)); Lane.AddSeparator(); Lane.AddLabel("Minion Percent"); Lane.Add("Wmin", new Slider("Minion Percent > %", 3, 1, 6)); // Jungle = Br.AddSubMenu("JungleClear"); Jungle.Add("Qj", new CheckBox("Use [Q]")); Jungle.Add("Wj", new CheckBox("Use [W]")); Jungle.Add("Ej", new CheckBox("Use [E]")); Jungle.AddSeparator(); Jungle.AddLabel("Mana Percent"); Jungle.Add("manaj", new Slider("Mana Percent > %", 50, 1)); // Misc = Br.AddSubMenu("Misc"); Misc.Add("In", new CheckBox("Use Interrupt")); Misc.Add("Gap", new CheckBox("Use GapClose")); // KillSteal = Br.AddSubMenu("KillSteal"); KillSteal.Add("KsQ", new CheckBox("Use [Q] KS")); KillSteal.Add("KsW", new CheckBox("Use [W] KS")); KillSteal.Add("KsE", new CheckBox("Use [E] KS")); KillSteal.Add("KsR", new CheckBox("Use [R] KS")); // Draws = Br.AddSubMenu("Draws"); Draws.Add("DQ", new CheckBox("Use Draw [Q]")); Draws.Add("DW", new CheckBox("Use Draw [W]")); Draws.Add("DE", new CheckBox("Use Draw [E]")); Draws.Add("DR", new CheckBox("Use Draw [R]")); }
public static void Game_OnUpdate(EventArgs args) { if (!OnUpdateChecks.CanUpdate()) { return; } MyHeroInfo.UpdatePosition(); ManageAutoAttack.UpdateAutoAttack(); var enemyHeroes = EnemyHeroes.UsableHeroes; var allyHeroes = AllyHeroes.UsableHeroes; GankDamage.UpdateDamage(enemyHeroes, allyHeroes); if (!Me.IsAlive || (Me.IsInvisible() && !Me.IsVisibleToEnemies && Me.ClassID != ClassID.CDOTA_Unit_Hero_Riki && (Me.Modifiers.All(x => x.Name != "modifier_templar_assassin_meld") || !Orbwalking.CanCancelAnimation())) || Me.IsChanneling()) { return; } if (Utils.SleepCheck("cancelorder")) { if (lastOrderPosition != Vector3.Zero) { var ctarget = TargetSelector.ClosestToMouse(Me, 150); if (ctarget != null) { Me.Attack(ctarget); } else { Me.Attack(lastOrderPosition); } lastOrderPosition = Vector3.Zero; } } else { lastOrderPosition = Game.MousePosition; } var meModifiers = Me.Modifiers.ToList(); var ping = Game.Ping; if (LaunchSnowball(meModifiers)) { return; } if (MyAbilities.DeffensiveAbilities.Any() && Utils.SleepCheck("casting")) { if (allyHeroes.Any(allyHero => FullCombo.DeffensiveAutoUsage(allyHero, Me, enemyHeroes, ping))) { return; } } if (!MyAbilities.OffensiveAbilities.Any()) { if (Game.IsChatOpen) { return; } if (Game.IsKeyDown(MainMenu.ComboKeysMenu.Item("abilityKey1").GetValue <KeyBind>().Key)) { if (Utils.SleepCheck("UpdateTarget")) { target = TargetSelector.ClosestToMouse(Me, 2000); Utils.Sleep(250, "UpdateTarget"); } if (target != null && !target.IsValid) { target = null; } if (Utils.SleepCheck("GlobalCasting")) { Orbwalking.Orbwalk(target, attackmodifiers: true); } } } if (Utils.SleepCheck("casting")) { if (FullCombo.KillSteal(enemyHeroes, ping, Me)) { return; } } var meMissingHp = Me.MaximumHealth - Me.Health; var meMana = Me.Mana; if ( enemyHeroes.Any( enemyHero => FullCombo.AutoUsage(enemyHero, enemyHeroes, meMissingHp, meModifiers, ping, Me, meMana))) { return; } if (Game.IsChatOpen) { return; } if (Game.IsKeyDown(MainMenu.ComboKeysMenu.Item("abilityKey1").GetValue <KeyBind>().Key)) { if (Utils.SleepCheck("UpdateTarget")) { target = TargetSelector.ClosestToMouse(Me, 2000); Utils.Sleep(250, "UpdateTarget"); } if (target != null && !target.IsValid) { target = null; } var selectedCombo = MainMenu.ComboKeysMenu.Item("abilityComboType").GetValue <StringList>().SelectedIndex; if (target != null && Utils.SleepCheck("Orbwalk.Attack")) { FullCombo.Execute( target, enemyHeroes, ping, selectedCombo == 2, selectedCombo == 1, Me, meModifiers, meMana); } if (Me.ClassID == ClassID.CDOTA_Unit_Hero_TemplarAssassin && target != null && target.IsVisible) { var meld = Me.Spellbook.SpellW; if (meld.ManaCost <= meMana && meld.Cooldown >= 0 && meld.Cooldown < UnitDatabase.GetAttackRate(Me) && target.Health > Dictionaries.HitDamageDictionary[target.Handle] * 2) { if (!Utils.SleepCheck("Ability.Move")) { return; } Me.Move(Game.MousePosition); Utils.Sleep(100, "Ability.Move"); return; } } if (Utils.SleepCheck("GlobalCasting")) { Orbwalking.Orbwalk(target, attackmodifiers: true); } } }
public static void Game_OnUpdate(EventArgs args) { if (!OnUpdateChecks.CanUpdate()) { return; } MyHeroInfo.UpdatePosition(); ManageAutoAttack.UpdateAutoAttack(); var enemyHeroes = EnemyHeroes.UsableHeroes; var allyHeroes = AllyHeroes.UsableHeroes; GankDamage.UpdateDamage(enemyHeroes, allyHeroes); if (!Me.IsAlive || (Me.IsInvisible() && !Me.IsVisibleToEnemies && Me.ClassID != ClassID.CDOTA_Unit_Hero_Riki && (!Me.HasModifier("modifier_templar_assassin_meld") || !Orbwalking.CanCancelAnimation())) || Me.IsChanneling()) { return; } if (Utils.SleepCheck("cancelorder")) { if (lastOrderPosition != Vector3.Zero && lastActivity == NetworkActivity.Move) { var ctarget = TargetSelector.ClosestToMouse(Me, 150); if (ctarget != null && ctarget.IsValid) { Me.Attack(ctarget); } else { Me.Move(lastOrderPosition); } lastOrderPosition = Vector3.Zero; } } else { lastActivity = Me.NetworkActivity; lastOrderPosition = Game.MousePosition; } var ping = Game.Ping; if (MyAbilities.DeffensiveAbilities.Any() && Utils.SleepCheck("casting")) { if (Utils.SleepCheck("Orbwalk.Attack") && allyHeroes.Any(allyHero => FullCombo.DeffensiveAutoUsage(allyHero, Me, enemyHeroes, ping))) { return; } } var targetLock = MainMenu.ComboKeysMenu.Item("Ability.KeyCombo.TargetLock").GetValue <StringList>().SelectedIndex; var keyDown = Game.IsKeyDown(MainMenu.ComboKeysMenu.Item("abilityKey1").GetValue <KeyBind>().Key); if (!keyDown) { target = null; } if (!MyAbilities.OffensiveAbilities.Any()) { if (Game.IsChatOpen) { return; } if (keyDown) { if (Utils.SleepCheck("UpdateTarget") && (target == null || !target.IsValid || !target.IsAlive || (!target.IsVisible && targetLock == 0))) { var mode = MainMenu.ComboKeysMenu.Item("Ability.KeyCombo.Target").GetValue <StringList>().SelectedIndex; target = mode == 0 ? TargetSelector.ClosestToMouse(Me, 2000) : EnemyHeroes.UsableHeroes.Where(x => x.Distance2D(Me) < 2000) .MaxOrDefault(x => x.GetDoableDamage()); Utils.Sleep(250, "UpdateTarget"); } if (target != null && !target.IsValid) { target = null; } if (Utils.SleepCheck("GlobalCasting") && (Game.MousePosition.Distance2D(Me) > MainMenu.ComboKeysMenu.Item("Ability.KeyCombo.NoMoveRange").GetValue <Slider>().Value || (target != null && Me.Distance2D(target) <= MainMenu.ComboKeysMenu.Item("Ability.KeyCombo.NoMoveRange").GetValue <Slider>().Value))) { var mode = MainMenu.ComboKeysMenu.Item("Ability.KeyCombo.Mode").GetValue <StringList>().SelectedIndex; switch (mode) { case 0: Orbwalking.Orbwalk(target, attackmodifiers: true); break; case 1: if (!Utils.SleepCheck("Ability.Move")) { return; } Me.Move(Game.MousePosition); Utils.Sleep(100, "Ability.Move"); break; case 2: if (!Utils.SleepCheck("Ability.Move") || target == null) { return; } Me.Attack(target); Utils.Sleep(100, "Ability.Move"); break; case 3: return; } } } } var meMissingHp = Me.MaximumHealth - Me.Health; var meMana = Me.Mana; if (Utils.SleepCheck("Orbwalk.Attack") && enemyHeroes.Any( enemyHero => FullCombo.AutoUsage(enemyHero, enemyHeroes, meMissingHp, ping, Me, meMana))) { return; } if (Utils.SleepCheck("casting")) { if (FullCombo.KillSteal(enemyHeroes, ping, Me)) { return; } } if (Game.IsChatOpen) { return; } if (keyDown) { if (Utils.SleepCheck("UpdateTarget") && (target == null || !target.IsValid || !target.IsAlive || (!target.IsVisible && targetLock == 0))) { var mode = MainMenu.ComboKeysMenu.Item("Ability.KeyCombo.Target").GetValue <StringList>().SelectedIndex; target = mode == 0 ? TargetSelector.ClosestToMouse(Me, 2000) : EnemyHeroes.UsableHeroes.Where(x => x.Distance2D(Me) < 2000) .MaxOrDefault(x => x.GetDoableDamage()); Utils.Sleep(250, "UpdateTarget"); } var selectedCombo = MainMenu.ComboKeysMenu.Item("abilityComboType").GetValue <StringList>().SelectedIndex; if (target != null && Utils.SleepCheck("Orbwalk.Attack")) { var combo = FullCombo.Execute( target, enemyHeroes, ping, selectedCombo == 2, selectedCombo == 1, Me, meMana); } if (Me.ClassID == ClassID.CDOTA_Unit_Hero_TemplarAssassin && target != null && target.IsVisible) { var meld = Me.Spellbook.SpellW; if (meld.ManaCost <= meMana && meld.Cooldown >= 0 && meld.Cooldown < UnitDatabase.GetAttackRate(Me) && target.Health > Dictionaries.HitDamageDictionary[target.Handle] * 2) { if (!Utils.SleepCheck("Ability.Move")) { return; } Me.Move(Game.MousePosition); Utils.Sleep(100, "Ability.Move"); return; } } if (Utils.SleepCheck("GlobalCasting") && (Game.MousePosition.Distance2D(Me) > MainMenu.ComboKeysMenu.Item("Ability.KeyCombo.NoMoveRange").GetValue <Slider>().Value || (target != null && Me.Distance2D(target) <= MainMenu.ComboKeysMenu.Item("Ability.KeyCombo.NoMoveRange").GetValue <Slider>().Value))) { var mode = MainMenu.ComboKeysMenu.Item("Ability.KeyCombo.Mode").GetValue <StringList>().SelectedIndex; switch (mode) { case 0: Orbwalking.Orbwalk(target, attackmodifiers: true); break; case 1: if (!Utils.SleepCheck("Ability.Move")) { return; } Me.Move(Game.MousePosition); Utils.Sleep(100, "Ability.Move"); break; case 2: if (!Utils.SleepCheck("Ability.Move") || target == null) { return; } Me.Attack(target); Utils.Sleep(100, "Ability.Move"); break; case 3: return; } } } }