private void StayInDangerZone() { if (Player.InFountain() || Player.IsRecalling()) { return; } if (GetCurrentHeat() < 31 && W.IsReady() && menu.Item("W_Auto_Heat", true).GetValue <bool>()) { W.Cast(); return; } if (GetCurrentHeat() < 31 && Q.IsReady() && menu.Item("Q_Auto_Heat", true).GetValue <bool>()) { var enemy = ObjectManager.Get <Obj_AI_Hero>().Where(x => x.IsEnemy).OrderBy(x => Player.Distance(x.Position)).FirstOrDefault(); if (enemy != null) { Q.Cast(enemy.ServerPosition); } return; } if (GetCurrentHeat() < 31 && E.IsReady() && menu.Item("E_Auto_Heat", true).GetValue <bool>()) { var enemy = ObjectManager.Get <Obj_AI_Hero>().Where(x => x.IsEnemy && !x.IsDead).OrderBy(x => Player.Distance(x.Position)).FirstOrDefault(); if (enemy != null) { E.Cast(enemy); } } }
private static void Orbwalking_AfterAttack(AttackableUnit unit, AttackableUnit target) { var useQ = _config.Item("UseQC").GetValue <bool>(); var useW = _config.Item("UseWC").GetValue <bool>(); var useE = _config.Item("UseEC").GetValue <bool>(); var useR = _config.Item("UseRC").GetValue <bool>(); var combo = _config.Item("ActiveCombo").GetValue <KeyBind>().Active; var rLim = _config.Item("RlimC").GetValue <Slider>().Value; if (combo && unit.IsMe && (target is Obj_AI_Hero)) { if (useW && _w.IsReady()) { foreach ( var hero in ObjectManager.Get <Obj_AI_Hero>() .Where(hero => hero.IsValidTarget(Orbwalking.GetRealAutoAttackRange(_player) + _w.Range))) { _w.CastOnUnit(ObjectManager.Player); } } if (useQ && _q.IsReady()) { var t = TargetSelector.GetTarget(_q.Range, TargetSelector.DamageType.Magical); var prediction = _q.GetPrediction(t); if (t.IsValidTarget(_q.Range) && prediction.Hitchance >= Qchangecombo() && _q.GetPrediction(t).CollisionObjects.Count == 0) { _q.Cast(t); } } if (useE && _e.IsReady()) { var t = TargetSelector.GetTarget(_e.Range, TargetSelector.DamageType.Magical); var predictione = _e.GetPrediction(t); if (t != null && t.IsValidTarget(_e.Range) && predictione.Hitchance >= Echangecombo()) { _e.Cast(t, false, true); } } if (useR && _r.IsReady() && GetBuffStacks() < rLim) { var t = TargetSelector.GetTarget(_r.Range, TargetSelector.DamageType.Magical); var predictionr = _r.GetPrediction(t); if (t.IsValidTarget(_r.Range) && predictionr.Hitchance >= Rchangecombo()) { _r.Cast(t, false, true); } } } }
private static void Game_OnGameUpdate(EventArgs args) { if (ObjectManager.Player.HasBuff("orianaghostself", true)) { CurrentBallPosition = ObjectManager.Player.ServerPosition; CurrentBallDrawPosition = ObjectManager.Player.Position; IsBallMoving = false; return; } foreach (var ally in ObjectManager.Get <Obj_AI_Hero>().Where(ally => ally.IsAlly && !ally.IsDead && ally.HasBuff("orianaghost", true))) { CurrentBallPosition = ally.ServerPosition; CurrentBallDrawPosition = ally.Position; IsBallMoving = false; return; } }
private static void Harass() { var useQ = _config.Item("UseQH").GetValue <bool>(); var useW = _config.Item("UseWH").GetValue <bool>(); var useE = _config.Item("UseEH").GetValue <bool>(); var useR = _config.Item("UseRH").GetValue <bool>(); var rLimH = _config.Item("RlimH").GetValue <Slider>().Value; if (useQ && _q.IsReady()) { var t = TargetSelector.GetTarget(_q.Range, TargetSelector.DamageType.Magical); if (t != null && _player.Distance(t) < _q.Range && _q.GetPrediction(t).Hitchance >= Qchangehar() && _q.GetPrediction(t).CollisionObjects.Count == 0) { _q.Cast(t); } } if (useW && _w.IsReady()) { foreach ( var hero in ObjectManager.Get <Obj_AI_Hero>() .Where(hero => hero.IsValidTarget(Orbwalking.GetRealAutoAttackRange(hero) + _w.Range))) { _w.CastOnUnit(ObjectManager.Player); } } if (useE && _e.IsReady()) { var t = TargetSelector.GetTarget(_e.Range, TargetSelector.DamageType.Magical); if (t != null && _player.Distance(t) < _e.Range && _e.GetPrediction(t).Hitchance >= Echangehar()) { _e.Cast(t, false, true); } } if (useR && _r.IsReady() && GetBuffStacks() < rLimH) { var t = TargetSelector.GetTarget(_r.Range, TargetSelector.DamageType.Magical); if (t != null && _player.Distance(t) < _r.Range && _r.GetPrediction(t).Hitchance >= Rchangehar()) { _r.Cast(t, false, true); } } }
/*private static bool Packets() * { * return _config.Item("usePackets").GetValue<bool>(); * }*/ private static void KillSteal() { foreach (var hero in ObjectManager.Get <Obj_AI_Hero>().Where(hero => hero.IsEnemy)) { if (_config.Item("useigniteks").GetValue <bool>() && _igniteSlot != SpellSlot.Unknown && _player.Spellbook.CanUseSpell(_igniteSlot) == SpellState.Ready && hero.IsValidTarget(600)) { var igniteDmg = _player.GetSummonerSpellDamage(hero, Damage.SummonerSpell.Ignite); if (igniteDmg > hero.Health) { _player.Spellbook.CastSpell(_igniteSlot, hero); } } if (_r.IsReady() && _config.Item("UseRM").GetValue <bool>() && hero.IsValidTarget(_r.Range) && ObjectManager.Player.GetSpellDamage(hero, SpellSlot.R) > hero.Health) { _r.Cast(hero, false, true); } } }
private static void UseItemes() { foreach (var hero in ObjectManager.Get <Obj_AI_Hero>().Where(hero => hero.IsEnemy)) { var iBilge = _config.Item("Bilge").GetValue <bool>(); var iBilgeEnemyhp = hero.Health <= (hero.MaxHealth * (_config.Item("BilgeEnemyhp").GetValue <Slider>().Value) / 100); var iBilgemyhp = _player.Health <= (_player.MaxHealth * (_config.Item("Bilgemyhp").GetValue <Slider>().Value) / 100); var iBlade = _config.Item("Blade").GetValue <bool>(); var iBladeEnemyhp = hero.Health <= (hero.MaxHealth * (_config.Item("BladeEnemyhp").GetValue <Slider>().Value) / 100); var iBlademyhp = _player.Health <= (_player.MaxHealth * (_config.Item("Blademyhp").GetValue <Slider>().Value) / 100); var iYoumuu = _config.Item("Youmuu").GetValue <bool>(); var iHextech = _config.Item("Hextech").GetValue <bool>(); var iHextechEnemyhp = hero.Health <= (hero.MaxHealth * (_config.Item("HextechEnemyhp").GetValue <Slider>().Value) / 100); var iHextechmyhp = _player.Health <= (_player.MaxHealth * (_config.Item("Hextechmyhp").GetValue <Slider>().Value) / 100); if (hero.IsValidTarget(450) && iBilge && (iBilgeEnemyhp || iBilgemyhp) && _bilge.IsReady()) { _bilge.Cast(hero); } if (hero.IsValidTarget(450) && iBlade && (iBladeEnemyhp || iBlademyhp) && _blade.IsReady()) { _blade.Cast(hero); } if (hero.IsValidTarget(450) && iYoumuu && _youmuu.IsReady()) { _youmuu.Cast(); } if (hero.IsValidTarget(700) && iHextech && (iHextechEnemyhp || iHextechmyhp) && _hextech.IsReady()) { _hextech.Cast(hero); } } }
private static void Combo() { if (!Orbwalking.CanMove(100) && !(ObjectManager.Player.BaseAbilityDamage + ObjectManager.Player.FlatMagicDamageMod > 100)) { return; } var etarget = TargetSelector.GetTarget(_e.Range, TargetSelector.DamageType.Physical); var useQ = _config.Item("UseQC").GetValue <bool>(); var useW = _config.Item("UseWC").GetValue <bool>(); var useE = _config.Item("UseEC").GetValue <bool>(); var useR = _config.Item("UseRC").GetValue <bool>(); var ignitecombo = _config.Item("UseIgnitecombo").GetValue <bool>(); var rLim = _config.Item("RlimC").GetValue <Slider>().Value; UseItemes(); if (_igniteSlot != SpellSlot.Unknown && ignitecombo && _player.Spellbook.CanUseSpell(_igniteSlot) == SpellState.Ready) { if (etarget.Health <= ComboDamage(etarget) && etarget.IsValidTarget(600)) { _player.Spellbook.CastSpell(_igniteSlot, etarget); } } if (useW && _w.IsReady()) { foreach ( var hero in ObjectManager.Get <Obj_AI_Hero>() .Where(hero => hero.IsValidTarget(Orbwalking.GetRealAutoAttackRange(_player) + _w.Range))) { _w.CastOnUnit(ObjectManager.Player); } } if (useQ && _q.IsReady()) { var t = TargetSelector.GetTarget(_q.Range, TargetSelector.DamageType.Magical); var prediction = _q.GetPrediction(t); if (t.IsValidTarget(_q.Range) && prediction.Hitchance >= Qchangecombo() && _q.GetPrediction(t).CollisionObjects.Count == 0) { _q.Cast(t); } } if (useE && _e.IsReady()) { var t = TargetSelector.GetTarget(_e.Range, TargetSelector.DamageType.Magical); var predictione = _e.GetPrediction(t); if (t != null && t.IsValidTarget(_e.Range) && predictione.Hitchance >= Echangecombo()) { _e.Cast(t, false, true); } } if (useR && _r.IsReady() && GetBuffStacks() < rLim) { var t = TargetSelector.GetTarget(_r.Range, TargetSelector.DamageType.Magical); var predictionr = _r.GetPrediction(t); if (t.IsValidTarget(_r.Range) && predictionr.Hitchance >= Rchangecombo()) { _r.Cast(t, false, true); } } }
private static void Drawing_OnDraw(EventArgs args) { var harass = (_config.Item("harasstoggle").GetValue <KeyBind>().Active); if (_config.Item("Drawharass").GetValue <bool>()) { if (harass) { Drawing.DrawText(Drawing.Width * 0.02f, Drawing.Height * 0.92f, System.Drawing.Color.GreenYellow, "Auto harass Enabled"); } else { Drawing.DrawText(Drawing.Width * 0.02f, Drawing.Height * 0.92f, System.Drawing.Color.OrangeRed, "Auto harass Disabled"); } } if (_config.Item("damagetest").GetValue <bool>()) { foreach ( var enemyVisible in ObjectManager.Get <Obj_AI_Hero>().Where(enemyVisible => enemyVisible.IsValidTarget())) { if (ComboDamage(enemyVisible) > enemyVisible.Health) { Drawing.DrawText(Drawing.WorldToScreen(enemyVisible.Position)[0] + 50, Drawing.WorldToScreen(enemyVisible.Position)[1] - 40, Color.Red, "Combo=Rekt"); } else if (ComboDamage(enemyVisible) + _player.GetAutoAttackDamage(enemyVisible, true) * 2 > enemyVisible.Health) { Drawing.DrawText(Drawing.WorldToScreen(enemyVisible.Position)[0] + 50, Drawing.WorldToScreen(enemyVisible.Position)[1] - 40, Color.Orange, "Combo+AA=Rekt"); } else { Drawing.DrawText(Drawing.WorldToScreen(enemyVisible.Position)[0] + 50, Drawing.WorldToScreen(enemyVisible.Position)[1] - 40, Color.Green, "Unkillable"); } } } if (_config.Item("DrawQ").GetValue <bool>() && _q.Level > 0) { Render.Circle.DrawCircle(ObjectManager.Player.Position, _q.Range, System.Drawing.Color.GreenYellow); } if (_config.Item("DrawW").GetValue <bool>() && _w.Level > 0) { Render.Circle.DrawCircle(ObjectManager.Player.Position, Orbwalking.GetRealAutoAttackRange(null) + 65 + _w.Range, System.Drawing.Color.GreenYellow); } if (_config.Item("DrawE").GetValue <bool>() && _e.Level > 0) { Render.Circle.DrawCircle(ObjectManager.Player.Position, _e.Range, System.Drawing.Color.GreenYellow); } if (_config.Item("DrawR").GetValue <bool>() && _r.Level > 0) { Render.Circle.DrawCircle(ObjectManager.Player.Position, _r.Range, System.Drawing.Color.GreenYellow); } }
protected override void Drawing_OnDraw(EventArgs args) { if (menu.Item("Draw_Disabled", true).GetValue <bool>()) { return; } if (menu.Item("Draw_Q", true).GetValue <bool>()) { if (Q.Level > 0) { Render.Circle.DrawCircle(Player.Position, Q.Range, Q.IsReady() ? Color.Green : Color.Red); } } if (menu.Item("Draw_W", true).GetValue <bool>()) { if (W.Level > 0) { Render.Circle.DrawCircle(Player.Position, W.Range - 2, W.IsReady() ? Color.Green : Color.Red); } } if (menu.Item("Draw_E", true).GetValue <bool>()) { if (E.Level > 0) { Render.Circle.DrawCircle(Player.Position, E.Range, E.IsReady() ? Color.Green : Color.Red); } } if (menu.Item("Draw_R", true).GetValue <bool>()) { if (R.Level > 0) { Render.Circle.DrawCircle(Player.Position, R.Range, R.IsReady() ? Color.Green : Color.Red); } } if (menu.Item("Draw_R_Pred", true).GetValue <bool>() && R.IsReady()) { if (countEnemiesNearPosition(Player.ServerPosition, R.Range + 500) < 2) { var target = TargetSelector.GetTarget(R.Range, TargetSelector.DamageType.Magical); if (target == null) { return; } var vector1 = target.ServerPosition - Vector3.Normalize(target.ServerPosition - Player.ServerPosition) * 300; R2.UpdateSourcePosition(vector1, vector1); var pred = R2.GetPrediction(target, true); var midpoint = (Player.ServerPosition + pred.UnitPosition) / 2; var vector2 = midpoint - Vector3.Normalize(pred.UnitPosition - Player.ServerPosition) * 300; if (Player.Distance(target) < 400) { vector1 = midpoint + Vector3.Normalize(pred.UnitPosition - Player.ServerPosition) * 800; if (!IsPassWall(pred.UnitPosition, vector1) && !IsPassWall(pred.UnitPosition, vector2)) { Vector2 wts = Drawing.WorldToScreen(Player.Position); Drawing.DrawText(wts[0], wts[1], Color.Wheat, "Hit: " + 1); Vector2 wtsPlayer = Drawing.WorldToScreen(vector1); Vector2 wtsPred = Drawing.WorldToScreen(vector2); Drawing.DrawLine(wtsPlayer, wtsPred, 1, Color.Wheat); Render.Circle.DrawCircle(vector1, 50, Color.Aqua); Render.Circle.DrawCircle(vector2, 50, Color.Yellow); Render.Circle.DrawCircle(pred.UnitPosition, 50, Color.Red); } } else if (!IsPassWall(pred.UnitPosition, vector1) && !IsPassWall(pred.UnitPosition, pred.CastPosition)) { if (pred.Hitchance >= HitChance.Medium) { Vector2 wts = Drawing.WorldToScreen(Player.Position); Drawing.DrawText(wts[0], wts[1], Color.Wheat, "Hit: " + 1); Vector2 wtsPlayer = Drawing.WorldToScreen(vector1); Vector2 wtsPred = Drawing.WorldToScreen(pred.CastPosition); Drawing.DrawLine(wtsPlayer, wtsPred, 1, Color.Wheat); Render.Circle.DrawCircle(vector1, 50, Color.Aqua); Render.Circle.DrawCircle(pred.CastPosition, 50, Color.Yellow); } } return; } //-----------------------------------------------------------------Draw Ult Mec----------------------------------------------- int maxHit = 0; Vector3 start = Vector3.Zero; Vector3 end = Vector3.Zero; Vector3 mid = Vector3.Zero; //loop one foreach (var target in ObjectManager.Get <Obj_AI_Hero>().Where(x => x.IsValidTarget(R.Range)).OrderByDescending(GetComboDamage)) { //loop 2 foreach ( var enemy in ObjectManager.Get <Obj_AI_Hero>() .Where( x => x.IsValidTarget(R.Range + 1000) && x.NetworkId != target.NetworkId && x.Distance(target) < 900) .OrderByDescending(x => x.Distance(target))) { int hit = 2; var targetPred = Prediction.GetPrediction(target, .25f); var enemyPred = Prediction.GetPrediction(enemy, .25f); var midpoint = (enemyPred.CastPosition + targetPred.CastPosition) / 2; var startpos = midpoint + Vector3.Normalize(enemyPred.CastPosition - targetPred.CastPosition) * 600; var endPos = midpoint - Vector3.Normalize(enemyPred.CastPosition - targetPred.CastPosition) * 600; if (!IsPassWall(midpoint, startpos) && !IsPassWall(midpoint, endPos) && countEnemiesNearPosition(Player.ServerPosition, R.Range + 1000) > 2) { //loop 3 foreach (var enemy2 in ObjectManager.Get <Obj_AI_Hero>().Where(x => x.IsValidTarget(R.Range + 1000) && x.NetworkId != target.NetworkId && x.NetworkId != enemy.NetworkId && x.Distance(target) < 1000)) { var enemy2Pred = Prediction.GetPrediction(enemy2, .25f); Object[] obj = VectorPointProjectionOnLineSegment(startpos.To2D(), endPos.To2D(), enemy2Pred.CastPosition.To2D()); var isOnseg = (bool)obj[2]; var pointLine = (Vector2)obj[1]; if (pointLine.Distance(enemy2Pred.CastPosition.To2D()) < 100 + enemy2.BoundingRadius && isOnseg) { hit++; } } } if (hit > maxHit) { maxHit = hit; start = startpos; end = endPos; mid = midpoint; } } } if (maxHit >= 2) { Vector2 wts = Drawing.WorldToScreen(Player.Position); Drawing.DrawText(wts[0], wts[1], Color.Wheat, "Hit: " + maxHit); Vector2 wtsPlayer = Drawing.WorldToScreen(start); Vector2 wtsPred = Drawing.WorldToScreen(end); Drawing.DrawLine(wtsPlayer, wtsPred, 1, Color.Wheat); Render.Circle.DrawCircle(start, 50, Color.Aqua); Render.Circle.DrawCircle(end, 50, Color.Yellow); Render.Circle.DrawCircle(mid, 50, Color.Red); } //---------------------------------------------------End drawing Ult Mec--------------------------------------- } }
private void CastMecR(bool forceUlt) { //check if only one target if (countEnemiesNearPosition(Player.ServerPosition, R.Range + 500) < 2 && forceUlt) { CastSingleR(); return; } int maxHit = 0; Vector3 start = Vector3.Zero; Vector3 end = Vector3.Zero; //loop one foreach (var target in ObjectManager.Get <Obj_AI_Hero>().Where(x => x.IsValidTarget(R.Range)).OrderByDescending(GetComboDamage)) { //loop 2 foreach (var enemy in ObjectManager.Get <Obj_AI_Hero>().Where(x => x.IsValidTarget(R.Range + 1000) && x.NetworkId != target.NetworkId && x.Distance(target) < 900) .OrderByDescending(x => x.Distance(target))) { int hit = 2; var targetPred = Prediction.GetPrediction(target, .25f); var enemyPred = Prediction.GetPrediction(enemy, .25f); var midpoint = (enemyPred.CastPosition + targetPred.CastPosition) / 2; var startpos = midpoint + Vector3.Normalize(enemyPred.CastPosition - targetPred.CastPosition) * 600; var endPos = midpoint - Vector3.Normalize(enemyPred.CastPosition - targetPred.CastPosition) * 600; if (!IsPassWall(midpoint, startpos) && !IsPassWall(midpoint, endPos) && countEnemiesNearPosition(Player.ServerPosition, R.Range + 1000) > 2) { //loop 3 foreach (var enemy2 in ObjectManager.Get <Obj_AI_Hero>().Where(x => x.IsValidTarget(R.Range + 1000) && x.NetworkId != target.NetworkId && x.NetworkId != enemy.NetworkId && x.Distance(target) < 1000)) { var enemy2Pred = Prediction.GetPrediction(enemy2, .25f); Object[] obj = VectorPointProjectionOnLineSegment(startpos.To2D(), endPos.To2D(), enemy2Pred.CastPosition.To2D()); var isOnseg = (bool)obj[2]; var pointLine = (Vector2)obj[1]; if (pointLine.Distance(enemy2Pred.CastPosition.To2D()) < 110 && isOnseg) { hit++; } } } if (hit > maxHit && hit > 1) { maxHit = hit; start = startpos; end = endPos; } } } if (start != Vector3.Zero && end != Vector3.Zero && R.IsReady()) { if (forceUlt) { CastR(start, end); } if (menu.Item("ComboActive", true).GetValue <KeyBind>().Active&& maxHit >= menu.Item("R_If_Enemy_Count_Combo", true).GetValue <Slider>().Value) { CastR(start, end); } if (maxHit >= menu.Item("R_If_Enemy_Count", true).GetValue <Slider>().Value) { CastR(start, end); } } }