public static void OnProcessSpell(LeagueSharp.Obj_AI_Base sender, LeagueSharp.GameObjectProcessSpellCastEventArgs arg) { if (Config.Item("forceQE").GetValue <bool>() && sender.IsMe && arg.SData.Name.Contains("RivenFeint") && Riven.Q.IsReady() && LXOrbwalker.GetPossibleTarget() != null) { Console.WriteLine("force q"); Riven.Q.Cast(LXOrbwalker.GetPossibleTarget()); Riven.forceQ = true; // Riven.timer = new System.Threading.Timer(obj => { Riven.Player.IssueOrder(GameObjectOrder.MoveTo, Riven.difPos()); }, null, (long)100, System.Threading.Timeout.Infinite); } }
public static void doLaneClear() { Obj_AI_Base target = LXOrbwalker.GetPossibleTarget(); if (target is Obj_AI_Minion) { useESmart(target); useWSmart(target); useHydra(target); } }
public static void cancelAnim(bool aaToo = false) { if (aaToo) { LXOrbwalker.ResetAutoAttackTimer(); } if (LXOrbwalker.GetPossibleTarget() != null && !Riven.useHydra(LXOrbwalker.GetPossibleTarget())) { if (W.IsReady()) { Riven.useWSmart(LXOrbwalker.GetPossibleTarget()); } } moveTo(Game.CursorPos); // Packet.C2S.Cast.Encoded(new Packet.C2S.Cast.Struct(fill iterator up)).Send(); }
private static void doHarass() { var Target = SimpleTs.GetTarget(Q1.Range, SimpleTs.DamageType.Magical); var OrbTarget = LXOrbwalker.GetPossibleTarget(); if (!IsCougar && (OrbTarget == null || !OrbTarget.IsMinion)) { if (Q1.IsReady() && Config.Item("harass_Q1").GetValue <bool>()) { Q1.Cast(Target, PacketCasting); } if (W1.IsReady() && Config.Item("harass_W1").GetValue <bool>()) { W1.Cast(Target, PacketCasting); } } }
private static void doFarm() { var SaveFero = Config.Item("FeroSaveRRdy").GetValue <bool>(); var FeroSpell = Config.Item("FeroSpellF").GetValue <StringList>(); var ForceW = Config.Item("ForceWF").GetValue <Slider>(); var Target = LXOrbwalker.GetPossibleTarget(); // Save Ferocity if (SaveFero && R.IsReady() && Player.Mana == 5) { return; } // Ferocity Spells if (Player.Mana == 5) { if (Target.IsValidTarget(W.Range) && (Player.Health / Player.MaxHealth <= ForceW.Value / 100f || FeroSpell.SelectedIndex == 1)) { W.CastOnUnit(Player, UsePackets); } if (Target.IsValidTarget(E.Range) && FeroSpell.SelectedIndex == 2) { E.Cast(Target, UsePackets); } return; } // Normal Spells if (Q.IsReady() && Target.IsValidTarget(Orbwalking.GetRealAutoAttackRange(Player))) { Q.CastOnUnit(Player, UsePackets); } if (W.IsReady() && Target.IsValidTarget(W.Range)) { W.CastOnUnit(Player, UsePackets); } if (E.IsReady() && Target.IsValidTarget(E.Range)) { E.Cast(Target, UsePackets); } }
private static void doLastHit() { var useW = Config.Item("LastHitW").GetValue <bool>(); var useE = Config.Item("LastHitE").GetValue <bool>(); var FeroSpell = Config.Item("FeroSpellLH").GetValue <StringList>(); if (Player.Mana == 5 && FeroSpell.SelectedIndex == 0) { return; } foreach ( var minion in MinionManager.GetMinions(Player.Position, E.Range, MinionTypes.All, MinionTeam.NotAlly)) { if (minion.IsValidTarget(Orbwalking.GetRealAutoAttackRange(Player)) && LXOrbwalker.GetPossibleTarget() == minion) { return; } if (useW && W.IsReady() && minion.IsValidTarget(W.Range) && minion.Health < W.GetDamage(minion) && (Player.Mana == 5 ? FeroSpell.SelectedIndex == 1 : true)) { W.CastOnUnit(Player, UsePackets); return; } if (useE && E.IsReady() && minion.IsValidTarget(E.Range) && HealthPrediction.GetHealthPrediction(minion, (int)(Player.Distance(minion) * E.Speed)) < E.GetDamage(minion) && (Player.Mana == 5 ? FeroSpell.SelectedIndex == 1 : true)) { E.Cast(minion, UsePackets); return; } } }
public static void OnGameSendPacket(GamePacketEventArgs args) { try { if (args.PacketData[0] == 119) { args.Process = false; } //if (Riven.orbwalker.ActiveMode.ToString() == "Combo") // LogPacket(args); if (args.PacketData[0] == 154 && LXOrbwalker.CurrentMode == LXOrbwalker.Mode.Combo) { Packet.C2S.Cast.Struct cast = Packet.C2S.Cast.Decoded(args.PacketData); if ((int)cast.Slot > -1 && (int)cast.Slot < 5) { Utility.DelayAction.Add(Game.Ping + LXOrbwalker.GetCurrentWindupTime(), delegate { Riven.cancelAnim(true); }); //Game.Say("/l"); } if (cast.Slot == SpellSlot.E && Riven.R.IsReady() && Config.Item("useR").GetValue <bool>()) { Utility.DelayAction.Add(Game.Ping + 50, delegate { Riven.useRSmart(LXOrbwalker.GetPossibleTarget()); }); } //Console.WriteLine(cast.Slot + " : " + Game.Ping); /* if (cast.Slot == SpellSlot.Q) * Orbwalking.ResetAutoAttackTimer(); * else if (cast.Slot == SpellSlot.W && Riven.Q.IsReady()) * Utility.DelayAction.Add(Game.Ping+200, delegate { Riven.useHydra(Riven.orbwalker.GetTarget()); }); * else if (cast.Slot == SpellSlot.E && Riven.W.IsReady()) * { * Console.WriteLine("cast QQQQ"); * Utility.DelayAction.Add(Game.Ping+200, delegate { Riven.useWSmart(Riven.orbwalker.GetTarget()); }); * } * else if ((int)cast.Slot == 131 && Riven.W.IsReady()) * { * Orbwalking.ResetAutoAttackTimer(); * Utility.DelayAction.Add(Game.Ping +200, delegate { Riven.useWSmart(Riven.orbwalker.GetTarget()); }); * }*/ // LogPacket(args); } } catch (Exception ex) { Console.WriteLine(ex.ToString()); } }
public static void OnGameProcessPacket(GamePacketEventArgs args) { try { if (isComboing()) { if (args.PacketData[0] == 35 && Riven.Q.IsReady()) { Console.WriteLine("Gott"); GamePacket gp = new GamePacket(args.PacketData); gp.Position = 2; int netId = gp.ReadInteger(); if (LXOrbwalker.GetPossibleTarget() == null || LXOrbwalker.GetPossibleTarget().NetworkId != netId) { return; } if (!LXOrbwalker.CanAttack()) { Riven.Q.Cast(LXOrbwalker.GetPossibleTarget().Position); } } if (args.PacketData[0] == 0x17) { Console.WriteLine("cancel"); GamePacket packet = new GamePacket(args.PacketData); packet.Position = 2; int sourceId = packet.ReadInteger(); if (sourceId == Riven.Player.NetworkId) { Console.WriteLine("cancel wawf"); Packet.C2S.Move.Encoded(new Packet.C2S.Move.Struct(Game.CursorPos.X, Game.CursorPos.Y)).Send(); if (LXOrbwalker.GetPossibleTarget() != null) { Riven.moveTo(LXOrbwalker.GetPossibleTarget().Position); //Packet.C2S.Move.Encoded(new Packet.C2S.Move.Struct(LXOrbwalker.GetPossibleTarget().Position.X, LXOrbwalker.GetPossibleTarget().Position.Y)).Send(); // LXOrbwalker.ResetAutoAttackTimer(); Riven.cancelAnim(true); } } } if (args.PacketData[0] == 0xDF && false) { Console.WriteLine("cancel"); GamePacket packet = new GamePacket(args.PacketData); packet.Position = 2; int sourceId = packet.ReadInteger(); if (sourceId == Riven.Player.NetworkId) { Console.WriteLine("cancel wawf"); Riven.moveTo(Game.CursorPos); Packet.C2S.Move.Encoded(new Packet.C2S.Move.Struct(Game.CursorPos.X, Game.CursorPos.Y)).Send(); LXOrbwalker.ResetAutoAttackTimer(); Riven.cancelAnim(); } } if (args.PacketData[0] == 0x61) //move { GamePacket packet = new GamePacket(args.PacketData); packet.Position = 12; int sourceId = packet.ReadInteger(); if (sourceId == Riven.Player.NetworkId) { if (LXOrbwalker.GetPossibleTarget() != null) { // Packet.C2S.Move.Encoded(new Packet.C2S.Move.Struct(LXOrbwalker.GetPossibleTarget().Position.X, LXOrbwalker.GetPossibleTarget().Position.Y)).Send(); LXOrbwalker.ResetAutoAttackTimer(); } } } else if (args.PacketData[0] == 0x38) //animation2 { GamePacket packet = new GamePacket(args.PacketData); packet.Position = 1; int sourceId = packet.ReadInteger(); if (packet.Size() == 9 && sourceId == Riven.Player.NetworkId) { Riven.moveTo(Game.CursorPos); Packet.C2S.Move.Encoded(new Packet.C2S.Move.Struct(Game.CursorPos.X, Game.CursorPos.Y)).Send(); LXOrbwalker.ResetAutoAttackTimer(); Riven.cancelAnim(); } } } } catch (Exception ex) { Console.WriteLine(ex.ToString()); } }
public static void OnGameProcessPacket(GamePacketEventArgs args) { try { if (isComboing()) { if (args.PacketData[0] == 0x65 && Riven.Q.IsReady()) { Packet.S2C.Damage.Struct dmg = Packet.S2C.Damage.Decoded(args.PacketData); // LogPacket(args); GamePacket gp = new GamePacket(args.PacketData); gp.Position = 1; int targetID = gp.ReadInteger(); int dType = (int)gp.ReadByte(); int Unknown = gp.ReadShort(); float DamageAmount = gp.ReadFloat(); int TargetNetworkIdCopy = gp.ReadInteger(); int SourceNetworkId = gp.ReadInteger(); if (Riven.Player.NetworkId != dmg.SourceNetworkId) { return; } Obj_AI_Base targ = ObjectManager.GetUnitByNetworkId <Obj_AI_Base>(dmg.TargetNetworkId); if ((int)dmg.Type == 12 || (int)dmg.Type == 4 || (int)dmg.Type == 3 || (int)dmg.Type == 36 || (int)dmg.Type == 11) { Riven.Q.Cast(targ.Position); } else { Console.WriteLine("dtyoe: " + dType); } } if (args.PacketData[0] == 0x34)// from yol0 :) { GamePacket packet = new GamePacket(args.PacketData); packet.Position = 9; int action = packet.ReadByte(); packet.Position = 1; int sourceId = packet.ReadInteger(); if (action == 17 && sourceId == Riven.Player.NetworkId) { Packet.C2S.Move.Encoded(new Packet.C2S.Move.Struct(Game.CursorPos.X, Game.CursorPos.Y)).Send(); if (LXOrbwalker.GetPossibleTarget() != null) { Riven.moveTo(LXOrbwalker.GetPossibleTarget().Position); //Packet.C2S.Move.Encoded(new Packet.C2S.Move.Struct(LXOrbwalker.GetPossibleTarget().Position.X, LXOrbwalker.GetPossibleTarget().Position.Y)).Send(); // LXOrbwalker.ResetAutoAttackTimer(); Riven.cancelAnim(true); } } } else if (args.PacketData[0] == 0x61) //move { GamePacket packet = new GamePacket(args.PacketData); packet.Position = 12; int sourceId = packet.ReadInteger(); if (sourceId == Riven.Player.NetworkId) { if (LXOrbwalker.GetPossibleTarget() != null) { // Packet.C2S.Move.Encoded(new Packet.C2S.Move.Struct(LXOrbwalker.GetPossibleTarget().Position.X, LXOrbwalker.GetPossibleTarget().Position.Y)).Send(); LXOrbwalker.ResetAutoAttackTimer(); } } } else if (args.PacketData[0] == 0x38) //animation2 { GamePacket packet = new GamePacket(args.PacketData); packet.Position = 1; int sourceId = packet.ReadInteger(); if (packet.Size() == 9 && sourceId == Riven.Player.NetworkId) { Riven.moveTo(Game.CursorPos); Packet.C2S.Move.Encoded(new Packet.C2S.Move.Struct(Game.CursorPos.X, Game.CursorPos.Y)).Send(); LXOrbwalker.ResetAutoAttackTimer(); Riven.cancelAnim(); } } } } catch (Exception ex) { Console.WriteLine(ex.ToString()); } }
public static void OnProcessSpell(LeagueSharp.Obj_AI_Base sender, LeagueSharp.GameObjectProcessSpellCastEventArgs arg) { if (!sender.IsMe) { return; } // Game.PrintChat(arg.SData.Name); if (Config.Item("forceQE").GetValue <bool>() && sender.IsMe && arg.SData.Name.Contains("RivenFeint") && Riven.Q.IsReady() && LXOrbwalker.GetPossibleTarget() != null) { Console.WriteLine("force q"); Riven.Q.Cast(LXOrbwalker.GetPossibleTarget().Position); Riven.forceQ = true; // Riven.timer = new System.Threading.Timer(obj => { Riven.Player.IssueOrder(GameObjectOrder.MoveTo, Riven.difPos()); }, null, (long)100, System.Threading.Timeout.Infinite); } if (arg.SData.Name.Contains("RivenFeint") || arg.SData.Name.Contains("TriCleave") || arg.SData.Name.Contains("RivenFMartyr")) { Utility.DelayAction.Add(Game.Ping + LXOrbwalker.GetCurrentWindupTime() + 50, delegate { Riven.cancelAnim(true); }); } if (arg.SData.Name.Contains("RivenFeint") && Riven.R.IsReady() && Config.Item("useR").GetValue <bool>()) { Utility.DelayAction.Add(Game.Ping + 50, delegate { Riven.useRSmart(LXOrbwalker.GetPossibleTarget()); }); } }
private static void doCombo() { try { // Menu Config var FeroSpell = Config.Item("FeroSpellC").GetValue <StringList>(); var ForceW = Config.Item("ForceWC").GetValue <Slider>(); var ForceE = Config.Item("ForceEC").GetValue <bool>(); var Target = TargetSelector.GetSelectedTarget() ?? TargetSelector.GetTarget(1600f, TargetSelector.DamageType.Physical); // Force Leap to target if (Player.HasBuff("RengarR", true)) { LXOrbwalker.ForcedTarget = Target; LXOrbwalker.SetAttack(LXOrbwalker.GetPossibleTarget() == Target); } // Use Tiamat / Hydra if (Target.IsValidTarget(TMT.Range)) { if (TMT.IsReady()) { TMT.Cast(); } else if (HYD.IsReady()) { HYD.Cast(); } } // Use Yommus Ghostblade if (YGB.IsReady() && Target.IsValidTarget(Orbwalking.GetRealAutoAttackRange(Player) + (Player.HasBuff("RengarR", true) ? Player.MoveSpeed / 2 : 0))) { YGB.Cast(); } // Cutlass if (BCL.IsReady() && Target.IsValidTarget(BCL.Range)) { BCL.Cast(Target); } // BORK if (BRK.IsReady() && Target.IsValidTarget(BRK.Range)) { BRK.Cast(Target); } // Ferocity Spell if (Player.Mana == 5) { if (Player.Health / Player.MaxHealth < ForceW.Value / 100f && Target.IsValidTarget(W.Range)) { W.CastOnUnit(Player, UsePackets); return; } switch (FeroSpell.SelectedIndex) { case 1: if (!Target.IsValidTarget(W.Range)) { return; } W.CastOnUnit(Player, UsePackets); break; case 2: if (!Target.IsValidTarget(E.Range) || Player.HasBuff("RengarR", true)) { return; } E.Cast(Target, UsePackets); break; } return; } // Don't cast W or E while ultimate is active (force leap) if (Player.HasBuff("RengarR", true)) { return; } if (E.IsReady() && Target.IsValidTarget(E.Range) && (!Target.HasBuff("RengarEFinalMAX", true) && !Target.HasBuff("rengareslow") && LastETick + 1500 < Environment.TickCount || ForceE)) { E.Cast(Target, UsePackets); } if (W.IsReady() && Target.IsValidTarget(W.Range)) { W.CastOnUnit(Player, UsePackets); } } catch (Exception e) { Console.WriteLine("Combo Exception: {0}", e); } }
private static void OrbwalkToReticle(bool force, bool w) { var closestToPlayer = new Reticle(null, -1, -1); var closestToMouse = new Reticle(null, -1, -1); foreach (var ret in Reticles) { if (!ret.gameobj.IsValid) { Reticles.Remove(ret); } } if (Reticles.Any()) { if (Config.SubMenu("Reticle").Item("Mode").GetValue <StringList>().SelectedIndex == 0) // Close to mouse { var closestDistance = float.MaxValue; var closestIndex = int.MaxValue; for (var i = 0; i < Reticles.Count(); i++) { var ret = Reticles[i]; var distance = Vector3.Distance(ret.gameobj.Position, Game.CursorPos); if (distance < closestDistance) { closestIndex = i; closestDistance = distance; } closestToMouse = Reticles[closestIndex]; } } else if (Config.SubMenu("Reticle").Item("Mode").GetValue <StringList>().SelectedIndex == 1) // Close to player { var closestDistance = float.MaxValue; var closestIndex = int.MaxValue; for (var i = 0; i < Reticles.Count(); i++) { var ret = Reticles[i]; var distance = Vector3.Distance(ret.gameobj.Position, Player.Position); if (distance < closestDistance) { closestIndex = i; closestDistance = distance; } closestToPlayer = Reticles[closestIndex]; } } } else { _orbWalkPos = new Vector3(); if (UsingLXOrbwalker) { LXOrbwalker.CustomOrbwalkMode = false; } else if (orbwalker != null) { orbwalker.SetOrbwalkingPoint(new Vector3()); } } if (Config.SubMenu("Reticle").Item("Mode").GetValue <StringList>().SelectedIndex == 0) { if (closestToMouse.CreateTime != -1) { var qMouseDistance = Vector3.Distance(closestToMouse.gameobj.Position, Game.CursorPos); var qHeroDistance = Vector3.Distance(closestToMouse.gameobj.Position, Player.Position) - Player.BoundingRadius; var canReach = DateTime.Now.Ticks + qHeroDistance / Player.MoveSpeed < closestToMouse.ExpireTime; var qMouseRadius = Config.SubMenu("Reticle").Item("MouseRadius").GetValue <Slider>().Value; var qPlayerRadius = Config.SubMenu("Reticle").Item("PlayerRadius").GetValue <Slider>().Value; if ((force || canReach) && qMouseDistance < qMouseRadius && qHeroDistance > qPlayerRadius) { if (UsingLXOrbwalker) { LXOrbwalker.CustomOrbwalkMode = true; LXOrbwalker.Orbwalk(closestToMouse.gameobj.Position, LXOrbwalker.GetPossibleTarget()); } else if (orbwalker != null) { orbwalker.SetOrbwalkingPoint(closestToMouse.gameobj.Position); } } /*else * { * _orbWalkPos = new Vector3(); * if (UsingLXOrbwalker) * { * LXOrbwalker.CustomOrbwalkMode = false; * } * else if (orbwalker != null) * { * orbwalker.SetOrbwalkingPoint(new Vector3()); * } * * }*/ } } else if (Config.SubMenu("Reticle").Item("Mode").GetValue <StringList>().SelectedIndex == 1) { if (closestToMouse.CreateTime != -1) { var qHeroDistance = Vector3.Distance(closestToPlayer.gameobj.Position, Player.Position); var canReach = DateTime.Now.Ticks + qHeroDistance / Player.MoveSpeed < closestToMouse.ExpireTime; if (!canReach && w && _W.IsReady()) { _W.Cast(); canReach = true; } var qPlayerRadius = Config.SubMenu("Reticle").Item("PlayerRadius").GetValue <Slider>().Value; if ((force || canReach) && qHeroDistance > qPlayerRadius) { _orbWalkPos = closestToPlayer.gameobj.Position; if (UsingLXOrbwalker) { LXOrbwalker.CustomOrbwalkMode = true; LXOrbwalker.Orbwalk(closestToPlayer.gameobj.Position, LXOrbwalker.GetPossibleTarget()); } else if (orbwalker != null) { orbwalker.SetOrbwalkingPoint(closestToPlayer.gameobj.Position); } } /*else * { * _orbWalkPos = new Vector3(); * if (UsingLXOrbwalker) * { * LXOrbwalker.CustomOrbwalkMode = false; * } * else if (orbwalker != null) * { * orbwalker.SetOrbwalkingPoint(new Vector3()); * } * }*/ } } else { _orbWalkPos = new Vector3(); if (UsingLXOrbwalker) { LXOrbwalker.CustomOrbwalkMode = false; } else if (orbwalker != null) { orbwalker.SetOrbwalkingPoint(new Vector3()); } } }
private static void OnGameUpdate(EventArgs args) { UpdateBuffs(); KillSteal(); if (UsingLXOrbwalker) { if (LXOrbwalker.CurrentMode == LXOrbwalker.Mode.Combo && Config.SubMenu("Combo").Item("UseQ").GetValue <bool>()) { OrbwalkToReticle(false, false); } if (LXOrbwalker.CurrentMode == LXOrbwalker.Mode.Harass && Config.SubMenu("Harass").Item("UseQ").GetValue <bool>()) { OrbwalkToReticle(false, false); } if (LXOrbwalker.CurrentMode == LXOrbwalker.Mode.Lasthit && Config.SubMenu("Farm").Item("UseQ").GetValue <bool>()) { OrbwalkToReticle(false, false); } if (LXOrbwalker.CurrentMode == LXOrbwalker.Mode.LaneClear && Config.SubMenu("LaneClear").Item("UseQ").GetValue <bool>()) { OrbwalkToReticle(false, false); } else { LXOrbwalker.CustomOrbwalkMode = false; } if (LXOrbwalker.CurrentMode == LXOrbwalker.Mode.Combo) { var target = LXOrbwalker.GetPossibleTarget(); if (!target.IsValidTarget()) { return; } if (_W.IsReady() && (Config.SubMenu("Combo").Item("UseW").GetValue <bool>()) && target.IsValidTarget(_W.Range)) { _W.Cast(); } if (_E.IsReady() && Config.SubMenu("Combo").Item("UseE").GetValue <bool>() && Player.Distance(target) > Config.SubMenu("Misc").Item("MinERange").GetValue <Slider>().Value) { _E.Cast(LXOrbwalker.GetPossibleTarget()); } } else if (LXOrbwalker.CurrentMode == LXOrbwalker.Mode.Harass) { var target = LXOrbwalker.GetPossibleTarget(); if (!target.IsValidTarget()) { return; } if (_W.IsReady() && (Config.SubMenu("Harass").Item("UseW").GetValue <bool>() && _W.InRange(target.Position))) { _W.Cast(); } if (_E.IsReady() && Config.SubMenu("Harass").Item("UseE").GetValue <bool>() && Player.Distance(target) > Config.SubMenu("Misc").Item("MinERange").GetValue <Slider>().Value) { _E.Cast(target); } } else if (LXOrbwalker.CurrentMode == LXOrbwalker.Mode.Lasthit) { var target = LXOrbwalker.GetPossibleTarget(); if (!target.IsValidTarget()) { return; } if (_W.IsReady() && _W.InRange(target.Position) && Config.SubMenu("Farm").Item("UseW").GetValue <bool>()) { _W.Cast(); } } else if (LXOrbwalker.CurrentMode == LXOrbwalker.Mode.LaneClear) { var target = LXOrbwalker.GetPossibleTarget(); if (!target.IsValidTarget()) { return; } if (_W.IsReady() && _W.InRange(target.Position) && Config.SubMenu("LaneClear").Item("UseW").GetValue <bool>()) { _W.Cast(); } } } else if (orbwalker != null) { if (orbwalker.ActiveMode.ToString() == "Combo" && Config.SubMenu("Combo").Item("UseQ").GetValue <bool>()) { OrbwalkToReticle(false, false); } else if (orbwalker.ActiveMode.ToString() == "Mixed" && Config.SubMenu("Harass").Item("UseQ").GetValue <bool>()) { OrbwalkToReticle(false, false); } else if (orbwalker.ActiveMode.ToString() == "LastHit" && Config.SubMenu("Farm").Item("UseQ").GetValue <bool>()) { OrbwalkToReticle(false, false); } else if (orbwalker.ActiveMode.ToString() == "LaneClear" && Config.SubMenu("LaneClear").Item("UseQ").GetValue <bool>()) { OrbwalkToReticle(false, false); } else { orbwalker.SetOrbwalkingPoint(new Vector3()); } if (orbwalker.ActiveMode.ToString() == "Combo") { var target = orbwalker.GetTarget(); if (!target.IsValidTarget()) { return; } if (_W.IsReady() && (Config.SubMenu("Combo").Item("UseW").GetValue <bool>()) && target.IsValidTarget(_W.Range)) { _W.Cast(); } if (_E.IsReady() && Config.SubMenu("Combo").Item("UseE").GetValue <bool>() && Player.Distance(target) > Config.SubMenu("Misc").Item("MinERange").GetValue <Slider>().Value) { _E.Cast(target); } } else if (orbwalker.ActiveMode.ToString() == "Mixed") { var target = orbwalker.GetTarget(); if (!target.IsValidTarget()) { return; } if (_W.IsReady() && (Config.SubMenu("Harass").Item("UseW").GetValue <bool>() && target.IsValidTarget(_W.Range))) { _W.Cast(); } if (_E.IsReady() && Config.SubMenu("Harass").Item("UseE").GetValue <bool>() && Player.Distance(target) > Config.SubMenu("Misc").Item("MinERange").GetValue <Slider>().Value) { _E.Cast(target); } } else if (orbwalker.ActiveMode.ToString() == "LastHit") { var target = orbwalker.GetTarget(); if (!target.IsValidTarget()) { return; } if (_W.IsReady() && _W.InRange(target.Position) && Config.SubMenu("Farm").Item("UseW").GetValue <bool>()) { _W.Cast(); } } else if (orbwalker.ActiveMode.ToString() == "LaneClear") { var target = orbwalker.GetTarget(); if (!target.IsValidTarget()) { return; } if (_W.IsReady() && _W.InRange(target.Position) && Config.SubMenu("LaneClear").Item("UseW").GetValue <bool>()) { _W.Cast(); } } } }
public override void Game_OnGameUpdate(EventArgs args) { var orbwalkPos = GetOrbwalkPos(); var cursor = Game.CursorPos; if (orbwalkPos != cursor && (ComboActive || LaneClearActive || LXOrbwalker.CurrentMode == LXOrbwalker.Mode.Lasthit)) { LXOrbwalker.CustomOrbwalkMode = true; LXOrbwalker.Orbwalk(orbwalkPos, LXOrbwalker.GetPossibleTarget()); } else { LXOrbwalker.CustomOrbwalkMode = false; } //Combo var rtarget = SimpleTs.GetTarget(2000, SimpleTs.DamageType.Physical); if (ComboActive) { var target = SimpleTs.GetTarget(550, SimpleTs.DamageType.Physical); if (target == null) { return; } if (W.IsReady() && Config.Item("UseWC").GetValue <bool>() && ObjectManager.Player.Buffs.FirstOrDefault( buff => buff.Name == "dravenfurybuff" || buff.Name == "DravenFury") == null) { W.Cast(); } if (IsFleeing(target) && Config.Item("UseEC").GetValue <bool>()) { E.Cast(target); } try { if (Config.Item("UseRC").GetValue <bool>() && R.GetHealthPrediction(target) <= 0) { R.Cast(target); } } catch (Exception e) { Console.WriteLine(e); throw; } } //Manual cast R if (Config.Item("RManualCast").GetValue <KeyBind>().Active) { R.Cast(rtarget); } //Peel from melees if (Config.Item("EPeel").GetValue <bool>()) //Taken from ziggs(by pq/esk0r) { foreach (var pos in from enemy in ObjectManager.Get <Obj_AI_Hero>() where enemy.IsValidTarget() && enemy.Distance(ObjectManager.Player) <= enemy.BoundingRadius + enemy.AttackRange + ObjectManager.Player.BoundingRadius && enemy.IsMelee() let direction = (enemy.ServerPosition.To2D() - ObjectManager.Player.ServerPosition.To2D()).Normalized() let pos = ObjectManager.Player.ServerPosition.To2D() select pos + Math.Min(200, Math.Max(50, enemy.Distance(ObjectManager.Player) / 2)) * direction) { E.Cast(pos.To3D()); } } }