private void Drawing_OnDraw(EventArgs args) { //PrintTimers(); //EvadeHelper.CheckMovePath(Game.CursorPos.To2D()); //TestUnderTurret(); /*if (EvadeHelper.CheckPathCollision(myHero, Game.CursorPos.To2D())) * { * var paths = myHero.GetPath(ObjectCache.myHeroCache.serverPos2DExtra.To3D(), Game.CursorPos); * foreach (var path in paths) * { * Render.Circle.DrawCircle(path, ObjectCache.myHeroCache.boundingRadius, Color.Red, 3); * } * } * else * { * Render.Circle.DrawCircle(Game.CursorPos, ObjectCache.myHeroCache.boundingRadius, Color.White, 3); * }*/ foreach (KeyValuePair <int, Spell> entry in SpellDetector.drawSpells) { Spell spell = entry.Value; if (spell.spellType == SpellType.Line) { Vector2 spellPos = spell.currentSpellPosition; Render.Circle.DrawCircle(new Vector3(spellPos.X, spellPos.Y, myHero.Position.Z), spell.info.radius, Color.White, 3); /*spellPos = spellPos + spell.direction * spell.info.projectileSpeed * (60 / 1000); //move the spellPos by 50 miliseconds forwards * spellPos = spellPos + spell.direction * 200; //move the spellPos by 50 units forwards * * Render.Circle.DrawCircle(new Vector3(spellPos.X, spellPos.Y, myHero.Position.Z), spell.info.radius, Color.White, 3);*/ } } if (testMenu.Item("TestHeroPos").GetValue <bool>()) { var path = myHero.Path; if (path.Length > 0) { var heroPos2 = EvadeHelper.GetRealHeroPos(ObjectCache.gamePing + 50);// path[path.Length - 1].To2D(); var heroPos1 = ObjectCache.myHeroCache.serverPos2D; Render.Circle.DrawCircle(new Vector3(heroPos2.X, heroPos2.Y, myHero.ServerPosition.Z), ObjectCache.myHeroCache.boundingRadius, Color.Red, 3); Render.Circle.DrawCircle(new Vector3(myHero.ServerPosition.X, myHero.ServerPosition.Y, myHero.ServerPosition.Z), ObjectCache.myHeroCache.boundingRadius, Color.White, 3); var heroPos = Drawing.WorldToScreen(ObjectManager.Player.Position); var dimension = Drawing.GetTextExtent("Evade: ON"); Drawing.DrawText(heroPos.X - dimension.Width / 2, heroPos.Y, Color.Red, "" + (int)(heroPos2.Distance(heroPos1))); Render.Circle.DrawCircle(new Vector3(circleRenderPos.X, circleRenderPos.Y, myHero.ServerPosition.Z), 10, Color.Red, 3); } } if (testMenu.Item("DrawHeroPos").GetValue <bool>()) { Render.Circle.DrawCircle(new Vector3(myHero.ServerPosition.X, myHero.ServerPosition.Y, myHero.ServerPosition.Z), ObjectCache.myHeroCache.boundingRadius, Color.White, 3); } if (testMenu.Item("TestMoveTo").GetValue <KeyBind>().Active) { var keyBind = testMenu.Item("TestMoveTo").GetValue <KeyBind>(); testMenu.Item("TestMoveTo").SetValue(new KeyBind(keyBind.Key, KeyBindType.Toggle, false)); /*lastRightMouseClickTime = EvadeUtils.TickCount; * myHero.IssueOrder(GameObjectOrder.MoveTo, Game.CursorPos,false);*/ myHero.IssueOrder(GameObjectOrder.MoveTo, Game.CursorPos); var dir = (Game.CursorPos - myHero.Position).Normalized(); //var pos2 = myHero.Position - dir * Game.CursorPos.Distance(myHero.Position); //var pos2 = myHero.Position.To2D() - dir.To2D() * 75; var pos2 = Game.CursorPos.To2D() - dir.To2D() * 75; //Console.WriteLine(myHero.BBox.Maximum.Distance(myHero.Position)); DelayAction.Add(20, () => myHero.IssueOrder(GameObjectOrder.MoveTo, pos2.To3D(), false)); //myHero.IssueOrder(GameObjectOrder.MoveTo, pos2, false); } if (testMenu.Item("TestPath").GetValue <bool>()) { var tPath = myHero.GetPath(Game.CursorPos); Vector2 lastPoint = Vector2.Zero; foreach (Vector3 point in tPath) { var point2D = point.To2D(); Render.Circle.DrawCircle(new Vector3(point.X, point.Y, point.Z), ObjectCache.myHeroCache.boundingRadius, Color.Violet, 3); lastPoint = point2D; } } if (testMenu.Item("TestPath").GetValue <bool>()) { var tPath = myHero.GetPath(Game.CursorPos); Vector2 lastPoint = Vector2.Zero; foreach (Vector3 point in tPath) { var point2D = point.To2D(); //Render.Circle.DrawCircle(new Vector3(point.X, point.Y, point.Z), ObjectCache.myHeroCache.boundingRadius, Color.Violet, 3); lastPoint = point2D; } foreach (KeyValuePair <int, Spell> entry in SpellDetector.spells) { Spell spell = entry.Value; Vector2 to = Game.CursorPos.To2D(); var dir = (to - myHero.Position.To2D()).Normalized(); Vector2 cPos1, cPos2; var cpa = MathUtilsCPA.CPAPointsEx(myHero.Position.To2D(), dir * ObjectCache.myHeroCache.moveSpeed, spell.endPos, spell.direction * spell.info.projectileSpeed, to, spell.endPos); var cpaTime = MathUtilsCPA.CPATime(myHero.Position.To2D(), dir * ObjectCache.myHeroCache.moveSpeed, spell.endPos, spell.direction * spell.info.projectileSpeed); //ConsolePrinter.Print("" + cpaTime); //Render.Circle.DrawCircle(cPos1.To3D(), ObjectCache.myHeroCache.boundingRadius, Color.Red, 3); if (cpa < ObjectCache.myHeroCache.boundingRadius + spell.radius) { } } } if (testMenu.Item("ShowBuffs").GetValue <bool>()) { var target = myHero; foreach (var hero in HeroManager.Enemies) { target = hero; } var buffs = target.Buffs; //ConsolePrinter.Print(myHero.ChampionName); //if(myHero.IsDead) // ConsolePrinter.Print("dead"); if (!target.IsTargetable) { ConsolePrinter.Print("invul" + EvadeUtils.TickCount); } int height = 20; foreach (var buff in buffs) { if (buff.IsValidBuff()) { Drawing.DrawText(10, height, Color.White, buff.Name); height += 20; ConsolePrinter.Print(buff.Name); } } } if (testMenu.Item("TestTracker").GetValue <bool>()) { foreach (KeyValuePair <int, ObjectTrackerInfo> entry in ObjectTracker.objTracker) { var info = entry.Value; Vector3 endPos2; if (info.usePosition == false) { endPos2 = info.obj.Position; } else { endPos2 = info.position; } Render.Circle.DrawCircle(new Vector3(endPos2.X, endPos2.Y, myHero.Position.Z), 50, Color.Green, 3); } /*foreach (var obj in ObjectManager.Get<Obj_AI_Minion>()) * { * ConsolePrinter.Print("minion: " + obj.Name); * if (obj.Name == "Ekko") * { * var pos = obj.Position; * Render.Circle.DrawCircle(pos, 100, Color.Green, 3); * } * }*/ } if (testMenu.Item("ShowMissileInfo").GetValue <bool>()) { if (testMissile != null) { //Render.Circle.DrawCircle(testMissile.Position, testMissile.BoundingRadius, Color.White, 3); } } if (testMenu.Item("TestWall").GetValue <bool>()) { /*foreach (var posInfo in sortedBestPos) * { * var posOnScreen = Drawing.WorldToScreen(posInfo.position.To3D()); * //Drawing.DrawText(posOnScreen.X, posOnScreen.Y, Color.Aqua, "" + (int)posInfo.closestDistance); * * * if (!posInfo.rejectPosition) * { * Drawing.DrawText(posOnScreen.X, posOnScreen.Y, Color.Aqua, "" + (int)posInfo.closestDistance); * } * * Drawing.DrawText(posOnScreen.X, posOnScreen.Y, Color.Aqua, "" + (int)posInfo.closestDistance); * * if (posInfo.posDangerCount <= 0) * { * var pos = posInfo.position; * Render.Circle.DrawCircle(new Vector3(pos.X, pos.Y, myHero.Position.Z), (float)25, Color.White, 3); * } * }*/ int posChecked = 0; int maxPosToCheck = 50; int posRadius = 50; int radiusIndex = 0; Vector2 heroPoint = ObjectCache.myHeroCache.serverPos2D; List <PositionInfo> posTable = new List <PositionInfo>(); while (posChecked < maxPosToCheck) { radiusIndex++; int curRadius = radiusIndex * (2 * posRadius); int curCircleChecks = (int)Math.Ceiling((2 * Math.PI * (double)curRadius) / (2 * (double)posRadius)); for (int i = 1; i < curCircleChecks; i++) { posChecked++; var cRadians = (2 * Math.PI / (curCircleChecks - 1)) * i; //check decimals var pos = new Vector2((float)Math.Floor(heroPoint.X + curRadius * Math.Cos(cRadians)), (float)Math.Floor(heroPoint.Y + curRadius * Math.Sin(cRadians))); if (!EvadeHelper.CheckPathCollision(myHero, pos)) { Render.Circle.DrawCircle(new Vector3(pos.X, pos.Y, myHero.Position.Z), (float)25, Color.White, 3); } } } } }
private void Drawing_OnDraw(EventArgs args) { //PrintTimers(); //EvadeHelper.CheckMovePath(Game.CursorPos.To2D()); foreach (KeyValuePair <int, Spell> entry in SpellDetector.drawSpells) { Spell spell = entry.Value; if (spell.info.spellType == SpellType.Line) { Vector2 spellPos = spell.GetCurrentSpellPosition(); Render.Circle.DrawCircle(new Vector3(spellPos.X, spellPos.Y, myHero.Position.Z), spell.info.radius, Color.White, 3); /*spellPos = spellPos + spell.direction * spell.info.projectileSpeed * (60 / 1000); //move the spellPos by 50 miliseconds forwards * spellPos = spellPos + spell.direction * 200; //move the spellPos by 50 units forwards * * Render.Circle.DrawCircle(new Vector3(spellPos.X, spellPos.Y, myHero.Position.Z), spell.info.radius, Color.White, 3);*/ } } RenderTestCircles(); if (testMenu.Item("TestHeroPos").GetValue <bool>()) { var path = myHero.Path; if (path.Length > 0) { var heroPos2 = EvadeHelper.GetRealHeroPos(Game.Ping + 50);// path[path.Length - 1].To2D(); var heroPos1 = myHero.ServerPosition.To2D(); Render.Circle.DrawCircle(new Vector3(heroPos2.X, heroPos2.Y, myHero.ServerPosition.Z), myHero.BoundingRadius, Color.Red, 3); Render.Circle.DrawCircle(new Vector3(myHero.ServerPosition.X, myHero.ServerPosition.Y, myHero.ServerPosition.Z), myHero.BoundingRadius, Color.White, 3); var heroPos = Drawing.WorldToScreen(ObjectManager.Player.Position); var dimension = Drawing.GetTextExtent("Evade: ON"); Drawing.DrawText(heroPos.X - dimension.Width / 2, heroPos.Y, Color.Red, "" + (int)(heroPos2.Distance(heroPos1))); Render.Circle.DrawCircle(new Vector3(circleRenderPos.X, circleRenderPos.Y, myHero.ServerPosition.Z), 10, Color.Red, 3); } } if (testMenu.Item("DrawHeroPos").GetValue <bool>()) { Render.Circle.DrawCircle(new Vector3(myHero.ServerPosition.X, myHero.ServerPosition.Y, myHero.ServerPosition.Z), myHero.BoundingRadius, Color.White, 3); } if (testMenu.Item("TestMoveTo").GetValue <KeyBind>().Active) { var keyBind = testMenu.Item("TestMoveTo").GetValue <KeyBind>(); testMenu.Item("TestMoveTo").SetValue(new KeyBind(keyBind.Key, KeyBindType.Toggle, false)); myHero.IssueOrder(GameObjectOrder.MoveTo, Game.CursorPos); var dir = (Game.CursorPos - myHero.Position).Normalized(); var pos2 = myHero.Position - dir * Game.CursorPos.Distance(myHero.Position); Utility.DelayAction.Add(1, () => myHero.IssueOrder(GameObjectOrder.MoveTo, pos2)); } if (testMenu.Item("TestPath").GetValue <bool>()) { var tPath = myHero.GetPath(Game.CursorPos); Vector2 lastPoint = Vector2.Zero; foreach (Vector3 point in tPath) { var point2D = point.To2D(); //Render.Circle.DrawCircle(new Vector3(point.X, point.Y, point.Z), myHero.BoundingRadius, Color.Violet, 3); lastPoint = point2D; } } if (testMenu.Item("TestPath").GetValue <bool>()) { var tPath = myHero.GetPath(Game.CursorPos); Vector2 lastPoint = Vector2.Zero; foreach (Vector3 point in tPath) { var point2D = point.To2D(); //Render.Circle.DrawCircle(new Vector3(point.X, point.Y, point.Z), myHero.BoundingRadius, Color.Violet, 3); lastPoint = point2D; } foreach (KeyValuePair <int, Spell> entry in SpellDetector.spells) { Spell spell = entry.Value; Vector2 to = Game.CursorPos.To2D(); var dir = (to - myHero.Position.To2D()).Normalized(); Vector2 cPos1, cPos2; var cpa = MathUtilsCPA.CPAPointsEx(myHero.Position.To2D(), dir * myHero.MoveSpeed, spell.endPos, spell.direction * spell.info.projectileSpeed, to, spell.endPos); var cpaTime = MathUtilsCPA.CPATime(myHero.Position.To2D(), dir * myHero.MoveSpeed, spell.endPos, spell.direction * spell.info.projectileSpeed); //Game.PrintChat("" + cpaTime); //Render.Circle.DrawCircle(cPos1.To3D(), myHero.BoundingRadius, Color.Red, 3); if (cpa < myHero.BoundingRadius + spell.GetSpellRadius()) { } } } if (testMenu.Item("ShowBuffs").GetValue <bool>()) { var target = myHero; foreach (var hero in HeroManager.Enemies) { target = hero; } var buffs = target.Buffs; //Game.PrintChat(myHero.ChampionName); //if(myHero.IsDead) // Game.PrintChat("dead"); if (!target.IsTargetable) { Game.PrintChat("invul" + Evade.GetTickCount()); } int height = 20; foreach (var buff in buffs) { if (buff.IsValidBuff()) { Drawing.DrawText(10, height, Color.White, buff.Name); height += 20; Game.PrintChat(buff.Name); } } } if (testMenu.Item("TestTracker").GetValue <bool>()) { foreach (KeyValuePair <int, ObjectTrackerInfo> entry in SpecialSpells.objTracker) { var info = entry.Value; Vector3 endPos2; if (info.usePosition == false) { endPos2 = info.obj.Position; } else { endPos2 = info.position; } Render.Circle.DrawCircle(new Vector3(endPos2.X, endPos2.Y, myHero.Position.Z), 50, Color.Green, 3); } } if (testMenu.Item("TestWall").GetValue <bool>()) { foreach (var posInfo in sortedBestPos) { var posOnScreen = Drawing.WorldToScreen(posInfo.position.To3D()); //Drawing.DrawText(posOnScreen.X, posOnScreen.Y, Color.Aqua, "" + (int)posInfo.closestDistance); /* * if (!posInfo.rejectPosition) * { * Drawing.DrawText(posOnScreen.X, posOnScreen.Y, Color.Aqua, "" + (int)posInfo.closestDistance); * }*/ Drawing.DrawText(posOnScreen.X, posOnScreen.Y, Color.Aqua, "" + (int)posInfo.closestDistance); /*if (posInfo.posDangerCount <= 0) * { * var pos = posInfo.position; * Render.Circle.DrawCircle(new Vector3(pos.X, pos.Y, myHero.Position.Z), (float)25, Color.White, 3); * }*/ } } }