public static void InsecCombo(Obj_AI_Hero targetHero) { if (((!W.IsReady() || Items.GetWardSlot() == null) && Player.SummonerSpellbook.CanUseSpell(LeeSinSharp.FlashSlot) != SpellState.Ready) || !R.IsReady() || !Q.IsReady() || Q.Instance.Name != "BlindMonkQOne") { if (Config.Menu.Item("insec1").GetValue <KeyBind>().Active || Config.Menu.Item("insec2").GetValue <KeyBind>().Active) { Player.IssueOrder(GameObjectOrder.MoveTo, Game.CursorPos); } return; } if (!targetHero.IsValidTarget()) { return; } var useFlash = LeeUtility.MenuParamBool("useFlashInsec") && ((Config.Menu.Item("insecMode").GetValue <StringList>().SelectedIndex == 0 && (!W.IsReady() || Items.GetWardSlot() == null)) || (Config.Menu.Item("insecMode").GetValue <StringList>().SelectedIndex == 1 && Player.SummonerSpellbook.CanUseSpell(LeeSinSharp.FlashSlot) == SpellState.Ready)); //Console.WriteLine(Game.Time + useFlash.ToString()); //useFlash = true; var pos = Player.ServerPosition.To2D(); var qPos = Q.GetPrediction(targetHero); if (Config.Menu.Item("insec1").GetValue <KeyBind>().Active) { if (LeeUtility.CastQ(targetHero, QMode.Insec)) { var delay = (int)(Player.Distance(qPos.UnitPosition) / Q.Speed * 1000) + 300 + Game.Ping; Utility.DelayAction.Add(delay, () => Q.Cast()); if (useFlash) { Utility.DelayAction.Add( (int)(delay * 1.2), () => { if (Vector3.DistanceSquared(targetHero.ServerPosition, Player.ServerPosition) <= 375 * 375) { R.Cast(targetHero); //Console.WriteLine("casted R"); Utility.DelayAction.Add( 200 - Game.Ping, () => Player.SummonerSpellbook.CastSpell( LeeSinSharp.FlashSlot, LeeUtility.GetInsecVector3(targetHero, true, pos))); } }); } else { Utility.DelayAction.Add( (int)(delay * 1.1), () => { var wardJumpPos = LeeUtility.GetInsecVector3(targetHero, false, pos); if (Vector3.DistanceSquared(wardJumpPos, Player.ServerPosition) <= 600 * 600) { LeeUtility.WardJump(wardJumpPos, true, false); //Utility.DelayAction.Add(300 + Game.Ping, () => LeeUtility.WardJump(wardJumpPos, true, false)); Utility.DelayAction.Add( 250 + Game.Ping, () => { if (Vector3.DistanceSquared(wardJumpPos, Player.ServerPosition) <= 100 * 100) { R.Cast(targetHero, LeeUtility.MenuParamBool("packetCast")); } }); } }); } } else { Player.IssueOrder(GameObjectOrder.MoveTo, Game.CursorPos); } } else if (Config.Menu.Item("insec2").GetValue <KeyBind>().Active) { var insecPos = LeeUtility.GetInsecVector3(targetHero, useFlash, pos); var inDistance = Player.Distance(insecPos) <= (useFlash ? 400 : 600); if (useFlash) { if (inDistance && Vector3.DistanceSquared(Player.ServerPosition, targetHero.ServerPosition) <= 375 * 375) { R.Cast(targetHero); Utility.DelayAction.Add( 200 - Game.Ping, () => Player.SummonerSpellbook.CastSpell(LeeSinSharp.FlashSlot, insecPos)); Utility.DelayAction.Add( 250, () => { Q.Cast(targetHero); var delay = (int)(Player.Distance(targetHero) / Q.Speed * 1000) + 300 + Game.Ping; Utility.DelayAction.Add(delay + 500, () => Q.Cast(targetHero)); }); } else { Player.IssueOrder(GameObjectOrder.MoveTo, Game.CursorPos); } } else { if (inDistance) { LeeUtility.WardJump(insecPos); Utility.DelayAction.Add(250 + Game.Ping, () => R.Cast(targetHero, false)); Utility.DelayAction.Add( 250, () => { var delay = (int)(Player.Distance(targetHero) / Q.Speed * 1000) + 300 + Game.Ping; Q.Cast(targetHero); Utility.DelayAction.Add(delay + 500, () => Q.Cast(targetHero)); }); } else { Player.IssueOrder(GameObjectOrder.MoveTo, Game.CursorPos); } } } }
private void OnDraw(EventArgs args) { try { foreach (var spell in Config.SpellList) { var menuItem = Config.Menu.Item(spell.Slot + "Draw").GetValue <Circle>(); if (menuItem.Active) { Utility.DrawCircle(ObjectManager.Player.Position, spell.Range, menuItem.Color); } } var insecItem = Config.Menu.Item("drawInsec").GetValue <Circle>(); if (insecItem.Active && _target.IsValidTarget() && (Config.Menu.Item("insec1").GetValue <KeyBind>().Active || Config.Menu.Item("insec2").GetValue <KeyBind>().Active)) { var startPoint = _target.Position.To2D(); var insecPoint = LeeUtility.GetInsecVector3(_target, false, LeeMethods.Player.Position.To2D()).To2D(); var endPoint = startPoint.Extend(insecPoint, -1200); var insecRectangle = LeeUtility.Rectangle(startPoint, endPoint, _target.BoundingRadius); for (int i = 0; i < insecRectangle.Count; i++) { Drawing.DrawLine(Drawing.WorldToScreen(insecRectangle[i].To3D()), Drawing.WorldToScreen(insecRectangle[i == 3 ? 0 : i + 1].To3D()), 1, insecItem.Color); } } } catch (Exception e) { Console.WriteLine(e); throw; } /*try * { * var startPos = LeeMethods.Player.ServerPosition.To2D(); * var endPos = LeeMethods.Player.ServerPosition.To2D().Extend(Game.CursorPos.To2D(), 1200); * Utility.DrawCircle(endPos.To3D(),10,Color.Red); * Utility.DrawCircle(startPos.To3D(), 10, Color.Red); * * var rectangle = LeeUtility.Rectangle(startPos, endPos, LeeMethods.Player.BoundingRadius); * Utility.DrawCircle(rectangle[0].To3D(), 10, Color.Red); * Utility.DrawCircle(rectangle[1].To3D(), 10, Color.Green); * Utility.DrawCircle(rectangle[2].To3D(), 10, Color.Blue); * Utility.DrawCircle(rectangle[3].To3D(), 10, Color.Black); * * Drawing.DrawLine(Drawing.WorldToScreen(rectangle[0].To3D()), Drawing.WorldToScreen(rectangle[1].To3D()), 1, Color.Red); * Drawing.DrawLine(Drawing.WorldToScreen(rectangle[1].To3D()), Drawing.WorldToScreen(rectangle[2].To3D()), 1, Color.Green); * Drawing.DrawLine(Drawing.WorldToScreen(rectangle[2].To3D()), Drawing.WorldToScreen(rectangle[3].To3D()), 1, Color.Blue); * Drawing.DrawLine(Drawing.WorldToScreen(rectangle[3].To3D()), Drawing.WorldToScreen(rectangle[0].To3D()), 1, Color.Black); * * var polygon = new Polygon(rectangle); * if (polygon.Contains(Game.CursorPos.To2D())) * { * Packet.S2C.Ping.Encoded(new Packet.S2C.Ping.Struct(Game.CursorPos.X, Game.CursorPos.Y)).Process(); * } * } * catch (Exception e) * { * Console.WriteLine(e); * throw; * }*/ //var hero1 = hero; //Drawing.DrawText(100, 100, Color.White, "Harass Stage: " + LeeMethods.harassStage); //Console.WriteLine(ObjectManager.Player.BoundingRadius); }