public static void RCast() { if (!Config.ComboMenu.Checked("R")) { return; } var Target = Spells.R.GetTarget(); var WhereCastR = new Vector3(); if (Spells.R.IsReady() && Target != null) { for (var i = 0; i <= 160; i++) { WhereWall = VectorHelp.GetWallAroundMe(Spells.R.Range, i / 25f); } } if (WhereWall.Count != 0) { var Wall = WhereWall.OrderBy(x => x.Distance(Target)).FirstOrDefault(); WhereCastR = Target.Position.To2D().Parallel(Wall.To2D(), Player.Instance.Position.To2D()); } if (WhereCastR != new Vector3() && Player.Instance.CountEnemyHeroesInRangeWithPrediction((int)Spells.R.Range, 500) >= Config.ComboMenu.GetValue("unit")) { if (Spells.R.IsInRange(WhereCastR)) { Spells.R.Cast(WhereCastR); } else { Spells.R.Cast(Player.Instance.Position.Extend(WhereCastR, Spells.R.Range).To3DWorld()); } } }
private static void OnDraw(EventArgs args) { if (!Config.DrawMenu.Checked("draw")) { return; } if (Config.DrawMenu.Checked("Qdr")) { Circle.Draw(Spells.QTiny.IsLearned ? Color.HotPink : Color.Zero, Spells.QTiny.Range, Player.Instance.Position); } if (Config.DrawMenu.Checked("Wdr")) { Circle.Draw(Spells.WMega.IsLearned ? Color.Yellow : Color.Zero, Spells.WMega.Range, Player.Instance.Position); } if (Config.DrawMenu.Checked("Edr")) { Circle.Draw(Spells.ETiny.IsLearned ? Color.Cyan : Color.Zero, Spells.ETiny.Range, Player.Instance.Position); } if (Config.DrawMenu.Checked("Rdr")) { Circle.Draw(Spells.R.IsLearned ? Color.Green : Color.Zero, Spells.R.Range, Player.Instance.Position); } if (Config.DrawMenu.Checked("timer")) { var Buff1 = Player.GetBuff("GnarTransformTired"); var Buff2 = Player.GetBuff("gnartransform"); if (Buff1 == null && Buff2 == null) { var Fury = Player.Instance.Mana; var Color = Fury > 95 ? Colour.Red : Fury > 80 ? Colour.OrangeRed : Fury > 25? Colour.Orange : Colour.Yellow; VectorHelp.DrawArc(Player.Instance.Position.To2D(), 100, Color, 0, -Player.Instance.Mana / 15.5f, 3.5f); } else { var EndTime = Buff1 != null ? Buff1.EndTime : Buff2.StartTime + 15f; var PercentRemaining = (Game.Time - EndTime) / 15f * 100; var Fury = Player.Instance.Mana; var Color = Buff1 != null ? Colour.White : Fury > 95 ? Colour.Red : Fury > 80 ? Colour.OrangeRed : Fury > 25 ? Colour.Orange : Colour.Yellow; VectorHelp.DrawArc(Player.Instance.Position.To2D(), 100, Color, 0, PercentRemaining / 15.5f, 3.5f); } } if (Config.DrawMenu.Checked("rpos") && !Spells.R.IsOnCooldown) { var WhereWall = new List <Vector3>(); for (var i = 0; i <= 80; i++) { WhereWall = VectorHelp.GetWallAroundMe(Spells.R.Range, i / 12.5f); } Circle.Draw(Color.Green, 40, WhereWall.ToArray()); } }
public static void Interrupter_OnInterruptableSpell(Obj_AI_Base sender, Interrupter.InterruptableSpellEventArgs e) { var Value = Config.MiscMenu.GetValue("interrupt.level", false); var Danger = Value == 2 ? DangerLevel.High : Value == 1 ? DangerLevel.Medium : Value == 0 ? DangerLevel.Low : DangerLevel.High; if (sender != null && sender.IsEnemy && Config.MiscMenu.Checked("interrupt") && sender.IsValidTarget(Spells.WMega.Range) && e.DangerLevel == Danger) { if (Spells.WMega.IsInRange(sender) && Spells.WMega.IsReady()) { var pred = Spells.WMega.GetPrediction(sender); Spells.WMega.Cast(pred.CastPosition); } else if (Spells.R.IsInRange(sender) && Spells.R.IsReady()) { var WhereWall = new List <Vector3>(); var WhereCastR = new Vector3(); for (var i = 0; i <= 600; i++) { WhereWall = VectorHelp.GetWallAroundMe(Spells.R.Range, i / 100f); } if (WhereWall.Count != 0) { var Wall = WhereWall.OrderBy(x => x.Distance(sender)).FirstOrDefault(); WhereCastR = sender.Position.To2D().Parallel(Wall.To2D(), Player.Instance.Position.To2D()); } if (WhereCastR != new Vector3() && Spells.R.IsInRange(WhereCastR)) { Spells.R.Cast(WhereCastR); } if (WhereCastR == new Vector3()) { Spells.R.Cast(sender); } } } }