private static float IgniteDamage(EloBuddy.AIHeroClient target) { if (ignite == EloBuddy.SpellSlot.Unknown || Player.Spellbook.CanUseSpell(ignite) != EloBuddy.SpellState.Ready) { return(0f); } return((float)Player.GetSummonerSpellDamage(target, LeagueSharp.Common.Damage.SummonerSpell.Ignite)); }
private int CountHeroesInRange(EloBuddy.AIHeroClient target, bool checkteam, float range = 1200f) { var objListTeam = EloBuddy.ObjectManager.Get <EloBuddy.AIHeroClient>() .Where( x => x.LSIsValidTarget(range, false)); return(objListTeam.Count(hero => checkteam ? hero.Team != target.Team : hero.Team == target.Team)); }
static void Interrupter2_OnInterruptableTarget(EloBuddy.AIHeroClient sender, LeagueSharp.Common.Interrupter2.InterruptableTargetEventArgs args) { if (!Misc["autoEI"].Cast <CheckBox>().CurrentValue) { return; } if (EloBuddy.ObjectManager.Player.LSDistance(sender, true) < _spellE.Range * _spellE.Range) { _spellE.Cast(sender); } }
static bool OkToUlt() { if (Helper.EnemyTeam.Any(x => x.LSDistance(EloBuddy.ObjectManager.Player) < 500)) //any enemies around me? { return(true); } Vector3 mousePos = EloBuddy.Game.CursorPos; var enemiesNearMouse = Helper.EnemyTeam.Where(x => x.LSDistance(EloBuddy.ObjectManager.Player) < _spellR.Range && x.LSDistance(mousePos) < 650); if (enemiesNearMouse.Count() > 0) { if (IsRActive()) //R already active { return(true); } bool enoughMana = EloBuddy.ObjectManager.Player.Mana > EloBuddy.ObjectManager.Player.Spellbook.GetSpell(EloBuddy.SpellSlot.Q).SData.Mana + EloBuddy.ObjectManager.Player.Spellbook.GetSpell(EloBuddy.SpellSlot.E).SData.Mana + EloBuddy.ObjectManager.Player.Spellbook.GetSpell(EloBuddy.SpellSlot.R).SData.Mana; if (ComboM["comboROnlyUserInitiate"].Cast <CheckBox>().CurrentValue || !(_spellQ.IsReady() && _spellE.IsReady()) || !enoughMana) //dont initiate if user doesnt want to, also dont initiate if Q and E isnt ready or not enough mana for QER combo { return(false); } var friendsNearMouse = Helper.OwnTeam.Where(x => x.IsMe || x.LSDistance(mousePos) < 650); //me and friends near mouse (already in fight) if (enemiesNearMouse.Count() == 1) //x vs 1 enemy { EloBuddy.AIHeroClient enemy = enemiesNearMouse.FirstOrDefault(); bool underTower = LeagueSharp.Common.Utility.UnderTurret(enemy); return(GetComboDamage(enemy) / enemy.Health >= (underTower ? 1.25f : 1)); //if enemy under tower, only initiate if combo damage is >125% of enemy health } else //fight if enemies low health or 2 friends vs 3 enemies and 3 friends vs 3 enemies, but not 2vs4 { int lowHealthEnemies = enemiesNearMouse.Count(x => x.Health / x.MaxHealth <= 0.1); //dont count low health enemies float totalEnemyHealth = enemiesNearMouse.Sum(x => x.Health); return(friendsNearMouse.Count() - (enemiesNearMouse.Count() - lowHealthEnemies) >= -1 || EloBuddy.ObjectManager.Player.Health / totalEnemyHealth >= 0.8); } } return(false); }
private void FleeMode(EkkoCore core, EloBuddy.AIHeroClient target, bool useQ, bool useE, bool useW) { CastEOut(target, core); if (useQ && core.spells.Q.IsInRange(target)) { var predQ = core.spells.Q.GetPrediction(target); if (predQ.HitChance >= HitChance.High) { core.spells.Q.Cast(predQ.CastPosition); } } if (useW && core.spells.W.IsInRange(Prediction.Position.PredictUnitPosition(target, core.spells.W.CastDelay * 1000 + Game.Ping).To3D())) { var pos = Prediction.Position.PredictUnitPosition(target, core.spells.W.CastDelay * 1000 + Game.Ping); core.spells.Q.Cast(pos.To3D()); } }
private void NormalMode(EkkoCore core, EloBuddy.AIHeroClient target, bool useQ, bool useE, bool useW) { if (useQ && (core.Player.Distance(target) > core.spells.E.Range || core.Player.Distance(target) <= 100 && (core.spells.E.IsReady()) && useE)) { var predQ = core.spells.Q.GetPrediction(target); if (predQ.HitChance >= HitChance.High) { core.spells.Q.Cast(predQ.CastPosition); } } if (useE && core.Player.Distance(target) > core.spells.E.Range * 2) { this.CastE(target, core, useQ); } if (useW && core.spells.W.IsInRange(target) && (target.HasBuffOfType(BuffType.Slow) || target.HasBuffOfType(BuffType.Stun))) { core.spells.W.Cast(target.Position); } }
internal void OnGapCloser(EloBuddy.AIHeroClient sender, EloBuddy.SDK.Events.Gapcloser.GapcloserEventArgs args, EkkoCore core) { if (sender == null || sender.IsAlly) { return; } var Gapcloser = core._menu.MiscMenu["MG"].Cast <CheckBox>().CurrentValue; if (Gapcloser != false) { if (sender.IsAttackingPlayer) { core.spells.W.Cast(core.Player.Position); this.CastEOut(sender, core); var predQ = core.spells.Q.GetPrediction(sender); if (predQ.HitChance >= HitChance.High) { core.spells.Q.Cast(predQ.CastPosition); } } } }
private static bool IsJungler(AIHeroClient hero) { return(hero.Spellbook.Spells.Any(spell => spell.Name.ToLower().Contains("smite"))); }
// static void Main(string[] args) { CustomEvents.Game.OnGameLoad += GameOnOnGameLoad; } private static void GameOnOnGameLoad(EventArgs args) { enemySpawn = ObjectManager.Get <Obj_SpawnPoint>().FirstOrDefault(x => x.IsEnemy); Q = new Spell(SpellSlot.Q); E = new Spell(SpellSlot.E); W = new Spell(SpellSlot.W); R = new Spell(SpellSlot.R); Config = new Menu("OneKeyToWin AIO", "OneKeyToWin_AIO" + ObjectManager.Player.ChampionName, true); #region MENU ABOUT OKTW Config.SubMenu("About OKTW©").AddItem(new MenuItem("debug", "Debug").SetValue(false)); Config.SubMenu("About OKTW©").AddItem(new MenuItem("debugChat", "Debug Chat").SetValue(false)); Config.SubMenu("About OKTW©").AddItem(new MenuItem("print", "OKTW NEWS in chat").SetValue(true)); #endregion Config.AddItem(new MenuItem("AIOmode", "AIO mode", true).SetValue(new StringList(new[] { "Utility and champion", "Only Champion", "Only Utility" }, 0))); AIOmode = Config.Item("AIOmode", true).GetValue <StringList>().SelectedIndex; if (AIOmode != 2) { Config.AddSubMenu(new Menu("Orbwalking", "Orbwalking")); Orbwalker = new LeagueSharp.Common.Orbwalking.Orbwalker(Config.SubMenu("Orbwalking")); } if (AIOmode != 1) { Config.SubMenu("Utility, Draws OKTW©").SubMenu("GankTimer").AddItem(new MenuItem("timer", "GankTimer").SetValue(true)); Config.SubMenu("Utility, Draws OKTW©").SubMenu("GankTimer").AddItem(new MenuItem("1", "RED - be careful")); Config.SubMenu("Utility, Draws OKTW©").SubMenu("GankTimer").AddItem(new MenuItem("2", "ORANGE - you have time")); Config.SubMenu("Utility, Draws OKTW©").SubMenu("GankTimer").AddItem(new MenuItem("3", "GREEN - jungler visable")); Config.SubMenu("Utility, Draws OKTW©").SubMenu("GankTimer").AddItem(new MenuItem("4", "CYAN jungler dead - take objectives")); } Config.SubMenu("Prediction MODE").AddItem(new MenuItem("PredictionMODE", "Prediction MODE", true).SetValue(new StringList(new[] { "Common Prediction", "OKTW© Prediction", "SPediction press F5 if not loaded", "SDK" }, 1))); Config.SubMenu("Prediction MODE").AddItem(new MenuItem("HitChance", "Hit Chance", true).SetValue(new StringList(new[] { "Very High", "High", "Medium" }, 0))); Config.SubMenu("Prediction MODE").AddItem(new MenuItem("debugPred", "Draw Aiming OKTW© Prediction").SetValue(false)); if (Config.Item("PredictionMODE", true).GetValue <StringList>().SelectedIndex == 2) { SPrediction.Prediction.Initialize(Config.SubMenu("Prediction MODE")); SPredictionLoad = true; Config.SubMenu("Prediction MODE").AddItem(new MenuItem("322", "SPrediction LOADED")); } else { Config.SubMenu("Prediction MODE").AddItem(new MenuItem("322", "SPrediction NOT LOADED")); } if (AIOmode != 2) { Config.SubMenu("Extra settings OKTW©").AddItem(new MenuItem("supportMode", "Support Mode", true).SetValue(false)); Config.SubMenu("Extra settings OKTW©").AddItem(new MenuItem("comboDisableMode", "Disable auto-attack in combo mode", true).SetValue(false)); Config.SubMenu("Extra settings OKTW©").AddItem(new MenuItem("manaDisable", "Disable mana manager in combo", true).SetValue(false)); Config.SubMenu("Extra settings OKTW©").AddItem(new MenuItem("collAA", "Disable auto-attack if Yasuo wall collision", true).SetValue(true)); Config.SubMenu("Extra settings OKTW©").SubMenu("Anti-Melee Positioning Assistant OKTW©").AddItem(new MenuItem("positioningAssistant", "Anti-Melee Positioning Assistant OKTW©").SetValue(false)); foreach (var enemy in HeroManager.Enemies.Where(enemy => enemy.IsMelee)) { Config.SubMenu("Extra settings OKTW©").SubMenu("Anti-Melee Positioning Assistant OKTW©").SubMenu("Positioning Assistant:").AddItem(new MenuItem("posAssistant" + enemy.ChampionName, enemy.ChampionName).SetValue(true)); } Config.SubMenu("Extra settings OKTW©").SubMenu("Anti-Melee Positioning Assistant OKTW©").AddItem(new MenuItem("positioningAssistantDraw", "Show notification").SetValue(true)); Config.SubMenu("Extra settings OKTW©").AddItem(new MenuItem("harassLaneclear", "Skill-Harass in lane clear").SetValue(true)); Config.Item("supportMode", true).SetValue(false); #region LOAD CHAMPIONS switch (Player.ChampionName) { case "Jinx": new Jinx().LoadOKTW(); break; case "Sivir": new Sivir().LoadOKTW(); break; case "Ezreal": new Ezreal().LoadOKTW(); break; case "KogMaw": new KogMaw().LoadOKTW(); break; case "Annie": new Annie().LoadOKTW(); break; case "Ashe": new Ashe().LoadOKTW(); break; case "MissFortune": new MissFortune().LoadOKTW(); break; case "Quinn": new Quinn().LoadOKTW(); break; case "Kalista": new Kalista().LoadOKTW(); break; case "Caitlyn": new Caitlyn().LoadOKTW(); break; case "Graves": new Graves().LoadOKTW(); break; case "Urgot": new Urgot().LoadOKTW(); break; case "Anivia": new Anivia().LoadOKTW(); break; case "Orianna": new Orianna().LoadOKTW(); break; case "Ekko": new Ekko().LoadOKTW(); break; case "Vayne": new Vayne().LoadOKTW(); break; case "Lucian": new Lucian().LoadOKTW(); break; case "Darius": new Champions.Darius().LoadOKTW(); break; case "Blitzcrank": new Champions.Blitzcrank().LoadOKTW(); break; case "Corki": new Champions.Corki().LoadOKTW(); break; case "Varus": new Champions.Varus().LoadOKTW(); break; case "Twitch": new Champions.Twitch().LoadOKTW(); break; case "Tristana": new Champions.Tristana().LoadMenuOKTW(); break; case "Xerath": new Champions.Xerath().LoadOKTW(); break; case "Jayce": new Champions.Jayce().LoadOKTW(); break; case "Kayle": new Champions.Kayle().LoadOKTW(); break; case "Thresh": new Champions.Thresh().LoadOKTW(); break; case "Draven": new Champions.Draven().LoadOKTW(); break; case "Evelynn": new Champions.Evelynn().LoadOKTW(); break; case "Ahri": new Champions.Ahri().LoadOKTW(); break; case "Brand": new Champions.Brand().LoadOKTW(); break; case "Morgana": new Morgana().LoadOKTW(); break; case "Lux": new Champions.Lux().LoadOKTW(); break; case "Malzahar": new Champions.Malzahar().LoadOKTW(); break; case "Karthus": new Champions.Karthus().LoadOKTW(); break; case "Swain": new Champions.Swain().LoadOKTW(); break; case "TwistedFate": new Champions.TwistedFate().LoadOKTW(); break; case "Syndra": new Champions.Syndra().LoadOKTW(); break; case "Velkoz": new Champions.Velkoz().LoadOKTW(); break; case "Jhin": new Champions.Jhin().LoadOKTW(); break; case "Kindred": new Champions.Kindred().LoadOKTW(); break; case "Braum": new Champions.Braum().LoadOKTW(); break; } } #endregion foreach (var hero in HeroManager.Enemies) { if (hero.IsEnemy && hero.Team != Player.Team) { if (IsJungler(hero)) { jungler = hero; } } } if (Config.Item("debug").GetValue <bool>()) { // new Core.OKTWlab().LoadOKTW(); } if (AIOmode != 1) { // new Activator().LoadOKTW(); new Core.OKTWward().LoadOKTW(); // new Core.AutoLvlUp().LoadOKTW(); // new Core.OKTWtracker().LoadOKTW(); // new Core.OKTWdraws().LoadOKTW(); } Config.AddToMainMenu(); Game.OnUpdate += OnUpdate; LeagueSharp.Common.Orbwalking.BeforeAttack += Orbwalking_BeforeAttack; Drawing.OnDraw += OnDraw; // Game.OnWndProc += Game_OnWndProc; if (Config.Item("print").GetValue <bool>()) { Chat.Print("<font size='30'>OneKeyToWin</font> <font color='#b756c5'>by Sebby</font>"); Chat.Print("<font color='#b756c5'>OKTW NEWS: </font>OKTW Prediction REWORKED"); } }
private bool IsCondemnable(EloBuddy.AIHeroClient hero) { if (!hero.LSIsValidTarget(550f) || hero.HasBuffOfType(EloBuddy.BuffType.SpellShield) || hero.HasBuffOfType(EloBuddy.BuffType.SpellImmunity) || hero.IsDashing()) { return(false); } //values for pred calc pP = player position; p = enemy position; pD = push distance var pP = EloBuddy.ObjectManager.Player.ServerPosition; var p = hero.ServerPosition; var pD = EPushDistanceSlider; var mode = EModeStringList; if (mode == 1 && (IsCollisionable(p.LSExtend(pP, -pD)) || IsCollisionable(p.LSExtend(pP, -pD / 2f)) || IsCollisionable(p.LSExtend(pP, -pD / 3f)))) { if (!hero.CanMove) { return(true); } var enemiesCount = EloBuddy.ObjectManager.Player.CountEnemyHeroesInRange(1200); if (enemiesCount > 1 && enemiesCount <= 3) { var prediction = E.GetPrediction(hero); for (var i = 15; i < pD; i += 75) { if (i > pD) { var lastPosFlags = EloBuddy.NavMesh.GetCollisionFlags( prediction.UnitPosition.ToVector2() .Extend( pP.ToVector2(), -pD) .ToVector3()); if (lastPosFlags.HasFlag(EloBuddy.CollisionFlags.Wall) || lastPosFlags.HasFlag(EloBuddy.CollisionFlags.Building)) { return(true); } return(false); } var posFlags = EloBuddy.NavMesh.GetCollisionFlags( prediction.UnitPosition.ToVector2() .Extend( pP.ToVector2(), -i) .ToVector3()); if (posFlags.HasFlag(EloBuddy.CollisionFlags.Wall) || posFlags.HasFlag(EloBuddy.CollisionFlags.Building)) { return(true); } } return(false); } else { var hitchance = EHitchanceSlider; var angle = 0.20 * hitchance; const float travelDistance = 0.5f; var alpha = new Vector2((float)(p.X + travelDistance * Math.Cos(Math.PI / 180 * angle)), (float)(p.X + travelDistance * Math.Sin(Math.PI / 180 * angle))); var beta = new Vector2((float)(p.X - travelDistance * Math.Cos(Math.PI / 180 * angle)), (float)(p.X - travelDistance * Math.Sin(Math.PI / 180 * angle))); for (var i = 15; i < pD; i += 100) { if (i > pD) { return(false); } if (IsCollisionable(pP.ToVector2().Extend(alpha, i) .ToVector3()) && IsCollisionable(pP.ToVector2().Extend(beta, i).ToVector3())) { return(true); } } return(false); } } if (mode == 2 && (IsCollisionable(p.LSExtend(pP, -pD)) || IsCollisionable(p.LSExtend(pP, -pD / 2f)) || IsCollisionable(p.LSExtend(pP, -pD / 3f)))) { if (!hero.CanMove || (hero.Spellbook.IsAutoAttacking)) { return(true); } var hitchance = EHitchanceSlider; var angle = 0.20 * hitchance; const float travelDistance = 0.5f; var alpha = new Vector2((float)(p.X + travelDistance * Math.Cos(Math.PI / 180 * angle)), (float)(p.X + travelDistance * Math.Sin(Math.PI / 180 * angle))); var beta = new Vector2((float)(p.X - travelDistance * Math.Cos(Math.PI / 180 * angle)), (float)(p.X - travelDistance * Math.Sin(Math.PI / 180 * angle))); for (var i = 15; i < pD; i += 100) { if (i > pD) { return(IsCollisionable(alpha.Extend(pP.ToVector2(), -pD) .ToVector3()) && IsCollisionable(beta.Extend(pP.ToVector2(), -pD).ToVector3())); } if (IsCollisionable(alpha.Extend(pP.ToVector2(), -i) .ToVector3()) && IsCollisionable(beta.Extend(pP.ToVector2(), -i).ToVector3())) { return(true); } } return(false); } if (mode == 9) { if (!hero.CanMove || (hero.Spellbook.IsAutoAttacking)) { return(true); } var hitchance = EHitchanceSlider; var angle = 0.20 * hitchance; const float travelDistance = 0.5f; var alpha = new Vector2((float)(p.X + travelDistance * Math.Cos(Math.PI / 180 * angle)), (float)(p.X + travelDistance * Math.Sin(Math.PI / 180 * angle))); var beta = new Vector2((float)(p.X - travelDistance * Math.Cos(Math.PI / 180 * angle)), (float)(p.X - travelDistance * Math.Sin(Math.PI / 180 * angle))); for (var i = 15; i < pD; i += 100) { if (IsCollisionable(pP.ToVector2().Extend(alpha, i) .ToVector3()) || IsCollisionable(pP.ToVector2().Extend(beta, i).ToVector3())) { return(true); } } return(false); } if (mode == 3) { var prediction = E.GetPrediction(hero); return(EloBuddy.NavMesh.GetCollisionFlags( prediction.UnitPosition.ToVector2() .Extend( pP.ToVector2(), -pD) .ToVector3()).HasFlag(EloBuddy.CollisionFlags.Wall) || EloBuddy.NavMesh.GetCollisionFlags( prediction.UnitPosition.ToVector2() .Extend( pP.ToVector2(), -pD / 2f) .ToVector3()).HasFlag(EloBuddy.CollisionFlags.Wall)); } if (mode == 4) { var prediction = E.GetPrediction(hero); for (var i = 15; i < pD; i += 100) { if (i > pD) { return(false); } var posCF = EloBuddy.NavMesh.GetCollisionFlags( prediction.UnitPosition.ToVector2() .Extend( pP.ToVector2(), -i) .ToVector3()); if (posCF.HasFlag(EloBuddy.CollisionFlags.Wall) || posCF.HasFlag(EloBuddy.CollisionFlags.Building)) { return(true); } } return(false); } if (mode == 5) { var prediction = E.GetPrediction(hero); for (var i = 15; i < pD; i += 75) { var posCF = EloBuddy.NavMesh.GetCollisionFlags( prediction.UnitPosition.ToVector2() .Extend( pP.ToVector2(), -i) .ToVector3()); if (posCF.HasFlag(EloBuddy.CollisionFlags.Wall) || posCF.HasFlag(EloBuddy.CollisionFlags.Building)) { return(true); } } return(false); } if (mode == 6) { var prediction = E.GetPrediction(hero); for (var i = 15; i < pD; i += (int)hero.BoundingRadius) //:frosty: { var posCF = EloBuddy.NavMesh.GetCollisionFlags( prediction.UnitPosition.ToVector2() .Extend( pP.ToVector2(), -i) .ToVector3()); if (posCF.HasFlag(EloBuddy.CollisionFlags.Wall) || posCF.HasFlag(EloBuddy.CollisionFlags.Building)) { return(true); } } return(false); } if (mode == 7) { var prediction = E.GetPrediction(hero); for (var i = 15; i < pD; i += 75) { var posCF = EloBuddy.NavMesh.GetCollisionFlags( prediction.UnitPosition.ToVector2() .Extend( pP.ToVector2(), -i) .ToVector3()); if (posCF.HasFlag(EloBuddy.CollisionFlags.Wall) || posCF.HasFlag(EloBuddy.CollisionFlags.Building)) { return(true); } } return(false); } if (mode == 8 && (IsCollisionable(p.LSExtend(pP, -pD)) || IsCollisionable(p.LSExtend(pP, -pD / 2f)) || IsCollisionable(p.LSExtend(pP, -pD / 3f)))) { return(true); } return(false); }
private bool IsInvulnerable(EloBuddy.AIHeroClient target) { return(target.HasBuffOfType(EloBuddy.BuffType.SpellShield) || target.HasBuffOfType(EloBuddy.BuffType.SpellImmunity)); }
private bool IsKillable(EloBuddy.AIHeroClient hero) { return(EloBuddy.ObjectManager.Player.LSGetAutoAttackDamage(hero) * 2 < hero.Health); }