private static void Drawing_OnEndScene(EventArgs args) { if (DrawQTime && ArgsQ.IsLearned || ArgsR.IsLearned) { var qbuff = Player.Instance.GetBuff("TwitchHideInShadows"); var rbuff = Player.Instance.GetBuff("TwitchUlt"); if (qbuff != null) { var percentage = 100 * Math.Max(0, qbuff.EndTime - Game.Time) / ArgsInvisTime[ArgsQ.Level]; var g = Math.Max(0, 255f / 100f * percentage); var r = Math.Max(0, 255 - g); var color = Color.FromArgb((int)r, (int)g, 0); InfoText.Color = color; InfoText.X = (int)Drawing.WorldToScreen(Player.Instance.Position).X; InfoText.Y = (int)Drawing.WorldToScreen(Player.Instance.Position).Y; InfoText.TextValue = "Q expiry time : " + Math.Max(0, qbuff.EndTime - Game.Time).ToString("F1"); InfoText.Draw(); } if (rbuff != null) { var percentage = 100 * Math.Max(0, rbuff.EndTime - Game.Time) / 5; var g = Math.Max(0, 255f / 100f * percentage); var r = Math.Max(0, 255 - g); var color = Color.FromArgb((int)r, (int)g, 0); InfoText.Color = color; InfoText.X = (int)Drawing.WorldToScreen(Player.Instance.Position).X; InfoText.Y = (int)Drawing.WorldToScreen(Player.Instance.Position).Y; InfoText.TextValue = "\nR expiry time : " + Math.Max(0, rbuff.EndTime - Game.Time).ToString("F1"); InfoText.Draw(); } } if (!DrawTextNearHpBar) { return; } foreach ( var enemy in EntityManager.Heroes.Enemies.Where( a => !a.IsDead && a.HasBuff("twitchdeadlyvenom") && a.IsHPBarRendered && a.IsValidTarget(ArgsE.Range))) { var stacks = CountEStacks(enemy); if (ArgsE.IsReady()) { var calc = GetFinalEDamage(enemy) / GetTotalHealth(enemy) * 100; InfoText.Color = Color.DeepSkyBlue; InfoText.X = (int)(enemy.HPBarPosition.X + 140); InfoText.Y = (int)enemy.HPBarPosition.Y; InfoText.TextValue = "" + Math.Min(calc, 100).ToString("F1") + " %"; InfoText.Draw(); } if (stacks < 1) { continue; } for (var i = 0; i < 6; i++) { Drawing.DrawLine(enemy.HPBarPosition.X + i * 20, enemy.HPBarPosition.Y - 30, enemy.HPBarPosition.X + i * 20 + 20, enemy.HPBarPosition.Y - 30, 10, stacks <= i ? Color.DarkGray : Color.MediumVioletRed); } } }