public static void Game_OnUpdate(EventArgs args) { me = ObjectMgr.LocalHero; if (me == null || !Game.IsInGame || me.ClassID != ClassID.CDOTA_Unit_Hero_Tinker) { return; } // Ability init Laser = me.Spellbook.Spell1; Rocket = me.Spellbook.Spell2; ReArm = me.Spellbook.Spell4; // Item init Blink = me.FindItem("item_blink"); Dagon = me.Inventory.Items.FirstOrDefault(item => item.Name.Contains("item_dagon")); Hex = me.FindItem("item_sheepstick"); Soulring = me.FindItem("item_soul_ring"); Ethereal = me.FindItem("item_ethereal_blade"); Veil = me.FindItem("item_veil_of_discord"); Orchid = me.FindItem("item_orchid"); Shiva = me.FindItem("item_shivas_guard"); Glimmer = me.FindItem("item_glimmer_cape"); // Manacost calculations var manaForCombo = Laser.ManaCost + Rocket.ManaCost; if (Dagon != null && Dagon.CanBeCasted()) { manaForCombo += 180; } if (Hex != null && Hex.CanBeCasted()) { manaForCombo += 100; } if (Ethereal != null && Ethereal.CanBeCasted()) { manaForCombo += 150; } if (Veil != null && Veil.CanBeCasted()) { manaForCombo += 50; } if (Shiva != null && Shiva.CanBeCasted()) { manaForCombo += 100; } if (Glimmer != null && Glimmer.CanBeCasted()) { manaForCombo += 110; } // Glimmer Use on Boots of Travel if (Glimmer != null && me.IsChanneling() && Glimmer.CanBeCasted() && Utils.SleepCheck("Glimmer") && !ReArm.IsChanneling && (SubMenu.Item("safeglimmer").GetValue <bool>())) { Glimmer.UseAbility(me); Utils.Sleep(100 + Game.Ping, "Glimmer"); } // Blink Use to Hide After Travel if (Blink != null && !me.IsChanneling() && Blink.CanBeCasted() && Utils.SleepCheck("Blink") && (Menu.Item("safeblink").GetValue <KeyBind>().Active)) { Blink.UseAbility(Game.MousePosition); Utils.Sleep(1000 + Game.Ping, "Blink"); } // Main combo if (active && toggle) { target = me.ClosestToMouseTarget(1000); if ((target == null || !target.IsVisible) && !me.IsChanneling()) { me.Move(Game.MousePosition); } if (target != null && target.IsAlive && !target.IsIllusion && !target.IsMagicImmune() && Utils.SleepCheck("ReArm") && !me.IsChanneling() && (me.Distance2D(target) < 3000)) { if (Soulring != null && Soulring.CanBeCasted() && me.Health > 300 && Utils.SleepCheck("soulring")) { Soulring.UseAbility(); Utils.Sleep(150 + Game.Ping, "soulring"); } // Blink if (Blink != null && Blink.CanBeCasted() && (me.Distance2D(target) > 500) && Utils.SleepCheck("Blink") && blinkToggle) { Blink.UseAbility(target.Position); Utils.Sleep(1000 + Game.Ping, "Blink"); } // Items else if (Shiva != null && Shiva.CanBeCasted() && Utils.SleepCheck("shiva")) { Shiva.UseAbility(); Utils.Sleep(100 + Game.Ping, "shiva"); Utils.ChainStun(me, 200 + Game.Ping, null, false); } else if (Veil != null && Veil.CanBeCasted() && Utils.SleepCheck("veil")) { Veil.UseAbility(target.Position); Utils.Sleep(150 + Game.Ping, "veil"); Utils.Sleep(300 + Game.Ping, "ve"); Utils.ChainStun(me, 170 + Game.Ping, null, false); } else if (Hex != null && Hex.CanBeCasted() && Utils.SleepCheck("hex")) { Hex.UseAbility(target); Utils.Sleep(150 + Game.Ping, "hex"); Utils.Sleep(300 + Game.Ping, "h"); Utils.ChainStun(me, 170 + Game.Ping, null, false); } else if (Ethereal != null && Ethereal.CanBeCasted() && Utils.SleepCheck("ethereal")) { Ethereal.UseAbility(target); Utils.Sleep(270 + Game.Ping, "ethereal"); Utils.ChainStun(me, 200 + Game.Ping, null, false); } else if (Dagon != null && Dagon.CanBeCasted() && Utils.SleepCheck("ethereal") && Utils.SleepCheck("h") && Utils.SleepCheck("dagon") && Utils.SleepCheck("veil")) { Dagon.UseAbility(target); Utils.Sleep(270 + Game.Ping, "dagon"); Utils.ChainStun(me, 200 + Game.Ping, null, false); } // Skills else if (Rocket != null && Rocket.CanBeCasted() && Utils.SleepCheck("rocket") && Utils.SleepCheck("ethereal") && Utils.SleepCheck("veil")) { Rocket.UseAbility(); Utils.Sleep(150 + Game.Ping, "rocket"); Utils.ChainStun(me, 150 + Game.Ping, null, false); } else if (Laser != null && Laser.CanBeCasted() && Utils.SleepCheck("laser") && Utils.SleepCheck("ethereal") && Utils.SleepCheck("rocket")) { Laser.UseAbility(target); Utils.Sleep(150 + Game.Ping, "laser"); Utils.ChainStun(me, 150 + Game.Ping, null, false); } else if (ReArm != null && ReArm.CanBeCasted() && me.Mana > 200 && Utils.SleepCheck("ReArm") && !ReArm.IsChanneling && nothingCanCast()) { ReArm.UseAbility(); Utils.ChainStun(me, (ReArm.ChannelTime * 1000) + Game.Ping + 400, null, false); Utils.Sleep(700 + Game.Ping, "ReArm"); } else if (!me.IsChanneling() && !ReArm.IsChanneling && nothingCanCast()) { me.Attack(target); } } } }
} // OnClose public void Combo() { if (!Menu.Item("enabled").IsActive() || Game.IsChatOpen || Time.Enabled) { return; } Me = ObjectManager.LocalHero; Q = Me.Spellbook.SpellQ; W = Me.Spellbook.SpellW; R = Me.Spellbook.SpellR; Leans = Me.FindItem("item_aether_lens"); Urn = Me.FindItem("item_urn_of_shadows"); Dagon = Me.Inventory.Items.FirstOrDefault(x => x.Name.Contains("item_dagon")); Ethereal = Me.FindItem("item_ethereal_blade"); Shiva = Me.FindItem("item_shivas_guard"); Glimmer = Me.FindItem("item_glimmer_cape"); Vail = Me.FindItem("item_veil_of_discord"); Orchid = Me.FindItem("item_orchid") ?? Me.FindItem("item_bloodthorn"); Abyssal = Me.FindItem("item_abyssal_blade"); Atos = Me.FindItem("item_rod_of_atos"); Bkb = Me.FindItem("item_black_king_bar"); Mail = Me.FindItem("item_blade_mail"); Lotus = Me.FindItem("item_lotus_orb"); Active = Game.IsKeyDown(Menu.Item("Combo Key").GetValue <KeyBind>().Key); var v = ObjectManager.GetEntities <Hero>().Where(x => x.Team != Me.Team && x.IsAlive && x.IsVisible && !x.IsIllusion && !x.IsMagicImmune()).ToList(); if (Active && Menu.Item("Skills").GetValue <AbilityToggler>().IsEnabled(W.Name)) { if (Me.HasModifier("modifier_pudge_rot") && v.Count(x => x.Distance2D(Me) <= W.GetCastRange() + Me.HullRadius) == 0) { W.ToggleAbility(); Time.Start(); } else if (!Me.HasModifier("modifier_pudge_rot") && v.Count(x => x.Distance2D(Me) <= W.GetCastRange() + Me.HullRadius) > 0) { W.ToggleAbility(); Time.Start(); } } E = Toolset.ClosestToMouse(Me); if (E == null || !Me.IsAlive) { return; } Sheep = E.ClassId == ClassId.CDOTA_Unit_Hero_Tidehunter ? null : Me.FindItem("item_sheepstick"); if (R.IsInAbilityPhase || R.IsChanneling || Me.IsChanneling()) { return; } if (Active) { MinRangeHook = E.HullRadius + 27; CastRange = Leans != null ? (Q.CastRange + 200 + E.HullRadius) : (Q.CastRange + E.HullRadius); EMoveSpeed = E.HasModifier("modifier_spirit_breaker_charge_of_darkness") ? 550 + ((int)E.Spellbook.Spell1.Level * 50) : E.MovementSpeed; Vector2 vector = new Vector2((float)Math.Cos(E.RotationRad) * EMoveSpeed, (float)Math.Sin(E.RotationRad) * EMoveSpeed); Vector3 start = new Vector3((float)((0.3 + (Game.Ping / 1000)) * Math.Cos(E.RotationRad) * EMoveSpeed + E.Position.X), (float)((0.3 + (Game.Ping / 1000)) * Math.Sin(E.RotationRad) * EMoveSpeed + E.NetworkPosition.Y), E.NetworkPosition.Z); Vector3 specialPosition = new Vector3((float)(MinRangeHook * Math.Cos(E.RotationRad) + E.NetworkPosition.X), (float)(MinRangeHook * Math.Sin(E.RotationRad) + E.NetworkPosition.Y), E.NetworkPosition.Z); HookPosition = Interception(start, vector, Me.Position, 1600); if ( Atos != null && Atos.CanBeCasted() && Me.CanCast() && !E.IsMagicImmune() && !E.HasModifier("modifier_spirit_breaker_charge_of_darkness") && Menu.Item("Items").GetValue <AbilityToggler>().IsEnabled(Atos.Name) && Me.Distance2D(E) <= 1500 && Utils.SleepCheck("a") ) { Atos.UseAbility(E); Utils.Sleep(250, "a"); } else if (Q.CanBeCasted() && Menu.Item("Skills").GetValue <AbilityToggler>().IsEnabled(Q.Name)) { if (E.NetworkActivity == NetworkActivity.Move || E.HasModifier("modifier_spirit_breaker_charge_of_darkness")) { for (double i = 0.03; i <= 0.135; i += 0.03) { Vector3 estimated = new Vector3((float)(i * Math.Cos(E.RotationRad) * EMoveSpeed + HookPosition.X), (float)(i * Math.Sin(E.RotationRad) * EMoveSpeed + HookPosition.Y), E.NetworkPosition.Z); if (GetTimeToTurn(estimated) <= i) { HookPosition = estimated; TimeTurn = i; break; } } CastPos = (HookPosition - Me.Position) * ((Q.GetCastRange() + Me.HullRadius) / HookPosition.Distance2D(Me.Position)) + Me.Position; if (Me.Position.Distance2D(HookPosition) < CastRange) { Q.UseAbility(CastPos); Time.Interval = 150 + TimeTurn * 1000; Time.Start(); } } else { CastPos = (specialPosition - Me.Position) * ((Q.GetCastRange() + Me.HullRadius) / specialPosition.Distance2D(Me.Position)) + Me.Position; if (Me.Position.Distance2D(E.NetworkPosition) < CastRange) { Q.UseAbility(CastPos); Time.Start(); } } } else { if (R.IsInAbilityPhase || R.IsChanneling) { return; } uint countElse = 0; countElse += 1; if (Vail != null && Vail.CanBeCasted() && Me.Distance2D(E) <= 1100 && Menu.Item("Items").GetValue <AbilityToggler>().IsEnabled(Vail.Name) && Utils.SleepCheck("vail")) { Vail.UseAbility(E.Position); Utils.Sleep(130, "vail"); } else { countElse += 1; } if (Orchid != null && Orchid.CanBeCasted() && Me.Distance2D(E) <= 900 && Menu.Item("Items").GetValue <AbilityToggler>().IsEnabled(Orchid.Name) && Utils.SleepCheck("orchid")) { Orchid.UseAbility(E); Utils.Sleep(100, "orchid"); } else { countElse += 1; } if (Shiva != null && Shiva.CanBeCasted() && Me.Distance2D(E) <= 600 && Menu.Item("Items").GetValue <AbilityToggler>().IsEnabled(Shiva.Name) && !E.IsMagicImmune() && Utils.SleepCheck("Shiva")) { Shiva.UseAbility(); Utils.Sleep(100, "Shiva"); } else { countElse += 1; } if (Ethereal != null && Ethereal.CanBeCasted() && Me.Distance2D(E) <= 700 && Me.Distance2D(E) <= 400 && Menu.Item("Items").GetValue <AbilityToggler>().IsEnabled(Ethereal.Name) && Utils.SleepCheck("ethereal")) { Ethereal.UseAbility(E); Utils.Sleep(100, "ethereal"); } else { countElse += 1; } if (Dagon != null && Dagon.CanBeCasted() && Me.Distance2D(E) <= Dagon.GetCastRange() && Utils.SleepCheck("dagon")) { Dagon.UseAbility(E); Utils.Sleep(100, "dagon"); } else { countElse += 1; } if (Urn != null && Urn.CanBeCasted() && Urn.CurrentCharges > 0 && Me.Distance2D(E) <= 400 && Menu.Item("Items").GetValue <AbilityToggler>().IsEnabled(Urn.Name) && Utils.SleepCheck("urn")) { Urn.UseAbility(E); Utils.Sleep(240, "urn"); } else { countElse += 1; } if (Glimmer != null && Glimmer.CanBeCasted() && Me.Distance2D(E) <= 300 && Utils.SleepCheck("glimmer")) { Glimmer.UseAbility(Me); Utils.Sleep(200, "glimmer"); } else { countElse += 1; } if (Mail != null && Mail.CanBeCasted() && v.Count(x => x.Distance2D(Me) <= 650) >= (Menu.Item("Heel").GetValue <Slider>().Value) && Menu.Item("Items").GetValue <AbilityToggler>().IsEnabled(Mail.Name) && Utils.SleepCheck("mail")) { Mail.UseAbility(); Console.WriteLine(countElse.ToString()); Utils.Sleep(100, "mail"); } else { countElse += 1; } if (Bkb != null && Bkb.CanBeCasted() && v.Count(x => x.Distance2D(Me) <= 650) >= (Menu.Item("Heel").GetValue <Slider>().Value) && Menu.Item("Items").GetValue <AbilityToggler>().IsEnabled(Bkb.Name) && Utils.SleepCheck("bkb")) { Bkb.UseAbility(); Utils.Sleep(100, "bkb"); } else { countElse += 1; } if (Lotus != null && Lotus.CanBeCasted() && v.Count(x => x.Distance2D(Me) <= 650) >= 2 && Menu.Item("Items").GetValue <AbilityToggler>().IsEnabled(Lotus.Name) && Utils.SleepCheck("lotus")) { Lotus.UseAbility(Me); Utils.Sleep(100, "lotus"); } else { countElse += 1; } if (countElse == 11 && R != null && R.CanBeCasted() && Me.Distance2D(E) <= R.GetCastRange() + 150 && (!Urn.CanBeCasted() || Urn.CurrentCharges <= 0) && Menu.Item("Skills").GetValue <AbilityToggler>().IsEnabled(R.Name) && Utils.SleepCheck("R") ) { R.UseAbility(E); Utils.Sleep(150, "R"); } else { countElse += 1; } if (Abyssal != null && !R.CanBeCasted() && Abyssal.CanBeCasted() && !E.IsStunned() && !E.IsHexed() && Me.Distance2D(E) <= 300 && Menu.Item("Items").GetValue <AbilityToggler>().IsEnabled(Abyssal.Name) && Utils.SleepCheck("abyssal")) { Abyssal.UseAbility(E); Utils.Sleep(200, "abyssal"); } else { countElse += 1; } if (Sheep != null && !R.CanBeCasted() && Sheep.CanBeCasted() && !E.IsStunned() && !E.IsHexed() && Me.Distance2D(E) <= 900 && Menu.Item("Items").GetValue <AbilityToggler>().IsEnabled(Sheep.Name) && Utils.SleepCheck("sheep")) { Sheep.UseAbility(E); Utils.Sleep(200, "sheep"); } else { countElse += 1; } if (countElse == 14 && Me.Distance2D(E) <= 300 && Mail != null && Mail.CanBeCasted() && (E.NetworkActivity == NetworkActivity.Attack || E.Spellbook.Spells.All(x => x.IsInAbilityPhase)) && Menu.Item("Items").GetValue <AbilityToggler>().IsEnabled(Mail.Name) && Utils.SleepCheck("mail")) { Mail.UseAbility(); Utils.Sleep(100, "mail"); } else { countElse += 1; } if (countElse == 15 && Lotus != null && Lotus.CanBeCasted() && Me.Distance2D(E) <= 600 && Menu.Item("Items").GetValue <AbilityToggler>().IsEnabled(Lotus.Name) && Utils.SleepCheck("lotus")) { Lotus.UseAbility(Me); Utils.Sleep(100, "lotus"); } if ((R == null || !R.CanBeCasted() || !Q.CanBeCasted() && Me.Distance2D(E) >= R.GetCastRange() + Me.HullRadius && !E.HasModifier("pudge_meat_hook")) && !E.IsAttackImmune()) { if (Menu.Item("orbwalk").GetValue <bool>() && Me.Distance2D(E) <= 1900) { Orbwalking.Orbwalk(E, 0, 1600, true, true); } } } } }