private async void UseItem(CancellationToken token) { // SoulRing if (SoulRing != null && Config.ItemsToggler.Value.IsEnabled(SoulRing.Item.Name) && SoulRing.CanBeCasted) { SoulRing.UseAbility(); await Await.Delay(SoulRing.GetCastDelay(), token); } else { Elsecount += 1; } // MidnightPulse if (MidnightPulse != null && Config.AbilityToggler.Value.IsEnabled(MidnightPulse.Ability.Name) && MidnightPulse.CanBeCasted) { MidnightPulse.UseAbility(Output.CastPosition); await Await.Delay(MidnightPulse.GetCastDelay(Output.CastPosition), token); } else { Elsecount += 1; } // GlimmerCape if (GlimmerCape != null && Config.ItemsToggler.Value.IsEnabled(GlimmerCape.Item.Name) && GlimmerCape.CanBeCasted) { GlimmerCape.UseAbility(Owner); await Await.Delay(GlimmerCape.GetCastDelay(Owner), token); } else { Elsecount += 1; } // BKB if (BKB != null && Config.ItemsToggler.Value.IsEnabled(BKB.Item.Name) && BKB.CanBeCasted) { BKB.UseAbility(); await Await.Delay(BKB.GetCastDelay(), token); } else { Elsecount += 1; } // Shivas if (Shivas != null && Config.ItemsToggler.Value.IsEnabled(Shivas.Item.Name) && Shivas.CanBeCasted) { Shivas.UseAbility(); await Await.Delay(Shivas.GetCastDelay(), token); } else { Elsecount += 1; } // ArcaneBoots if (ArcaneBoots != null && Config.ItemsToggler.Value.IsEnabled(ArcaneBoots.Item.Name) && ArcaneBoots.CanBeCasted && Owner.Mana * 100 / Owner.MaximumMana <= 92 && Elsecount == 5) { ArcaneBoots.UseAbility(); await Await.Delay(ArcaneBoots.GetCastDelay(), token); } // Guardian if (Guardian != null && Config.ItemsToggler.Value.IsEnabled(Guardian.Item.Name) && Guardian.CanBeCasted && Owner.Mana * 100 / Owner.MaximumMana <= 92 && Elsecount == 5) { Guardian.UseAbility(); await Await.Delay(Guardian.GetCastDelay(), token); } // Veil if (Veil != null && Config.ItemsToggler.Value.IsEnabled(Veil.Item.Name) && Veil.CanBeCasted) { Veil.UseAbility(Output.CastPosition); await Await.Delay(Veil.GetCastDelay(Output.CastPosition), token); } else { Elsecount += 1; } }
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; Refresh = 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"); // 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; } // Main combo if (active && toggle) { if ((target == null || !target.IsVisible) && !me.IsChanneling()) { me.Move(Game.MousePosition); } target = me.ClosestToMouseTarget(1000); if (target != null && target.IsAlive && !target.IsIllusion && !target.IsMagicImmune() && Utils.SleepCheck("refresh") && !Refresh.IsChanneling) { 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 (Refresh != null && Refresh.CanBeCasted() && me.Mana > 200 && Utils.SleepCheck("refresh") && !Refresh.IsChanneling && nothingCanCast()) { Refresh.UseAbility(); Utils.ChainStun(me, (Refresh.ChannelTime * 1000) + Game.Ping + 400, null, false); Utils.Sleep(700 + Game.Ping, "refresh"); } else if (!me.IsChanneling() && !Refresh.IsChanneling && nothingCanCast()) { me.Attack(target); } } } }
private static void Game_OnUpdate(EventArgs args) { _me = ObjectManager.LocalHero; if (!Game.IsInGame || _me == null || _me.ClassID != ClassID.CDOTA_Unit_Hero_Lina) { return; } if (Game.IsPaused || Game.IsChatOpen) { return; } _menuValue = Menu.Item("enabledAbilities").GetValue <AbilityToggler>(); _slider = Menu.Item("distance").GetValue <Slider>().Value; Q = _me.Spellbook.Spell1; W = _me.Spellbook.Spell2; R = _me.Spellbook.Spell4; Dagon = _me.Inventory.Items.FirstOrDefault(item => item.Name.Contains("item_dagon")); Hex = _me.FindItem("item_sheepstick"); Ethereal = _me.FindItem("item_ethereal_blade"); Veil = _me.FindItem("item_veil_of_discord"); Orchid = _me.FindItem("item_orchid"); Shiva = _me.FindItem("item_shivas_guard"); Eul = _me.FindItem("item_cyclone"); Blink = _me.FindItem("item_blink"); if (!Game.IsKeyDown(Menu.Item("Cooombo").GetValue <KeyBind>().Key)) { _targetActive = false; return; } if (!_targetActive) { _target = _me.ClosestToMouseTarget(300); _targetActive = true; } else { var modifHex = _target.Modifiers.Where(y => y.Name == "modifier_sheepstick_debuff") .DefaultIfEmpty(null) .FirstOrDefault(); var modifEul = _target.Modifiers.Where(y => y.Name == "modifier_eul_cyclone").DefaultIfEmpty(null).FirstOrDefault(); if (_target == null || !_target.IsAlive || _target.IsIllusion || _target.IsMagicImmune()) { return; } if (Blink != null && Blink.CanBeCasted() && _me.Distance2D(_target) > _slider + 100 && _menuValue.IsEnabled("item_blink") && Utils.SleepCheck("blink")) { Blink.UseAbility(PositionCalc(_me, _target, _slider)); Utils.Sleep(150 + Game.Ping, "blink"); } else if (Eul != null && Eul.CanBeCasted() && Utils.SleepCheck("eul") && _menuValue.IsEnabled("item_cyclone") && Utils.SleepCheck("blink")) { Eul.UseAbility(_target); Utils.Sleep(4000 + Game.Ping, "eul"); } else if (Eul == null || Eul.Cooldown > 0 || !_menuValue.IsEnabled("item_cyclone")) { if (Orchid != null && Orchid.CanBeCasted() && Utils.SleepCheck("orchid") && modifEul == null && _menuValue.IsEnabled("item_orchid")) { Orchid.UseAbility(_target); Utils.Sleep(150 + Game.Ping, "orchid"); } else if (Shiva != null && Shiva.CanBeCasted() && Utils.SleepCheck("shiva") && modifEul == null && _menuValue.IsEnabled("item_shivas_guard")) { Shiva.UseAbility(); Utils.Sleep(150 + Game.Ping, "shiva"); } else if (Veil != null && Veil.CanBeCasted() && Utils.SleepCheck("veil") && modifEul == null && _menuValue.IsEnabled("item_veil_of_discord")) { Veil.UseAbility(_target.Position); Utils.Sleep(150 + Game.Ping, "veil"); } else if (Ethereal != null && Ethereal.CanBeCasted() && Utils.SleepCheck("ethereal") && modifEul == null && _menuValue.IsEnabled("item_ethereal_blade")) { Ethereal.UseAbility(_target); Utils.Sleep(150 + Game.Ping, "ethereal"); } else if (Dagon != null && Dagon.CanBeCasted() && Utils.SleepCheck("dagon") && modifEul == null) { Dagon.UseAbility(_target); Utils.Sleep(150 + Game.Ping, "dagon"); } else if (Hex != null && Hex.CanBeCasted() && Utils.SleepCheck("hex") && !_target.IsStunned() && Utils.SleepCheck("eul") && _menuValue.IsEnabled("item_sheepstick")) { Hex.UseAbility(_target); Utils.Sleep(150 + Game.Ping, "hex"); } else if (W != null && W.CanBeCasted() && Utils.SleepCheck("w") && (modifEul != null && modifEul.RemainingTime <= W.GetCastDelay(_me, _target, true) + 0.5 || modifHex != null && modifHex.RemainingTime <= W.GetCastDelay(_me, _target, true) + 0.5 || (Hex == null || !_menuValue.IsEnabled("item_sheepstick") || Hex.Cooldown > 0) && (Eul == null || !_menuValue.IsEnabled("item_cyclone") || Eul.Cooldown < 20 && Eul.Cooldown > 0))) { W.UseAbility(W.GetPrediction(_target, W.GetCastDelay(_me, _target))); Utils.Sleep(150 + Game.Ping, "w"); } else if (Q != null && Q.CanBeCasted() && Utils.SleepCheck("q") && modifEul == null) { Q.UseAbility(_target); Utils.Sleep(150 + Game.Ping, "q"); } else if (R != null && R.CanBeCasted() && Utils.SleepCheck("r") && modifEul == null) { R.UseAbility(_target); Utils.Sleep(150 + Game.Ping, "r"); } else if (!_me.IsChanneling() && NothingCanCast() && !_target.IsAttackImmune() && Utils.SleepCheck("attack")) { _me.Attack(_target); Utils.Sleep(1000 + Game.Ping, "attack"); } } } }