public static void LastHitAfterAa(Obj_AI_Base target) { var unitHp = target.Health - Player.Instance.GetAutoAttackDamage(target, true); if (unitHp > 0) { if (FarmingMenu["QLastHit"].Cast <CheckBox>().CurrentValue&& Q.IsReady() && Player.Instance.CalculateDamageOnUnit(target, DamageType.Physical, Damager.QDamage()) > unitHp) { Player.CastSpell(SpellSlot.Q, target.Position); return; } if (FarmingMenu["WLastHit"].Cast <CheckBox>().CurrentValue&& W.IsReady() && W.IsInRange(target) && Player.Instance.CalculateDamageOnUnit(target, DamageType.Physical, Damager.WDamage()) > unitHp) { Player.CastSpell(SpellSlot.W); } } }
private static void Obj_AI_Base_OnSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args) { if (!sender.IsMe) { return; } var target = args.Target as Obj_AI_Base; // Hydra if (args.SData.Name.ToLower().Contains("itemtiamatcleave")) { Orbwalker.ResetAutoAttack(); if (W.IsReady()) { var target2 = TargetSelector.GetTarget(W.Range, DamageType.Physical); if (target2 != null || Orbwalker.ActiveModesFlags != Orbwalker.ActiveModes.None) { Player.CastSpell(SpellSlot.W); } } return; } //W if (args.SData.Name.ToLower().Contains(W.Name.ToLower())) { if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo)) { if (Player.Instance.HasBuff("RivenFengShuiEngine") && R.IsReady() && ComboMenu["R2Combo"].Cast <CheckBox>().CurrentValue) { ssfl = true; var target2 = TargetSelector.GetTarget(R.Range, DamageType.Physical); if (target2 != null && (target2.Distance(Player.Instance) < W.Range && target2.Health > Player.Instance.CalculateDamageOnUnit(target2, DamageType.Physical, Damager.WDamage()) || target2.Distance(Player.Instance) > W.Range) && Player.Instance.CalculateDamageOnUnit(target2, DamageType.Physical, Damager.RDamage(target2) + Damager.WDamage()) > target2.Health) { R.Cast(target2); } } } target = (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo) || Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Harass)) ? TargetSelector.GetTarget(E.Range + W.Range, DamageType.Physical) : (Obj_AI_Base)Orbwalker.LastTarget; if (Q.IsReady() && Orbwalker.ActiveModesFlags != Orbwalker.ActiveModes.None || ComboMenu["FlashBurst"].Cast <KeyBind>().CurrentValue&& target != null) { Player.CastSpell(SpellSlot.Q, target.Position); return; } return; } //E if (args.SData.Name.ToLower().Contains(E.Name.ToLower())) { if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo)) { if (Player.Instance.HasBuff("RivenFengShuiEngine") && R.IsReady() && ComboMenu["R2Combo"].Cast <CheckBox>().CurrentValue) { ssfl = true; var target2 = TargetSelector.GetTarget(R.Range, DamageType.Physical); if (target2 != null && Player.Instance.CalculateDamageOnUnit(target2, DamageType.Physical, (Damager.RDamage(target2))) > target2.Health) { R.Cast(target2); return; } } if ((EnableR == true) && R.IsReady() && !Player.Instance.HasBuff("RivenFengShuiEngine") && ComboMenu["RCombo"].Cast <CheckBox>().CurrentValue) { ssfl = false; Player.CastSpell(SpellSlot.R); } target = TargetSelector.GetTarget(W.Range, DamageType.Physical); if (target != null && Player.Instance.Distance(target) < W.Range) { Player.CastSpell(SpellSlot.W); return; } } } //Q if (args.SData.Name.ToLower().Contains(Q.Name.ToLower())) { if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo)) { if (Player.Instance.HasBuff("RivenFengShuiEngine") && R.IsReady() && ComboMenu["R2Combo"].Cast <CheckBox>().CurrentValue) { var target2 = TargetSelector.GetTarget(R.Range, DamageType.Physical); if (target2 != null && (target2.Distance(Player.Instance) < 300 && target2.Health > Player.Instance.CalculateDamageOnUnit(target2, DamageType.Physical, Damager.QDamage()) || target2.Distance(Player.Instance) > 300) && Player.Instance.CalculateDamageOnUnit(target2, DamageType.Physical, Damager.RDamage(target2) + Damager.QDamage()) > target2.Health) { R.Cast(target2); } } } return; } if (args.SData.IsAutoAttack() && target != null) { if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo)) { ComboAfterAa(target); } if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Harass)) { HarassAfterAa(target); } if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.JungleClear)) { JungleAfterAa(target); } if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LastHit) && target.IsMinion()) { LastHitAfterAa(target); } if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LaneClear) && target.IsMinion()) { LaneClearAfterAa(target); } } }
private static void LastHit() { Orbwalker.ForcedTarget = null; { if (Orbwalker.IsAutoAttacking) { return; } foreach ( var minion in EntityManager.MinionsAndMonsters.EnemyMinions.Where(a => a.IsValidTarget(W.Range))) { if (FarmingMenu["QLastHit"].Cast <CheckBox>().CurrentValue&& Q.IsReady() && minion.Health <= Player.Instance.CalculateDamageOnUnit(minion, DamageType.Physical, Damager.QDamage())) { Player.CastSpell(SpellSlot.Q, minion.Position); return; } if (FarmingMenu["WLastHit"].Cast <CheckBox>().CurrentValue&& W.IsReady() && minion.Health <= Player.Instance.CalculateDamageOnUnit(minion, DamageType.Physical, Damager.WDamage())) { Player.CastSpell(SpellSlot.W); return; } } } }
private static void JungleClear() { var minion = EntityManager.MinionsAndMonsters.Monsters.OrderByDescending(a => a.MaxHealth) .FirstOrDefault(a => a.Distance(Player.Instance) < Player.Instance.GetAutoAttackRange(a)); { if (minion == null) { return; } if (FarmingMenu["QJungleClear"].Cast <CheckBox>().CurrentValue&& Q.IsReady() && minion.Health <= Player.Instance.CalculateDamageOnUnit(minion, DamageType.Physical, Damager.QDamage())) { Player.CastSpell(SpellSlot.Q, minion.Position); return; } if (FarmingMenu["EJungleClear"].Cast <CheckBox>().CurrentValue&& (!W.IsReady() && !Q.IsReady() || Player.Instance.HealthPercent < 20) && E.IsReady() && LastCastW + 750 < Environment.TickCount) { Player.CastSpell(SpellSlot.E, minion.Position); } } }
private static void LaneClear() { try { Orbwalker.ForcedTarget = null; { if (Orbwalker.IsAutoAttacking || LastCastQ + 260 > Environment.TickCount) { return; } foreach ( var minion in EntityManager.MinionsAndMonsters.EnemyMinions.Where(a => a.IsValidTarget(W.Range))) { if (FarmingMenu["QLaneClear"].Cast <CheckBox>().CurrentValue&& Q.IsReady() && minion.Health <= Player.Instance.CalculateDamageOnUnit(minion, DamageType.Physical, Damager.QDamage())) { Player.CastSpell(SpellSlot.Q, minion.Position); return; } if (FarmingMenu["WLaneClear"].Cast <CheckBox>().CurrentValue&& W.IsReady() && minion.Health <= Player.Instance.CalculateDamageOnUnit(minion, DamageType.Physical, Damager.WDamage())) { Player.CastSpell(SpellSlot.W); return; } } } } catch (Exception ex) { Console.Write(ex); } }