private static void SpellsUsage(Hero me, Hero target, double distance, bool daggerIsReady) { //var qrange = 1200; //var wrange = 1000; var spellbook = me.Spellbook; var q = spellbook.SpellQ; var w = spellbook.SpellW; var e = spellbook.SpellE; //item abyssalblade = me.FindItem("item_abyssal_blade"); BKB = me.FindItem("item_abyssal_blade"); satanic = me.FindItem("item_satanic"); if (target != null && Menu.Item("keyBind").GetValue <KeyBind>().Active == true) { if (q != null && q.CanBeCasted() && q.CastRange >= distance && Utils.SleepCheck(me.Handle + q.Name)) { q.UseAbility(target); Utils.Sleep(500, me.Handle + q.Name); } if (w != null && w.CanBeCasted() && me.Distance2D(target) >= Menu.Item("Wrange").GetValue <Slider>().Value&& Utils.SleepCheck(me.Handle + w.Name)) { w.UseAbility(target); Utils.Sleep(500, me.Handle + w.Name); } if (abyssalblade != null && abyssalblade.CanBeCasted() && me.Distance2D(target) <= 140) { abyssalblade.UseAbility(target); Utils.Sleep(Game.Ping, "abyssalblade"); } if (BKB != null && BKB.CanBeCasted()) { BKB.UseAbility(); Utils.Sleep(Game.Ping, "BKB"); } if (satanic != null && satanic.CanBeCasted() && target.Health >= Menu.Item("UseSatanic").GetValue <Slider>().Value) { satanic.UseAbility(); Utils.Sleep(Game.Ping, "satanic"); } } }
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; } }