void Drawing_OnEndScene(EventArgs args) { if (_skillshot != null && Game.Time - drawTime <= 2) { _skillshot.Draw(Color.Blue, 2); } if (_skillshotAoe != null && Game.Time - drawTime <= 2) { _skillshotAoe.Draw(Color.Blue, 2); } if (Game.Time - drawTime > 2) { _skillshot = null; _skillshotAoe = null; } if (Config.SubMenu("AutoCombo").Item("Draw").GetValue <bool>()) { Render.Circle.DrawCircle(Player.Position, Config.SubMenu("AutoCombo").Item("Range").GetValue <Slider>().Value, Color.Red); } }
private static int GetWHits(Obj_AI_Base target, List <Obj_AI_Base> targets = null) { if (targets != null && ComboMode == ComboMode.Mode2xW) { targets = targets.Where(t => t.LSIsValidTarget((W.Range + W.Width))).ToList(); var pred = W.GetPrediction(target); if (pred.HitChance >= EloBuddy.SDK.Enumerations.HitChance.Medium) { var circle = new LeagueSharp.Common.Geometry.Polygon.Circle(pred.UnitPosition, target.BoundingRadius + W.Width); circle.Draw(System.Drawing.Color.Aqua, 5); return(1 + (from t in targets.Where(x => x.NetworkId != target.NetworkId) let pred2 = W.GetPrediction(t) where pred2.HitChance >= EloBuddy.SDK.Enumerations.HitChance.Medium select new LeagueSharp.Common.Geometry.Polygon.Circle(pred2.UnitPosition, t.BoundingRadius * 0.9f)).Count( circle2 => circle2.Points.Any(p => circle.IsInside(p)))); } } if (W.IsInRange(target)) { return(1); } return(0); }
private static int GetWHits(Obj_AI_Base target, List<Obj_AI_Base> targets = null) { if (targets != null && ComboMode == ComboMode.Mode2xW) { targets = targets.Where(t => t.LSIsValidTarget((W.Range + W.Width))).ToList(); var pred = W.GetPrediction(target); if (pred.Hitchance >= HitChance.Medium) { var circle = new LeagueSharp.Common.Geometry.Polygon.Circle(pred.UnitPosition, target.BoundingRadius + W.Width); circle.Draw(System.Drawing.Color.Aqua, 5); return 1 + (from t in targets.Where(x => x.NetworkId != target.NetworkId) let pred2 = W.GetPrediction(t) where pred2.Hitchance >= HitChance.Medium select new LeagueSharp.Common.Geometry.Polygon.Circle(pred2.UnitPosition, t.BoundingRadius * 0.9f)).Count( circle2 => circle2.Points.Any(p => circle.IsInside(p))); } } if (W.IsInRange(target)) { return 1; } return 0; }
private static void Drawing_OnDraw(EventArgs args) { if (!MenuLocal.Item("Draw.Enable").GetValue <bool>()) { return; } if (MenuLocal.Item(GetPcModeStringValue + "DrawBuffs").GetValue <bool>()) { var passiveBuffs = (from b in ObjectManager.Player.Buffs join b1 in CommonBuffManager.BuffDatabase on b.Name equals b1.BuffName select new { b, b1 }).Distinct(); var i = 0; foreach (var buffName in passiveBuffs) { if (buffName.b.EndTime >= Game.Time) { CommonGeometry.DrawBox( new Vector2(ObjectManager.Player.HPBarPosition.X + 10, (i * 8) + ObjectManager.Player.HPBarPosition.Y + 32), 130, 6, Color.FromArgb(100, 255, 200, 37), 1, Color.Black); var buffTime = buffName.b.EndTime - buffName.b.StartTime; CommonGeometry.DrawBox( new Vector2(ObjectManager.Player.HPBarPosition.X + 11, (i * 8) + ObjectManager.Player.HPBarPosition.Y + 33), (130 / buffTime) * (buffName.b.EndTime - Game.Time), 4, buffName.b1.Color, 1, buffName.b1.Color); TimeSpan timeSpan = TimeSpan.FromSeconds(buffName.b.EndTime - Game.Time); var timer = $"{timeSpan.Minutes:D2}:{timeSpan.Seconds:D2}"; CommonGeometry.DrawText(CommonGeometry.TextPassive, timer, ObjectManager.Player.HPBarPosition.X + 142, (i * 8) + ObjectManager.Player.HPBarPosition.Y + 29, SharpDX.Color.Wheat); CommonGeometry.TextPassive.DrawTextLeft(buffName.b1.Caption, (int)ObjectManager.Player.HPBarPosition.X + 8, (int)((i * 8) + ObjectManager.Player.HPBarPosition.Y + 35), SharpDX.Color.Wheat); } i += 1; } } DrawSpells(); DrawMinionLastHit(); //KillableEnemy(); DrawBuffs(); //Render.Circle.DrawCircle(ObjectManager.Player.Position, W.Range, System.Drawing.Color.Red); return; var t = TargetSelector.GetTarget(W.Range * 3, TargetSelector.DamageType.Magical); if (t == null) { return; } if (t.IsValidTarget(W.Range)) { return; } List <Vector2> xList = new List <Vector2>(); var nLocation = ObjectManager.Player.Position.To2D() + Vector2.Normalize(t.Position.To2D() - ObjectManager.Player.Position.To2D()) * W.Range; //if (CommonGeometry.IsWallBetween(nEvadePoint.To3D(), location.To3D())) //{ // Chat.Print("Wall"); //} //else //{ // Chat.Print("Not Wall"); //} Vector2 wCastPosition = nLocation; //Render.Circle.DrawCircle(wCastPosition.To3D(), 105f, System.Drawing.Color.Red); if (!wCastPosition.IsWall()) { xList.Add(wCastPosition); } if (wCastPosition.IsWall()) { for (int j = 20; j < 80; j += 20) { Vector2 wcPositive = ObjectManager.Player.Position.To2D() + Vector2.Normalize(t.Position.To2D() - ObjectManager.Player.Position.To2D()).Rotated(j * (float)Math.PI / 180) * W.Range; if (!wcPositive.IsWall()) { xList.Add(wcPositive); } Vector2 wcNegative = ObjectManager.Player.Position.To2D() + Vector2.Normalize(t.Position.To2D() - ObjectManager.Player.Position.To2D()).Rotated(-j * (float)Math.PI / 180) * W.Range; if (!wcNegative.IsWall()) { xList.Add(wcNegative); } } float xDiff = ObjectManager.Player.Position.X - t.Position.X; float yDiff = ObjectManager.Player.Position.Y - t.Position.Y; int angle = (int)(Math.Atan2(yDiff, xDiff) * 180.0 / Math.PI); } //foreach (var aa in xList) //{ // Render.Circle.DrawCircle(aa.To3D2(), 105f, System.Drawing.Color.White); //} var nJumpPoint = xList.OrderBy(al => al.Distance(t.Position)).First(); var color = System.Drawing.Color.DarkRed; var width = 4; var startpos = ObjectManager.Player.Position; var endpos = nJumpPoint.To3D(); if (startpos.Distance(endpos) > 100) { var endpos1 = nJumpPoint.To3D() + (startpos - endpos).To2D().Normalized().Rotated(25 * (float)Math.PI / 180).To3D() * 75; var endpos2 = nJumpPoint.To3D() + (startpos - endpos).To2D().Normalized().Rotated(-25 * (float)Math.PI / 180).To3D() * 75; var x1 = new LeagueSharp.Common.Geometry.Polygon.Line(startpos, endpos); x1.Draw(color, width - 2); var y1 = new LeagueSharp.Common.Geometry.Polygon.Line(endpos, endpos1); y1.Draw(color, width - 2); var z1 = new LeagueSharp.Common.Geometry.Polygon.Line(endpos, endpos2); z1.Draw(color, width - 2); Geometry.Polygon.Circle x2 = new LeagueSharp.Common.Geometry.Polygon.Circle(endpos, W.Width / 2); if (CommonGeometry.IsWallBetween(ObjectManager.Player.Position, endpos)) { x2.Draw(Color.Red, width - 2); } else { x2.Draw(Color.Wheat, width - 2); } } if (!t.IsValidTarget(W.Range + Q.Range - 60)) { return; } if (t.IsValidTarget(W.Range)) { return; } var canJump = false; if (Modes.ModeCombo.ComboMode == ComboMode.Mode2xQ) { if ((t.Health < ModeCombo.GetComboDamage(t) - W.GetDamage(t) && Q.IsReady() && R.IsReady()) || (t.Health < Q.GetDamage(t) && Q.IsReady())) { canJump = true; } } var nPoint = nJumpPoint.Extend(ObjectManager.Player.Position.To2D(), +ObjectManager.Player.BoundingRadius * 3); Render.Circle.DrawCircle(nPoint.To3D(), 50f, Color.GreenYellow); if (CommonGeometry.IsWallBetween(nPoint.To3D(), nJumpPoint.To3D())) { canJump = false; } if (canJump && W.IsReady() && !W.StillJumped()) { if (Modes.ModeConfig.Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo) { W.Cast(nJumpPoint); } return; } }
private static void Drawing_OnDraw(EventArgs args) { if (!MenuLocal.Item("Draw.Enable").GetValue <bool>()) { return; } DrawSpells(); DrawMinionLastHit(); //KillableEnemy(); DrawBuffs(); //Render.Circle.DrawCircle(ObjectManager.Player.Position, W.Range, System.Drawing.Color.Red); return; var t = TargetSelector.GetTarget(W.Range * 3, TargetSelector.DamageType.Magical); if (t == null) { return; } if (t.IsValidTarget(W.Range)) { return; } List <Vector2> xList = new List <Vector2>(); var nLocation = ObjectManager.Player.Position.To2D() + Vector2.Normalize(t.Position.To2D() - ObjectManager.Player.Position.To2D()) * W.Range; //if (CommonGeometry.IsWallBetween(nEvadePoint.To3D(), location.To3D())) //{ // Game.PrintChat("Wall"); //} //else //{ // Game.PrintChat("Not Wall"); //} Vector2 wCastPosition = nLocation; //Render.Circle.DrawCircle(wCastPosition.To3D(), 105f, System.Drawing.Color.Red); if (!wCastPosition.IsWall()) { xList.Add(wCastPosition); } if (wCastPosition.IsWall()) { for (int j = 20; j < 80; j += 20) { Vector2 wcPositive = ObjectManager.Player.Position.To2D() + Vector2.Normalize(t.Position.To2D() - ObjectManager.Player.Position.To2D()).Rotated(j * (float)Math.PI / 180) * W.Range; if (!wcPositive.IsWall()) { xList.Add(wcPositive); } Vector2 wcNegative = ObjectManager.Player.Position.To2D() + Vector2.Normalize(t.Position.To2D() - ObjectManager.Player.Position.To2D()).Rotated(-j * (float)Math.PI / 180) * W.Range; if (!wcNegative.IsWall()) { xList.Add(wcNegative); } } float xDiff = ObjectManager.Player.Position.X - t.Position.X; float yDiff = ObjectManager.Player.Position.Y - t.Position.Y; int angle = (int)(Math.Atan2(yDiff, xDiff) * 180.0 / Math.PI); } //foreach (var aa in xList) //{ // Render.Circle.DrawCircle(aa.To3D2(), 105f, System.Drawing.Color.White); //} var nJumpPoint = xList.OrderBy(al => al.Distance(t.Position)).First(); var color = System.Drawing.Color.DarkRed; var width = 4; var startpos = ObjectManager.Player.Position; var endpos = nJumpPoint.To3D(); if (startpos.Distance(endpos) > 100) { var endpos1 = nJumpPoint.To3D() + (startpos - endpos).To2D().Normalized().Rotated(25 * (float)Math.PI / 180).To3D() * 75; var endpos2 = nJumpPoint.To3D() + (startpos - endpos).To2D().Normalized().Rotated(-25 * (float)Math.PI / 180).To3D() * 75; var x1 = new LeagueSharp.Common.Geometry.Polygon.Line(startpos, endpos); x1.Draw(color, width - 2); var y1 = new LeagueSharp.Common.Geometry.Polygon.Line(endpos, endpos1); y1.Draw(color, width - 2); var z1 = new LeagueSharp.Common.Geometry.Polygon.Line(endpos, endpos2); z1.Draw(color, width - 2); Geometry.Polygon.Circle x2 = new LeagueSharp.Common.Geometry.Polygon.Circle(endpos, W.Width / 2); if (CommonGeometry.IsWallBetween(ObjectManager.Player.Position, endpos)) { x2.Draw(Color.Red, width - 2); } else { x2.Draw(Color.Wheat, width - 2); } } if (!t.IsValidTarget(W.Range + Q.Range - 60)) { return; } if (t.IsValidTarget(W.Range)) { return; } var canJump = false; if (Modes.ModeCombo.ComboMode == ComboMode.Mode2xQ) { if ((t.Health < ModeCombo.GetComboDamage(t) - W.GetDamage(t) && Q.IsReady() && R.IsReady()) || (t.Health < Q.GetDamage(t) && Q.IsReady())) { canJump = true; } } var nPoint = nJumpPoint.Extend(ObjectManager.Player.Position.To2D(), +ObjectManager.Player.BoundingRadius * 3); Render.Circle.DrawCircle(nPoint.To3D(), 50f, Color.GreenYellow); if (CommonGeometry.IsWallBetween(nPoint.To3D(), nJumpPoint.To3D())) { canJump = false; } if (canJump && W.IsReady() && !W.StillJumped()) { if (Modes.ModeConfig.Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo) { W.Cast(nJumpPoint); } return; } }