static bool IsPhysDamageImune(Hero v) { if (me.Modifiers .Any(x => (x.Name == "" && !me.Inventory.Items.Any(y => y.Name == "")) || (x.Name == "" && !me.Inventory.Items.Any(y => y.Name == "")) || x.Name == "") || v.Modifiers.Any(x => x.Name == "" || x.Name == "" || (x.Name == "" && !me.Inventory.Items.Any(y => y.Name == "")) || x.Name == "" /*|| x.Name == "" || x.Name == "" || x.Name == ""*/)) { if (Heal.CanBeCasted() && me.Modifiers.Any(x => (x.Name == "" && !me.Inventory.Items.Any(y => y.Name == "")) || (x.Name == "" && !me.Inventory.Items.Any(y => y.Name == "")) || x.Name == "")) { if (me.CanCast()) { Heal.UseAbility(me); return(false); } else { return(false); } } else if (difusal != null && difusal.CanBeCasted() && v.Modifiers.Any(x => x.Name == "" || x.Name == "")) { if (Utils.SleepCheck("difusalsleep")) { difusal.UseAbility(v); Utils.Sleep(800, "difusalsleep"); } return(false); } else { return(true); } } else { return(false); } }
static bool IsPhysDamageImune(Hero v) { if (me.Modifiers .Any(x => (x.Name == "modifier_tinker_laser_blind" && !me.Inventory.Items.Any(y => y.Name == "item_monkey_king_bar")) || (x.Name == "modifier_troll_warlord_whirling_axes_blind" && !me.Inventory.Items.Any(y => y.Name == "item_monkey_king_bar")) || x.Name == "modifier_pugna_decrepify") || v.Modifiers.Any(x => x.Name == "modifier_omninight_guardian_angel" || x.Name == "modifier_pugna_decrepify" || (x.Name == "modifier_windrunner_windrun" && !me.Inventory.Items.Any(y => y.Name == "item_monkey_king_bar")) || x.Name == "modifier_winter_wyverny_cold_embrace" /*|| x.Name == "modifier_ghost_state" || x.Name == "modifier_item_ethereal_blade_ethereal" || x.Name == "modifier_item_ethereal_blade_ethereal"*/)) { if (Heal.CanBeCasted() && me.Modifiers.Any(x => (x.Name == "modifier_tinker_laser_blind" && !me.Inventory.Items.Any(y => y.Name == "item_monkey_king_bar")) || (x.Name == "modifier_troll_warlord_whirling_axes_blind" && !me.Inventory.Items.Any(y => y.Name == "item_monkey_king_bar")) || x.Name == "modifier_pugna_decrepify")) { if (me.CanCast()) { Heal.UseAbility(me); return(false); } else { return(false); } } else if (difusal != null && difusal.CanBeCasted() && v.Modifiers.Any(x => x.Name == "modifier_omninight_guardian_angel" || x.Name == "modifier_pugna_decrepify")) { if (Utils.SleepCheck("difusalsleep")) { difusal.UseAbility(v); Utils.Sleep(800, "difusalsleep"); } return(false); } else { return(true); } } else { return(false); } }
public static void Working(EventArgs args) { if (!Game.IsInGame || Game.IsPaused || Game.IsWatchingGame) { return; } me = ObjectMgr.LocalHero; if (me == null || me.ClassID != ClassID.CDOTA_Unit_Hero_Legion_Commander) { return; } if (Game.IsKeyDown(Menu.Item("Black King Bar Toggle").GetValue <KeyBind>().Key) && !Game.IsChatOpen && Utils.SleepCheck("BKBTOGGLE")) { duel_items3["item_black_king_bar"] = !Menu.Item("Duel Items3").GetValue <AbilityToggler>().IsEnabled("item_black_king_bar"); Utils.Sleep(750, "BKBTOGGLE"); } if (Game.IsKeyDown(Menu.Item("DUEL!").GetValue <KeyBind>().Key) && !Game.IsChatOpen) { FindItems(); target = me.ClosestToMouseTarget(1000); //if (Utils.SleepCheck("console")) //{ // Console.WriteLine("=================================================================="); // Console.WriteLine(target.Modifiers.LastOrDefault().Name); // Console.WriteLine(me.Modifiers.LastOrDefault().Name); // Console.WriteLine("=================================================================="); // Utils.Sleep(1200, "console"); //} if (target != null && !target.IsInvul() && !IsPhysDamageImune(target) && (blink != null ? me.Distance2D(target) <= 1300 : me.Distance2D(target) <= 600)) { if (me.CanAttack() && me.CanCast()) { if (CanInvisCrit(me)) { me.Attack(target); } else { manacheck(); if (target.IsLinkensProtected()) { if (((cyclone.CanBeCasted() && Menu.Item("Pop Linkens2: ").GetValue <AbilityToggler>().IsEnabled(cyclone.Name)) || (force.CanBeCasted() && Menu.Item("Pop Linkens2: ").GetValue <AbilityToggler>().IsEnabled(force.Name)) || (halberd.CanBeCasted() && Menu.Item("Pop Linkens2: ").GetValue <AbilityToggler>().IsEnabled(halberd.Name)) || (vyse.CanBeCasted() && Menu.Item("Pop Linkens: ").GetValue <AbilityToggler>().IsEnabled(vyse.Name)) || (abyssal.CanBeCasted() && Menu.Item("Pop Linkens: ").GetValue <AbilityToggler>().IsEnabled(abyssal.Name)) || (atos.CanBeCasted() && Menu.Item("Pop Linkens: ").GetValue <AbilityToggler>().IsEnabled(atos.Name)) || (difusal.CanBeCasted() && Menu.Item("Pop Linkens: ").GetValue <AbilityToggler>().IsEnabled("item_diffusal_blade")) || /* new items*/ (malevo.CanBeCasted() && Menu.Item("Pop Linkens: ").GetValue <AbilityToggler>().IsEnabled("item_orchid")) || (hurricanepike.CanBeCasted() && Menu.Item("Pop Linkens2: ").GetValue <AbilityToggler>().IsEnabled("item_hurricane_pike")) || (bloodthorn.CanBeCasted() && Menu.Item("Pop Linkens2: ").GetValue <AbilityToggler>().IsEnabled("item_bloodthorn")) ) && Utils.SleepCheck("Combo2")) { if (blademail != null && blademail.Cooldown <= 0 && Menu.Item("Duel Items3").GetValue <AbilityToggler>().IsEnabled(blademail.Name) && me.Mana - blademail.ManaCost >= 75) { blademail.UseAbility(); } if (satanic != null && satanic.Cooldown <= 0 && me.Health <= me.MaximumHealth * 0.5 && Menu.Item("Duel Items3").GetValue <AbilityToggler>().IsEnabled(satanic.Name)) { satanic.UseAbility(); } if (crimson != null && crimson.Cooldown <= 0 && Menu.Item("Mana/Health Itens: ").GetValue <AbilityToggler>().IsEnabled(crimson.Name)) { crimson.UseAbility(); } if (buckler != null && buckler.Cooldown <= 0 && Menu.Item("Mana/Health Itens: ").GetValue <AbilityToggler>().IsEnabled(buckler.Name) && me.Mana - buckler.ManaCost >= 75) { buckler.UseAbility(); } if (lotusorb != null && lotusorb.Cooldown <= 0 && Menu.Item("Duel Items4").GetValue <AbilityToggler>().IsEnabled(lotusorb.Name) && me.Mana - lotusorb.ManaCost >= 75) { lotusorb.UseAbility(me); } if (mjollnir != null && mjollnir.Cooldown <= 0 && Menu.Item("Duel Items").GetValue <AbilityToggler>().IsEnabled(mjollnir.Name) && me.Mana - mjollnir.ManaCost >= 75) { mjollnir.UseAbility(me); } if (armlet != null && !armlet.IsToggled && Menu.Item("Duel Items").GetValue <AbilityToggler>().IsEnabled(armlet.Name) && Utils.SleepCheck("armlet")) { armlet.ToggleAbility(); Utils.Sleep(300, "armlet"); } if (madness != null && madness.Cooldown <= 0 && Menu.Item("Duel Items2").GetValue <AbilityToggler>().IsEnabled(madness.Name) && me.Mana - madness.ManaCost >= 75) { madness.UseAbility(); } if (Heal != null && Heal.Level > 0 && Heal.Cooldown <= 0 && Menu.Item("Skills").GetValue <AbilityToggler>().IsEnabled(Heal.Name) && !me.IsMagicImmune() && me.Mana - Heal.ManaCost >= 75) { Heal.UseAbility(me); } if (bkb != null && bkb.Cooldown <= 0 && Menu.Item("Duel Items3").GetValue <AbilityToggler>().IsEnabled(bkb.Name) && (!Heal.CanBeCasted() || Heal == null || !Menu.Item("Skills").GetValue <AbilityToggler>().IsEnabled(Heal.Name))) { bkb.UseAbility(); } if (blink != null && blink.Cooldown <= 0 && me.Distance2D(target) <= 1300 && me.Distance2D(target) >= 200 && Menu.Item("Duel Items").GetValue <AbilityToggler>().IsEnabled(blink.Name)) { blink.UseAbility(me.Distance2D(target.NetworkPosition) < 1200 ? target.NetworkPosition : new Vector3(me.NetworkPosition.X + 1150 * (float)Math.Cos(me.NetworkPosition.ToVector2().FindAngleBetween(target.NetworkPosition.ToVector2(), true)), me.NetworkPosition.Y + 1150 * (float)Math.Sin(me.NetworkPosition.ToVector2().FindAngleBetween(target.NetworkPosition.ToVector2(), true)), 100), false); } if (urn != null && urn.CurrentCharges > 0 && Menu.Item("Duel Items2").GetValue <AbilityToggler>().IsEnabled(urn.Name)) { urn.UseAbility(target); } if (solar != null && solar.CanBeCasted() && Menu.Item("Duel Items2").GetValue <AbilityToggler>().IsEnabled(solar.Name)) { solar.UseAbility(target); } if (medallion != null && medallion.CanBeCasted() && Menu.Item("Duel Items2").GetValue <AbilityToggler>().IsEnabled(medallion.Name)) { medallion.UseAbility(target); } if (cyclone != null && cyclone.CanBeCasted() && Utils.SleepCheck("CycloneRemoveLinkens") && Menu.Item("Pop Linkens2: ").GetValue <AbilityToggler>().IsEnabled(cyclone.Name) && me.Mana - cyclone.ManaCost >= 75) { cyclone.UseAbility(target); Utils.Sleep(100, "CycloneRemoveLinkens"); } else if (atos != null && atos.CanBeCasted() && Utils.SleepCheck("atosRemoveLinkens") && Menu.Item("Pop Linkens: ").GetValue <AbilityToggler>().IsEnabled(atos.Name) && me.Mana - atos.ManaCost >= 75) { atos.UseAbility(target); Utils.Sleep(100, "atosRemoveLinkens"); } else if (difusal != null && difusal.CanBeCasted() && Utils.SleepCheck("DifusalRemoveLinkens") && Menu.Item("Pop Linkens: ").GetValue <AbilityToggler>().IsEnabled("item_diffusal_blade")) { difusal.UseAbility(target); Utils.Sleep(600, "DifusalRemoveLinkens"); } else if (force != null && force.CanBeCasted() && Utils.SleepCheck("ForceRemoveLinkens") && Menu.Item("Pop Linkens2: ").GetValue <AbilityToggler>().IsEnabled(force.Name) && me.Mana - force.ManaCost >= 75) { force.UseAbility(target); Utils.Sleep(100, "ForceRemoveLinkens"); } else if (hurricanepike != null && hurricanepike.CanBeCasted() && Utils.SleepCheck("PikeRemoveLinkens") && Menu.Item("Pop Linkens2: ").GetValue <AbilityToggler>().IsEnabled(hurricanepike.Name) && me.Mana - hurricanepike.ManaCost >= 75) { hurricanepike.UseAbility(target); Utils.Sleep(100, "PikeRemoveLinkens"); } else if (halberd != null && halberd.CanBeCasted() && Utils.SleepCheck("halberdLinkens") && Menu.Item("Pop Linkens2: ").GetValue <AbilityToggler>().IsEnabled(halberd.Name) && me.Mana - halberd.ManaCost >= 75) { halberd.UseAbility(target); Utils.Sleep(100, "halberdLinkens"); } else if (bloodthorn != null && bloodthorn.CanBeCasted() && Utils.SleepCheck("bloodRemoveLinkens") && Menu.Item("Pop Linkens2: ").GetValue <AbilityToggler>().IsEnabled(bloodthorn.Name) && me.Mana - bloodthorn.ManaCost >= 75) { bloodthorn.UseAbility(target); Utils.Sleep(100, "bloodRemoveLinkens"); } else if (malevo != null && malevo.CanBeCasted() && Utils.SleepCheck("malevoRemoveLinkens") && Menu.Item("Pop Linkens: ").GetValue <AbilityToggler>().IsEnabled(malevo.Name) && me.Mana - malevo.ManaCost >= 75) { malevo.UseAbility(target); Utils.Sleep(100, "malevoRemoveLinkens"); } else if (vyse != null && vyse.CanBeCasted() && Utils.SleepCheck("vyseLinkens") && Menu.Item("Pop Linkens: ").GetValue <AbilityToggler>().IsEnabled(vyse.Name) && me.Mana - vyse.ManaCost >= 75) { vyse.UseAbility(target); Utils.Sleep(100, "vyseLinkens"); } else if (abyssal != null && abyssal.CanBeCasted() && Utils.SleepCheck("abyssal") && Menu.Item("Pop Linkens: ").GetValue <AbilityToggler>().IsEnabled(abyssal.Name) && me.Mana - abyssal.ManaCost >= 75) { abyssal.UseAbility(target); Utils.Sleep(100, "abyssal"); } Utils.Sleep(200, "Combo2"); } } else { if (UsedInvis(target)) { if (me.Distance2D(target) <= 500) { if (dust != null && dust.CanBeCasted() && Utils.SleepCheck("dust") && dust != null && Menu.Item("Mana/Health Itens2: ").GetValue <AbilityToggler>().IsEnabled(dust.Name)) { dust.UseAbility(); Utils.Sleep(100, "dust"); } else if (sentry != null && sentry.CanBeCasted() && Utils.SleepCheck("sentry") && sentry != null && Menu.Item("Mana/Health Itens2: ").GetValue <AbilityToggler>().IsEnabled(sentry.Name)) { sentry.UseAbility(me.Position); Utils.Sleep(100, "sentry"); } } } uint elsecount = 1; if (Utils.SleepCheck("combo")) { if (blademail != null && blademail.Cooldown <= 0 && Menu.Item("Duel Items3").GetValue <AbilityToggler>().IsEnabled(blademail.Name) && me.Mana - blademail.ManaCost >= 75) { blademail.UseAbility(); } else { elsecount += 1; } if (satanic != null && satanic.Cooldown <= 0 && me.Health <= me.MaximumHealth * 0.5 && Menu.Item("Duel Items3").GetValue <AbilityToggler>().IsEnabled(satanic.Name)) { satanic.UseAbility(); } else { elsecount += 1; } if (crimson != null && crimson.Cooldown <= 0 && Menu.Item("Mana/Health Itens: ").GetValue <AbilityToggler>().IsEnabled(crimson.Name)) { crimson.UseAbility(); } else { elsecount += 1; } if (buckler != null && buckler.Cooldown <= 0 && Menu.Item("Mana/Health Itens: ").GetValue <AbilityToggler>().IsEnabled(buckler.Name) && me.Mana - buckler.ManaCost >= 75) { buckler.UseAbility(); } else { elsecount += 1; } if (lotusorb != null && lotusorb.Cooldown <= 0 && Menu.Item("Duel Items4").GetValue <AbilityToggler>().IsEnabled(lotusorb.Name) && me.Mana - lotusorb.ManaCost >= 75) { lotusorb.UseAbility(me); } else { elsecount += 1; } if (mjollnir != null && mjollnir.Cooldown <= 0 && Menu.Item("Duel Items").GetValue <AbilityToggler>().IsEnabled(mjollnir.Name) && me.Mana - mjollnir.ManaCost >= 75) { mjollnir.UseAbility(me); } else { elsecount += 1; } if (armlet != null && !armlet.IsToggled && Menu.Item("Duel Items").GetValue <AbilityToggler>().IsEnabled(armlet.Name) && Utils.SleepCheck("armlet")) { armlet.ToggleAbility(); Utils.Sleep(300, "armlet"); } else { elsecount += 1; } if (madness != null && madness.Cooldown <= 0 && Menu.Item("Duel Items2").GetValue <AbilityToggler>().IsEnabled(madness.Name) && me.Mana - madness.ManaCost >= 75) { madness.UseAbility(); } else { elsecount += 1; } if (Heal != null && Heal.Level > 0 && Heal.Cooldown <= 0 && Menu.Item("Skills").GetValue <AbilityToggler>().IsEnabled(Heal.Name) && !me.IsMagicImmune() && me.Mana - Heal.ManaCost >= 75) { Heal.UseAbility(me); } else { elsecount += 1; } if (bkb != null && bkb.Cooldown <= 0 && Menu.Item("Duel Items3").GetValue <AbilityToggler>().IsEnabled(bkb.Name) && (!Heal.CanBeCasted() || Heal == null)) { bkb.UseAbility(); } else { elsecount += 1; } if (blink != null && blink.Cooldown <= 0 && me.Distance2D(target) <= 1300 && me.Distance2D(target) >= 200 && Menu.Item("Duel Items").GetValue <AbilityToggler>().IsEnabled(blink.Name)) { blink.UseAbility(target.Position); } else { elsecount += 1; } if (abyssal != null && abyssal.Cooldown <= 0 && Menu.Item("Duel Items").GetValue <AbilityToggler>().IsEnabled(abyssal.Name) && me.Mana - abyssal.ManaCost >= 75) { abyssal.UseAbility(target); } else { elsecount += 1; } if (urn != null && urn.CanBeCasted() && urn.CurrentCharges > 0 && Menu.Item("Duel Items2").GetValue <AbilityToggler>().IsEnabled(urn.Name)) { urn.UseAbility(target); } else { elsecount += 1; } if (solar != null && solar.CanBeCasted() && Menu.Item("Duel Items2").GetValue <AbilityToggler>().IsEnabled(solar.Name)) { solar.UseAbility(target); } else { elsecount += 1; } if (medallion != null && medallion.CanBeCasted() && Menu.Item("Duel Items2").GetValue <AbilityToggler>().IsEnabled(medallion.Name)) { medallion.UseAbility(target); } else { elsecount += 1; } // NEW ITENS if (bloodthorn != null && bloodthorn.CanBeCasted() && (malevo != null ? malevo.CanBeCasted() : true) && Menu.Item("Duel Items3").GetValue <AbilityToggler>().IsEnabled(bloodthorn.Name)) { bloodthorn.UseAbility(target); } else { elsecount += 1; } if (malevo != null && malevo.CanBeCasted() && (bloodthorn != null ? bloodthorn.CanBeCasted() : true) && Menu.Item("Duel Items4").GetValue <AbilityToggler>().IsEnabled(malevo.Name)) { malevo.UseAbility(target); } else { elsecount += 1; } if (Duel != null && Duel.Cooldown <= 0 && !target.IsLinkensProtected() && !target.Modifiers.Any(x => x.Name == "modifier_abaddon_borrowed_time") && Utils.SleepCheck("Duel") && elsecount == 18) { Duel.UseAbility(target); Utils.Sleep(100, "Duel"); } else { me.Attack(target, false); } Utils.Sleep(150, "combo"); } } } } } else { if (me.IsAlive && !me.IsChanneling() && !me.IsMoving && Utils.SleepCheck("moving")) { me.Move(Game.MousePosition, false); Utils.Sleep(200, "moving"); } } } }
public static void Game_OnUpdate(EventArgs args) { me = ObjectMgr.LocalHero; if (!Game.IsInGame || Game.IsPaused || Game.IsWatchingGame) { return; } if (me.ClassID != ClassID.CDOTA_Unit_Hero_Legion_Commander) { return; } if (me == null) { return; } if (Duel == null) { Duel = me.Spellbook.Spell4; } if (Heal == null) { Heal = me.Spellbook.Spell2; } if (Odds == null) { Odds = me.Spellbook.Spell1; } if (Blink == null) { Blink = me.FindItem("item_blink"); } if (armlet == null) { armlet = me.FindItem("item_armlet"); } if (mjollnir == null) { mjollnir = me.FindItem("item_mjollnir"); } if (medallion == null) { medallion = me.FindItem("item_medallion_of_courage"); } if (solar == null) { solar = me.FindItem("item_solar_crest"); } if (soulRing == null) { soulRing = me.FindItem("item_soul_ring"); } if (bkb == null) { bkb = me.FindItem("item_black_king_bar"); } if (abyssal == null) { abyssal = me.FindItem("item_abyssal_blade"); } if (dust == null) { dust = me.FindItem("item_dust"); } if (bladeMail == null) { bladeMail = me.FindItem("item_blade_mail"); } var duelManacost = Heal.ManaCost + Duel.ManaCost; // Main combo if (active && toggle) { target = me.ClosestToMouseTarget(1000); if (target != null && target.IsAlive && !target.IsInvul() && !target.IsIllusion) { if (me.CanAttack() && me.CanCast()) { var linkens = target.Modifiers.Any(x => x.Name == "modifier_item_spheretarget") || target.Inventory.Items.Any(x => x.Name == "item_sphere"); // here allied skills & items if (soulRing != null && soulRing.CanBeCasted() && me.Mana < duelManacost && me.Health > 300 && Utils.SleepCheck("soulring")) { soulRing.UseAbility(); Utils.Sleep(150 + Game.Ping, "soulring"); } if (bladeMail != null && bladeMail.CanBeCasted() && Utils.SleepCheck("blademail")) { bladeMail.UseAbility(); Utils.Sleep(150 + Game.Ping, "blademail"); } if (armlet != null && armlet.CanBeCasted() && Utils.SleepCheck("armlet1") && !armlet.IsToggled) { armlet.ToggleAbility(); Utils.Sleep(150 + Game.Ping, "armlet1"); } if (mjollnir != null && mjollnir.CanBeCasted() && Utils.SleepCheck("mjollnir")) { mjollnir.UseAbility(me); Utils.Sleep(150 + Game.Ping, "mjollnir"); } if (Heal.CanBeCasted() && Utils.SleepCheck("heal") && (!bkb.CanBeCasted() || !me.IsMagicImmune())) { Heal.UseAbility(me); Utils.Sleep(150 + Game.Ping, "heal"); } Utils.ChainStun(me, 100, null, false); if (bkb != null && bkb.CanBeCasted() && Utils.SleepCheck("bkb") && bkbToggle) { bkb.UseAbility(); Utils.Sleep(150 + Game.Ping, "bkb"); } Utils.ChainStun(me, 200, null, false); // Blink if (Blink != null && Blink.CanBeCasted() && me.Distance2D(target) > 300 && me.Distance2D(target) <= 1170 && Utils.SleepCheck("blink1")) { Blink.UseAbility(target.Position); Utils.Sleep(150 + Game.Ping, "blink1"); } // Enemy items & skills //if (Odds.CanBeCasted() && Utils.SleepCheck("odds") && !target.IsMoving) //{ // Odds.UseAbility(target.Position); // Utils.Sleep(200 + Game.Ping, "odds"); //} if (!Odds.CanBeCasted()) { Utils.ChainStun(me, 200, null, false); } if (abyssal != null && abyssal.CanBeCasted() && Utils.SleepCheck("abyssal")) { abyssal.UseAbility(target); Utils.Sleep(400 + Game.Ping, "abyssal"); } if (abyssal != null) { Utils.ChainStun(me, 310, null, false); } if (medallion != null && medallion.CanBeCasted() && Utils.SleepCheck("medallion")) { medallion.UseAbility(target); Utils.Sleep(150 + Game.Ping, "medallion"); } if (solar != null && solar.CanBeCasted() && Utils.SleepCheck("solar")) { solar.UseAbility(target); Utils.Sleep(200 + Game.Ping, "solar"); } if (dust != null && dust.CanBeCasted() && (target.CanGoInvis() || target.IsInvisible()) && Utils.SleepCheck("dust")) { dust.UseAbility(); Utils.Sleep(200 + Game.Ping, "dust"); } if (Duel.CanBeCasted() && me.CanAttack() && !target.IsInvul() && Utils.SleepCheck("duel") && !linkens) { Duel.UseAbility(target); Utils.Sleep(150 + Game.Ping, "duel"); } if (!Duel.CanBeCasted() && Utils.SleepCheck("attack2")) { me.Attack(target); Utils.Sleep(Game.Ping + 1000, "attack2"); } if (armlet != null && Utils.SleepCheck("armlet") && me.CanCast() && armlet.IsToggled && (target == null || !target.IsAlive || !target.IsVisible)) { armlet.ToggleAbility(); Utils.Sleep(150 + Game.Ping, "armlet"); } } else { if (armlet != null && !armlet.IsActivated) { armlet.ToggleAbility(); } if (Utils.SleepCheck("attack1")) { me.Attack(target); Utils.Sleep(1000, "attack1"); } } } } }
public static void Working(EventArgs args) { if (!Game.IsInGame || Game.IsPaused || Game.IsWatchingGame) { return; } me = ObjectMgr.LocalHero; if (me == null || me.ClassID != ClassID.CDOTA_Unit_Hero_Legion_Commander) { return; } if (Game.IsKeyDown(Menu.Item("Black King Bar Toggle").GetValue <KeyBind>().Key) && !Game.IsChatOpen && Utils.SleepCheck("BKBTOGGLE")) { defensive_items["item_black_king_bar"] = !Menu.Item("Defensive Items").GetValue <AbilityToggler>().IsEnabled("item_black_king_bar"); Utils.Sleep(750, "BKBTOGGLE"); } if (Game.IsKeyDown(Menu.Item("DUEL!").GetValue <KeyBind>().Key) && !Game.IsChatOpen) { FindItems(); target = me.ClosestToMouseTarget(1000); if (target != null && target.IsAlive && !target.IsIllusion && !target.IsInvul() && (blink != null ? me.Distance2D(target) <= 1300 : me.Distance2D(target) <= 600)) { if (me.CanAttack() && me.CanCast()) { if (CanInvisCrit(me)) { me.Attack(target); } else { manacheck(); if (target.IsLinkensProtected()) { if ((cyclone.CanBeCasted() || force.CanBeCasted() || halberd.CanBeCasted() || vyse.CanBeCasted() || abyssal.CanBeCasted()) && Utils.SleepCheck("Combo2")) { if (blademail != null && blademail.Cooldown <= 0 && Menu.Item("Defensive Items").GetValue <AbilityToggler>().IsEnabled(blademail.Name) && me.Mana - blademail.ManaCost >= 75) { blademail.UseAbility(); } if (satanic != null && satanic.Cooldown <= 0 && me.Health <= me.MaximumHealth * 0.5 && Menu.Item("Defensive Items").GetValue <AbilityToggler>().IsEnabled(satanic.Name)) { satanic.UseAbility(); } if (crimson != null && crimson.Cooldown <= 0 && Menu.Item("Consume Items").GetValue <AbilityToggler>().IsEnabled(crimson.Name)) { crimson.UseAbility(); } if (buckler != null && buckler.Cooldown <= 0 && Menu.Item("Consume Items").GetValue <AbilityToggler>().IsEnabled(buckler.Name) && me.Mana - buckler.ManaCost >= 75) { buckler.UseAbility(); } if (lotusorb != null && lotusorb.Cooldown <= 0 && Menu.Item("Defensive Items").GetValue <AbilityToggler>().IsEnabled(lotusorb.Name) && me.Mana - lotusorb.ManaCost >= 75) { lotusorb.UseAbility(me); } if (mjollnir != null && mjollnir.Cooldown <= 0 && Menu.Item("Ofensive Items").GetValue <AbilityToggler>().IsEnabled(mjollnir.Name) && me.Mana - mjollnir.ManaCost >= 75) { mjollnir.UseAbility(me); } if (armlet != null && !armlet.IsToggled && Menu.Item("Ofensive Items").GetValue <AbilityToggler>().IsEnabled(armlet.Name) && Utils.SleepCheck("armlet")) { armlet.ToggleAbility(); Utils.Sleep(300, "armlet"); } if (madness != null && madness.Cooldown <= 0 && Menu.Item("Ofensive Items").GetValue <AbilityToggler>().IsEnabled(madness.Name) && me.Mana - madness.ManaCost >= 75) { madness.UseAbility(); } if (Heal != null && Heal.Level > 0 && Heal.Cooldown <= 0 && Menu.Item("Skills").GetValue <AbilityToggler>().IsEnabled(Heal.Name) && !me.IsMagicImmune() && me.Mana - Heal.ManaCost >= 75) { Heal.UseAbility(me); } if (bkb != null && bkb.Cooldown <= 0 && Menu.Item("Defensive Items").GetValue <AbilityToggler>().IsEnabled(bkb.Name) && (!Heal.CanBeCasted() || Heal == null)) { bkb.UseAbility(); } if (blink != null && blink.Cooldown <= 0 && me.Distance2D(target) <= 1300 && me.Distance2D(target) >= 200 && Menu.Item("Ofensive Items").GetValue <AbilityToggler>().IsEnabled(blink.Name)) { blink.UseAbility(target.Position); } if (urn != null && urn.CurrentCharges > 0 && Menu.Item("Ofensive Items").GetValue <AbilityToggler>().IsEnabled(urn.Name)) { urn.UseAbility(target); } if (solar != null && solar.CanBeCasted() && Menu.Item("Ofensive Items").GetValue <AbilityToggler>().IsEnabled(solar.Name)) { solar.UseAbility(target); } if (medallion != null && medallion.CanBeCasted() && Menu.Item("Ofensive Items").GetValue <AbilityToggler>().IsEnabled(medallion.Name)) { medallion.UseAbility(target); } if (cyclone != null && cyclone.CanBeCasted() && Utils.SleepCheck("CycloneRemoveLinkens") && Menu.Item("Remove Linkens Items").GetValue <AbilityToggler>().IsEnabled(cyclone.Name) && me.Mana - cyclone.ManaCost >= 75) { cyclone.UseAbility(target); Utils.Sleep(100, "CycloneRemoveLinkens"); } else if (force != null && force.CanBeCasted() && Utils.SleepCheck("ForceRemoveLinkens") && Menu.Item("Remove Linkens Items").GetValue <AbilityToggler>().IsEnabled(force.Name) && me.Mana - force.ManaCost >= 75) { force.UseAbility(target); Utils.Sleep(100, "ForceRemoveLinkens"); } else if (halberd != null && halberd.CanBeCasted() && Utils.SleepCheck("halberdLinkens") && Menu.Item("Remove Linkens Items").GetValue <AbilityToggler>().IsEnabled(halberd.Name) && me.Mana - halberd.ManaCost >= 75) { halberd.UseAbility(target); Utils.Sleep(100, "halberdLinkens"); } else if (vyse != null && vyse.CanBeCasted() && Utils.SleepCheck("vyseLinkens") && Menu.Item("Remove Linkens Items").GetValue <AbilityToggler>().IsEnabled(vyse.Name) && me.Mana - vyse.ManaCost >= 75) { vyse.UseAbility(target); Utils.Sleep(100, "vyseLinkens"); } else if (abyssal != null && abyssal.CanBeCasted() && Utils.SleepCheck("abyssal") && Menu.Item("Ofensive Items").GetValue <AbilityToggler>().IsEnabled(abyssal.Name) && me.Mana - abyssal.ManaCost >= 75) { abyssal.UseAbility(target); Utils.Sleep(100, "abyssal"); } Utils.Sleep(200, "Combo2"); } } else { if (UsedInvis(target)) { if (me.Distance2D(target) <= 500) { if (dust != null && dust.CanBeCasted() && Utils.SleepCheck("dust") && dust != null && Menu.Item("Consume Items").GetValue <AbilityToggler>().IsEnabled(dust.Name)) { dust.UseAbility(); Utils.Sleep(100, "dust"); } else if (sentry != null && sentry.CanBeCasted() && Utils.SleepCheck("sentry") && sentry != null && Menu.Item("Consume Items").GetValue <AbilityToggler>().IsEnabled(sentry.Name)) { sentry.UseAbility(me.Position); Utils.Sleep(100, "sentry"); } } } uint elsecount = 1; if (Utils.SleepCheck("combo")) { if (blademail != null && blademail.Cooldown <= 0 && Menu.Item("Defensive Items").GetValue <AbilityToggler>().IsEnabled(blademail.Name) && me.Mana - blademail.ManaCost >= 75) { blademail.UseAbility(); } else { elsecount += 1; } if (satanic != null && satanic.Cooldown <= 0 && me.Health <= me.MaximumHealth * 0.5 && Menu.Item("Defensive Items").GetValue <AbilityToggler>().IsEnabled(satanic.Name)) { satanic.UseAbility(); } else { elsecount += 1; } if (crimson != null && crimson.Cooldown <= 0 && Menu.Item("Consume Items").GetValue <AbilityToggler>().IsEnabled(crimson.Name)) { crimson.UseAbility(); } else { elsecount += 1; } if (buckler != null && buckler.Cooldown <= 0 && Menu.Item("Consume Items").GetValue <AbilityToggler>().IsEnabled(buckler.Name) && me.Mana - buckler.ManaCost >= 75) { buckler.UseAbility(); } else { elsecount += 1; } if (lotusorb != null && lotusorb.Cooldown <= 0 && Menu.Item("Defensive Items").GetValue <AbilityToggler>().IsEnabled(lotusorb.Name) && me.Mana - lotusorb.ManaCost >= 75) { lotusorb.UseAbility(me); } else { elsecount += 1; } if (mjollnir != null && mjollnir.Cooldown <= 0 && Menu.Item("Ofensive Items").GetValue <AbilityToggler>().IsEnabled(mjollnir.Name) && me.Mana - mjollnir.ManaCost >= 75) { mjollnir.UseAbility(me); } else { elsecount += 1; } if (armlet != null && !armlet.IsToggled && Menu.Item("Ofensive Items").GetValue <AbilityToggler>().IsEnabled(armlet.Name) && Utils.SleepCheck("armlet")) { armlet.ToggleAbility(); Utils.Sleep(300, "armlet"); } else { elsecount += 1; } if (madness != null && madness.Cooldown <= 0 && Menu.Item("Ofensive Items").GetValue <AbilityToggler>().IsEnabled(madness.Name) && me.Mana - madness.ManaCost >= 75) { madness.UseAbility(); } else { elsecount += 1; } if (Heal != null && Heal.Level > 0 && Heal.Cooldown <= 0 && Menu.Item("Skills").GetValue <AbilityToggler>().IsEnabled(Heal.Name) && !me.IsMagicImmune() && me.Mana - Heal.ManaCost >= 75) { Heal.UseAbility(me); } else { elsecount += 1; } if (bkb != null && bkb.Cooldown <= 0 && Menu.Item("Defensive Items").GetValue <AbilityToggler>().IsEnabled(bkb.Name) && (!Heal.CanBeCasted() || Heal == null)) { bkb.UseAbility(); } else { elsecount += 1; } if (blink != null && blink.Cooldown <= 0 && me.Distance2D(target) <= 1300 && me.Distance2D(target) >= 200 && Menu.Item("Ofensive Items").GetValue <AbilityToggler>().IsEnabled(blink.Name)) { blink.UseAbility(target.Position); } else { elsecount += 1; } if (abyssal != null && abyssal.Cooldown <= 0 && Menu.Item("Ofensive Items").GetValue <AbilityToggler>().IsEnabled(abyssal.Name) && me.Mana - abyssal.ManaCost >= 75) { abyssal.UseAbility(target); } else { elsecount += 1; } if (urn != null && urn.CurrentCharges > 0 && Menu.Item("Ofensive Items").GetValue <AbilityToggler>().IsEnabled(urn.Name)) { urn.UseAbility(target); } else { elsecount += 1; } if (solar != null && solar.CanBeCasted() && Menu.Item("Ofensive Items").GetValue <AbilityToggler>().IsEnabled(solar.Name)) { solar.UseAbility(target); } else { elsecount += 1; } if (medallion != null && medallion.CanBeCasted() && Menu.Item("Ofensive Items").GetValue <AbilityToggler>().IsEnabled(medallion.Name)) { medallion.UseAbility(target); } else { elsecount += 1; } if (Duel != null && Duel.Cooldown <= 0 && !target.IsLinkensProtected() && !target.Modifiers.Any(x => x.Name == "modifier_abaddon_borrowed_time") && Utils.SleepCheck("Duel") && elsecount == 16) { Duel.UseAbility(target); Utils.Sleep(100, "Duel"); } else { me.Attack(target, false); } Utils.Sleep(150, "combo"); } } } } } else { if (me.IsAlive && !me.IsChanneling()) { me.Move(Game.MousePosition, false); } } } }