public void CastSkillshot(Obj_AI_Hero t, Spell s, HitChance hc = HitChance.High) { if (!s.IsSkillshot) return; PredictionOutput p = s.GetPrediction(t); if (s.Collision) { for (int i = 0; i < p.CollisionObjects.Count; i++) if (!p.CollisionObjects[i].IsDead && (p.CollisionObjects[i].IsEnemy || p.CollisionObjects[i].IsMinion)) return; } if ((t.HasBuffOfType(BuffType.Slow) && p.Hitchance >= HitChance.High) || p.Hitchance == HitChance.Immobile) s.Cast(p.CastPosition); else if (t.IsRecalling()) s.Cast(t.ServerPosition); else { if (s.IsReady()) { s.SPredictionCast(t, hc); } } }
public static void CastBasicFarm(Spell spell) { if (!spell.IsReady()) return; var minion = MinionManager.GetMinions(ObjectManager.Player.ServerPosition, spell.Range, MinionTypes.All, MinionTeam.NotAlly); if (minion.Count == 0) return; if (spell.Type == SkillshotType.SkillshotCircle) { spell.UpdateSourcePosition(); var predPosition = spell.GetCircularFarmLocation(minion); if (predPosition.MinionsHit >= 2) { spell.Cast(predPosition.Position); } } else if (spell.Type == SkillshotType.SkillshotLine || spell.Type == SkillshotType.SkillshotCone) { spell.UpdateSourcePosition(); var predPosition = spell.GetLineFarmLocation(minion); if (predPosition.MinionsHit >= 2) spell.Cast(predPosition.Position); } }
public static void WallJumpo(Spell spell, string menuname) { if (ObjectManager.Player.IsDead && ObjectManager.Player.IsZombie) { return; } CheckSpell(spell); if (Program.Champion.misc.Item(menuname).GetValue<KeyBind>().Active) { if (DrawColor == Color.Green) { if (ObjectManager.Player.Distance(LastWallStartPosition) > 50) ObjectManager.Player.IssueOrder(GameObjectOrder.MoveTo, LastWallStartPosition.To3D()); else if (Prediction.GetPrediction(ObjectManager.Player, 500).UnitPosition.Distance(ObjectManager.Player.Position) <= 10 && SpellCount == 1) spell.Cast(LastEndPosition); } else if (SpellCount == 1 && DrawColor == Color.ForestGreen) { DrawColor = Color.White; spell.Cast(LastWallJumpEndPosition); } } Vector2 dir = new Vector2(0, 0); float scale = 200; Position = ObjectManager.Player.Position.To2D() + scale * ObjectManager.Player.Direction.To2D().Perpendicular(); if (LeagueSharp.Common.Utility.IsWall(Position)) { dir = scale * ObjectManager.Player.Direction.To2D().Perpendicular(); Continue(dir); } if (!LeagueSharp.Common.Utility.IsWall(Position) || LastColor == Color.Red) { scale = 200; Position2 = ObjectManager.Player.Position.To2D() + (scale * ObjectManager.Player.Direction.To2D().Perpendicular()).Perpendicular(); Position3 = ObjectManager.Player.Position.To2D() + (scale * ObjectManager.Player.Direction.To2D().Perpendicular()).Perpendicular2(); if (LeagueSharp.Common.Utility.IsWall(Position2)) { dir = (scale * ObjectManager.Player.Direction.To2D().Perpendicular()).Perpendicular(); WardJumpPosition = Position2; Continue(dir, true); } else if (LeagueSharp.Common.Utility.IsWall(Position3)) { dir = (scale * ObjectManager.Player.Direction.To2D().Perpendicular()).Perpendicular2(); WardJumpPosition = Position3; Continue(dir, true); } } }
private static void CastSafePosition(Spell spell, Obj_AI_Hero hero) { if (Geometry.CircleCircleIntersection(ObjectManager.Player.ServerPosition.To2D(), Prediction.GetPrediction(hero, 0f, hero.AttackRange).UnitPosition.To2D(), spell.Range, Orbwalking.GetRealAutoAttackRange(hero)).Count() > 0) { spell.Cast( Geometry.CircleCircleIntersection(ObjectManager.Player.ServerPosition.To2D(), Prediction.GetPrediction(hero, 0f, hero.AttackRange).UnitPosition.To2D(), spell.Range, Orbwalking.GetRealAutoAttackRange(hero)).MinOrDefault(i => i.Distance(Game.CursorPos))); } else { spell.Cast(ObjectManager.Player.ServerPosition.Extend(hero.ServerPosition, -E.Range)); } }
public static void CastBasicSkillShot(Spell spell, float range, TargetSelector.DamageType type, HitChance hitChance, bool towerCheck = false) { var target = TargetSelector.GetTarget(range, type); if (target == null || !spell.IsReady()) return; if (towerCheck && target.UnderTurret(true)) return; spell.UpdateSourcePosition(); if (spell.Type == SkillshotType.SkillshotCircle) { var pred = Prediction.GetPrediction(target, spell.Delay); if (pred.Hitchance >= hitChance) spell.Cast(pred.CastPosition); } else { spell.CastIfHitchanceEquals(target, hitChance); } }
static void Obj_AI_Hero_OnProcessSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args) { Q = new Spell(SpellSlot.Q, 1150f); W = new Spell(SpellSlot.W, 5000f); E = new Spell(SpellSlot.E, 1000f); R = new Spell(SpellSlot.R, 1500f); foreach (var unit in ObjectManager.Get<Obj_AI_Hero>().Where(h => h.IsEnemy && h.IsHPBarRendered)) { // Get buffs for (int i = 0; i < unit.Buffs.Count(); i++) { // Check if the Soulbound is in a good range var soulboundhero = HeroManager.Allies.FirstOrDefault(hero => hero.HasBuff("kalistacoopstrikeally", true) && args.Target.NetworkId == hero.NetworkId && hero.HealthPercent <= 15); var enemy = HeroManager.Enemies.Where(x => soulboundhero.Distance(x.Position) > 800); // Check if the Soulbound is a Blitzcrank // Check if the enemy is hooked // Check if target was far enough for ult if (soulboundhero.ChampionName == "Blitzcrank" && unit.Buffs[i].Name == "rocketgrab2" && unit.Buffs[i].IsActive && enemy.Count() > 0 && Menu.Item("kaliscrank2", true).GetValue<Boolean>()) { R.Cast(); } } } }
public static void W(Spell spell) { foreach (var enemy in HeroManager.Enemies.Where(x => x.IsValidTarget(spell.Range) && x.Health < spell.GetDamage(x))) { spell.Cast(enemy); } }
public static bool DoCast(Spell spell, Obj_AI_Hero target, HitChance minHitChance, bool colisionCheck=false) { // Data.Static.Objects.ProjectLogger.WriteLog("DoCast Call"); if ((PredictionMethod==0)||((PredictionMethod==1)&&colisionCheck)) //Sebby Colision is broken...lol { var output=spell.GetPrediction(target); if (colisionCheck) if (CheckColision(output)) return false; if (minHitChance>output.Hitchance) return false; spell.Cast(output.CastPosition); return true; } if (PredictionMethod==1) { var output=SebbyLib.Prediction.Prediction.GetPrediction(target, spell.Delay); if (minHitChance>(HitChance)output.Hitchance) return false; spell.Cast(output.CastPosition); return true; } if (PredictionMethod==2) { var output=spell.GetSPrediction(target); if (colisionCheck) if (CheckColision(output)) return false; if (minHitChance>output.HitChance) return false; spell.Cast(output.CastPosition); return true; } return false; }
public static void CastBasicSkillShot(Spell spell, float range, LeagueSharp.Common.TargetSelector.DamageType type, HitChance hitChance) { var target = LeagueSharp.Common.TargetSelector.GetTarget(range, type); if (target == null || !spell.IsReady()) return; spell.UpdateSourcePosition(); if (spell.GetPrediction(target).Hitchance >= hitChance) spell.Cast(target, packets()); }
public static void CastSpell(Spell spell, Obj_AI_Base target, bool packetCast) { if (target.IsValidTarget(spell.Range)) { spell.Cast(target, packetCast); LastCastTime = Environment.TickCount; Orbwalking.ResetAutoAttackTimer(); } }
private static void CastSpellSSAuto(Spell spell, Vector3 predpos, Obj_AI_Hero target) { Orbwalking.ResetAutoAttackTimer(); spell.Cast(predpos); if (Player.Distance(target) <= Player.AttackRange) { Program.Player.IssueOrder(GameObjectOrder.AttackUnit, target); } }
public static void castSpell(Spell p, String menu, Obj_AI_Base target) { var Passive = Program.menu.Item(menu).GetValue<bool>(); if (!Program.Passive()) { Program.passive = false; } if (Passive == false && Program.passive) { p.Cast(target); } else { if (!Program.Passive()) { p.Cast(target); } } }
public static void CastSpell(Spell spell, Obj_AI_Base target, HitChance hitChance, bool packetCast) { Obj_AI_Hero Player = ObjectManager.Player; if (target.IsValidTarget(spell.Range) && spell.GetPrediction(target).Hitchance >= hitChance) { spell.Cast(target, packetCast); LastCastTime = Environment.TickCount; Orbwalking.ResetAutoAttackTimer(); } }
private static void CastSpell(Spell spell, BuffType x, Obj_AI_Hero target, float lastpostime) { if (x == BuffType.Stun || x == BuffType.Snare || x == BuffType.Knockup || x == BuffType.Fear) { if (Game.Time <= lastpostime) { spell.Cast(target.ServerPosition); } } else { var pred = spell.GetPrediction(target); if (pred != null && Game.Time <= lastpostime) { spell.Cast(pred.CastPosition); } } }
public Obj_AI_Hero Cast_BasicSkillshot_Enemy(Spell spell, TargetSelector.PriorityMode prio = TargetSelector.PriorityMode.AutoPriority, float extrarange = 0) { if(!spell.IsReady()) return null; var target = TargetSelector.GetTarget(spell.Range, prio); if(target == null) return null; if (!target.IsValidTarget(spell.Range + extrarange) || spell.GetPrediction(target).Hitchance < HitChance.High) return null; spell.Cast(target, UsePackets()); return target; }
/// <summary> /// Casts a basic line skillshot towards target if hitchance is high /// </summary> /// <param name="spell"></param> /// <param name="damageType"></param> /// <returns> target </returns> public Obj_AI_Hero castLineSkillShot(Spell spell, SimpleTs.DamageType damageType = SimpleTs.DamageType.Physical) { if (!spell.IsReady()) return null; Obj_AI_Hero target = SimpleTs.GetTarget(spell.Range, damageType); if (target == null) return null; if (!target.IsValidTarget(spell.Range) || spell.GetPrediction(target).Hitchance < HitChance.High) return null; spell.Cast(target, true); return target; }
/// <summary> /// Casts a basic circle skillshot towards target if hitchance is high /// </summary> /// <param name="spell"></param> /// <param name="damageType"></param> /// <param name="extrarange"></param> /// <returns></returns> public Obj_AI_Base castCircleSkillShot(Spell spell, SimpleTs.DamageType damageType = SimpleTs.DamageType.Physical, float extrarange = 0) { if (!spell.IsReady()) return null; Obj_AI_Hero target = SimpleTs.GetTarget(spell.Range + extrarange, damageType); if (target == null) return null; if (target.IsValidTarget(spell.Range + extrarange) && spell.GetPrediction(target).Hitchance >= HitChance.High) spell.Cast(target, true); return target; }
public static bool SpellAoePrediction(Spell spell) { var targets = ObjectManager.Get<Obj_AI_Hero>().Where(t => t.IsEnemy && t.Distance(ObjectManager.Player) < spell.Range); var positions = new List<List<Vector3>>(); foreach (Obj_AI_Base t in targets) { var posn = new List<Vector3>(); foreach (Obj_AI_Base te in targets) { var dist = t.Distance(ObjectManager.Player); var t1pos = LeagueSharp.Common.Prediction.GetPrediction(t, dist / spell.Speed).UnitPosition; var t2pos = LeagueSharp.Common.Prediction.GetPrediction(te, dist / spell.Speed).UnitPosition; if (t1pos.Distance(t2pos) < spell.Width) { posn.Add(t1pos); } } positions.Add(posn); } var posfint = positions.Max(t => t.Count); var posin = positions.Where(t => t.Count == posfint).FirstOrDefault(); if (posfint >= 2) { var flist = new List<float>(); var firstdis = new Distance(new Vector3(), new Vector3(), 0); for (var i = 0; i < posin.Count; i++) { for (var x = i + 1; x <= posin.Count; x++) { var d = posin[i].Distance(posin[x]); if (d > firstdis.dist) { firstdis = new Distance(posin[i], posin[x], d); } } } // firstdis Vector3 pos; pos.X = (firstdis.pos1.X + firstdis.pos2.X) / 2; pos.Y = (firstdis.pos1.Y + firstdis.pos2.Y) / 2; pos.Z = (firstdis.pos1.Z + firstdis.pos2.Z) / 2; spell.Cast(pos); Render.Circle.DrawCircle(pos, 10, System.Drawing.Color.Red, 2); return true; } // Render.Circle.DrawCircle(line_finish, 10, System.Drawing.Color.Red, 2); return false; }
private void AntiGapcloser_OnEnemyGapcloser(ActiveGapcloser gapcloser) { var t = gapcloser.Sender; if (!Config.Item("gapcloser" + t.ChampionName).GetValue <bool>()) { return; } if (Config.Item("AGC", true).GetValue <bool>()) { if (W.IsReady() && gapcloser.End.Distance(Player.Position) < gapcloser.Start.Distance(Player.Position)) { var allyHero = HeroManager.Allies.Where(ally => ally.Distance(Player) <= W.Range && !ally.IsMe) .OrderBy(ally => ally.Distance(gapcloser.End)).FirstOrDefault(); if (allyHero != null && Config.Item("Eon" + allyHero.ChampionName).GetValue <bool>()) { W.Cast(allyHero); } } if (E.IsReady()) { Utility.DelayAction.Add(200, () => E.Cast(t.ServerPosition)); } } if (Q.IsReady() && Config.Item("AGCq", true).GetValue <bool>()) { Q.Cast(t); } if (R.IsReady() && Config.Item("Rmode" + t.ChampionName, true).GetValue <StringList>().SelectedIndex == 3) { R.Cast(t); } }
private static void AntiGapcloser_OnEnemyGapcloser(ActiveGapcloser gapcloser) { var t = gapcloser.Sender; if (!getCheckBoxItem(ewMenu, "gapcloser" + t.ChampionName)) { return; } if (getCheckBoxItem(ewMenu, "AGC")) { if (W.IsReady() && gapcloser.End.Distance(Player.Position) < gapcloser.Start.Distance(Player.Position)) { var allyHero = SebbyLib.Program.Allies.Where(ally => ally.Distance(Player) <= W.Range && !ally.IsMe) .OrderBy(ally => ally.Distance(gapcloser.End)).FirstOrDefault(); if (allyHero != null && getCheckBoxItem(ewMenu, "Eon" + allyHero.ChampionName)) { W.Cast(allyHero); } } if (E.IsReady()) { LeagueSharp.Common.Utility.DelayAction.Add(200, () => E.Cast(t.ServerPosition)); } } if (Q.IsReady() && getCheckBoxItem(qMenu, "AGCq")) { Q.Cast(t); } if (R.IsReady() && getSliderItem(rMenu, "Rmode" + t.ChampionName) == 3) { R.Cast(t); } }
static void LaneClear() { if (Q.IsReady() && getCheckBoxItem(laneclearMenu, "laneclearUseQ") && Player.ManaPercent > getSliderItem(laneclearMenu, "laneclearQmana")) { var allMinionsQ = MinionManager.GetMinions(Player.ServerPosition, Q.Range, MinionTypes.All, MinionTeam.Enemy); var locQ = Q.GetLineFarmLocation(allMinionsQ); if (locQ.MinionsHit >= getSliderItem(laneclearMenu, "laneclearQmc")) { Q.Cast(locQ.Position); } } if (W.IsReady() && getCheckBoxItem(laneclearMenu, "laneclearUseW")) { var minioncount = MinionManager.GetMinions(Player.Position, 1500).Count; if (minioncount > 0) { if (Player.ManaPercent > getSliderItem(laneclearMenu, "laneclearbluemana")) { if (minioncount >= getSliderItem(laneclearMenu, "laneclearredmc")) { CardSelector.StartSelecting(Cards.Red); } else { CardSelector.StartSelecting(Cards.Blue); } } else { CardSelector.StartSelecting(Cards.Blue); } } } }
private void Combo() { var target = TargetSelector.GetTarget(1490, DamageType.Physical); if (target == null) { return; } if (getCheckBoxItem(menuC, "selected")) { target = CombatHelper.SetTarget(target, (AIHeroClient)Orbwalker.LastTarget); Orbwalker.ForcedTarget = target; } if (getCheckBoxItem(menuC, "useq") && Q.IsReady() && !QEnabled && player.Distance(target) >= getSliderItem(menuC, "useqmin") && player.Distance(target) < player.MoveSpeed * MsBonus(target) * 3.0f) { Q.Cast(getCheckBoxItem(config, "packets")); } if (getCheckBoxItem(menuC, "usew") && CanW && W.CanCast(target) && (player.CalcDamage(target, DamageType.Physical, Wdmg(target)) > target.Health || player.HealthPercent < 10)) { W.Cast(target, getCheckBoxItem(config, "packets")); } if (getCheckBoxItem(menuC, "usee") && E.CanCast(target) && ((getCheckBoxItem(menuC, "useenotccd") && !target.HasBuffOfType(BuffType.Snare) && !target.HasBuffOfType(BuffType.Slow) && !target.HasBuffOfType(BuffType.Stun) && !target.HasBuffOfType(BuffType.Suppression)) || !getCheckBoxItem(menuC, "useenotccd"))) { E.Cast(getCheckBoxItem(config, "packets")); } if (R.IsReady() && player.HealthPercent > 20 && ((getCheckBoxItem(menuC, "user") && player.Distance(target) < 200 && ComboDamage(target) + R.GetDamage(target) * 10 > target.Health && ComboDamage(target) < target.Health) || (getSliderItem(menuC, "usertf") <= player.CountEnemiesInRange(300)))) { R.Cast(getCheckBoxItem(config, "packets")); } var ignitedmg = (float)player.GetSummonerSpellDamage(target, Damage.SummonerSpell.Ignite); var hasIgnite = player.Spellbook.CanUseSpell(player.GetSpellSlot("SummonerDot")) == SpellState.Ready; if (getCheckBoxItem(menuC, "useIgnite") && ignitedmg > target.Health && hasIgnite && !W.CanCast(target)) { player.Spellbook.CastSpell(player.GetSpellSlot("SummonerDot"), target); } }
private static void LastHitQ() { if (!_Q.IsReady()) { return; } if (getCheckBoxItem(JungleClear, "Veigar_JUseQSet") || getCheckBoxItem(LaneClear, "Veigar_LUseQSet")) { var minions = MinionManager.GetMinions(_Q.Range, MinionTypes.All, MinionTeam.NotAlly).Where(m => m.LSIsValidTarget() && m.Health > 5 && m.LSDistance(Player) < _Q.Range && m.Health < (_Q.GetDamage(m) - getSliderItem(Misc, "Veigar_LowerQ"))); var objAiBases = from minion in minions let pred = _Q.GetCollision(Player.Position.LSTo2D(), new List <Vector2>() { Player.Position.LSExtend(minion.Position, _Q.Range).LSTo2D() }, 70f) orderby pred.Count descending select minion; if (objAiBases.Any()) { foreach (var minion in objAiBases) { var collision = _Q.GetCollision(Player.Position.LSTo2D(), new List <Vector2>() { Player.Position.LSExtend(minion.Position, _Q.Range).LSTo2D() }, 70f).OrderBy(c => c.LSDistance(Player)).ToList(); if (collision.Count <= 2 || collision[0].NetworkId == minion.NetworkId || collision[1].NetworkId == minion.NetworkId) { if (collision.Count == 1) { _Q.Cast(minion); } else { _Q.Cast(minion); } } } } } }
private static void Unit_OnDash(Obj_AI_Base sender, Dash.DashItem args) { if (sender.IsEnemy && Player.LSDistance(args.EndPos) > Player.LSDistance(args.StartPos)) { if (E.IsInRange(args.StartPos)) { E.Cast(sender); } if (getCheckBoxItem(SpellConfig, "autoQ") && SpellQ.GetState() == QState.ThreshQ && Q.IsInRange(args.EndPos) && !E.IsInRange(args.EndPos) && Math.Abs(args.Duration - args.EndPos.LSDistance(sender) / Q.Speed * 1000) < 150) { List <Vector2> to = new List <Vector2>(); to.Add(args.EndPos); var QCollision = Q.GetCollision(Player.Position.LSTo2D(), to); if (QCollision == null || QCollision.Count == 0 || QCollision.All(a => !a.IsMinion)) { if (Q.Cast(args.EndPos)) { return; } } } } }
private static void LogicQ() { if (Program.LagFree(1)) { if (!Orbwalker.CanMove) { return; } var cc = !Program.None && Player.Mana > RMANA + QMANA + EMANA; var harass = Program.Farm && Player.ManaPercent > getSliderItem(harassMenu, "HarassMana") && OktwCommon.CanHarras(); if (Program.Combo && Player.Mana > RMANA + QMANA) { var t = TargetSelector.GetTarget(Q.Range, DamageType.Physical); if (t.LSIsValidTarget()) { Program.CastSpell(Q, t); } } foreach (var t in Program.Enemies.Where(enemy => enemy.LSIsValidTarget(Q.Range)).OrderBy(t => t.Health)) { var qDmg = OktwCommon.GetKsDamage(t, Q); var wDmg = W.GetDamage(t); if (qDmg + wDmg > t.Health) { Program.CastSpell(Q, t); OverKill = Game.Time; return; } if (cc && !OktwCommon.CanMove(t)) { Q.Cast(t); } if (harass && getCheckBoxItem(harassMenu, "haras" + t.NetworkId)) { Program.CastSpell(Q, t); } } } else if (Program.LagFree(2)) { if (Farm && Player.Mana > QMANA) { farmQ(); lag = Game.Time; } else if (getCheckBoxItem(miscMenu, "stack") && Utils.TickCount - Q.LastCastAttemptT > 4000 && !Player.HasBuff("Recall") && Player.Mana > Player.MaxMana * 0.95 && Program.None && (Items.HasItem(Tear) || Items.HasItem(Manamune))) { Q.Cast(Player.Position.LSExtend(Game.CursorPos, 500)); } } }
private void LogicQ() { if (Program.LagFree(1)) { if (!EloBuddy.SDK.Orbwalker.CanMove)//LeagueSharp.Common.Orbwalking.CanMove(40)) { return; } bool cc = !Program.None && Player.Mana > RMANA + QMANA + EMANA; bool harass = Program.Farm && Player.ManaPercent > Config.Item("HarassMana", true).GetValue <Slider>().Value&& OktwCommon.CanHarras(); if (Program.Combo && Player.Mana > RMANA + QMANA) { var t = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Physical); if (t.IsValidTargetLS()) { Program.CastSpell(Q, t); } } foreach (var t in HeroManager.Enemies.Where(enemy => enemy.IsValidTargetLS(Q.Range)).OrderBy(t => t.Health)) { var qDmg = OktwCommon.GetKsDamage(t, Q); var wDmg = W.GetDamage(t); if (qDmg + wDmg > t.Health) { Program.CastSpell(Q, t); OverKill = Game.Time; return; } if (cc && !OktwCommon.CanMove(t)) { Q.Cast(t); } if (harass && Config.Item("haras" + t.ChampionName).GetValue <bool>()) { Program.CastSpell(Q, t); } } } else if (Program.LagFree(2)) { if (Farm && Player.Mana > QMANA) { farmQ(); lag = Game.Time; } else if (Config.Item("stack", true).GetValue <bool>() && Utils.TickCount - Q.LastCastAttemptT > 4000 && !Player.HasBuff("Recall") && Player.Mana > Player.MaxMana * 0.95 && Program.None && (Items.HasItem(Tear) || Items.HasItem(Manamune))) { Q.Cast(Player.Position.Extend(Game.CursorPos, 500)); } } }
private void CastQHero(AIHeroClient target) { if (Program.IsSPrediction) { var pred = Q.GetSPrediction(target); if (pred.CollisionResult.Units.Count < 2) { Q.Cast(pred.CastPosition); } } else { var targQ = Q.GetPrediction(target, true); var collision = Q.GetCollision( player.Position.To2D(), new List <Vector2>() { targQ.CastPosition.To2D() }); if (Q.Range - 100 > targQ.CastPosition.Distance(player.Position) && collision.Count < 2) { Q.CastIfHitchanceEquals(target, HitChance.High); } } }
internal static void CCast(this Spell spell, Obj_AI_Base target, HitChance SelectedHitchance) //for Circular spells { if (spell.Type == SkillshotType.SkillshotCircle || spell.Type == SkillshotType.SkillshotCone) // Cone 스킬은 임시로 { if (spell != null && target != null) { var pred = LeagueSharp.Common.Prediction.GetPrediction(target, spell.Delay, spell.Width / 2, spell.Speed); SharpDX.Vector2 castVec = (pred.UnitPosition.To2D() + target.ServerPosition.To2D()) / 2; SharpDX.Vector2 castVec2 = Player.ServerPosition.To2D() + SharpDX.Vector2.Normalize(pred.UnitPosition.To2D() - Player.Position.To2D()) * (spell.Range); if (target.IsValidTarget(spell.Range)) { if (target.MoveSpeed * (Game.Ping / 2000 + spell.Delay + Player.ServerPosition.Distance(target.ServerPosition) / spell.Speed) <= spell.Width * 1 / 2) { spell.Cast(target.ServerPosition); //Game.Ping/2000 추가함. } else if (pred.Hitchance >= SelectedHitchance && pred.UnitPosition.Distance(target.ServerPosition) < Math.Max(spell.Width, 300f)) { if (target.MoveSpeed * (Game.Ping / 2000 + spell.Delay + Player.ServerPosition.Distance(target.ServerPosition) / spell.Speed) <= spell.Width * 2 / 3 && castVec.Distance(pred.UnitPosition) <= spell.Width * 1 / 2 && castVec.Distance(Player.ServerPosition) <= spell.Range) { spell.Cast(castVec); } else if (castVec.Distance(pred.UnitPosition) > spell.Width * 1 / 2 && Player.ServerPosition.Distance(pred.UnitPosition) <= spell.Range) { spell.Cast(pred.UnitPosition); } else { spell.Cast(pred.CastPosition); // <- 별로 좋은 선택은 아니지만.. } } } else if (target.IsValidTarget(spell.Range + spell.Width / 2)) //사거리 밖 대상에 대해서 { if (pred.Hitchance >= SelectedHitchance && Player.ServerPosition.Distance(pred.UnitPosition) <= spell.Range + spell.Width * 1 / 2 && pred.UnitPosition.Distance(target.ServerPosition) < Math.Max(spell.Width, 400f)) { if (Player.ServerPosition.Distance(pred.UnitPosition) <= spell.Range) { if (Player.ServerPosition.Distance(pred.CastPosition) <= spell.Range) { spell.Cast(pred.CastPosition); } } else if (Player.ServerPosition.Distance(pred.UnitPosition) <= spell.Range + spell.Width * 1 / 2 && target.MoveSpeed * (Game.Ping / 2000 + spell.Delay + Player.ServerPosition.Distance(target.ServerPosition) / spell.Speed) <= spell.Width / 2) { if (Player.Distance(castVec2) <= spell.Range) { spell.Cast(castVec2); } } } } } } }
private static void LogicE() { if (SebbyLib.Program.Combo && WMissile != null && WMissile.IsValid) { if (WMissile.Position.CountEnemiesInRange(200) > 0 && WMissile.Position.LSDistance(Player.ServerPosition) < 100) { E.Cast(Player.Position.LSExtend(WMissile.Position, E.Range), true); } } var t = TargetSelector.GetTarget(800, DamageType.Magical); if (E.IsReady() && Player.Mana > RMANA + EMANA && Player.CountEnemiesInRange(260) > 0 && Player.Position.LSExtend(Game.CursorPos, E.Range).CountEnemiesInRange(500) < 3 && t.Position.LSDistance(Game.CursorPos) > t.Position.LSDistance(Player.Position)) { E.Cast(Player.Position.LSExtend(Game.CursorPos, E.Range), true); } else if (SebbyLib.Program.Combo && Player.Health > Player.MaxHealth * 0.4 && Player.Mana > RMANA + EMANA && !Player.UnderTurret(true) && Player.Position.LSExtend(Game.CursorPos, E.Range).CountEnemiesInRange(700) < 3) { if (t.IsValidTarget() && Player.Mana > QMANA + EMANA + WMANA && t.Position.LSDistance(Game.CursorPos) + 300 < t.Position.LSDistance(Player.Position)) { E.Cast(Player.Position.LSExtend(Game.CursorPos, E.Range), true); } } else if (t.IsValidTarget() && SebbyLib.Program.Combo && E.GetDamage(t) + W.GetDamage(t) > t.Health) { E.Cast(Player.Position.LSExtend(t.Position, E.Range), true); } }
private static void OnUpdate(EventArgs args) { if (Player.IsDead || MenuGUI.IsChatOpen || Player.IsRecalling()) { return; } if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo)) { Fight(); } if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LaneClear) || Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.JungleClear)) { Clear(); } if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Flee)) { if (getCheckBoxItem(fleeMenu, "Q") && !HaveQ && Q.Cast()) { } } }
private static void AntiGapcloser_OnEnemyGapcloser(ActiveGapcloser gapcloser) { if ((Player.IsChannelingImportantSpell() || Game.Time - Rtime < 0.5) && Game.Time - Rtime < 2.5) { OktwCommon.blockMove = true; OktwCommon.blockAttack = true; OktwCommon.blockSpells = true; Orbwalker.DisableAttacking = true; Orbwalker.DisableMovement = true; return; } var t = gapcloser.Sender; if (Q.IsReady() && getCheckBoxItem(qMenu, "gapQ") && t.IsValidTarget(Q.Range)) { Q.Cast(gapcloser.End); } else if (R.IsReady() && getCheckBoxItem(rMenu, "gapcloser" + gapcloser.Sender.NetworkId) && t.IsValidTarget(R.Range)) { R.CastOnUnit(t); } }
private static void Obj_AI_Base_OnProcessSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args) { if (!E.IsReady() || args.SData.IsAutoAttack() || Player.HealthPercent > getSliderItem(eMenu, "Edmg") || !getCheckBoxItem(eMenu, "autoE") || !sender.IsEnemy || sender.IsMinion || !sender.IsValid <AIHeroClient>() || args.SData.Name.ToLower() == "tormentedsoil") { return; } if (eMenu["spell" + args.SData.Name] == null || !getCheckBoxItem(eMenu, "spell" + args.SData.Name)) { return; } if (args.Target != null) { if (args.Target.IsMe) { E.Cast(); } } else if (OktwCommon.CanHitSkillShot(Player, args)) { E.Cast(); } }
public void Cast_BasicSkillshot_AOE_Farm(Spell spell, int extrawidth = 0) { if(!spell.IsReady() ) return; var minions = MinionManager.GetMinions(ObjectManager.Player.Position, spell.Type == SkillshotType.SkillshotLine ? spell.Range : spell.Range + ((spell.Width + extrawidth) / 2),MinionTypes.All , MinionTeam.NotAlly); if(minions.Count == 0) return; var castPostion = new MinionManager.FarmLocation(); if(spell.Type == SkillshotType.SkillshotCircle) castPostion = MinionManager.GetBestCircularFarmLocation(minions.Select(minion => minion.ServerPosition.To2D()).ToList(), spell.Width + extrawidth, spell.Range); if(spell.Type == SkillshotType.SkillshotLine) castPostion = MinionManager.GetBestLineFarmLocation(minions.Select(minion => minion.ServerPosition.To2D()).ToList(), spell.Width, spell.Range); spell.Cast(castPostion.Position, UsePackets()); }
/// <summary> /// Spell extension for cast vector spell with SPrediction /// </summary> /// <param name="s">Spell to cast</param> /// <param name="t">Target for spell</param> /// <param name="vectorLenght">Vector lenght</param> /// <param name="hc">Minimum HitChance to cast</param> /// <param name="reactionIgnoreDelay">Delay to ignore target's reaction time</param> /// <param name="minHit">Minimum Hit Count to cast</param> /// <param name="rangeCheckFrom">Position where spell will be casted from</param> /// <param name="filterHPPercent">Minimum HP Percent to cast (for target)</param> /// <returns>true if spell has casted</returns> public static bool SPredictionCastVector(this LeagueSharp.Common.Spell s, AIHeroClient t, float vectorLenght, LeagueSharp.Common.HitChance hc, int reactionIgnoreDelay = 0, byte minHit = 1, Vector3?rangeCheckFrom = null, float filterHPPercent = 100) { if (Prediction.predMenu != null && Prediction.predMenu.Item("PREDICTONLIST").GetValue <StringList>().SelectedIndex == 1) { throw new NotSupportedException("Vector Prediction not supported in Common prediction"); } if (minHit > 1) { return(SPredictionCastAoeVector(s, vectorLenght, minHit)); } if (t.HealthPercent > filterHPPercent) { return(false); } if (rangeCheckFrom == null) { rangeCheckFrom = ObjectManager.Player.ServerPosition; } if (Monitor.TryEnter(PathTracker.EnemyInfo[t.NetworkId].m_lock)) { try { float avgt = t.AvgMovChangeTime() + reactionIgnoreDelay; float movt = t.LastMovChangeTime(); float avgp = t.AvgPathLenght(); var result = VectorPrediction.GetPrediction(t, s.Width, s.Delay, s.Speed, s.Range, vectorLenght, t.GetWaypoints(), avgt, movt, avgp, s.RangeCheckFrom.To2D()); if (result.HitChance >= hc) { s.Cast(result.CastSourcePosition, result.CastTargetPosition); return(true); } Monitor.Pulse(PathTracker.EnemyInfo[t.NetworkId].m_lock); return(false); } finally { Monitor.Exit(PathTracker.EnemyInfo[t.NetworkId].m_lock); } } return(false); }
private static void Interrupter2_OnInterruptableTarget(AIHeroClient sender, Interrupter2.InterruptableTargetEventArgs args) { if (sender.IsAlly) { return; } W.Cast(sender); }
/// <summary> /// Spell extension for cast aoe spell with SPrediction /// </summary> /// <param name="minHit">Minimum aoe hits to cast</param> /// <returns></returns> public static bool SPredictionCastAoe(this Spell s, int minHit) { if (minHit < 2) { throw new InvalidOperationException("Minimum aoe hit count cannot be less than 2"); } if (s.Collision) { throw new InvalidOperationException("Collisionable spell"); } Prediction.AoeResult result; switch (s.Type) { case SkillshotType.SkillshotLine: result = LinePrediction.GetAoePrediction(s.Width, s.Delay, s.Speed, s.Range, s.From.LSTo2D(), s.RangeCheckFrom.LSTo2D()); break; case SkillshotType.SkillshotCircle: result = CirclePrediction.GetAoePrediction(s.Width, s.Delay, s.Speed, s.Range, s.From.LSTo2D(), s.RangeCheckFrom.LSTo2D()); break; case SkillshotType.SkillshotCone: result = ConePrediction.GetAoePrediction(s.Width, s.Delay, s.Speed, s.Range, s.From.LSTo2D(), s.RangeCheckFrom.LSTo2D()); break; default: throw new InvalidOperationException("Unknown spell type"); } Drawings.s_DrawTick = Utils.TickCount; Drawings.s_DrawPos = result.CastPosition; Drawings.s_DrawHitChance = string.Format("Aoe Cast (Hits: {0})", result.HitCount); Drawings.s_DrawDirection = (result.CastPosition - s.From.LSTo2D()).LSNormalized().LSPerpendicular(); Drawings.s_DrawWidth = (int)s.Width; if (result.HitCount >= minHit) { return(s.Cast(result.CastPosition)); } return(false); }
public override void Orbwalking_AfterAttack(AttackableUnit target, EventArgs args) { if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo) && Program.combo["Combo.UseQ"].Cast <CheckBox>().CurrentValue&& Q.IsReady()) { var enemy = target as AIHeroClient; if (enemy != null) { if (ObjectManager.Player.TotalAttackDamage < enemy.Health + enemy.AllShield) { Q.Cast(enemy); } } } }
private void LogicQ2() { if (Program.Farm && Config.Item("farmQ", true).GetValue <bool>()) { farmQ(); } else if (Config.Item("stack", true).GetValue <bool>() && Utils.TickCount - Q.LastCastAttemptT > 4000 && !Player.HasBuff("Recall") && Player.Mana > Player.MaxMana * 0.95 && Orbwalker.ActiveMode == LeagueSharp.Common.Orbwalking.OrbwalkingMode.None && (Items.HasItem(Tear) || Items.HasItem(Manamune))) { Q.Cast(Player.ServerPosition); } }
private static void Combo() { var useQ = getCheckBoxItem(comboMenu, "UseQC"); var useE = getCheckBoxItem(comboMenu, "UseEC"); var useR = getCheckBoxItem(comboMenu, "UseRC"); var Qdelay = Environment.TickCount - Qcast; var Rdelay = Environment.TickCount - Rcast; if (useQ && _q.IsReady() && Rdelay >= getSliderItem(miscMenu, "delaycombo")) { var t = TargetSelector.GetTarget(_q.Range, DamageType.Magical); if (t.LSIsValidTarget(_q.Range) && _q.GetPrediction(t).HitChance >= EloBuddy.SDK.Enumerations.HitChance.High) { _q.Cast(t, false, true); } Qcast = Environment.TickCount; } if (useE && _e.IsReady()) { var t = TargetSelector.GetTarget(_e.Range, DamageType.Magical); if (t.LSIsValidTarget(_e.Range) && _e.GetPrediction(t).HitChance >= EloBuddy.SDK.Enumerations.HitChance.High) { _e.Cast(t, false, true); } } if (useR && _r.IsReady() && Qdelay >= getSliderItem(miscMenu, "delaycombo")) { var t = TargetSelector.GetTarget(_r.Range, DamageType.Magical); if (t.LSIsValidTarget(_r.Range) && _r.GetPrediction(t).HitChance >= EloBuddy.SDK.Enumerations.HitChance.High) { _r.Cast(t, false, true); } Rcast = Environment.TickCount; } UseItemes(); }
private static void OnTick(EventArgs args) { // Validate all sentinels foreach (var entry in ActiveSentinels.ToArray()) { if (getCheckBoxItem(Kalista.miscMenu, "alert") && entry.Value.Any(o => o.Value.Health == 1)) { var activeSentinel = entry.Value.First(o => o.Value.Health == 1); Chat.Print("[Kalista] Sentinel at {0} taking damage! (local ping)", string.Concat((entry.Key == GameObjectTeam.Order ? "Blue-Jungle" : entry.Key == GameObjectTeam.Chaos ? "Red-Jungle" : "Lake"), " (", activeSentinel.Key, ")")); TacticalMap.ShowPing(PingCategory.Fallback, activeSentinel.Value.Position, true); } var invalid = entry.Value.Where(o => !o.Value.IsValid || o.Value.Health < 2 || o.Value.GetBuffCount("kalistaw") == 0).ToArray(); if (invalid.Length > 0) { foreach (var location in invalid) { ActiveSentinels[entry.Key].Remove(location.Key); } RecalculateOpenLocations(); } } // Auto sentinel management if (getCheckBoxItem(Kalista.miscMenu, "enabled") && W.IsReady() && Player.Instance.ManaPercent >= getSliderItem(Kalista.miscMenu, "mana") && !Player.Instance.IsRecalling()) { if (!getCheckBoxItem(Kalista.miscMenu, "noMode") || Orbwalker.ActiveModesFlags == Orbwalker.ActiveModes.None) { if (OpenLocations.Count > 0 && SentLocation == null) { var closestLocation = OpenLocations.Where(o => Locations[o.Item1][o.Item2].IsInRange(Player.Instance, W.Range - MaxRandomRadius / 2)) .OrderByDescending(o => Locations[o.Item1][o.Item2].Distance(Player.Instance, true)) .FirstOrDefault(); if (closestLocation != null) { var position = Locations[closestLocation.Item1][closestLocation.Item2]; var randomized = (new Vector2(position.X - MaxRandomRadius / 2 + Random.NextFloat(0, MaxRandomRadius), position.Y - MaxRandomRadius / 2 + Random.NextFloat(0, MaxRandomRadius))).To3DWorld(); SentLocation = closestLocation; W.Cast(randomized); Core.DelayAction(() => SentLocation = null, 2000); } } } } }
private void Spellbook_OnCastSpell(Spellbook sender, SpellbookCastSpellEventArgs args) { if (args.Slot == SpellSlot.W) { if (ObjectManager.Get <Obj_GeneralParticleEmitter>().Any(obj => obj.IsValid && obj.Position.LSDistance(args.EndPosition) < 300 && obj.Name.ToLower().Contains("yordleTrap_idle_green.troy".ToLower()))) { args.Process = false; } } if (args.Slot == SpellSlot.E && Player.Mana > RMANA + WMANA) { W.Cast(Player.Position.LSExtend(args.EndPosition, Player.LSDistance(args.EndPosition) + 100)); LeagueSharp.Common.Utility.DelayAction.Add(10, () => E.Cast(args.EndPosition)); } }
public static void AdvancedQ(Spell spell, AIHeroClient unit, int count) { switch (getBoxItem(Language.comboMenu, "q.combo.style")) { case 0: spell.Cast(Game.CursorPos); break; case 1: if (unit == null) return; CollisionObjectCheckCast(spell, unit, count); break; case 2: if (unit == null) return; CastSafePosition(spell, unit); break; } }
public Jinx() { Q = new Spell(SpellSlot.Q); W = new Spell(SpellSlot.W, 1490); E = new Spell(SpellSlot.E, 900); R = new Spell(SpellSlot.R, 3000); W.SetSkillshot(0.6f, 70f, 3300f, true, SkillshotType.SkillshotLine); E.SetSkillshot(0.7f, 120f, 1750f, false, SkillshotType.SkillshotCircle); R.SetSkillshot(0.7f, 140f, 1500f, false, SkillshotType.SkillshotLine); Obj_AI_Base.OnBuffAdd += (sebder, args) => { if (E.IsReady()) { BuffInstance aBuff = (from fBuffs in sebder.Buffs.Where(s => sebder.Team != ObjectManager.Player.Team && sebder.Distance(ObjectManager.Player.Position) < E.Range) from b in new[] { "teleport_", /* Teleport */ "pantheon_grandskyfall_jump", /* Pantheon */ "crowstorm", /* FiddleScitck */ "zhonya", "katarinar", /* Katarita */ "MissFortuneBulletTime", /* MissFortune */ "gate", /* Twisted Fate */ "chronorevive" /* Zilean */ } where args.Buff.Name.ToLower().Contains(b) select fBuffs).FirstOrDefault(); if (aBuff != null) { E.Cast(sebder.Position); } } }; Utility.HpBarDamageIndicator.DamageToUnit = GetComboDamage; Utility.HpBarDamageIndicator.Enabled = true; Game.OnUpdate += Game_OnUpdate; AntiGapcloser.OnEnemyGapcloser += OnEnemyGapcloser; Obj_AI_Base.OnProcessSpellCast += OnProcessSpellCast; Drawing.OnDraw += OnDraw; AioOrb.Orbwalking.BeforeAttack += BeforeAttack; Hero.Helpe.PrintMessage("Jinx TwAio"); }
public static void wardJump(Vector2 pos) { W = new Spell(SpellSlot.Q, 700); Vector2 posStart = pos; if (!W.IsReady()) return; bool wardIs = false; if (!inDistance(pos, Player.ServerPosition.To2D(), W.Range+15)) { pos = Player.ServerPosition.To2D() + Vector2.Normalize(pos - Player.ServerPosition.To2D())*600; } if(!W.IsReady() && W.ChargedSpellName == "") return; foreach (Obj_AI_Base ally in ObjectManager.Get<Obj_AI_Base>().Where(ally => ally.IsAlly && !(ally is Obj_AI_Turret) && inDistance(pos, ally.ServerPosition.To2D(), 200))) { wardIs = true; moveTo(pos); if (inDistance(Player.ServerPosition.To2D(), ally.ServerPosition.To2D(), W.Range + ally.BoundingRadius)) { if (last < Environment.TickCount) { W.Cast(ally); last = Environment.TickCount + 2000; } else return; } return; } Polygon pol; if ((pol = Program.map.getInWhichPolygon(pos)) != null) { if (inDistance(pol.getProjOnPolygon(pos), Player.ServerPosition.To2D(), W.Range + 15) && !wardIs && inDistance(pol.getProjOnPolygon(pos), pos, 200)) { putWard(pos); } } else if(!wardIs) { putWard(pos); } }
private static void Interrupter2_OnInterruptableTarget( AIHeroClient sender, Interrupter2.InterruptableTargetEventArgs args) { if (!menuMisc["InterruptSpells"].Cast<CheckBox>().CurrentValue) return; if (Player.LSDistance(sender) < E.Range && E.IsReady()) { Q.Cast(sender.ServerPosition); E.Cast(sender.ServerPosition); } else if (Player.LSDistance(sender) < Eq.Range && E.IsReady() && Q.IsReady()) { UseQe(sender); } }
private static void Interrupter2_OnInterruptableTarget(Obj_AI_Base sender, Interrupter.InterruptableSpellEventArgs e) { try { if (Player.IsDead) { return; } if (!sender.IsEnemy || !sender.IsValid <AIHeroClient>()) { return; } if (getCheckBoxItem(MiscMenu, "Blitzcrank_InterQ") && _Q.IsReady()) { if (sender.Distance(Player.ServerPosition, true) <= _Q.RangeSqr) { _Q.Cast(sender); } } if (getCheckBoxItem(MiscMenu, "Blitzcrank_InterR") && _R.IsReady()) { if (sender.Distance(Player.ServerPosition, true) <= _R.RangeSqr) { _R.Cast(); } } if (getCheckBoxItem(MiscMenu, "Blitzcrank_InterE") && _E.IsReady()) { if (sender.Distance(Player.ServerPosition, true) <= _E.RangeSqr) { _E.CastOnUnit(Player); } } } catch (Exception) { if (FreshCommon.NowTime() > ErrorTime) { Chat.Print(ChampName + " in FreshBooster isn't Load. Error Code 09"); ErrorTime = FreshCommon.TickCount(10000); } } }
internal bool UseQ(AIHeroClient target, HitChance minhc = HitChance.Medium, bool UseQ1 = true, bool UseQ2 = true) { if (target == null) { return(false); } var tready = TornadoReady; if ((tready && !UseQ2) || !tready && !UseQ1) { return(false); } if (tready) { //Avoid casting Q if E in range and Tornado ready :o if (Spells[E].IsReady() && target.IsDashable() && GetBool("Misc.saveQ4QE", YasuoMenu.MiscM) && GetBool("Combo.UseEQ", YasuoMenu.ComboM) && isHealthy && (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo) && GetBool("Combo.UseE", YasuoMenu.ComboM) && ((GetBool("Combo.ETower", YasuoMenu.ComboM) && GetKeyBind("Misc.TowerDive", YasuoMenu.MiscM)) || !GetDashPos(target).PointUnderEnemyTurret()))) { return(Spells[E].CastOnUnit(target)); } if (Yasuo.LSIsDashing()) { if (GetBool("Combo.NoQ2Dash", YasuoMenu.ComboM) || !(ETarget is AIHeroClient)) { return(false); } } } LeagueSharp.Common.Spell sp = tready ? Spells[Q2] : Spells[Q]; PredictionOutput pred = sp.GetPrediction(target); if (pred.Hitchance >= minhc) { return(sp.Cast(pred.CastPosition)); } return(false); }
public Caitlyn() { Q = new Spell(SpellSlot.Q, 1240); W = new Spell(SpellSlot.W, 820); E = new Spell(SpellSlot.E, 800); R = new Spell(SpellSlot.R, 2000); Q.SetSkillshot(0.25f, 60f, 2000f, false, SkillshotType.SkillshotLine); E.SetSkillshot(0.25f, 80f, 1600f, true, SkillshotType.SkillshotLine); AntiGapcloser.OnEnemyGapcloser += AntiGapcloser_OnEnemyGapcloser; Drawing.OnEndScene += DrawingOnOnEndScene; Obj_AI_Base.OnProcessSpellCast += Obj_AI_Hero_OnProcessSpellCast; Obj_AI_Base.OnBuffAdd += (sender, args) => { if (W.IsReady()) { BuffInstance aBuff = (from fBuffs in sender.Buffs.Where( s => sender.Team != ObjectManager.Player.Team && sender.Distance(ObjectManager.Player.Position) < W.Range) from b in new[] { "teleport", /* Teleport */ "pantheon_grandskyfall_jump", /* Pantheon */ "crowstorm", /* FiddleScitck */ "zhonya", "katarinar", /* Katarita */ "MissFortuneBulletTime", /* MissFortune */ "gate", /* Twisted Fate */ "chronorevive" /* Zilean */ } where args.Buff.Name.ToLower().Contains(b) select fBuffs).FirstOrDefault(); if (aBuff != null) { W.Cast(sender.Position); } } }; Marksman.Utils.Utils.PrintMessage("Caitlyn loaded."); }
private static void Orbwalking_AfterAttack(AttackableUnit target, EventArgs args) { AIHeroClient t = TargetSelector.GetTarget(1100, DamageType.Physical); if (!W.IsReady() || !t.IsValidTarget() || !t.IsEnemy) { return; } if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo) && t is AIHeroClient && getCheckBoxItem(miscMenu, "Misc.AutoW") && t != null && t.NetworkId == t.NetworkId) { W.Cast(); Orbwalker.ResetAutoAttack(); } if ((Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LaneClear) || Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.JungleClear)) && !(t is AIHeroClient) && getCheckBoxItem(laneClearMenu, "UseWLaneClear") && MinionManager.GetMinions(Orbwalking.GetRealAutoAttackRange(t), MinionTypes.All, MinionTeam.NotAlly) .Count(m => m.Health > Player.GetAutoAttackDamage((Obj_AI_Base)t, true)) > 0) { W.Cast(); Orbwalker.ResetAutoAttack(); } }
public Caitlyn() { Q = new LeagueSharp.Common.Spell(SpellSlot.Q, 1240); W = new LeagueSharp.Common.Spell(SpellSlot.W, 820); E = new LeagueSharp.Common.Spell(SpellSlot.E, 800); R = new LeagueSharp.Common.Spell(SpellSlot.R, 2000); Q.SetSkillshot(0.50f, 50f, 2000f, false, SkillshotType.SkillshotLine); E.SetSkillshot(0.25f, 60f, 1600f, true, SkillshotType.SkillshotLine); AntiGapcloser.OnEnemyGapcloser += AntiGapcloser_OnEnemyGapcloser; Drawing.OnEndScene += DrawingOnOnEndScene; Obj_AI_Base.OnProcessSpellCast += AIHeroClient_OnProcessSpellCast; Obj_AI_Base.OnBuffGain += (sender, args) => { if (W.IsReady()) { BuffInstance aBuff = (from fBuffs in sender.Buffs.Where( s => sender.Team != ObjectManager.Player.Team && sender.LSDistance(ObjectManager.Player.Position) < W.Range) from b in new[] { "teleport", /* Teleport */ "pantheon_grandskyfall_jump", /* Pantheon */ "crowstorm", /* FiddleScitck */ "zhonya", "katarinar", /* Katarita */ "MissFortuneBulletTime", /* MissFortune */ "gate", /* Twisted Fate */ "chronorevive" /* Zilean */ } where args.Buff.Name.ToLower().Contains(b) select fBuffs).FirstOrDefault(); if (aBuff != null) { W.Cast(sender.Position); } } }; Marksman.Utils.Utils.PrintMessage("Caitlyn loaded."); }
internal static void ConeCast(this Spell spell, Obj_AI_Base target, HitChance SelectedHitchance, float alpha = 0f, float colmini = float.MaxValue, bool HeroOnly = false) { if (spell.Type == SkillshotType.SkillshotCone) { if (spell != null && target != null) { var pred = LeagueSharp.Common.Prediction.GetPrediction(target, spell.Delay, spell.Width / 2, spell.Speed); //spell.Width/2 var collision = spell.GetCollision(Player.ServerPosition.To2D(), new List <SharpDX.Vector2> { pred.CastPosition.To2D() }); var minioncol = collision.Count(x => (HeroOnly == false ? x.IsMinion : (x is AIHeroClient))); if (target.IsValidTarget(spell.Range - target.MoveSpeed * (spell.Delay + Player.Distance(target.ServerPosition) / spell.Speed) + alpha) && minioncol <= colmini && pred.Hitchance >= SelectedHitchance) { spell.Cast(pred.CastPosition); } } } }
public Jinx() { Q = new Spell(SpellSlot.Q); W = new Spell(SpellSlot.W, 1500f); E = new Spell(SpellSlot.E, 900f); R = new Spell(SpellSlot.R, 25000f); W.SetSkillshot(0.6f, 60f, 3300f, true, SkillshotType.SkillshotLine); E.SetSkillshot(0.7f, 120f, 1750f, false, SkillshotType.SkillshotCircle); R.SetSkillshot(0.6f, 140f, 1700f, false, SkillshotType.SkillshotLine); Obj_AI_Base.OnBuffAdd += (sender, args) => { if (E.IsReady()) { BuffInstance aBuff = (from fBuffs in sender.Buffs.Where( s => sender.Team != ObjectManager.Player.Team && sender.Distance(ObjectManager.Player.Position) < E.Range) from b in new[] { "teleport_", /* Teleport */ "pantheon_grandskyfall_jump", /* Pantheon */ "crowstorm", /* FiddleScitck */ "zhonya", "katarinar", /* Katarita */ "MissFortuneBulletTime", /* MissFortune */ "gate", /* Twisted Fate */ "chronorevive" /* Zilean */ } where args.Buff.Name.ToLower().Contains(b) select fBuffs).FirstOrDefault(); if (aBuff != null) { E.Cast(sender.Position); } } }; Utility.HpBarDamageIndicator.DamageToUnit = GetComboDamage; Utility.HpBarDamageIndicator.Enabled = true; Utils.Utils.PrintMessage("Jinx loaded."); }
private static void DetectBlink(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args) { if (sender.IsMe || args.SData.IsAutoAttack()) { return; } if (Spelldatabase.list.Contains(args.SData.Name.ToLower()) && (((Player.LSDistance(args.End) >= Q.Range) && AutoQOnly) || !AutoQOnly) && Q.IsReady() && AutoQ) { Q.Cast((Obj_AI_Base)args.Target); } }
static void Obj_AI_Base_OnProcessSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args) { if (!getCheckBoxItem(escapeMenu, "Evade")) { return; } if (sender.IsAlly) { return; } if (!sender.IsChampion()) { return; } //Need to calc Delay/Time for misille to hit ! if (DangerDB.TargetedList.Contains(args.SData.Name)) { if (args.Target.IsMe) { R.Cast(); } } if (DangerDB.CircleSkills.Contains(args.SData.Name)) { if (player.LSDistance(args.End) < args.SData.LineWidth) { R.Cast(); } } if (DangerDB.Skillshots.Contains(args.SData.Name)) { if (new LeagueSharp.Common.Geometry.Polygon.Rectangle(args.Start, args.End, args.SData.LineWidth).IsInside(player)) { R.Cast(); } } }
public Ashe() { Q = new Spell(SpellSlot.Q); W = new Spell(SpellSlot.W, 1200); E = new Spell(SpellSlot.E); R = new Spell(SpellSlot.R, 4000); W.SetSkillshot(250f, (float)(45f * Math.PI / 180), 900f, true, SkillshotType.SkillshotCone); E.SetSkillshot(377f, 299f, 1400f, false, SkillshotType.SkillshotLine); R.SetSkillshot(250f, 130f, 1600f, false, SkillshotType.SkillshotLine); Obj_AI_Base.OnProcessSpellCast += Game_OnProcessSpell; Interrupter2.OnInterruptableTarget += Interrupter2_OnInterruptableTarget; Utility.HpBarDamageIndicator.DamageToUnit = GetComboDamage; Utility.HpBarDamageIndicator.Enabled = true; Obj_AI_Base.OnBuffAdd += (sender, args) => { if (!Config.Item("RInterruptable" + Id).GetValue<bool>()) return; BuffInstance aBuff = (from fBuffs in sender.Buffs.Where( s => sender.Team != ObjectManager.Player.Team && sender.Distance(ObjectManager.Player.Position) < 2500) from b in new[] {"katarinar", "MissFortuneBulletTime", "crowstorm"} where b.Contains(args.Buff.Name.ToLower()) select fBuffs).FirstOrDefault(); if (aBuff != null && R.IsReady()) { R.Cast(sender.Position); } }; Utils.Utils.PrintMessage("Ashe loaded."); }
public static void CastSpell(Spell QWER, Obj_AI_Base target) { switch (GetStringValue("PredictionMode")) { case 0: { const SkillshotType coreType2 = SkillshotType.SkillshotLine; var predInput2 = new PredictionInput { Collision = QWER.Collision, Speed = QWER.Speed, Delay = QWER.Delay, Range = QWER.Range, From = Player.ServerPosition, Radius = QWER.Width, Unit = target, Type = coreType2 }; var poutput2 = Prediction.GetPrediction(predInput2); // if (poutput2 == null) return; if (poutput2.Hitchance >= HitChance.High || poutput2.Hitchance == HitChance.Immobile || poutput2.Hitchance == HitChance.Dashing) { QWER.Cast(poutput2.CastPosition); } break; } case 1: var pred = Q.GetPrediction(target); if (pred.Hitchance >= LeagueSharp.Common.HitChance.High || pred.Hitchance == LeagueSharp.Common.HitChance.Immobile) { if (pred.CollisionObjects.Count == 0) Q.Cast(pred.CastPosition); } break; } }
public Ashe() { Q = new LeagueSharp.Common.Spell(SpellSlot.Q); W = new LeagueSharp.Common.Spell(SpellSlot.W, 1200); E = new LeagueSharp.Common.Spell(SpellSlot.E); R = new LeagueSharp.Common.Spell(SpellSlot.R, 4000); W.SetSkillshot(250f, (float)(45f * Math.PI / 180), 900f, true, SkillshotType.SkillshotCone); E.SetSkillshot(377f, 299f, 1400f, false, SkillshotType.SkillshotLine); R.SetSkillshot(250f, 130f, 1600f, false, SkillshotType.SkillshotLine); Obj_AI_Base.OnProcessSpellCast += Game_OnProcessSpell; Interrupter2.OnInterruptableTarget += Interrupter2_OnInterruptableTarget; Obj_AI_Base.OnBuffGain += (sender, args) => { if (!Program.misc["RInterruptable"].Cast<CheckBox>().CurrentValue) return; BuffInstance aBuff = (from fBuffs in sender.Buffs.Where( s => sender.Team != ObjectManager.Player.Team && sender.LSDistance(ObjectManager.Player.Position) < 2500) from b in new[] { "katarinar", "MissFortuneBulletTime", "crowstorm" } where b.Contains(args.Buff.Name.ToLower()) select fBuffs).FirstOrDefault(); if (aBuff != null && R.IsReady()) { R.Cast(sender.Position); } }; Utils.Utils.PrintMessage("Ashe loaded."); }
public Teemo() { Q = new LeagueSharp.Common.Spell(SpellSlot.Q, 680); R = new LeagueSharp.Common.Spell(SpellSlot.R, 230); Q.SetTargetted(0f, 2000f); R.SetSkillshot(0.1f, 75f, float.MaxValue, false, SkillshotType.SkillshotCircle); Obj_AI_Base.OnBuffGain += (sender, args) => { if (R.IsReady()) { BuffInstance aBuff = (from fBuffs in sender.Buffs.Where( s => sender.Team != ObjectManager.Player.Team && sender.LSDistance(ObjectManager.Player.Position) < R.Range) from b in new[] { "teleport", /* Teleport */ "pantheon_grandskyfall_jump", /* Pantheon */ "crowstorm", /* FiddleScitck */ "zhonya", "katarinar", /* Katarita */ "MissFortuneBulletTime", /* MissFortune */ "gate", /* Twisted Fate */ "chronorevive" /* Zilean */ } where args.Buff.Name.ToLower().Contains(b) select fBuffs).FirstOrDefault(); if (aBuff != null) { R.Cast(sender.Position); } } }; Utils.Utils.PrintMessage("Teemo loaded."); }
public Jhin() { Q = new LeagueSharp.Common.Spell(SpellSlot.Q, 600); W = new LeagueSharp.Common.Spell(SpellSlot.W, 2400); E = new LeagueSharp.Common.Spell(SpellSlot.E, 750); R = new LeagueSharp.Common.Spell(SpellSlot.R, 3500); W.SetSkillshot(250f, (float)(45f * Math.PI / 180), 900f, true, SkillshotType.SkillshotCone); E.SetSkillshot(377f, 299f, 1400f, false, SkillshotType.SkillshotLine); R.SetSkillshot(250f, 130f, 1600f, false, SkillshotType.SkillshotLine); Obj_AI_Base.OnProcessSpellCast += Game_OnProcessSpell; Interrupter2.OnInterruptableTarget += Interrupter2_OnInterruptableTarget; Drawing.OnEndScene += DrawingOnOnEndScene; Obj_AI_Base.OnBuffGain += (sender, args) => { BuffInstance aBuff = (from fBuffs in sender.Buffs.Where( s => sender.Team != ObjectManager.Player.Team && sender.LSDistance(ObjectManager.Player.Position) < 2500) from b in new[] { "katarinar", "MissFortuneBulletTime", "crowstorm" } where b.Contains(args.Buff.Name.ToLower()) select fBuffs).FirstOrDefault(); if (aBuff != null && E.IsReady()) { R.Cast(sender.Position); } }; Utils.Utils.PrintMessage("Jhin loaded."); }
public static void SkillShot(Obj_AI_Base target, Spell spell, HitChance hitChance, bool aoe = false, bool towerCheck = false) { if (!spell.IsReady()) { return; } if (target == null || towerCheck && target.UnderTurret(true)) { return; } spell.UpdateSourcePosition(); var prediction = spell.GetPrediction(target, aoe); if (prediction.Hitchance >= hitChance) { spell.Cast(prediction.CastPosition); } }