private static float GetComboDamage(Obj_AI_Hero enemy) { double damage = 0d; if (Q.IsReady()) { damage += Player.GetSpellDamage(enemy, SpellSlot.Q) + Player.GetSpellDamage(enemy, SpellSlot.Q, 1); } if (W.IsReady()) { damage += Player.GetSpellDamage(enemy, SpellSlot.W); } if (E.IsReady()) { damage += Player.GetSpellDamage(enemy, SpellSlot.E); } if (R.IsReady() || (ObjectManager.Player.Spellbook.GetSpell(SpellSlot.R).State == SpellState.Surpressed && R.Level > 0)) { damage += Player.GetSpellDamage(enemy, SpellSlot.R) * 8; } if (IgniteSlot.IsReady()) { damage += IgniteHandler.GetIgniteDamage(enemy); } return((float)damage); }
private static void KillSteal() { foreach (var enemy in ObjectManager.Get <Obj_AI_Hero>().Where(p => p.IsEnemy && !p.IsDead && p.IsValidTarget(E.Range + Q.Range) && !p.IsInvulnerable)) { if (enemy.Health + enemy.HPRegenRate < Q.GetDamage(enemy) && Q.IsReady() && Config.Item("TK/ks/q").GetValue <bool>()) { if (enemy.IsValidTarget(Q.Range)) { if (Config.Item("TK/misc/humanizer").GetValue <bool>()) { Utility.DelayAction.Add(Config.Item("TK/misc/q/humanizer").GetValue <Slider>().Value, () => Q.Cast(enemy)); } else { Q.Cast(enemy); } } } else if ((Q.GetDamage(enemy)) > enemy.Health + enemy.HPRegenRate && Config.Item("TK/ks/q").GetValue <bool>() && !enemy.IsValidTarget(Q.Range) && enemy.IsValidTarget(Q.Range + Player.Distance(GetFarthestMinion(Player.Position, enemy.Position).Position)) && Q.IsReady() && E.IsReady()) { if (Config.Item("TK/ks/e/mode").GetValue <StringList>().SelectedIndex == 0) { if (Config.Item("TK/ks/e").GetValue <bool>()) { if (Config.Item("TK/misc/humanizer").GetValue <bool>()) { Utility.DelayAction.Add(Config.Item("TK/misc/e/humanizer").GetValue <Slider>().Value, () => E.Cast(GetClosestMinion(Player.Position, enemy.Position))); } else { E.Cast(GetClosestMinion(Player.Position, enemy.Position)); } //E.Cast(qtarget); } } else if (Config.Item("TK/ks/e/mode").GetValue <StringList>().SelectedIndex == 1) { if (Config.Item("TK/ks/e").GetValue <bool>() && GetClosestMinion(Player.Position, enemy.Position).CountEnemiesInRange(1000f) <= Config.Item("TK/misc/e/mode/#").GetValue <Slider>().Value) { if (Config.Item("TK/misc/humanizer").GetValue <bool>()) { Utility.DelayAction.Add(Config.Item("TK/misc/e/humanizer").GetValue <Slider>().Value, () => E.Cast(GetClosestMinion(Player.Position, enemy.Position))); } else { E.Cast(GetClosestMinion(Player.Position, enemy.Position)); } } } } else if (enemy.Health + enemy.HPRegenRate < W.GetDamage(enemy) && W.IsReady() && Config.Item("TK/ks/w").GetValue <bool>()) { if (enemy.IsValidTarget(W.Range)) { if (Config.Item("TK/misc/humanizer").GetValue <bool>()) { Utility.DelayAction.Add(Config.Item("TK/misc/w/humanizer").GetValue <Slider>().Value, () => W.Cast()); } else { W.Cast(); } } } else if ((W.GetDamage(enemy)) > enemy.Health + enemy.HPRegenRate && !enemy.IsValidTarget(W.Range) && enemy.IsValidTarget(W.Range + Player.Distance(GetFarthestMinion(Player.Position, enemy.Position).Position)) && W.IsReady() && E.IsReady() && Config.Item("TK/ks/w").GetValue <bool>()) { if (Config.Item("TK/ks/e/mode").GetValue <StringList>().SelectedIndex == 0) { if (Config.Item("TK/ks/e").GetValue <bool>()) { if (Config.Item("TK/misc/humanizer").GetValue <bool>()) { Utility.DelayAction.Add(Config.Item("TK/misc/e/humanizer").GetValue <Slider>().Value, () => E.Cast(GetClosestMinion(Player.Position, enemy.Position))); } else { E.Cast(GetClosestMinion(Player.Position, enemy.Position)); } //E.Cast(qtarget); } } else if (Config.Item("TK/ks/e/mode").GetValue <StringList>().SelectedIndex == 1) { if (Config.Item("TK/ks/e").GetValue <bool>() && GetClosestMinion(Player.Position, enemy.Position).CountEnemiesInRange(1000f) <= Config.Item("TK/misc/e/mode/#").GetValue <Slider>().Value) { if (Config.Item("TK/misc/humanizer").GetValue <bool>()) { Utility.DelayAction.Add(Config.Item("TK/misc/e/humanizer").GetValue <Slider>().Value, () => E.Cast(GetClosestMinion(Player.Position, enemy.Position))); } else { E.Cast(GetClosestMinion(Player.Position, enemy.Position)); } } } } else if (Config.Item("TK/ks/r/mode").GetValue <StringList>().SelectedIndex == 1 && enemy.Health + enemy.HPRegenRate < (R.GetDamage(enemy) / 2) && R.IsReady() && Config.Item("TK/ks/r").GetValue <bool>()) { if (enemy.IsValidTarget(R.Range - 50)) { if (Config.Item("TK/misc/humanizer").GetValue <bool>()) { Utility.DelayAction.Add(Config.Item("TK/misc/r/humanizer").GetValue <Slider>().Value, () => R.Cast()); } else { R.Cast(); } } } else if (Config.Item("TK/ks/r/mode").GetValue <StringList>().SelectedIndex == 0 && enemy.Health + enemy.HPRegenRate < (R.GetDamage(enemy)) && R.IsReady() && Config.Item("TK/ks/r").GetValue <bool>()) { if (enemy.IsValidTarget(R.Range - 50)) { if (Config.Item("TK/misc/humanizer").GetValue <bool>()) { Utility.DelayAction.Add(Config.Item("TK/misc/r/humanizer").GetValue <Slider>().Value, () => R.Cast()); } else { R.Cast(); } } } else if (Config.Item("TK/ks/r/mode").GetValue <StringList>().SelectedIndex == 1 && (R.GetDamage(enemy) / 2) > enemy.Health + enemy.HPRegenRate && !enemy.IsValidTarget(R.Range - 50) && enemy.IsValidTarget((R.Range - 50) + Player.Distance(GetFarthestMinion(Player.Position, enemy.Position).Position)) && R.IsReady() && E.IsReady() && Config.Item("TK/ks/r").GetValue <bool>()) { if (Config.Item("TK/ks/e/mode").GetValue <StringList>().SelectedIndex == 0) { if (Config.Item("TK/ks/e").GetValue <bool>()) { if (Config.Item("TK/misc/humanizer").GetValue <bool>()) { Utility.DelayAction.Add(Config.Item("TK/misc/e/humanizer").GetValue <Slider>().Value, () => E.Cast(GetClosestMinion(Player.Position, enemy.Position))); } else { E.Cast(GetClosestMinion(Player.Position, enemy.Position)); } //E.Cast(qtarget); } } else if (Config.Item("TK/ks/e/mode").GetValue <StringList>().SelectedIndex == 1) { if (Config.Item("TK/ks/e").GetValue <bool>() && GetClosestMinion(Player.Position, enemy.Position).CountEnemiesInRange(1000f) <= Config.Item("TK/misc/e/mode/#").GetValue <Slider>().Value) { if (Config.Item("TK/misc/humanizer").GetValue <bool>()) { Utility.DelayAction.Add(Config.Item("TK/misc/e/humanizer").GetValue <Slider>().Value, () => E.Cast(GetClosestMinion(Player.Position, enemy.Position))); } else { E.Cast(GetClosestMinion(Player.Position, enemy.Position)); } } } } else if (Config.Item("TK/ks/r/mode").GetValue <StringList>().SelectedIndex == 0 && (R.GetDamage(enemy)) > enemy.Health + enemy.HPRegenRate && !enemy.IsValidTarget(R.Range - 50) && enemy.IsValidTarget((R.Range - 50) + Player.Distance(GetFarthestMinion(Player.Position, enemy.Position).Position)) && R.IsReady() && E.IsReady() && Config.Item("TK/ks/r").GetValue <bool>()) { if (Config.Item("TK/ks/e/mode").GetValue <StringList>().SelectedIndex == 0) { if (Config.Item("TK/ks/e").GetValue <bool>()) { if (Config.Item("TK/misc/humanizer").GetValue <bool>()) { Utility.DelayAction.Add(Config.Item("TK/misc/e/humanizer").GetValue <Slider>().Value, () => E.Cast(GetClosestMinion(Player.Position, enemy.Position))); } else { E.Cast(GetClosestMinion(Player.Position, enemy.Position)); } //E.Cast(qtarget); } } else if (Config.Item("TK/ks/e/mode").GetValue <StringList>().SelectedIndex == 1) { if (Config.Item("TK/ks/e").GetValue <bool>() && GetClosestMinion(Player.Position, enemy.Position).CountEnemiesInRange(1000f) <= Config.Item("TK/misc/e/mode/#").GetValue <Slider>().Value) { if (Config.Item("TK/misc/humanizer").GetValue <bool>()) { Utility.DelayAction.Add(Config.Item("TK/misc/e/humanizer").GetValue <Slider>().Value, () => E.Cast(GetClosestMinion(Player.Position, enemy.Position))); } else { E.Cast(GetClosestMinion(Player.Position, enemy.Position)); } } } } else if (Config.Item("TK/summoners/ignite").GetValue <bool>() && enemy.Health + enemy.HPRegenRate < IgniteHandler.GetIgniteDamage(enemy)) { if (enemy.IsValidTarget(IgniteHandler.IgniteRange)) { ObjectManager.Player.Spellbook.CastSpell(IgniteSlot, enemy); } } else if (!enemy.IsValidTarget(IgniteHandler.IgniteRange) && enemy.IsValidTarget(IgniteHandler.IgniteRange + Player.Distance(GetFarthestMinion(Player.Position, enemy.Position).Position)) && IgniteHandler.GetIgniteDamage(enemy) > enemy.Health + enemy.HPRegenRate && E.IsReady() && Config.Item("TK/summoners/ignite").GetValue <bool>()) { if (Config.Item("TK/ks/e/mode").GetValue <StringList>().SelectedIndex == 0) { if (Config.Item("TK/ks/e").GetValue <bool>()) { if (Config.Item("TK/misc/humanizer").GetValue <bool>()) { Utility.DelayAction.Add(Config.Item("TK/misc/e/humanizer").GetValue <Slider>().Value, () => E.Cast(GetClosestMinion(Player.Position, enemy.Position))); } else { E.Cast(GetClosestMinion(Player.Position, enemy.Position)); } //E.Cast(qtarget); } } else if (Config.Item("TK/ks/e/mode").GetValue <StringList>().SelectedIndex == 1) { if (Config.Item("TK/ks/e").GetValue <bool>() && GetClosestMinion(Player.Position, enemy.Position).CountEnemiesInRange(1000f) <= Config.Item("TK/misc/e/mode/#").GetValue <Slider>().Value) { if (Config.Item("TK/misc/humanizer").GetValue <bool>()) { Utility.DelayAction.Add(Config.Item("TK/misc/e/humanizer").GetValue <Slider>().Value, () => E.Cast(GetClosestMinion(Player.Position, enemy.Position))); } else { E.Cast(GetClosestMinion(Player.Position, enemy.Position)); } } } } } }
static void Game_OnGameLoad(EventArgs args) { if (Player.ChampionName != Katarina) { return; } Game.PrintChat("TehKatarina Loaded!"); Q = new Spell(SpellSlot.Q, 675); W = new Spell(SpellSlot.W, 375); E = new Spell(SpellSlot.E, 700); R = new Spell(SpellSlot.R, 550); IgniteHandler.Run(); Spells.Add(Q); Spells.Add(W); Spells.Add(E); Spells.Add(R); Config = new Menu("TehKatarina", "TehKatarina", true); Config.AddSubMenu(new Menu("Orbwalking", "Orbwalking")); //Orbwalker = new Orbwalking.Orbwalker(Config.SubMenu("Orbwalking")); Config.AddSubMenu(OrbwalkerMenu); xSLxOrbwalker.AddToMenu(OrbwalkerMenu); var targetselectormenu = new Menu("Target Selector", "Target Selector"); TargetSelector.AddToMenu(targetselectormenu); Config.AddSubMenu(targetselectormenu); //done Config.AddSubMenu(new Menu("TehKatarina - Combo", "TK/combo")); Config.SubMenu("TK/combo").AddItem(new MenuItem("TK/combo/q", "Use Bouncing Blades (Q)").SetValue(true)); Config.SubMenu("TK/combo").AddItem(new MenuItem("TK/combo/w", "Use Sinister Steel (W)").SetValue(true)); Config.SubMenu("TK/combo").AddItem(new MenuItem("TK/combo/e", "Use Shunpo (E)").SetValue(true)); Config.SubMenu("TK/combo").AddItem(new MenuItem("TK/combo/r", "Use Death Lotus (R)").SetValue(true)); Config.SubMenu("TK/combo").AddItem(new MenuItem("TK/combo/spacer", " ")); Config.SubMenu("TK/combo").AddItem(new MenuItem("TK/combo/w/mode", "Sinister Steel (W) Mode").SetValue(new StringList(new[] { "Normal", "Enemy Marked" }))); Config.SubMenu("TK/combo").AddItem(new MenuItem("TK/combo/e/mode", "Shunpo (E) Mode").SetValue(new StringList(new[] { "Normal", "Safe Shunpo" }, 1))); Config.SubMenu("TK/combo").AddItem(new MenuItem("TK/combo/r/mode", "Min Enemies for Death Lotus (R)").SetValue(new Slider(1, 1, 5))); //done Config.AddSubMenu(new Menu("TehKatarina - Harass", "TK/harass")); Config.SubMenu("TK/harass").AddItem(new MenuItem("TK/harass/q", "Use Bouncing Blades (Q)").SetValue(true)); Config.SubMenu("TK/harass").AddItem(new MenuItem("TK/harass/w", "Use Sinister Steel (W)").SetValue(true)); Config.SubMenu("TK/harass").AddItem(new MenuItem("TK/harass/spacer", " ")); Config.SubMenu("TK/harass").AddItem(new MenuItem("TK/harass/system", "Harass Active").SetValue(new KeyBind('I', KeyBindType.Toggle))); //done Config.AddSubMenu(new Menu("TehKatarina - Kill Steal", "TK/ks")); Config.SubMenu("TK/ks").AddItem(new MenuItem("TK/ks/q", "Use Bouncing Blades (Q)").SetValue(true)); Config.SubMenu("TK/ks").AddItem(new MenuItem("TK/ks/w", "Use Sinister Steel (W)").SetValue(true)); Config.SubMenu("TK/ks").AddItem(new MenuItem("TK/ks/e", "Use Shunpo (E)").SetValue(true)); Config.SubMenu("TK/ks").AddItem(new MenuItem("TK/ks/r", "Use Death Lotus (R)").SetValue(true)); Config.SubMenu("TK/ks").AddItem(new MenuItem("TK/ks/spacer", " ")); Config.SubMenu("TK/ks").AddItem(new MenuItem("TK/ks/system", "Use Smart KS System").SetValue(true)); Config.SubMenu("TK/ks").AddItem(new MenuItem("TK/ks/e/mode", "Shunpo (E) Mode").SetValue(new StringList(new[] { "Normal", "Safe Shunpo" }, 1))); Config.SubMenu("TK/ks").AddItem(new MenuItem("TK/ks/r/mode", "Death Lotus (R) Mode").SetValue(new StringList(new[] { "Full HP", "Half HP" }, 1))); //done if (IgniteSlot != SpellSlot.Unknown) { Config.AddSubMenu(new Menu("TehKatarina - Summoners", "TK/summoners")); Config.SubMenu("TK/summoners").AddItem(new MenuItem("TK/summoners/ignite", "Use Smart Ignite").SetValue(true)); } //done Config.AddSubMenu(new Menu("TehKatarina - Last Hit", "TK/lasthit")); Config.SubMenu("TK/lasthit").AddItem(new MenuItem("TK/lasthit/q", "Use Bouncing Blades (Q)").SetValue(true)); Config.SubMenu("TK/lasthit").AddItem(new MenuItem("TK/lasthit/w", "Use Sinister Steel (W)").SetValue(true)); Config.SubMenu("TK/lasthit").AddItem(new MenuItem("TK/lasthit/spacer", " ")); Config.SubMenu("TK/lasthit").AddItem(new MenuItem("TK/lasthit/w/#", "Sinister Steel (W) Min Minions").SetValue(new Slider(1, 1, 5))); //done Config.AddSubMenu(new Menu("TehKatarina - Drawings", "TK/drawings")); Config.SubMenu("TK/drawings").AddItem(new MenuItem("TK/drawings/toggle", "Drawings").SetValue(true)); Config.SubMenu("TK/drawings").AddItem(new MenuItem("TK/drawings/q", "Draw Bouncing Blades (Q)").SetValue(new Circle(true, System.Drawing.Color.FromArgb(255, 255, 255, 255)))); Config.SubMenu("TK/drawings").AddItem(new MenuItem("TK/drawings/w", "Draw Sinister Steel (W)").SetValue(new Circle(true, System.Drawing.Color.FromArgb(255, 255, 255, 255)))); Config.SubMenu("TK/drawings").AddItem(new MenuItem("TK/drawings/e", "Draw Shunpo (E)").SetValue(new Circle(true, System.Drawing.Color.FromArgb(255, 255, 255, 255)))); Config.SubMenu("TK/drawings").AddItem(new MenuItem("TK/drawings/r", "Draw Death Lotus (R)").SetValue(new Circle(true, System.Drawing.Color.FromArgb(255, 255, 255, 255)))); Config.SubMenu("TK/drawings").AddItem(new MenuItem("TK/drawings/target", "Draw Target").SetValue(new Circle(true, System.Drawing.Color.FromArgb(255, 0, 255, 255)))); MenuItem drawComboDamageMenu = new MenuItem("Draw_ComboDamage", "Draw Combo Damage", true).SetValue(true); MenuItem drawFill = new MenuItem("Draw_Fill", "Draw Combo Damage Fill", true).SetValue(new Circle(true, System.Drawing.Color.FromArgb(90, 255, 169, 4))); Config.SubMenu("TK/drawings").AddItem(drawComboDamageMenu); Config.SubMenu("TK/drawings").AddItem(drawFill); DamageIndicator.DamageToUnit = GetComboDamage; DamageIndicator.Enabled = drawComboDamageMenu.GetValue <bool>(); DamageIndicator.Fill = drawFill.GetValue <Circle>().Active; DamageIndicator.FillColor = drawFill.GetValue <Circle>().Color; drawComboDamageMenu.ValueChanged += delegate(object sender, OnValueChangeEventArgs eventArgs) { DamageIndicator.Enabled = eventArgs.GetNewValue <bool>(); }; drawFill.ValueChanged += delegate(object sender, OnValueChangeEventArgs eventArgs) { DamageIndicator.Fill = eventArgs.GetNewValue <Circle>().Active; DamageIndicator.FillColor = eventArgs.GetNewValue <Circle>().Color; }; //done Config.AddSubMenu(new Menu("TehKatarina - Escape", "TK/escape")); Config.SubMenu("TK/escape").AddItem(new MenuItem("TK/escape/run", "Escape Active").SetValue(new KeyBind('G', KeyBindType.Press))); Config.SubMenu("TK/escape").AddItem(new MenuItem("TK/escape/e", "Use Shunpo (E)").SetValue(true)); Config.SubMenu("TK/escape").AddItem(new MenuItem("TK/escape/ward", "Use Ward").SetValue(true)); Config.SubMenu("TK/escape").AddItem(new MenuItem("TK/escape/e/antigapcloser", " Shunpo (E) Anti Gapcloser").SetValue(true)); Config.AddSubMenu(new Menu("TehKatarina - Misc", "TK/misc")); Config.SubMenu("TK/misc").AddItem(new MenuItem("TK/misc/combo/mode", "Combo Mode").SetValue(new StringList(new[] { "Q E W", "E Q W" }))); Config.SubMenu("TK/misc").AddItem(new MenuItem("TK/misc/q/humanizer", "Q Humanizer").SetValue(new Slider(0, 0, 1000))); Config.SubMenu("TK/misc").AddItem(new MenuItem("TK/misc/e/humanizer", "E Humanizer").SetValue(new Slider(0, 0, 1000))); Config.SubMenu("TK/misc").AddItem(new MenuItem("TK/misc/w/humanizer", "W Humanizer").SetValue(new Slider(0, 0, 1000))); Config.SubMenu("TK/misc").AddItem(new MenuItem("TK/misc/r/humanizer", "R Humanizer").SetValue(new Slider(0, 0, 1000))); Config.SubMenu("TK/misc").AddItem(new MenuItem("TK/misc/humanizer", "Use humanizers in KS").SetValue(true)); Config.SubMenu("TK/misc").AddItem(new MenuItem("TK/misc/e/mode/#", "Shunpo (E) Max Enemies").SetValue(new Slider(2, 1, 5))); Config.AddSubMenu(new Menu("Assembly Info", "TK/info")); Config.SubMenu("TK/info").AddItem(new MenuItem("TK/info/author", "Author: TehBlaxxor")); Config.SubMenu("TK/info").AddItem(new MenuItem("TK/info/edition", "Edition: BETA")); Config.SubMenu("TK/info").AddItem(new MenuItem("TK/info/version", "5.6.3.1")); Config.AddSubMenu(new Menu("Keybinds", "TK/keybinds")); Config.SubMenu("TK/info").AddItem(new MenuItem("keybind.combo", "Combo").SetValue(new KeyBind(32, KeyBindType.Press))); Config.SubMenu("TK/info").AddItem(new MenuItem("keybind.lasthit", "Lasthit").SetValue(new KeyBind('X', KeyBindType.Press))); Config.SubMenu("TK/info").AddItem(new MenuItem("keybind.harass", "Harass").SetValue(new KeyBind('C', KeyBindType.Press))); //Config.SubMenu("TK/combo").AddItem(new MenuItem("TK/combo/", "").SetValue(true)); Config.AddToMainMenu(); GameObject.OnCreate += OnCreateObj; Drawing.OnDraw += Drawing_OnDraw; Game.OnUpdate += Game_OnGameUpdate; AntiGapcloser.OnEnemyGapcloser += AntiGapcloser_OnEnemyGapcloser; }