public static void Orbwalk(Vector3 Pos, Obj_AI_Base Target) { if (Target != null && (CanAttack() || HaveCancled()) && IsAllowedToAttack()) { DisableNextAttack = false; FireBeforeAttack(Target); if (!DisableNextAttack) { if (CurrentMode != Mode.Harass || !Target.IsMinion || Config.Item("OW_Harass_LastHit").GetValue <bool>()) { Player.IssueOrder(GameObjectOrder.AttackUnit, Target); LastAttack = Environment.TickCount + Game.Ping / 2; } } } if (!CanMove() || !IsAllowedToMove()) { return; } if (Player.IsMelee() && Target != null && InAutoAttackRange(Target) && Config.Item("OW_Misc_MeleePrediction").GetValue <bool>() && Target is Obj_AI_Hero && Game.CursorPos.Distance(Target.Position) < 300) { MovePrediction.Delay = Player.BasicAttack.SpellCastTime; MovePrediction.Speed = Player.BasicAttack.MissileSpeed; MoveTo(MovePrediction.GetPrediction(Target).UnitPosition); } else { MoveTo(Pos); } }
private static void Combo(Obj_AI_Hero target) { if (Config.Item("Muramana-Enabled").GetValue <bool>() && !Player.HasBuff("Muramana") && Config.Item("Muramana-Mana").GetValue <Slider>().Value <= (Player.Mana / Player.MaxMana) * 100 && Muramana.IsOwned() && Muramana.IsReady()) { Items.UseItem(Muramana.Id); } if (Config.Item("Combo-Use-Q").GetValue <bool>() && _q.IsReady()) { var qHit = _q.GetPrediction(target); if (qHit.Hitchance >= ComboHitChance) { _q.Cast(target); } } if (Config.Item("Combo-Use-W").GetValue <bool>() && _w.IsReady() && Player.Distance(target) < _w.Range) { var wHit = _w.GetPrediction(target); if (wHit.Hitchance >= ComboHitChance) { _w.Cast(wHit.CastPosition); if (Config.Item("Combo-Use-E-W").GetValue <bool>() && _e.IsReady()) { var landingPosition = Player.Position.Extend(wHit.CastPosition, _e.Range); if (!landingPosition.UnderTurret(true) && !landingPosition.IsWall() && //Check if landing position is definitely not a wall or a turret ObjectManager.Get <Obj_AI_Hero>().Count(enemy => enemy.IsEnemy && enemy.IsValidTarget(600, true, target.Position)) - 1 //The number of enemies, other than the target, near the target <= ObjectManager.Get <Obj_AI_Hero>().Count(ally => ally.IsAlly && !ally.IsDead && ally.Distance(target) < 600) && //The number of allies near the target (!target.IsMelee() || //If target is range, then just go ahead and land (target.IsMelee() && (landingPosition.Distance(target.Position) + Player.BoundingRadius + 50 > target.AttackRange + target.BoundingRadius)))) //If target is melee, make sure you don't land in its AA range { CheckFlag = true; } } } } if (Config.Item("Combo-Use-R").GetValue <bool>() && _r.IsReady()) { var rHit = _r.GetPrediction(target); if (rHit.Hitchance >= ComboHitChance) { _r.Cast(target); } } CastOffensiveItems(target); }
public static void eBehindWall(Obj_AI_Hero target) { if (!E.IsReady() || !enemyIsJumpable(target) || target.IsMelee()) { return; } float dist = Player.Distance(target); var pPos = Player.Position.To2D(); Vector2 dashPos = target.Position.To2D(); if (!target.IsMoving || Player.Distance(dashPos) <= dist) { foreach (Obj_AI_Base enemy in ObjectManager.Get <Obj_AI_Base>().Where(enemy => enemyIsJumpable(enemy))) { Vector2 posAfterE = pPos + (Vector2.Normalize(enemy.Position.To2D() - pPos) * E.Range); if ((target.Distance(posAfterE) < dist || target.Distance(posAfterE) < Orbwalking.GetRealAutoAttackRange(target) + 100) && goesThroughWall(target.Position, posAfterE.To3D())) { if (useENormal(target)) { return; } } } } }
public static void Orbwalk(Vector3 goalPosition, Obj_AI_Base target) { if (target != null && (CanAttack() || HaveCancled()) && IsAllowedToAttack()) { _disableNextAttack = false; FireBeforeAttack(target); if (!_disableNextAttack) { if (CurrentMode != Mode.Harass || !target.IsMinion || Menu.Item("Harass_Lasthit").GetValue <bool>()) { MyHero.IssueOrder(GameObjectOrder.AttackUnit, target); _lastAATick = Environment.TickCount + Game.Ping / 2; } } } if (!CanMove() || !IsAllowedToMove()) { return; } if (MyHero.IsMelee() && target != null && target.Distance(MyHero) < GetAutoAttackRange(MyHero, target) && Menu.Item("orb_Melee_Prediction").GetValue <bool>() && target is Obj_AI_Hero && Game.CursorPos.Distance(target.Position) < 300) { _movementPrediction.Delay = MyHero.BasicAttack.SpellCastTime; _movementPrediction.Speed = MyHero.BasicAttack.MissileSpeed; MoveTo(_movementPrediction.GetPrediction(target).UnitPosition); } else { MoveTo(goalPosition); } }
/// <summary> /// Returns player auto-attack missile speed. /// </summary> /// <param name="hero"> /// The hero. /// </param> /// <returns> /// The <see cref="float" />. /// </returns> public static float GetProjectileSpeed(this Obj_AI_Hero hero) { var name = hero.ChampionName; return(hero.IsMelee() || name == "Azir" || name == "Velkoz" || name == "Thresh" || (name == "Viktor" && hero.HasBuff("ViktorPowerTransferReturn")) || (name == "Kayle" && hero.HasBuff("JudicatorRighteousFury")) ? float.MaxValue : hero.BasicAttack.MissileSpeed); }
public static void attackMinion(Obj_AI_Base target, Vector3 moveTo) { if (target != null && CanAttack() && (player.IsMelee() || InAutoAttackRange(target))) { if (player.IssueOrder(GameObjectOrder.AttackUnit, target)) { _lastAATick = Environment.TickCount + Game.Ping / 2; } } MoveTo(moveTo); }
public override void OnEnemyGapcloser(ActiveGapcloser gapcloser) { Obj_AI_Hero attacker = gapcloser.Sender; if (!Menu.Item("use" + Name).GetValue <bool>()) { return; } if (!Menu.Item("enemygap" + Name).GetValue <bool>() || !IsReady()) { return; } foreach (var hero in Activator.Allies()) { if (!hero.Player.IsMe) { continue; } if (!Parent.Item(Parent.Name + "useon" + attacker.NetworkId).GetValue <bool>()) { continue; } if (Menu.Item("enemygapmelee" + Name).GetValue <bool>() && !attacker.IsMelee()) { continue; } if (hero.HitTypes.Contains(HitType.Ultimate) || hero.HitTypes.Contains(HitType.Danger)) { if (attacker.Distance(hero.Player) <= Range / 2f) { UseItem(Tar.Player, true); } } if (!Menu.Item("enemygapdanger" + Name).GetValue <bool>()) { if (attacker.Distance(hero.Player) <= Range / 2f) { UseItem(Tar.Player, true); } } } }
public static void putWallBehind(Obj_AI_Hero target) { if (!W.IsReady() || !E.IsReady() || target.IsMelee()) { return; } Vector2 dashPos = getNextPos(target); PredictionOutput po = Prediction.GetPrediction(target, 0.5f); float dist = Player.Distance(po.UnitPosition); if (!target.IsMoving || Player.Distance(dashPos) <= dist + 40) { if (dist < 330 && dist > 100 && W.IsReady()) { W.Cast(po.UnitPosition); } } }
public static void Orbwalk(Vector3 goalPosition, Obj_AI_Base target) { if (target != null && CanAttack() && IsAllowedToAttack()) { _disableNextAttack = false; FireBeforeAttack(target); if (!_disableNextAttack) { if (CurrentMode != Mode.Combo) { foreach (var obj in ObjectManager.Get <Obj_Building>().Where(obj => obj.Position.Distance(MyHero.Position) <= GetAutoAttackRange() + obj.BoundingRadius / 2 && obj.IsTargetable && (obj.Name.StartsWith("Barracks_") || obj.Name.StartsWith("HQ_")))) { MyHero.IssueOrder(GameObjectOrder.AttackTo, obj.Position); _lastAATick = Environment.TickCount + Game.Ping / 2; return; } } if (MyHero.IssueOrder(GameObjectOrder.AttackUnit, target)) { _lastAATick = Environment.TickCount + Game.Ping / 2; } } } if (!CanMove() || !IsAllowedToMove()) { return; } if (MyHero.IsMelee() && target != null && target.Distance(MyHero) < GetAutoAttackRange(MyHero, target) && Menu.Item("lxOrbwalker_Melee_Prediction").GetValue <bool>() && target is Obj_AI_Hero && Game.CursorPos.Distance(target.Position) < 300) { _movementPrediction.Delay = MyHero.BasicAttack.SpellCastTime; _movementPrediction.Speed = MyHero.BasicAttack.MissileSpeed; MoveTo(_movementPrediction.GetPrediction(target).UnitPosition); } else { MoveTo(goalPosition); } }
public static void Orbwalk(Vector3 goalPosition, Obj_AI_Base target) { if (target != null && CanAttack() && !PUC.Menu.Item("orb_noattack").GetValue <bool>()) { _disableNextAttack = false; FireBeforeAttack(target); if (!_disableNextAttack) { if (!Player.IssueOrder(GameObjectOrder.AttackUnit, target)) { Utility.DelayAction.Add(250, ResetAutoAttackTimer); } else { _lastAATick = Environment.TickCount + Game.Ping / 2; } return; } } if (!CanMove() || PUC.Menu.Item("orb_nomove").GetValue <bool>()) { return; } if (Player.IsMelee() && target != null && target.Distance(Player) < GetAutoAttackRangeto(target) && PUC.Menu.Item("orb_MeleePrediction").GetValue <bool>() && target is Obj_AI_Hero && Game.CursorPos.Distance(target.Position) < 300) { _movementPrediction.Delay = Player.BasicAttack.SpellCastTime; _movementPrediction.Speed = Player.BasicAttack.MissileSpeed; MoveTo(_movementPrediction.GetPrediction(target).UnitPosition, 1); } else { MoveTo(goalPosition); } }
public static void putWallBehind(Obj_AI_Hero target) { if (!W.IsReady() || !E.IsReady() || target.IsMelee()) return; Vector2 dashPos = getNextPos(target); PredictionOutput po = Prediction.GetPrediction(target, 0.5f); float dist = myHero.Distance(po.UnitPosition); if (!target.IsMoving || myHero.Distance(dashPos) <= dist + 40) if (dist < 330 && dist > 100 && W.IsReady() && Config.Item(target.ChampionName).GetValue<bool>()) { W.Cast(po.UnitPosition, true); } }
public static void updateArmaPlay() { try { if (!haveSeenMinion) { haveSeenMinion = ObjectManager.Get <Obj_AI_Minion>().Any(min => min.IsTargetable && min.IsHPBarRendered && min.IsAlly && min.Health > 50) || ARAMDetFull.gameStart + 44 * 1000 < ARAMDetFull.now; } if (!haveSeenMinion) { return; } try { AutoLevelChamp.LevelUpOff(); } catch (Exception ex) { Console.WriteLine(ex); } if ((player.InShop() || player.IsDead)) { buyItems(); } if (champ != null) { champ.alwaysCheck(); } setRambo(); if (player.IsDead || player.IsChannelingImportantSpell()) { return; } var fightLevel = MapControl.fightLevel(); MapControl.updateReaches(); var closestEnemy = EloBuddy.SDK.EntityManager.Heroes.Enemies.Where(ene => !ene.IsDead && ene.IsTargetable && ene.IsHPBarRendered && !ARAMTargetSelector.IsInvulnerable(ene)).OrderBy(ene => player.Position.Distance(ene.Position, true)).FirstOrDefault(); if (closestEnemy != null && ramboMode) { DeathWalker.deathWalk(closestEnemy.Position, true); return; } if (fightLevel != 0) { Aggresivity.addAgresiveMove(new AgresiveMove(40 * fightLevel, 2000, true, true)); } agrobalance = Aggresivity.getAgroBalance(); balance = (ARAMTargetSelector.IsInvulnerable(player) || player.IsZombie) ? 250 : MapControl.balanceAroundPointAdvanced(player.Position.To2D(), 250 - agrobalance * 5) + agrobalance; inDanger = balance < 0; if (champ != null) { try { if (player.GetEnemiesInRange(ARAMSimulator.farmRange).Count(ene => !ene.IsDead && !ene.IsZombie) != 0) { champ.killSteal(); } else { champ.farm(); } } catch (Exception ex) { Console.WriteLine(ex); } } if (!Sector.inTowerRange(player.Position.To2D()) || towerAttackedAlly || player.HealthPercent < 25) { try { ItemHandler.useItems(); sSpells.useSumoners(); if (champ != null) { champ.useSpells(); } else { MapControl.myControler.useSpells(); if (player.MaxMana < 350 || player.ManaPercent > 50) { MapControl.myControler.useSpellsOnMinions(); } } } catch (Exception ex) { Console.WriteLine(ex); } } deepestAlly = EloBuddy.SDK.EntityManager.Heroes.Allies.OrderBy(al => toNex.Position.Distance(al.Position, true)).FirstOrDefault(); var lookRange = player.AttackRange + ((player.IsMelee) ? 260 : 155); var easyKill = EloBuddy.SDK.EntityManager.Heroes.Enemies.FirstOrDefault(ene => ene != null && !ene.IsZombie && !ene.IsDead && ene.Distance(player, true) < lookRange * lookRange && !ARAMTargetSelector.IsInvulnerable(ene) && ene.Health / 1.5 < player.GetAutoAttackDamage(ene) && ene.IsHPBarRendered); if (easyKill != null && easyKill.IsValidTarget()) { Aggresivity.addAgresiveMove(new AgresiveMove(45, 1500, true)); DeathWalker.deathWalk(easyKill.Position.To2D().Extend(player.Position.To2D(), player.AttackRange * 0.7f).To3D(), true); } if (balance < 0) { DeathWalker.deathWalk(player.Position.To2D().Extend(fromNex.Position.To2D(), 632).To3D(), true); } if ((!player.IsMelee || fightLevel < 2) && EloBuddy.SDK.EntityManager.Heroes.Enemies.Any(h => !h.IsDead) && moveToRelicIfForHeal()) { return; } if (!player.UnderTurret(true)) { towerAttackedMe = false; towerAttackedAlly = false; } if (towerAttackedMe) { DeathWalker.CustomOrbwalkMode = false; DeathWalker.deathWalk(player.Position.To2D().Extend(fromNex.Position.To2D(), 600).To3D(), true); return; } awayTo = eAwayFromTo(); if (awayTo.IsValid() && awayTo.X != 0) { DeathWalker.CustomOrbwalkMode = false; if (champ != null) { champ.kiteBack(awayTo); } DeathWalker.deathWalk(awayTo.To3D(), true); return; } else { var closestObj = EloBuddy.SDK.EntityManager.Turrets.Enemies.Where( obj => obj.IsValidTarget(700) && !obj.IsDead && !obj.IsInvulnerable && obj.IsTargetable) .OrderBy(obj => obj.Position.Distance(player.Position, true)).FirstOrDefault(); if (closestObj != null && (!(closestObj is Obj_AI_Turret) || Sector.towerContainsAlly((Obj_AI_Turret)closestObj))) { DeathWalker.deathWalk( closestObj.Position.Extend(player.Position, player.AttackRange * 0.6f), true); return; } if (player.IsMelee) { var safeMeleeEnem = ARAMTargetSelector.getSafeMeleeTarget(); if (safeMeleeEnem != null && safeMeleeEnem.IsValidTarget()) { DeathWalker.deathWalk(safeMeleeEnem.Position.Extend(safeMeleeEnem.Direction, player.AttackRange * 0.3f), true); return; } } var fightOn = MapControl.fightIsOn(); if (fightOn != null && MapControl.balanceAroundPointAdvanced(fightOn.Position.To2D(), 280, 450) > (-130) && fightOn.Distance(player, true) < 2500 * 2500 && (!player.IsMelee() || !Sector.inTowerRange(fightOn.Position.To2D()))) { Aggresivity.addAgresiveMove(new AgresiveMove(40 * MapControl.fightLevel(), 2000, true, true)); DeathWalker.deathWalk(fightOn.Position.Extend(player.Position, player.AttackRange * 0.8f), true); } else { if (!inDanger) { Sector orbSector = null; Sector prevSector = null; foreach (var sector in sectors) { sector.update(); int sectorCheck = 1150 - MapControl.fearDistance; if (sector.containsEnemyChamp && sector.enemyChampIn.Distance(player, true) < sectorCheck * sectorCheck) { orbSector = sector; break; } if (sector.dangerPolig) { break; } if (sector.containsEnemy && !sector.containsAlly) { break; } orbSector = sector; if (sector.containsEnemy && sector.containsAlly) { break; } prevSector = sector; } if (orbSector == null) { return; } DeathWalker.deathWalk(orbSector.getRandomPointIn().To3D(), false, true); } else { DeathWalker.deathWalk(player.Position.To2D().Extend(fromNex.Position.To2D(), 600).To3D(), false); } } } } catch (Exception e) { Console.WriteLine(e); } }
private static void Game_OnGameInput(GameInputEventArgs args) { if (args.Input.StartsWith("#")) { args.Process = false; if (args.Input.ToLowerInvariant().Contains("print buffs") && !args.Input.ToLowerInvariant().Contains("print buffs nearest")) { print(countbuffs(Player) + " buffs have been found:", "normal"); foreach (var Buff in Player.Buffs) { Game.PrintChat("<font color=\'#1fdb35\'> Buff Name: </font>" + Buff.Name); Game.PrintChat("<font color=\'#1fdb35\'> Buff Display Name: </font>" + Buff.DisplayName); Game.PrintChat("<font color=\'#1fdb35\'> Buff Type: </font>" + Buff.Type); Game.PrintChat("--------------------------"); } } else if (args.Input.ToLowerInvariant().Contains("print buffs nearest")) { print(countbuffs(GetNearestTarget(Game.CursorPos)) + " buffs have been found:", "normal"); foreach (var Buff in GetNearestTarget(Game.CursorPos).Buffs) { Game.PrintChat("<font color=\'#1fdb35\'> Buff Name: </font>" + Buff.Name); Game.PrintChat("<font color=\'#1fdb35\'> Buff Display Name: </font>" + Buff.DisplayName); Game.PrintChat("<font color=\'#1fdb35\'> Buff Type: </font>" + Buff.Type); Game.PrintChat("--------------------------"); } } else if (args.Input.ToLowerInvariant().Contains("champname")) { print("Your champion is named " + Player.ChampionName, "normal"); print("Your champion's base skin is named " + Player.BaseSkinName, "normal"); print("Your champion's current skin name is " + Player.SkinName, "normal"); } else if (args.Input.ToLowerInvariant().Contains("print position") && !args.Input.ToLowerInvariant().Contains("print position cursor")) { print("Your position is: " + Player.Position, "normal"); } else if (args.Input.ToLowerInvariant().Contains("print position cursor")) { print("Your cursor's position is: " + Game.CursorPos, "normal"); } else if (args.Input.ToLowerInvariant().Contains("print petinfo")) { if (Player.Pet != null) { var pet = Player.Pet; print("Pet found! Printing info:", "normal"); Game.PrintChat("Pet name is: " + pet.Name); Game.PrintChat("Pet position is: " + pet.Position); Game.PrintChat("Pet type is: " + pet.Type); Game.PrintChat("Pet return radius: " + Player.PetReturnRadius); Game.PrintChat("Last Pet Spawned ID: " + Player.AI_LastPetSpawnedID); } else { print("Pet not found!", "error"); } } else if (args.Input.ToLowerInvariant().Contains("print iteminfo")) { if (Player.InventoryItems.Count() > 0) { print("Printing items' info:", "normal"); foreach (var Item in Player.InventoryItems) { Game.PrintChat("Item Display Name: " + Item.DisplayName); Game.PrintChat("Item Name: " + Item.Name); Game.PrintChat("Item ID: " + Item.Id); Game.PrintChat("Item Stacks: " + Item.Stacks); Game.PrintChat("--------------------------"); } } else { print("You do not own any items!", "error"); } } else if (args.Input.ToLowerInvariant().Contains("print attacktype")) { if (Player.IsMelee()) { print("Champion is melee!", "normal"); } else if (!Player.IsMelee()) { print("Champion is ranged!", "normal"); } else { print("Unexpected error!", "error"); } } else if (args.Input.ToLowerInvariant().Contains("print largest critstrike")) { if (Player.LargestCriticalStrike != 0) { print("Your largest critical strike is " + Player.LargestCriticalStrike, "normal"); } else { print("You haven't critically striked yet!", "error"); } } else if (args.Input.ToLowerInvariant() == "print my info") { print("Printing info:", "normal"); Game.PrintChat("Armor: " + Player.Armor); Game.PrintChat("Flat Magic Reduction: " + Player.FlatMagicReduction); Game.PrintChat("Gold: " + Player.Gold); Game.PrintChat("Current Gold: " + Player.GoldCurrent); Game.PrintChat("Gold Earned: " + Player.GoldEarned); Game.PrintChat("Has Bot AI: " + Player.HasBotAI); Game.PrintChat("HP: " + Player.Health + "/" + Player.MaxHealth); Game.PrintChat("HP Percentage: " + Player.HealthPercentage()); Game.PrintChat("Mana: " + Player.Mana + "/" + Player.MaxMana); Game.PrintChat("Mana Percentage: " + Player.ManaPercentage()); } else if (args.Input.ToLowerInvariant().Contains("print my info 2")) { Game.PrintChat("HP Regen Rate: " + Player.HPRegenRate); // Game.PrintChat("Is In Fountain: " + Player.InFountain()); Game.PrintChat("Is In Shop: " + Player.InShop()); Game.PrintChat("Is Bot: " + Player.IsBot); Game.PrintChat("Is Player Dead?: " + Player.IsDead); Game.PrintChat("Is Immovable: " + Player.IsImmovable); Game.PrintChat("Is Invulnerable: " + Player.IsInvulnerable); Game.PrintChat("Is Moving: " + Player.IsMoving); Game.PrintChat("Is Pacified: " + Player.IsPacified); Game.PrintChat("Is Recalling: " + Player.IsRecalling()); } else if (args.Input.ToLowerInvariant().Contains("print my info 3")) { Game.PrintChat("Is Rooted: " + Player.IsRooted);// Game.PrintChat("Is Stunned: " + Player.IsStunned); Game.PrintChat("Is Targetable: " + Player.IsTargetable); Game.PrintChat("Is Visible: " + Player.IsVisible); Game.PrintChat("Is Winding Up: " + Player.IsWindingUp); Game.PrintChat("Is Zombie: " + Player.IsZombie); Game.PrintChat("Last Spell Casted: " + Player.LastCastedSpellName()); Game.PrintChat("Last Spell's Target: " + Player.LastCastedSpellTarget()); Game.PrintChat("Last Pause Position: " + Player.LastPausePosition); Game.PrintChat("Level: " + Player.Level); } else if (args.Input.ToLowerInvariant().Contains("print my info 4")) { Game.PrintChat("Level Cap: " + Player.LevelCap);// Game.PrintChat("Lifesteal Immune: " + Player.LifestealImmune); Game.PrintChat("Longest Time Alive: " + Player.LongestTimeSpentLiving); Game.PrintChat("Magic Immune: " + Player.MagicImmune); Game.PrintChat("Network ID: " + Player.NetworkId); Game.PrintChat("Wards Killed: " + Player.WardsKilled); Game.PrintChat("Wards Placed: " + Player.WardsPlaced); } else if (args.Input.ToLowerInvariant().Contains("print game info")) { print("Printing game info:", "normal"); Game.PrintChat("Clock Time: " + Game.ClockTime); Game.PrintChat("ID: " + Game.Id); Game.PrintChat("IP: " + Game.IP); Game.PrintChat("Map ID: " + Game.MapId); Game.PrintChat("Mode: " + Game.Mode); Game.PrintChat("Ping: " + Game.Ping); Game.PrintChat("Time: " + Game.Time); Game.PrintChat("Version: " + Game.Version); } else if (args.Input.ToLowerInvariant().Contains("ping")) { print("Ping: " + Game.Ping, "normal"); } else { print("Command not found!", "error"); } } }
public static void updateJungleCleaner() { if (player.IsDead) { jcState = JungleCleanState.RecallForHeal; //Console.WriteLine("RecallForHeal"); return; } if (jcState == JungleCleanState.SearchingBestCamp) { focusedCamp = getBestCampToGo(); if (focusedCamp != null) { if (focusedCamp.priority >= 20) { GamePacket gPacketT; gPacketT = Packet.S2C.Ping.Encoded(new Packet.S2C.Ping.Struct(player.Position[0], player.Position[1], 0, 0, Packet.PingType.Normal)); gPacketT.Process(); gPacketT = Packet.S2C.Ping.Encoded(new Packet.S2C.Ping.Struct(player.Position[0], player.Position[1], 0, 0, Packet.PingType.Fallback)); gPacketT.Process(); } Console.WriteLine("New camp found " + focusedCamp); Console.WriteLine("Time to finish camp " + focusedCamp.timeToKill); Console.WriteLine("HP left after camp " + focusedCamp.hpLeftAfterFight); Console.WriteLine("Camp level " + focusedCamp.level); //puss out or kill? if ((focusedCamp.willKillMe || (focusedCamp.priority > 25 && player.Health / player.MaxHealth < 0.85f))) { Console.WriteLine("gona diee"); jcState = JungleCleanState.RecallForHeal; } else { jcState = JungleCleanState.RunningToCamp; Console.WriteLine("RunningToCamp"); } } else { jcState = JungleCleanState.RecallForHeal; Console.WriteLine("RecallForHeal"); } } if (jcState == JungleCleanState.RunningToCamp) { if (focusedCamp.State != Camp.JungleCampState.Dead && focusedCamp.side != GameObjectTeam.Neutral) { jungler.castWhenNear(focusedCamp); } jungler.checkItems(); logicRunToCamp(); } if (jcState == JungleCleanState.RunningToCamp && jungler.canMove() && (HypaJungle.player.Position.Distance(focusedCamp.campPosition) < 200 || isCampVisible())) { jcState = JungleCleanState.WaitingMinions; Console.WriteLine("WaitingMinions"); } if (jcState == JungleCleanState.WaitingMinions) { doWhileIdling(); } if (jcState == JungleCleanState.WaitingMinions && (isCampVisible())) { jcState = JungleCleanState.AttackingMinions; Console.WriteLine("AttackingMinions"); } if (jcState == JungleCleanState.AttackingMinions) { attackCampMinions(); if (focusedCamp.inAARangeMinCount() == 0 && !player.IsMelee()) { player.IssueOrder(GameObjectOrder.MoveTo, focusedCamp.campPosition); } } if (jcState == JungleCleanState.AttackingMinions && isCampFinished()) { if (HypaJungle.Config.Item("autoBuy").GetValue <bool>()) { jcState = JungleCleanState.GoingToShop; Console.WriteLine("GoingToShop"); } else { jcState = JungleCleanState.SearchingBestCamp; Console.WriteLine("SearchingBestCamp"); } } if (jcState == JungleCleanState.ThinkAfterFinishCamp) { jcState = JungleCleanState.SearchingBestCamp; Console.WriteLine("SearchingBestCamp"); } if (jcState == JungleCleanState.RecallForHeal) { if (jungler.recall.IsReady() && !player.IsChanneling && !jungler.inSpwan() && !recalCasted) { jungler.recall.Cast(); recalCasted = true; } if (jungler.inSpwan()) { if (HypaJungle.Config.Item("autoBuy").GetValue <bool>()) { jcState = JungleCleanState.GoingToShop; } else { if (jungler.inSpwan() && player.Health > player.MaxHealth * 0.7f && (!jungler.gotMana || player.Mana > player.MaxMana * 0.7f)) { jcState = JungleCleanState.SearchingBestCamp; Console.WriteLine("SearchingBestCamp"); } } } } if (jcState == JungleCleanState.GoingToShop) { if (!HypaJungle.Config.Item("autoBuy").GetValue <bool>()) { jcState = JungleCleanState.SearchingBestCamp; Console.WriteLine("SearchingBestCamp"); } if (jungler.inSpwan()) { jungler.getItemPassiveBoostDps(); jungler.setupSmite(); } if (jungler.inSpwan() && player.IsChanneling) { Vector3 stopRecPos = new Vector3(6, 30, 2); player.IssueOrder(GameObjectOrder.MoveTo, player.Position + stopRecPos); } if (jungler.nextItem != null && player.GoldCurrent - 12 >= jungler.nextItem.goldReach) { if (jungler.recall.IsReady() && !player.IsChanneling && !jungler.inSpwan() && !recalCasted) { jungler.recall.Cast(); recalCasted = true; } } else { if (jungler.inSpwan() && player.Health > player.MaxHealth * 0.8f && (!jungler.gotMana || player.Mana > player.MaxMana * 0.8f) && (jungler.nextItem == null || player.GoldCurrent + 40 <= jungler.nextItem.goldReach)) { jcState = JungleCleanState.SearchingBestCamp; Console.WriteLine("SearchingBestCamp"); } if (!player.IsChanneling && !jungler.inSpwan()) { jcState = JungleCleanState.SearchingBestCamp; Console.WriteLine("SearchingBestCamp"); } } } else if (jcState != JungleCleanState.RecallForHeal && jcState != JungleCleanState.GoingToShop) { recalCasted = false; } if (jcState == JungleCleanState.GoingToShop && jungler.inSpwan()) { if (jungler.nextItem != null && player.GoldCurrent >= jungler.nextItem.goldReach) { jungler.buyItems(); } if (player.Health > player.MaxHealth * 0.75f && player.Mana > player.MaxMana * 0.75f) { jcState = JungleCleanState.SearchingBestCamp; Console.WriteLine("SearchingBestCamp"); } } }
public static void eBehindWall(Obj_AI_Hero target) { if (!E.IsReady() || !enemyIsJumpable(target) || target.IsMelee()) return; float dist = Player.Distance(target); var pPos = Player.Position.To2D(); Vector2 dashPos = target.Position.To2D(); if (!target.IsMoving || Player.Distance(dashPos) <= dist) { foreach (Obj_AI_Base enemy in ObjectManager.Get<Obj_AI_Base>().Where(enemy => enemyIsJumpable(enemy))) { Vector2 posAfterE = pPos + (Vector2.Normalize(enemy.Position.To2D() - pPos) * E.Range); if ((target.Distance(posAfterE) < dist || target.Distance(posAfterE) < Orbwalking.GetRealAutoAttackRange(target) + 100) && goesThroughWall(target.Position, posAfterE.To3D())) { if (useENormal(target)) return; } } } }
public static bool SpellPrediction(Spell spell, Obj_AI_Hero target,bool collisionable) { // var dist = ObjectManager.Player.Distance(target.Position); var pos1 = LeagueSharp.Common.Prediction.GetPrediction(target, dist / spell.Speed).UnitPosition; var e = pos1.Distance(target.GetWaypoints()[1].To3D()); pos1.Extend(target.GetWaypoints()[1].To3D(), -e); Render.Circle.DrawCircle(pos1, 10, System.Drawing.Color.BlueViolet, 2); // var point = PointsAroundTheTarget(target.Position, target.BoundingRadius + 50).FirstOrDefault(t => t.IsWall()); if (point.X != 0 && point.Y != 0 && point.Z != 0) { if (MinionCollideLine(ObjectManager.Player.Position, ExtendWallpos(target, point), spell,collisionable)) return false; Render.Circle.DrawCircle(ExtendWallpos(target, point), 10, System.Drawing.Color.Brown, 2); spell.Cast(ExtendWallpos(target, point)); return true; } else { var range = spell.Range; if (target.Position.Distance(ObjectManager.Player.Position) < target.GetWaypoints()[1].Distance(ObjectManager.Player.Position)) { range -= 100; } if (!spell.IsInRange(target, range)) return false; if (target.IsFacing(ObjectManager.Player) && target.Position.Distance(ObjectManager.Player.Position) > target.GetWaypoints()[1].Distance(ObjectManager.Player.Position)) { if (MinionCollideLine(ObjectManager.Player.Position, target.Position, spell,collisionable)) return false; spell.Cast(target.Position); return true; } // float speed = if (target.IsImmovable) // check for cc guys { if (MinionCollideLine(ObjectManager.Player.Position, target.Position, spell,collisionable)) return false; spell.Cast(target.Position); return true; } // if(target.IsChannelingImportantSpell()) if (target.IsWindingUp && !target.IsMelee()) { if (MinionCollideLine(ObjectManager.Player.Position, target.Position, spell,collisionable)) return false; spell.Cast(target.Position); return true; } if (target.Position.Distance(ObjectManager.Player.Position) <= 300) { CastToDirection( target, spell,collisionable); } else { var oldPos = target.GetWaypoints()[0].To3D(); var h = false; Utility.DelayAction.Add(Game.Ping + 1000, () => h = Next(target, oldPos, spell,collisionable)); return h; } } return false; }
public static void Orbwalk(AttackableUnit mytarget, Vector3 goalPosition) { if (Player.IsChannelingImportantSpell()) { return; } if (mytarget is Obj_AI_Base) { var target = (Obj_AI_Base)mytarget; if (target != null && (CanAttack || HaveCancled) && IsAllowedToAttack()) { _disableNextAttack = false; FireBeforeAttack(target); if (!_disableNextAttack) { if (CurrentMode != Mode.Harass || !target.IsMinion || _menu.Item("Harass_Lasthit").GetValue <bool>()) { Player.IssueOrder(GameObjectOrder.AttackUnit, target); _lastAaTick = Utils.GameTimeTickCount + Game.Ping / 2; _canmove = false; } } } if (!CanMoves || !IsAllowedToMove()) { return; } if (Player.IsMelee() && target != null && target.Distance(Player.Position) < GetAutoAttackRange(Player, target) && _menu.Item("orb_Melee_Prediction").GetValue <bool>() && target is Obj_AI_Hero && Game.CursorPos.Distance(target.Position) < 300) { _movementPrediction.Delay = Player.BasicAttack.SpellCastTime; _movementPrediction.Speed = Player.BasicAttack.MissileSpeed; MoveTo(_movementPrediction.GetPrediction(target).UnitPosition); } else { MoveTo(goalPosition); } } else { if (mytarget != null && (CanAttack || HaveCancled) && IsAllowedToAttack()) { _disableNextAttack = false; FireBeforeAttack(mytarget); if (!_disableNextAttack) { Player.IssueOrder(GameObjectOrder.AttackUnit, mytarget); _lastAaTick = Utils.GameTimeTickCount + Game.Ping / 2; _canmove = false; } } if (!CanMoves || !IsAllowedToMove()) { return; } MoveTo(goalPosition); } }
static void Drawing_OnDraw(EventArgs args) { if (!Menu.Item("switch").GetValue <Boolean>()) { return; } Target = Hud.SelectedUnit != null ? Hud.SelectedUnit as Obj_AI_Hero : Player; var buffs = string.Empty; foreach (var buff in Target.Buffs) { buffs += "\n" + buff.Name + "[Count: " + buff.Count + "/Duration: " + (buff.EndTime - Game.ClockTime).ToString("0.00") + "],"; } var Mobs = MinionManager.GetMinions(1500, MinionTypes.All, MinionTeam.NotAlly, MinionOrderTypes.MaxHealth); var MobsList = string.Empty; foreach (var Mob in Mobs) { MobsList += "\n" + Mob.Name + "[BaseSkin: " + Mob.CharData.BaseSkinName + "/HP: " + Mob.Health + " / " + Mob.MaxHealth + "(" + Mob.HealthPercent.ToString("0.0") + "%)],"; } Render.Circle.DrawCircle(Player.Position, 1500, Color.Red, 10); Text.text = //"Name: " + Target.Name + NewLine + "ChampionName: " + Target.ChampionName + NewLine + "SkinName: " + Target.SkinName + NewLine + //"Gold: " + Target.Gold + NewLine + //"Level: " + Target.Level + NewLine + "TotalAttackDamage: " + Utility.TotalAttackDamage(Target) + NewLine + "TotalMagicalDamage: " + Utility.TotalMagicalDamage(Target) + NewLine + "Armor: " + Target.Armor + NewLine + "Health: " + Target.Health + " / " + Target.MaxHealth + " (" + Target.HealthPercent.ToString("0.0") + "%)" + NewLine + "Mana: " + Target.Mana + " / " + Target.MaxMana + " (" + Target.HealthPercent.ToString("0.0") + "%)" + NewLine + "HPRegenRate: " + Target.HPRegenRate + NewLine + "PARRegenRate: " + Target.PARRegenRate + NewLine + "Experience: " + Target.Experience + NewLine + "Position: " + Target.Position + NewLine + "ServerPosition: " + Target.ServerPosition + NewLine + "Team: " + Target.Team + NewLine + "NetworkId: " + Target.NetworkId + NewLine + "MoveSpeed: " + Target.MoveSpeed + NewLine + "AttackRange: " + Target.AttackRange + NewLine + "RealAutoAttackRange: " + Orbwalking.GetRealAutoAttackRange(Target) + NewLine + //"DeathDuration: " + Target.DeathDuration + NewLine + "BoundingRadius: " + Target.BoundingRadius + NewLine + NewLine + "Buffs: " + buffs + NewLine + NewLine + "IsDead: " + Target.IsDead + NewLine + "IsImmovable: " + Target.IsImmovable + NewLine + "IsInvulnerable: " + Target.IsInvulnerable + NewLine + "IsMoving: " + Target.IsMoving + NewLine + "IsPacified: " + Target.IsPacified + NewLine + "IsTargetable: " + Target.IsTargetable + NewLine + "IsWindingUp: " + Target.IsWindingUp + NewLine + "IsZombie: " + Target.IsZombie + NewLine + "IsRecalling: " + Target.IsRecalling() + NewLine + "IsStunned: " + Target.IsStunned + NewLine + "IsRooted: " + Target.IsRooted + NewLine + "IsMelee: " + Target.IsMelee() + NewLine + "IsDashing: " + Target.IsDashing() + NewLine + "IsAlly: " + Target.IsAlly + NewLine + "IsCanMove: " + Orbwalking.CanMove(1) + NewLine + "UnderTurret: " + Target.UnderTurret() + NewLine + NewLine + "Mobs: " + MobsList + NewLine + NewLine + "Game_CursorPos: " + Game.CursorPos + NewLine + "Game_ClockTime: " + Game.ClockTime + NewLine + "Game_Time: " + Game.Time + NewLine + "Game_Type: " + Game.Type + NewLine + "Game_Version: " + Game.Version + NewLine + "Game_Region: " + Game.Region + NewLine + "Game_IP: " + Game.IP + NewLine + "Game_Port: " + Game.Port + NewLine + "Game_Ping: " + Game.Ping + NewLine + "Game_Mode: " + Game.Mode + NewLine + "Game_MapId: " + Game.MapId + NewLine + "Game_MapName: " + Utility.Map.GetMap().Name ; Text.OnEndScene(); }
public static bool SpellPrediction(Spell spell, Obj_AI_Hero target,bool collisionable) { // var dist = ObjectManager.Player.Distance(target.Position); var pos1 = LeagueSharp.Common.Prediction.GetPrediction(target, dist / spell.Speed).UnitPosition-40; var dister = target.Position.Extend(target.GetWaypoints()[1].To3D(), target.GetWaypoints()[1].To3D().Distance(target.Position) + 50); // var pos1 = LeagueSharp.Common.Prediction.GetPrediction(target, dist / spell.Speed).UnitPosition - 40; var wts = Drawing.WorldToScreen(target.Position); var wtsx = target.GetWaypoints()[1]; Drawing.DrawLine(wts[0], wts[1], wtsx[0], wtsx[1], 2f, System.Drawing.Color.Red); var e = pos1.Distance(target.GetWaypoints()[1].To3D()); pos1.Extend(target.GetWaypoints()[1].To3D(), -e); Render.Circle.DrawCircle(dister, 10, System.Drawing.Color.GreenYellow, 2); Render.Circle.DrawCircle(pos1, 10, System.Drawing.Color.BlueViolet, 2); // var point = PointsAroundTheTarget(target.Position, target.BoundingRadius + 50).FirstOrDefault(t => t.IsWall()); if (point.X != 0 && point.Y != 0 && point.Z != 0) { if (MinionCollideLine(ObjectManager.Player.Position, ExtendWallpos(target, point), spell,collisionable)) return false; Render.Circle.DrawCircle(ExtendWallpos(target, point), 10, System.Drawing.Color.Brown, 2); spell.Cast(ExtendWallpos(target, point)); return true; } else { var range = spell.Range; if (target.Position.Distance(ObjectManager.Player.Position) < target.GetWaypoints()[1].Distance(ObjectManager.Player.Position)) { range -= 100; } if (!spell.IsInRange(target, range)) return false; /*if (target.IsFacing(ObjectManager.Player) && target.Position.Distance(ObjectManager.Player.Position) > target.GetWaypoints()[1].Distance(ObjectManager.Player.Position)) { if (MinionCollideLine(ObjectManager.Player.Position, target.Position, spell,collisionable)) return false; { Game.PrintChat("Casteando por inface"); spell.Cast(target.Position); return true; } }*/ // code of dashes if (target.IsDashing()) { float timeforArrive=(target.Position.Distance(target.GetDashInfo().EndPos.To3D()))/target.GetDashInfo().Speed; float grabtime =( ObjectManager.Player.Position.Distance(target.GetDashInfo().EndPos.To3D()) / spell.Speed)+spell.Delay; if (timeforArrive<grabtime) { spell.Cast(target.GetDashInfo().EndPos); return true; } } /* if (target.IsImmovable) // check for cc guys { if (MinionCollideLine(ObjectManager.Player.Position, target.Position, spell,collisionable)) return false; spell.Cast(target.Position); return true; }*/ // if(target.IsChannelingImportantSpell()) if (target.IsWindingUp && !target.IsMelee()) { if (MinionCollideLine(ObjectManager.Player.Position, target.Position, spell,collisionable)) return false; spell.Cast(target.Position); return true; } if (target.Position.Distance(ObjectManager.Player.Position) <= 300) { CastToDirection( target, spell,collisionable); } else { var oldPos = target.GetWaypoints()[0].To3D(); var h = false; Utility.DelayAction.Add(Game.Ping + 1000, () => h = Next(target, oldPos, spell,collisionable)); return h; } } return false; }
public static bool SpellPrediction(Spell spell, Obj_AI_Hero target, bool collisionable) { // var dist = ObjectManager.Player.Distance(target.Position); var pos1 = LeagueSharp.Common.Prediction.GetPrediction(target, dist / spell.Speed).UnitPosition - 40; var dister = target.Position.Extend(target.GetWaypoints()[1].To3D(), target.GetWaypoints()[1].To3D().Distance(target.Position) + 50); // var pos1 = LeagueSharp.Common.Prediction.GetPrediction(target, dist / spell.Speed).UnitPosition - 40; var wts = Drawing.WorldToScreen(target.Position); var wtsx = target.GetWaypoints()[1]; Drawing.DrawLine(wts[0], wts[1], wtsx[0], wtsx[1], 2f, System.Drawing.Color.Red); var e = pos1.Distance(target.GetWaypoints()[1].To3D()); pos1.Extend(target.GetWaypoints()[1].To3D(), -e); Render.Circle.DrawCircle(dister, 10, System.Drawing.Color.GreenYellow, 2); Render.Circle.DrawCircle(pos1, 10, System.Drawing.Color.BlueViolet, 2); // var point = PointsAroundTheTarget(target.Position, target.BoundingRadius + 50).FirstOrDefault(t => t.IsWall()); if (point.X != 0 && point.Y != 0 && point.Z != 0) { if (MinionCollideLine(ObjectManager.Player.Position, ExtendWallpos(target, point), spell, collisionable)) { return(false); } Render.Circle.DrawCircle(ExtendWallpos(target, point), 10, System.Drawing.Color.Brown, 2); spell.Cast(ExtendWallpos(target, point)); return(true); } else { var range = spell.Range; if (target.Position.Distance(ObjectManager.Player.Position) < target.GetWaypoints()[1].Distance(ObjectManager.Player.Position)) { range -= 100; } if (!spell.IsInRange(target, range)) { return(false); } /*if (target.IsFacing(ObjectManager.Player) && target.Position.Distance(ObjectManager.Player.Position) > target.GetWaypoints()[1].Distance(ObjectManager.Player.Position)) * { * if (MinionCollideLine(ObjectManager.Player.Position, target.Position, spell,collisionable)) return false; * * { * Game.PrintChat("Casteando por inface"); * spell.Cast(target.Position); * * return true; * } * * }*/ // code of dashes if (target.IsDashing()) { float timeforArrive = (target.Position.Distance(target.GetDashInfo().EndPos.To3D())) / target.GetDashInfo().Speed; float grabtime = (ObjectManager.Player.Position.Distance(target.GetDashInfo().EndPos.To3D()) / spell.Speed) + spell.Delay; if (timeforArrive < grabtime) { spell.Cast(target.GetDashInfo().EndPos); return(true); } } /* if (target.IsImmovable) // check for cc guys * { * if (MinionCollideLine(ObjectManager.Player.Position, target.Position, spell,collisionable)) return false; * spell.Cast(target.Position); * return true; * }*/ // if(target.IsChannelingImportantSpell()) if (target.IsWindingUp && !target.IsMelee()) { if (MinionCollideLine(ObjectManager.Player.Position, target.Position, spell, collisionable)) { return(false); } spell.Cast(target.Position); return(true); } if (target.Position.Distance(ObjectManager.Player.Position) <= 300) { CastToDirection(target, spell, collisionable); } else { var oldPos = target.GetWaypoints()[0].To3D(); var h = false; Utility.DelayAction.Add(Game.Ping + 1000, () => h = Next(target, oldPos, spell, collisionable)); return(h); } } return(false); }
public static void putWallBehind(Obj_AI_Hero target) { if (!W.IsReady() || !E.IsReady() || target.IsMelee()) return; Vector2 dashPos = getNextPos(target); PredictionOutput po = Prediction.GetPrediction(target, 0.5f); float dist = Player.Distance(po.UnitPosition); if (!target.IsMoving || Player.Distance(dashPos) <= dist + 40) if (dist < 330 && dist > 100 && W.IsReady()) { SmoothMouse.addMouseEvent(po.UnitPosition); W.Cast(po.UnitPosition); } }
private static void Combo(Obj_AI_Hero target) { if (Config.Item("Muramana-Enabled").GetValue<bool>() && !Player.HasBuff("Muramana") && Config.Item("Muramana-Mana").GetValue<Slider>().Value <= (Player.Mana / Player.MaxMana) * 100 && Muramana.IsOwned() && Muramana.IsReady()) Items.UseItem(Muramana.Id); if (Config.Item("Combo-Use-Q").GetValue<bool>() && _q.IsReady()) { var qHit = _q.GetPrediction(target); if (qHit.Hitchance >= ComboHitChance) { _q.Cast(target); } } if (Config.Item("Combo-Use-W").GetValue<bool>() && _w.IsReady() && Player.Distance(target) < _w.Range) { var wHit = _w.GetPrediction(target); if (wHit.Hitchance >= ComboHitChance) { _w.Cast(wHit.CastPosition); if (Config.Item("Combo-Use-E-W").GetValue<bool>() && _e.IsReady()) { var landingPosition = Player.Position.Extend(wHit.CastPosition, _e.Range); if (!landingPosition.UnderTurret(true) && !landingPosition.IsWall() && //Check if landing position is definitely not a wall or a turret ObjectManager.Get<Obj_AI_Hero>().Count(enemy => enemy.IsEnemy && enemy.IsValidTarget(600, true, target.Position)) - 1 //The number of enemies, other than the target, near the target <= ObjectManager.Get<Obj_AI_Hero>().Count(ally => ally.IsAlly && !ally.IsDead && ally.Distance(target) < 600) && //The number of allies near the target (!target.IsMelee() || //If target is range, then just go ahead and land (target.IsMelee() && (landingPosition.Distance(target.Position) + Player.BoundingRadius + 50 > target.AttackRange + target.BoundingRadius)))) //If target is melee, make sure you don't land in its AA range { CheckFlag = true; } } } } if (Config.Item("Combo-Use-R").GetValue<bool>() && _r.IsReady()) { var rHit = _r.GetPrediction(target); if (rHit.Hitchance >= ComboHitChance) { _r.Cast(target); } } CastOffensiveItems(target); }
public static void updateArmaPlay() { if (!haveSeenMinion) { haveSeenMinion = ObjectManager.Get <Obj_AI_Minion>().Any(min => min.IsTargetable && min.IsAlly && min.Health > 50) || ARAMDetFull.gameStart + 44 * 1000 < ARAMDetFull.now; } if (!haveSeenMinion) { return; } try { AutoLevelChamp.LevelUpOff(); } catch (Exception ex) { Console.WriteLine(ex); } if ((player.InShop() || player.IsDead) /* && nextItem != null && nextItem.goldReach <= player.Gold*/) { buyItems(); } if (champ != null) { champ.alwaysCheck(); } setRambo(); if (player.IsDead || (player.IsChannelingImportantSpell() && player.ChampionName != "Varus")) { champ?.castingImportantSpell(); return; } var fightLevel = MapControl.fightLevel(); MapControl.updateReaches(); var closestEnemy = HeroManager.Enemies.Where(ene => !ene.IsDead && ene.IsTargetable && !ARAMTargetSelector.IsInvulnerable(ene)).OrderBy(ene => player.Position.Distance(ene.Position, true)).FirstOrDefault(); if (closestEnemy != null && ramboMode) { DeathWalker.deathWalk(closestEnemy.Position, true); return; } if (fightLevel != 0) { Aggresivity.addAgresiveMove(new AgresiveMove(40 * fightLevel, 2000, true, true)); } agrobalance = Aggresivity.getAgroBalance(); balance = (ARAMTargetSelector.IsInvulnerable(player) || player.IsZombie) ? 250 : MapControl.balanceAroundPointAdvanced(player.Position.To2D(), 250 - agrobalance * 5) + agrobalance; inDanger = balance < 0; if (Game.MapId == GameMapId.SummonersRift) { if (player.IsRecalling() || needRecall && lastRecall + 1000 > DeathWalker.now) { return; } if (player.InFountain() && player.HealthPercent < 90) { player.IssueOrder(GameObjectOrder.Stop, player); return; } if (player.HealthPercent > 85 && (player.MaxMana < 450 || player.ManaPercent > 85)) { needRecall = false; } if ((((player.HealthPercent < 32 || (player.MaxMana > 450 && player.ManaPercent < 5)) && player.CountEnemiesInRange(1000) == 0) || needRecall) && balance > 5) { if (lastRecall + 9000 < DeathWalker.now) { needRecall = true; var recall = new Spell(SpellSlot.Recall); recall.Cast(); lastRecall = DeathWalker.now; return; } } if (needRecall) { player.IssueOrder(GameObjectOrder.MoveTo, fromNex.Position.Randomize(534, 1005)); return; } } if (champ != null) { try { if (player.GetEnemiesInRange(ARAMSimulator.farmRange).Count(ene => !ene.IsDead && !ene.IsZombie) != 0) { champ.killSteal(); } else { champ.farm(); } } catch (Exception ex) { Console.WriteLine(ex); } } if (!Sector.inTowerRange(player.Position.To2D()) || towerAttackedAlly || player.HealthPercent < 25) { try { ItemHandler.useItems(); sSpells.useSumoners(); if (champ != null) { champ.useSpells(); } else { MapControl.myControler.useSpells(); if (player.MaxMana < 280 || player.ManaPercent > 50) { MapControl.myControler.useSpellsOnMinions(); } } } catch (Exception ex) { Console.WriteLine(ex); } } deepestAlly = HeroManager.Allies.OrderBy(al => toNex.Position.Distance(al.Position, true)).FirstOrDefault(); var lookRange = player.AttackRange + ((player.IsMelee) ? 260 : 155); var easyKill = HeroManager.Enemies.FirstOrDefault(ene => ene != null && !ene.IsZombie && !ene.IsDead && ene.Distance(player, true) < lookRange * lookRange && !ARAMTargetSelector.IsInvulnerable(ene) && ene.Health / 1.5 < player.GetAutoAttackDamage(ene)); if (easyKill != null) { Aggresivity.addAgresiveMove(new AgresiveMove(45, 1500, true)); //Console.WriteLine("go get easy"); DeathWalker.deathWalk(easyKill.Position.To2D().Extend(player.Position.To2D(), player.AttackRange * 0.7f).To3D(), true); } if (balance < 0) { DeathWalker.deathWalk(player.Position.To2D().Extend(fromNex.Position.To2D(), 632).To3D(), true); } if ((!player.IsMelee || fightLevel < 2) && HeroManager.Enemies.Any(h => !h.IsDead) && moveToRelicIfForHeal()) { return; } if (!player.UnderTurret(true)) { towerAttackedMe = false; towerAttackedAlly = false; } if (towerAttackedMe) { DeathWalker.CustomOrbwalkMode = false; // Game.PrintChat("ouch tower!"); DeathWalker.deathWalk(player.Position.To2D().Extend(fromNex.Position.To2D(), 600).To3D(), true); return; } awayTo = eAwayFromTo(); if (balance < 70 && awayTo.IsValid() && awayTo.X != 0) { DeathWalker.CustomOrbwalkMode = false; if (champ != null) { champ.kiteBack(awayTo); } DeathWalker.deathWalk(awayTo.To3D(), true); return; } else { var closestObj = DeathWalker.EnemyObjectives.Where( obj => obj.IsValidTarget(700) && !obj.IsDead && !obj.IsInvulnerable) .OrderBy(obj => obj.Position.Distance(player.Position, true)).FirstOrDefault(); if (closestObj != null && (!(closestObj is Obj_AI_Turret) || Sector.towerContainsAlly((Obj_AI_Turret)closestObj))) { DeathWalker.deathWalk( closestObj.Position.Extend(player.Position, player.AttackRange * 0.6f), true); return; } if (player.IsMelee) { var safeMeleeEnem = ARAMTargetSelector.getSafeMeleeTarget(); if (safeMeleeEnem != null) { DeathWalker.deathWalk( safeMeleeEnem.Position.Extend(safeMeleeEnem.Direction, player.AttackRange * 0.3f), true); return; } } var fightOn = MapControl.fightIsOn(); if (fightOn != null && MapControl.balanceAroundPointAdvanced(fightOn.Position.To2D(), 280, 450) > (-130) && fightOn.Distance(player, true) < 2500 * 2500 && (!player.IsMelee() || !Sector.inTowerRange(fightOn.Position.To2D()))) { Aggresivity.addAgresiveMove(new AgresiveMove(40 * MapControl.fightLevel(), 3000, true, true)); DeathWalker.deathWalk(fightOn.Position.Extend(player.Position, player.AttackRange * 0.6f), true); } else {/* * if (player.HealthPercent < 69 && moveToRelicIfForHeal()) * { * return; * }*/ if (!inDanger) { Sector orbSector = null; Sector prevSector = null; foreach (var sector in sectors) { sector.update(); int sectorCheck = 1150 - MapControl.fearDistance; if (sector.containsEnemyChamp && sector.enemyChampIn.Distance(player, true) < sectorCheck * sectorCheck) { orbSector = sector; break; } if (sector.dangerPolig) { break; } // if (!player.IsMelee) // { if (sector.containsEnemy && !sector.containsAlly) { break; } // } // else // { // if (prevSector != null && sector.containsEnemy && !prevSector.containsAlly && !sector.containsAlly) // break; // } orbSector = sector; if (sector.containsEnemy && sector.containsAlly) { break; } prevSector = sector; } if (orbSector == null) { return; } DeathWalker.deathWalk(orbSector.getRandomPointIn().To3D(), false, true); } else { DeathWalker.deathWalk(player.Position.To2D().Extend(fromNex.Position.To2D(), 333).To3D(), false); } } } /*foreach (var ally in MapControl.ally_champions) * { * if (ally.hero.Distance(player) < 800 && MapControl.myControler != null) * MapControl.myControler.useNonSkillshots(ally.hero); * }*/ }
static void Drawing_OnDraw(EventArgs args) { if (!Menu.Item("switch").GetValue<Boolean>()) return; Target = TargetSelector.GetSelectedTarget() != null ? TargetSelector.GetSelectedTarget() : Player; var buffs = string.Empty; foreach (var buff in Target.Buffs) { buffs += "\n" + buff.Name + "[Count: " + buff.Count + "/Duration: " + (buff.EndTime - Game.ClockTime).ToString("0.00") +"],"; } var Mobs = MinionManager.GetMinions(1500, MinionTypes.All, MinionTeam.NotAlly, MinionOrderTypes.MaxHealth); var MobsList = string.Empty; foreach (var Mob in Mobs) { MobsList += "\n" + Mob.Name + "[Skinname: " + Mob.SkinName + "/HP: " + Mob.Health + " / " + Mob.MaxHealth + "(" + Mob.HealthPercent.ToString("0.0") + "%)],"; } Render.Circle.DrawCircle(Player.Position, 1500, Color.Red, 10); Text.text = //"Name: " + Target.Name + NewLine + "ChampionName: " + Target.ChampionName + NewLine + "SkinName: " + Target.SkinName + NewLine + //"Gold: " + Target.Gold + NewLine + //"Level: " + Target.Level + NewLine + "TotalAttackDamage: " + Utility.TotalAttackDamage(Target) + NewLine + "TotalMagicalDamage: " + Utility.TotalMagicalDamage(Target) + NewLine + "Armor: " + Target.Armor + NewLine + "Health: " + Target.Health + " / " + Target.MaxHealth + " (" + Target.HealthPercent.ToString("0.0") + "%)" + NewLine + "Mana: " + Target.Mana + " / " + Target.MaxMana + " (" + Target.HealthPercent.ToString("0.0") + "%)" + NewLine + "HPRegenRate: " + Target.HPRegenRate + NewLine + "PARRegenRate: " + Target.PARRegenRate + NewLine + "Experience: " + Target.Experience + NewLine + "Position: " + Target.Position + NewLine + "ServerPosition: " + Target.ServerPosition + NewLine + "Team: " + Target.Team + NewLine + "NetworkId: " + Target.NetworkId + NewLine + "MoveSpeed: " + Target.MoveSpeed + NewLine + "AttackRange: " + Target.AttackRange + NewLine + "RealAutoAttackRange: " + Orbwalking.GetRealAutoAttackRange(Target) + NewLine + //"DeathDuration: " + Target.DeathDuration + NewLine + "BoundingRadius: " + Target.BoundingRadius + NewLine + NewLine + "Buffs: " + buffs + NewLine + NewLine + "IsDead: " + Target.IsDead + NewLine + "IsImmovable: " + Target.IsImmovable + NewLine + "IsInvulnerable: " + Target.IsInvulnerable + NewLine + "IsMoving: " + Target.IsMoving + NewLine + "IsPacified: " + Target.IsPacified + NewLine + "IsTargetable: " + Target.IsTargetable + NewLine + "IsWindingUp: " + Target.IsWindingUp + NewLine + "IsZombie: " + Target.IsZombie + NewLine + "IsRecalling: " + Target.IsRecalling() + NewLine + "IsStunned: " + Target.IsStunned + NewLine + "IsRooted: " + Target.IsRooted + NewLine + "IsMelee: " + Target.IsMelee() + NewLine + "IsDashing: " + Target.IsDashing() + NewLine + "IsAlly: " + Target.IsAlly + NewLine + "IsCanMove: " + Orbwalking.CanMove(1) + NewLine + "UnderTurret: " + Target.UnderTurret() + NewLine + NewLine + "Mobs: " + MobsList + NewLine + NewLine + "Game_CursorPos: " + Game.CursorPos + NewLine + "Game_ClockTime: " + Game.ClockTime + NewLine + "Game_Time: " + Game.Time + NewLine + "Game_Type: " + Game.Type + NewLine + "Game_Version: " + Game.Version + NewLine + "Game_Region: " + Game.Region + NewLine + "Game_IP: " + Game.IP + NewLine + "Game_Port: " + Game.Port + NewLine + "Game_Ping: " + Game.Ping + NewLine + "Game_Mode: " + Game.Mode + NewLine + "Game_MapId: " + Game.MapId + NewLine + "Game_MapName: " + Utility.Map.GetMap().Name ; Text.OnEndScene(); }