public 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.CalculateDamageOnUnit(minion, DamageType.Physical, Damage.QDamage())) { Player.CastSpell(SpellSlot.Q, minion.Position); return; } if (FarmingMenu["WLastHit"].Cast <CheckBox>().CurrentValue&& W.IsReady() && minion.Health <= _Player.CalculateDamageOnUnit(minion, DamageType.Physical, Damage.WDamage())) { Player.CastSpell(SpellSlot.W); return; } } } }
private static float getComboDamage(Obj_AI_Base enemy) { if (enemy != null) { float damage = 0; float passivenhan; if (_Player.Level >= 18) { passivenhan = 0.5f; } else if (_Player.Level >= 15) { passivenhan = 0.45f; } else if (_Player.Level >= 12) { passivenhan = 0.4f; } else if (_Player.Level >= 9) { passivenhan = 0.35f; } else if (_Player.Level >= 6) { passivenhan = 0.3f; } else if (_Player.Level >= 3) { passivenhan = 0.25f; } else { passivenhan = 0.2f; } if (Item.HasItem(3074)) { damage = damage + _Player.GetAutoAttackDamage(enemy) * 0.7f; } if (W.IsReady()) { damage = damage + Damage.WDamage(); } if (Q.IsReady()) { var qnhan = 4 - QCount; damage = damage + Damage.QDamage() * qnhan + _Player.GetAutoAttackDamage(enemy) * qnhan * (1 + passivenhan); } damage = damage + _Player.GetAutoAttackDamage(enemy) * (1 + passivenhan); if (R.IsReady()) { return(damage * 1.2f + Damage.RDamage(enemy)); } return(damage); } return(0); }
public static void LastHitAfterAa(Obj_AI_Base target) { var unitHp = target.Health - _Player.GetAutoAttackDamage(target, true); if (unitHp > 0) { if (FarmingMenu["QLastHit"].Cast <CheckBox>().CurrentValue&& Q.IsReady() && _Player.CalculateDamageOnUnit(target, DamageType.Physical, Damage.QDamage()) > unitHp) { Player.CastSpell(SpellSlot.Q, target.Position); return; } if (FarmingMenu["WLastHit"].Cast <CheckBox>().CurrentValue&& W.IsReady() && W.IsInRange(target) && _Player.CalculateDamageOnUnit(target, DamageType.Physical, Damage.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; var targetC = args.Target as AIHeroClient; // 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.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.CalculateDamageOnUnit(target2, DamageType.Physical, Damage.WDamage()) || target2.Distance(Player.Instance) > W.Range) && _Player.CalculateDamageOnUnit(target2, DamageType.Physical, Damage.RDamage(target2) + Damage.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 && 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.HasBuff("RivenFengShuiEngine") && R.IsReady() && ComboMenu["R2Combo"].Cast <CheckBox>().CurrentValue) { ssfl = true; var target2 = TargetSelector.GetTarget(R.Range, DamageType.Physical); if (target2 != null && _Player.CalculateDamageOnUnit(target2, DamageType.Physical, (Damage.RDamage(target2))) > target2.Health) { R.Cast(target2); return; } } if ((EnableR == true) && R.IsReady() && !_Player.HasBuff("RivenFengShuiEngine") && ComboMenu["RCombo"].Cast <CheckBox>().CurrentValue) { ssfl = false; ForceR(); Player.CastSpell(SpellSlot.R); } target = TargetSelector.GetTarget(W.Range, DamageType.Physical); if (target != null && _Player.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.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.CalculateDamageOnUnit(target2, DamageType.Physical, Damage.QDamage()) || target2.Distance(Player.Instance) > 300) && _Player.CalculateDamageOnUnit(target2, DamageType.Physical, Damage.RDamage(target2) + Damage.QDamage()) > target2.Health) { R.Cast(target2); } } } return; } if (args.SData.IsAutoAttack() && target != null) { 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); } } if (args.SData.IsAutoAttack() && targetC != null) { if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo)) { ComboAfterAa(targetC); } if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Harass)) { HarassAfterAa(targetC); } } }
public 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.CalculateDamageOnUnit(minion, DamageType.Physical, Damage.QDamage())) { Player.CastSpell(SpellSlot.Q, minion.Position); return; } if (FarmingMenu["WLaneClear"].Cast <CheckBox>().CurrentValue&& W.IsReady() && minion.Health <= _Player.CalculateDamageOnUnit(minion, DamageType.Physical, Damage.WDamage())) { Player.CastSpell(SpellSlot.W); return; } } } } catch (Exception ex) { Console.Write(ex); } }