/// <summary> /// The On Window Procedure Event /// </summary> /// <param name="args"> /// The args. /// </param> public void Game_OnWndProc(WndEventArgs args) { foreach (var module in Variables.Modules.Where(x => x.CanDraw())) { module.OnWndProc(args); } if (args.Msg != (ulong)Utils.WindowsMessages.WM_LBUTTONDOWN) { return; } foreach (var hero in from play in Heroes.GetByTeam(Variables.EnemyTeam).Where(x => x.IsValid && !x.IsIllusion) select play into hero let sizeX = (float)HUDInfo.GetTopPanelSizeX(hero) let x = HUDInfo.GetTopPanelPosition(hero).X let sizey = HUDInfo.GetTopPanelSizeY(hero) * 1.4 where Utils.IsUnderRectangle(Game.MouseScreenPosition, x, 0, sizeX, (float)(sizey * 1.4)) select hero) { bool enabled; if (this.EnabledHeroes.TryGetValue(hero.ClassID, out enabled)) { this.EnabledHeroes[hero.ClassID] = !enabled; } } }
private static void Game_OnWndProc(WndEventArgs args) { if (args.Msg != (ulong)Utils.WindowsMessages.WM_LBUTTONDOWN) { return; } try { foreach (var hero in from play in players select play.Hero into hero let sizeX = (float)HUDInfo.GetTopPanelSizeX(hero) let x = HUDInfo.GetTopPanelPosition(hero).X let sizey = HUDInfo.GetTopPanelSizeY(hero) * 1.4 where Utils.IsUnderRectangle(Game.MouseScreenPosition, x, 0, sizeX, (float)(sizey * 1.4)) select hero) { bool enabled; if (enabledHeroes.TryGetValue(hero.ClassID, out enabled)) { enabledHeroes[hero.ClassID] = !enabled; } } } catch (Exception) { // } }
/// <summary> /// The drawing_ on draw. /// </summary> /// <param name="args"> /// The args. /// </param> public void Drawing_OnDraw(EventArgs args) { if (!Game.IsInGame || Game.IsPaused || Variables.Techies == null || !Variables.Techies.IsValid) { return; } foreach (var module in Variables.Modules.Where(module => module.CanDraw())) { module.Draw(); } foreach (var hero in Heroes.GetByTeam(Variables.EnemyTeam).Where(x => x.IsValid && !x.IsIllusion)) { var classId = hero.ClassID; bool enabled; if (!this.EnabledHeroes.TryGetValue(classId, out enabled)) { this.EnabledHeroes[classId] = true; } var health = hero.Health; if (!hero.IsAlive) { health = hero.MaximumHealth; } double[] topPanel; if (!this.heroTopPanel.TryGetValue(classId, out topPanel)) { topPanel = new double[3]; topPanel[0] = HUDInfo.GetTopPanelSizeX(hero); topPanel[1] = HUDInfo.GetTopPanelPosition(hero).X; topPanel[2] = HUDInfo.GetTopPanelSizeY(hero) * 1.4; this.heroTopPanel.Add(classId, topPanel); } var sizeX = topPanel[0]; var x = topPanel[1]; var sizey = topPanel[2]; var meepo = hero as Meepo; if ((meepo == null || meepo.WhichMeepo == 0) && Variables.Menu.DrawingsMenu.Item("drawTopPanel").GetValue <bool>()) { DrawingUtils.DrawRemoteMineNumber(hero.Handle, health, x, sizeX, sizey, enabled, hero); DrawingUtils.DrawLandMineNumber(hero.Handle, health, x, sizey, enabled, hero); } if (!Variables.Damage.GetSuicideDamage().ContainsKey(hero.Handle)) { continue; } DrawingUtils.DrawSuicide(hero.Handle, health, x, sizey, sizeX, enabled, hero); } }
private static void Render_HUD(EventArgs args) { for (uint i = 0; i < 10; i++) { var player = ObjectMgr.GetPlayerById(i); if (player == null) { continue; } Hero h = player.Hero; if (h == null) { continue; } var Pos = HUDInfo.GetTopPanelPosition(h); var PosX = (float)HUDInfo.GetTopPanelSizeX(h); var PosY = (float)HUDInfo.GetTopPanelSizeY(h); var PosHealth = new Vector2(h.Health * PosX / h.MaximumHealth, 0); var PosMana = new Vector2(h.Mana * PosX / h.MaximumMana, 0); float BPos = PosY + 1; if (h.Health == 0) { continue; } if (h.Mana == 0) { continue; } //uint HPX = h.Health * 100 / h.MaximumHealth; //string buff = Convert.ToString(HPX); if (Menu.Item("HPBarShow").GetValue <bool>()) { Drawing.DrawRect(Pos + new Vector2(0, BPos), new Vector2(PosX, 7), new Color(0, 0, 0, 100)); Drawing.DrawRect(Pos + new Vector2(0, BPos), new Vector2(PosHealth.X, 7), new Color(0, 255, 0, 255)); Drawing.DrawRect(Pos + new Vector2(0, BPos), new Vector2(PosX, 7), Color.Black, true); BPos += 7; } if (Menu.Item("ManaBarShow").GetValue <bool>()) { Drawing.DrawRect(Pos + new Vector2(0, BPos), new Vector2(PosX, 7), new Color(0, 0, 0, 100)); Drawing.DrawRect(Pos + new Vector2(0, BPos), new Vector2(PosMana.X, 7), new Color(0, 122, 204, 255)); Drawing.DrawRect(Pos + new Vector2(0, BPos), new Vector2(PosX, 7), Color.Black, true); } // Ebala... //Drawing.DrawText(string.Format("({0}% | 999%)", buff), "Arial", Pos + new Vector2(0, PosY + 18), new Vector2(13, 5), Color.White, 0); } }
private static void Overlay1(EventArgs args) { if (!Game.IsInGame) { return; } if (Menu.Item("manabar").GetValue <bool>()) { var player = ObjectMgr.LocalPlayer; if (player == null || player.Team == Team.Observer) { return; } var enemies = ObjectMgr.GetEntities <Hero>() .Where(x => x.IsVisible && x.IsAlive && x.MaximumMana > 0 && !x.IsIllusion && x.Team != player.Team) .ToList(); foreach (var enemy in enemies) { var start = HUDInfo.GetHPbarPosition(enemy) + new Vector2(0, HUDInfo.GetHpBarSizeY(enemy) + 1); var manaperc = enemy.Mana / enemy.MaximumMana; var size = new Vector2(HUDInfo.GetHPBarSizeX(enemy), HUDInfo.GetHpBarSizeY(enemy) * 2 / 5); Drawing.DrawRect(start, size + new Vector2(1, 1), Color.Black); Drawing.DrawRect(start, new Vector2(size.X * manaperc, size.Y), new Color(100, 135, 240, 255)); Drawing.DrawRect(start + new Vector2(-1, -2), size + new Vector2(4, 3), Color.Black, true); } } if (Menu.Item("toppanel").GetValue <bool>()) { for (uint i = 0; i < 10; i++) { var v = ObjectMgr.GetPlayerById(i).Hero; if (v == null || !v.IsAlive) { continue; } var pos = HUDInfo.GetTopPanelPosition(v); var sizeX = (float)HUDInfo.GetTopPanelSizeX(v); var sizeY = (float)HUDInfo.GetTopPanelSizeY(v); var healthDelta = new Vector2(v.Health * sizeX / v.MaximumHealth, 0); var manaDelta = new Vector2(v.Mana * sizeX / v.MaximumMana, 0); const int height = 7; Drawing.DrawRect(pos + new Vector2(0, sizeY + 1), new Vector2(healthDelta.X, height), new Color(0, 255, 0, 100)); Drawing.DrawRect(pos + new Vector2(0, sizeY + 1), new Vector2(sizeX, height), Color.Black, true); Drawing.DrawRect(pos + new Vector2(0, sizeY + height), new Vector2(manaDelta.X, height), new Color(80, 120, 255, 255)); Drawing.DrawRect(pos + new Vector2(0, sizeY + height), new Vector2(sizeX, height), Color.Black, true); } } }
private static void DrawOnTopPanel(BombDamageManager.HeroDamageContainer heroCont) { var hero = heroCont.Hero; var topPos = HUDInfo.GetTopPanelPosition(hero) + new Vector2(0, (float)HUDInfo.GetTopPanelSizeX(hero)) + MenuManager.GetExtraPosForTopPanel; var size = new Vector2((float)HUDInfo.GetTopPanelSizeX(hero), (float)HUDInfo.GetTopPanelSizeY(hero)); var iconSize = new Vector2(size.X / 2, size.Y) / 2 + MenuManager.GetTopPanelExtraSize; Drawing.DrawRect(topPos, iconSize, Textures.GetSpellTexture(AbilityId.techies_land_mines.ToString())); var text = heroCont.GetLandDamage; var textSize = Drawing.MeasureText(text, "Arial", new Vector2((float)(iconSize.Y * .80), (float)(iconSize.Y * .95)), FontFlags.AntiAlias); var textPos = topPos + new Vector2(iconSize.X + 2, 0); Drawing.DrawText( text, textPos + new Vector2(2, 2), new Vector2(textSize.Y, 0), Color.White, FontFlags.AntiAlias | FontFlags.StrikeOut); Drawing.DrawRect(topPos + new Vector2(0, iconSize.Y), iconSize, Textures.GetSpellTexture(AbilityId.techies_suicide.ToString())); text = heroCont.GetSuicideStatus; textSize = Drawing.MeasureText(text, "Arial", new Vector2((float)(iconSize.Y * .80), (float)(iconSize.Y * .95)), FontFlags.AntiAlias); textPos = topPos + new Vector2(iconSize.X + 2, iconSize.Y); Drawing.DrawText( text, textPos + new Vector2(2, 2), new Vector2(textSize.Y, 0), Color.White, FontFlags.AntiAlias | FontFlags.StrikeOut); Drawing.DrawRect(topPos + new Vector2(0, iconSize.Y * 2), iconSize, Textures.GetSpellTexture(AbilityId.techies_remote_mines.ToString())); text = heroCont.GetRemoteDamage; textSize = Drawing.MeasureText(text, "Arial", new Vector2((float)(iconSize.Y * .80), (float)(iconSize.Y * .95)), FontFlags.AntiAlias); textPos = topPos + new Vector2(iconSize.X + 2, iconSize.Y * 2); Drawing.DrawText( text, textPos + new Vector2(2, 2), new Vector2(textSize.Y, 0), Color.White, FontFlags.AntiAlias | FontFlags.StrikeOut); }
private void DrawingOnOnDraw(EventArgs args) { var heroes = EntityManager <Hero> .Entities.Where( x => x.IsAlive && !x.IsAlly(_main.Invoker.Owner) && x.IsVisible); if (!DrawDamageHero && !DrawDamageTop) { return; } if (_main.Invoker.Exort.Level == 0) { return; } var damage = GetSunStikeDamage; foreach (var hero in heroes) { var text = $"{(int)(hero.Health - damage)}"; if (DrawDamageHero) { var pos = HUDInfo.GetHPbarPosition(hero); if (!pos.IsZero) { var size = new Vector2(HUDInfo.HpBarY / 1.5f); var textSize = Drawing.MeasureText(text, "Arial", size, FontFlags.AntiAlias | FontFlags.StrikeOut); pos -= new Vector2(textSize.X + 5, 0); Drawing.DrawText(text, pos, size, Color.White, FontFlags.AntiAlias | FontFlags.StrikeOut); } } if (DrawDamageTop) { var sizeY = (float)HUDInfo.GetTopPanelSizeY(hero); var pos = HUDInfo.GetTopPanelPosition(hero) + new Vector2(0, sizeY * 2); var size = new Vector2(sizeY / 1.5f); /*var textSize = Drawing.MeasureText(text, "Arial", size, * FontFlags.AntiAlias | FontFlags.StrikeOut);*/ Drawing.DrawText(text, pos, size, Color.White, FontFlags.AntiAlias | FontFlags.StrikeOut); } } }
public ScreenInfo(IAbilityUnit unit) { this.Unit = unit; var hero = unit.SourceUnit as Hero; if (hero != null) { this.TopPanelPosition = HUDInfo.GetTopPanelPosition(hero); this.TopPanelIconSize = new Vector2( (float)HUDInfo.GetTopPanelSizeX(hero), (float)HUDInfo.GetTopPanelSizeY(hero)); } this.HealthBarSize = new Vector2( HUDInfo.GetHPBarSizeX(hero ?? unit.SourceUnit), HUDInfo.GetHpBarSizeY(hero ?? unit.SourceUnit)); }
public static void OnChange(Entity sender, Int32PropertyChangeEventArgs args) { return; var hero = sender as Hero; if (hero == null) { return; } if (hero.Team != Members.MyHero.Team || hero.IsIllusion()) { return; } if (args.PropertyName != "m_iTaggedAsVisibleByTeam") { return; } DelayAction.Add(50, () => { var visible = args.NewValue == 0x1E; var player = hero.Player; if (player == null) { return; } RectangleStruct st; if (!RectDictionary.TryGetValue(player, out st)) { var newRect = new Rectangle( new Vector2((float)HudInfoNew.GetTopPanelSizeX(hero), (float)HUDInfo.GetTopPanelSizeY(hero)), Clr) { Position = HudInfoNew.GetTopPanelPosition(hero) }; st = new RectangleStruct(newRect, eventArgs => newRect.Render()); RectDictionary.Add(player, st); //Log.Info($"Init new player {player.Name}({hero.GetRealName()})"); } var rect = st.Rect; var draw = st.Draw; if (visible) { if (IsEnable) { if (!rect.IsInitialized) { rect.Initialize(); rect.Color = Clr; //new ColorBGRA(0,155,255,10); Drawing.OnEndScene += draw; } } } else { if (rect.IsInitialized) { rect.Dispose(); Drawing.OnEndScene -= draw; } } }); }
private static void Drawing_OnEndScene(EventArgs args) { if (Drawing.Direct3DDevice9 == null || Drawing.Direct3DDevice9.IsDisposed || !Game.IsInGame || me == null || (!Menu.Item("drawTopPanel").GetValue <bool>() && !Menu.Item("drawSuicideKills").GetValue <bool>())) { return; } //Console.WriteLine(players.Count()); try { if (players == null || players.Count() < 5) { players = ObjectMgr.GetEntities <Player>() .Where(x => x != null && x.Hero != null && x.Hero.Team == me.GetEnemyTeam()); } var enumerable = players as Player[] ?? players.ToArray(); //Console.WriteLine(enumerable.Count()); foreach (var hero in enumerable.Select(x => x.Hero)) { var classId = hero.ClassID; bool enabled; if (!enabledHeroes.TryGetValue(classId, out enabled)) { enabledHeroes[classId] = true; } var health = hero.Health; if (!hero.IsAlive) { health = hero.MaximumHealth; } double[] topPanel; if (!heroTopPanel.TryGetValue(classId, out topPanel)) { topPanel = new double[3]; topPanel[0] = HUDInfo.GetTopPanelSizeX(hero); topPanel[1] = HUDInfo.GetTopPanelPosition(hero).X; topPanel[2] = HUDInfo.GetTopPanelSizeY(hero) * 1.4; heroTopPanel.Add(classId, topPanel); } var sizeX = topPanel[0]; var x = topPanel[1]; var sizey = topPanel[2]; if (Menu.Item("drawTopPanel").GetValue <bool>()) { if (remoteMinesDmg > 0) { double remoteNumber; if (!RemoteMinesHeroDmg.TryGetValue(classId, out remoteNumber)) { remoteNumber = Math.Ceiling(health / hero.DamageTaken(remoteMinesDmg, DamageType.Magical, me)); RemoteMinesHeroDmg.Add(classId, remoteNumber); Utils.Sleep(1000, classId + " remoteNumber"); } else if (Utils.SleepCheck(classId + " remoteNumber")) { remoteNumber = Math.Ceiling(health / hero.DamageTaken(remoteMinesDmg, DamageType.Magical, me)); RemoteMinesHeroDmg[classId] = remoteNumber; Utils.Sleep(1000, classId + " remoteNumber"); } panelText.DrawText( null, remoteNumber.ToString(CultureInfo.InvariantCulture), (int)(x + sizeX / 3.6), (int)sizey, enabled ? Color.Green : Color.DimGray); } if (landMinesDmg > 0) { double landNumber; if (!landMinesHeroDmg.TryGetValue(classId, out landNumber)) { landNumber = Math.Ceiling(health / hero.DamageTaken(landMinesDmg, DamageType.Physical, me)); landMinesHeroDmg.Add(classId, landNumber); Utils.Sleep(1000, classId + " remoteNumber"); } else if (Utils.SleepCheck(classId + " remoteNumber")) { landNumber = Math.Ceiling(health / hero.DamageTaken(landMinesDmg, DamageType.Physical, me)); landMinesHeroDmg[classId] = landNumber; Utils.Sleep(1000, classId + " remoteNumber"); } panelText.DrawText( null, landNumber.ToString(CultureInfo.InvariantCulture), (int)x, (int)sizey, enabled ? Color.Red : Color.DimGray); } } if (suicideAttackDmg > 0) { float dmg; if (!suicideHeroDmg.TryGetValue(classId, out dmg)) { dmg = health - hero.DamageTaken(suicideAttackDmg, DamageType.Physical, me); suicideHeroDmg.Add(classId, dmg); Utils.Sleep(150, classId + " canKill"); } else if (Utils.SleepCheck(classId + " canKill")) { dmg = health - hero.DamageTaken(suicideAttackDmg, DamageType.Physical, me); suicideHeroDmg[classId] = dmg; Utils.Sleep(150, classId + " canKill"); } var canKill = dmg <= 0; if (Menu.Item("drawTopPanel").GetValue <bool>()) { panelText.DrawText( null, canKill ? "Yes" : "No", canKill ? (int)(x + sizeX / 2) : (int)(x + sizeX / 1.7), (int)sizey, enabled ? Color.DarkOrange : Color.DimGray); } if (!hero.IsVisible || !hero.IsAlive) { continue; } if (Menu.Item("drawSuicideKills").GetValue <bool>()) { var screenPos = HUDInfo.GetHPbarPosition(hero); if (screenPos.X + 20 > Drawing.Width || screenPos.X - 20 < 0 || screenPos.Y + 100 > Drawing.Height || screenPos.Y - 30 < 0) { continue; } suicideDmgText.DrawText( null, canKill ? "Yes" : "No " + Math.Floor(dmg), (int)(screenPos.X), (int)(screenPos.Y - HUDInfo.GetHpBarSizeY(hero) * 1.5), enabled ? (canKill ? Color.LawnGreen : Color.Red) : Color.Gray); } } } } catch (Exception) { players = ObjectMgr.GetEntities <Player>() .Where(x => x != null && x.Hero != null && x.Hero.Team == me.GetEnemyTeam()); } }
public static void OnDraw(object sender, EventArgs eventArgs) { if (Core.Logics.MainLogic.DoStack) { if (Core.Config._Menu.Drawings.DrawingsOnTop) { var _Temp = HUDInfo.GetTopPanelPosition(Core.Config._Hero) + new Vector2(0, 60); Core.Config._Renderer.DrawRectangle(new RectangleF(_Temp.X, _Temp.Y, (float)HUDInfo.GetTopPanelSizeX(Core.Config._Hero), (float)HUDInfo.GetTopPanelSizeY(Core.Config._Hero)), System.Drawing.Color.Green, 2); } if (Core.Config._Menu.Drawings.DrawingsOnHero) { String _Text = "Pulling..."; var _Pos = HUDInfo.GetHPbarPosition(Core.Config._Hero); var _Size = new Vector2((float)HUDInfo.GetHPBarSizeX(Core.Config._Hero), (float)HUDInfo.GetHpBarSizeY(Core.Config._Hero)); var _TextSize = Core.Config._Renderer.MessureText(_Text); var _TextPos = _Pos - new Vector2(_TextSize.X + 10, 5); Core.Config._Renderer.DrawText(_TextPos, _Text, System.Drawing.Color.White); } } }
public static void start(bool topmenu) { me = ObjectMgr.LocalHero; if (me == null && !Game.IsInGame) { return; } GetHPbarSize(); ScaleX = (float)Drawing.Width / 1400; ScaleY = (float)Drawing.Height / 900; heroes = ObjectMgr.GetEntities <Hero>().Where(x => x.IsAlive && !x.IsIllusion && x.IsVisible && x.IsValid).ToList(); try { try { for (uint t = 0; t < 10; t++) { player = ObjectMgr.GetPlayerById(t); if (player != null && player.Team != me.Team) { Hero x = player.Hero; if (x != null && x.IsValid && x.Health != 0) { if (topmenu) { TOP_HEALTH_BAR_POS = new Vector2(HUDInfo.GetTopPanelPosition(x).X, (float)HUDInfo.GetTopPanelSizeY(x) + (1 * ScaleY)); TOP_HEALTH_BAR_SIZE = new Vector2(((float)HUDInfo.GetTopPanelSizeX(x) / (x.MaximumHealth / (float)x.Health)) - (2 * ScaleX), boxSizeY - (13 * ScaleY)); TOP_MANA_BAR_POS = new Vector2(HUDInfo.GetTopPanelPosition(x).X, (float)HUDInfo.GetTopPanelSizeY(x) + 6); TOP_MANA_BAR_SIZE = new Vector2(((float)HUDInfo.GetTopPanelSizeX(x) / (x.MaximumMana / x.Mana)) - (2 * ScaleX), boxSizeY - (13 * ScaleY)); TOP_BAR_FULLSIZE = new Vector2((float)HUDInfo.GetTopPanelSizeX(x) - (2 * ScaleX), boxSizeY - (13 * ScaleY)); TOP_ULT_BAR_POS = new Vector2(HUDInfo.GetTopPanelPosition(x).X, (float)HUDInfo.GetTopPanelSizeY(x) + (12 * ScaleY)); TOP_ULT_BAR_SIZE = new Vector2(((float)HUDInfo.GetTopPanelSizeX(x) / (x.Spellbook.SpellR.CooldownLength / x.Spellbook.SpellR.Cooldown)) - (2 * ScaleX), boxSizeY - (13 * ScaleY)); if (MouseOnSpot(TOP_HEALTH_BAR_POS, new Vector2((float)HUDInfo.GetTopPanelSizeX(x), 100 * ScaleY))) { Drawing.DrawText("HP: " + (int)x.Health + " / MANA: " + (int)x.Mana + " / ULT: " + (int)x.Spellbook.SpellR.Cooldown, TOP_HEALTH_BAR_POS + new Vector2(-5 * ScaleX, 17 * ScaleY), new Vector2(18 * ScaleX, 15 * ScaleY), Color.White, FontFlags.AntiAlias | FontFlags.StrikeOut | FontFlags.Additive); } Drawing.DrawRect(TOP_HEALTH_BAR_POS, TOP_HEALTH_BAR_SIZE, Color.Green, false); Drawing.DrawRect(TOP_HEALTH_BAR_POS, TOP_BAR_FULLSIZE, Color.Black, true); Drawing.DrawRect(TOP_MANA_BAR_POS, TOP_MANA_BAR_SIZE, new Color(0x00, 0x80, 0xF8, 0xFF), false); Drawing.DrawRect(TOP_MANA_BAR_POS, TOP_BAR_FULLSIZE, Color.Black, true); if (TOP_ULT_BAR_SIZE.X > 0) { Drawing.DrawRect(TOP_ULT_BAR_POS, TOP_ULT_BAR_SIZE, Color.Gold, false); Drawing.DrawRect(TOP_ULT_BAR_POS, TOP_BAR_FULLSIZE, Color.Black, true); } } } } } foreach (Hero x in heroes) { if (x == null) { continue; } if (x == me) { continue; } Herospells = x.Spellbook.Spells; DangerItems = x.Inventory.Items; i = 0; i2 = 0; i3 = 0; if (x.Mana > 0 && x.Team != me.Team && !x.UnitState.HasFlag(UnitState.NoHealthbar)) { Drawing.DrawRect(new Vector2((float)(HUDInfo.GetHPbarPosition(x).X - (0.5 * ScaleX)), HUDInfo.GetHPbarPosition(x).Y + (9 * ScaleY)), new Vector2((boxSizeX * 6) + (2 * ScaleX), boxSizeY - (13 * ScaleY)), new Color(0x00, 0x80, 0xF8, 0x32), false); Drawing.DrawRect(new Vector2((float)(HUDInfo.GetHPbarPosition(x).X - (0.5 * ScaleX)), HUDInfo.GetHPbarPosition(x).Y + (9 * ScaleY)), new Vector2((boxSizeX * 6) + (2 * ScaleX), boxSizeY - (13 * ScaleY)), Color.Black, true); Drawing.DrawRect(new Vector2(HUDInfo.GetHPbarPosition(x).X + (1 * ScaleX), HUDInfo.GetHPbarPosition(x).Y + (10 * ScaleY)), new Vector2(((boxSizeX * 6) / (x.MaximumMana / x.Mana)) - (1 * ScaleX), boxSizeY - (15 * ScaleY)), new Color(0x00, 0x80, 0xF8, 0xFF), false); } foreach (Ability y in Herospells) { if (y != null && !y.Name.Contains("empty") && (x.Name.Contains("rubick") ? !y.Name.Contains("hidden") : true) && !x.UnitState.HasFlag(UnitState.NoHealthbar)) { if (y.AbilitySlot == AbilitySlot.Slot_1ULL || y.AbilitySlot == AbilitySlot.Slot_2 || y.AbilitySlot == AbilitySlot.Slot_3 || y.AbilitySlot == AbilitySlot.Slot_4 || y.AbilitySlot == AbilitySlot.Slot_5 || y.AbilitySlot == AbilitySlot.Slot_6) { Drawing.DrawRect(new Vector2(HUDInfo.GetHPbarPosition(x).X + ((i * 20) * ScaleX), HUDInfo.GetHPbarPosition(x).Y - (25 * ScaleY)), new Vector2(boxSizeX, boxSizeY), Drawing.GetTexture("materials/ensage_ui/spellicons/" + y.Name + ".vmat")); Drawing.DrawRect(new Vector2(HUDInfo.GetHPbarPosition(x).X + ((i * 20) * ScaleX), HUDInfo.GetHPbarPosition(x).Y - (25 * ScaleY)), new Vector2(boxSizeX, boxSizeY), Color.Black, true); if (y.Cooldown > 0 || (y.ManaCost > x.Mana && y.ManaCost > 0)) { Drawing.DrawRect(new Vector2(HUDInfo.GetHPbarPosition(x).X + ((i * 20) * ScaleX), HUDInfo.GetHPbarPosition(x).Y - (25 * ScaleY)), new Vector2(boxSizeX, boxSizeY), new Color(0x5F, 0x00, 0xCE, 0x9E), false); Drawing.DrawText((int)(y.Cooldown == 0 ? (y.ManaCost - x.Mana) : y.Cooldown) + "", new Vector2((float)(HUDInfo.GetHPbarPosition(x).X + (0.8 + (i * 20) * ScaleX)), HUDInfo.GetHPbarPosition(x).Y - (17 * ScaleY)), new Vector2(10 * ScaleX, 20 * ScaleY), y.Cooldown == 0 ? Color.LightSkyBlue : Color.White, FontFlags.AntiAlias | FontFlags.StrikeOut | FontFlags.Additive); } if (y.Level <= 0) { Drawing.DrawRect(new Vector2(HUDInfo.GetHPbarPosition(x).X + ((i * 20) * ScaleX), HUDInfo.GetHPbarPosition(x).Y - (25 * ScaleY)), new Vector2(boxSizeX, boxSizeY), new Color(0x5F, 0x00, 0x00, 0x9E), false); } else { Drawing.DrawRect(new Vector2((HUDInfo.GetHPbarPosition(x).X + ((i * 20) * ScaleX)), HUDInfo.GetHPbarPosition(x).Y - (25 * ScaleY)), new Vector2(boxSizeX - ((y.Level < 10 ? 8 : 5) * ScaleX), boxSizeY - (9 * ScaleY)), Color.Black, false); Drawing.DrawText((int)y.Level + "", new Vector2((float)(HUDInfo.GetHPbarPosition(x).X + (((y.Level < 10 ? 0.8 : 0) + (i * 20)) * ScaleX)), HUDInfo.GetHPbarPosition(x).Y - (25 * ScaleY)), new Vector2(10 * ScaleX, 20 * ScaleY), Color.YellowGreen, FontFlags.AntiAlias | FontFlags.StrikeOut | FontFlags.Additive); } i += 1 * ScaleX; } else { if (y.Cooldown != 0 || y.ManaCost > x.Mana) { Drawing.DrawRect(new Vector2(HUDInfo.GetHPbarPosition(x).X + ((i2 * 20) * ScaleX), HUDInfo.GetHPbarPosition(x).Y - (50 * ScaleY)), new Vector2(boxSizeX, boxSizeY), Drawing.GetTexture("materials/ensage_ui/spellicons/" + y.Name + ".vmat")); Drawing.DrawRect(new Vector2(HUDInfo.GetHPbarPosition(x).X + ((i2 * 20) * ScaleX), HUDInfo.GetHPbarPosition(x).Y - (50 * ScaleY)), new Vector2(boxSizeX, boxSizeY), Color.Black, true); if (y.Cooldown > 0 || (y.ManaCost > x.Mana && y.ManaCost > 0)) { Drawing.DrawRect(new Vector2(HUDInfo.GetHPbarPosition(x).X + ((i2 * 20) * ScaleX), HUDInfo.GetHPbarPosition(x).Y - (50 * ScaleY)), new Vector2(boxSizeX, boxSizeY), new Color(0x5F, 0x00, 0xCE, 0x9E), false); Drawing.DrawText((int)(y.Cooldown == 0 ? (y.ManaCost - x.Mana) : y.Cooldown) + "", new Vector2((float)(HUDInfo.GetHPbarPosition(x).X + ((0.8 + (i2 * 20)) * ScaleX)), HUDInfo.GetHPbarPosition(x).Y - (42 * ScaleY)), new Vector2(10 * ScaleX, 20 * ScaleY), y.Cooldown == 0 ? Color.LightSkyBlue : Color.White, FontFlags.AntiAlias | FontFlags.StrikeOut | FontFlags.Additive); } i2 += 1 * ScaleX; } } } } foreach (Item z in DangerItems) { if (z != null && !x.UnitState.HasFlag(UnitState.NoHealthbar) && (z.Name == "item_gem" || z.Name == "item_dust" || z.Name == "item_sphere" || z.Name == "item_blink" || z.Name == "item_ward_observer" || z.Name == "item_ward_sentry" || z.Name == "item_black_king_bar" || z.Name == "item_ward_dispenser" || z.Name == "item_sheepstick" || z.Name == "item_blade_mail" || z.Name == "item_rapier" || z.Name == "item_cyclone" || z.Name == "item_shadow_amulet" || z.Name == "item_invis_sword" || z.Name == "item_silver_edge" || z.Name == "item_glimmer_cape" || z.Name == "item_lotus_orb" || z.Name == "item_orchid" || z.Name.Contains("item_dagon") || z.Name == "item_manta" || z.Name == "item_aegis" || z.Name == "item_cheese")) { Drawing.DrawRect(new Vector2(HUDInfo.GetHPbarPosition(x).X + ((i3 * 20) * ScaleX), HUDInfo.GetHPbarPosition(x).Y + (15 * ScaleY)), new Vector2(boxSizeX + (6 * ScaleX), boxSizeY), Drawing.GetTexture("materials/ensage_ui/items/" + z.Name.Remove(0, 5))); Drawing.DrawRect(new Vector2(HUDInfo.GetHPbarPosition(x).X + ((i3 * 20) * ScaleX), HUDInfo.GetHPbarPosition(x).Y + (15 * ScaleY)), new Vector2(boxSizeX, boxSizeY), Color.Black, true); if (z.Cooldown > 0 || (z.ManaCost > x.Mana && z.ManaCost > 0)) { Drawing.DrawRect(new Vector2(HUDInfo.GetHPbarPosition(x).X + ((i3 * 20) * ScaleX), HUDInfo.GetHPbarPosition(x).Y + (15 * ScaleY)), new Vector2(boxSizeX, boxSizeY), new Color(0x5F, 0x00, 0xCE, 0x9E), false); Drawing.DrawText((int)(z.Cooldown == 0 ? (z.ManaCost - x.Mana) : z.Cooldown) + "", new Vector2((float)(HUDInfo.GetHPbarPosition(x).X + ((1.2 + (i3 * 20)) * ScaleX)), HUDInfo.GetHPbarPosition(x).Y + (23 * ScaleY)), new Vector2(10 * ScaleX, 20 * ScaleY), z.Cooldown == 0 ? Color.LightSkyBlue : Color.White, FontFlags.AntiAlias | FontFlags.StrikeOut | FontFlags.Additive); } i3 += 1 * ScaleX; } } } } catch (EntityNotFoundException) { } } catch (NullReferenceException) { } }
public static void OnDraw(object sender, EventArgs eventArgs) { //foreach (var C in Core.Config.GetCamps) //{ // Drawing.DrawText("Camp " + C.Id, "Arial", Drawing.WorldToScreen(C.TablePos), new Vector2(20, 20), Color.Red, FontFlags.Italic); // Drawing.DrawCircle(Drawing.WorldToScreen(C.StackPos), 10, 10, Color.Red); // Drawing.DrawCircle(Drawing.WorldToScreen(C.PreparePos), 10, 10, Color.Red); //} //if (Core.Config.DrawConsole) //{ // Drawing.DrawText("POS " + Core.Config._Hero.Position.X + " " + Core.Config._Hero.Position.Y + " " + Core.Config._Hero.Position.Z, // "Arial", Drawing.WorldToScreen(Core.Config._Hero.Position), new Vector2(40, 40), Color.Red, FontFlags.Italic); //} //else //{ // Drawing.DrawText("Status " + Core.Config.Status + " " + " " + Core.Config._Hero.IsAttacking() + " " + Core.Config.ForTest, // "Arial", Drawing.WorldToScreen(Core.Config._Hero.Position), new Vector2(40, 40), Color.Red, FontFlags.Italic); //} if (Core.Config.DoStack) { if (Core.Config._Menu.Drawings.DrawingsOnTop) { var _Temp = HUDInfo.GetTopPanelPosition(Core.Config._Hero) + new Vector2(0, 60); Core.Config._Renderer.DrawRectangle(new RectangleF(_Temp.X, _Temp.Y, (float)HUDInfo.GetTopPanelSizeX(Core.Config._Hero), (float)HUDInfo.GetTopPanelSizeY(Core.Config._Hero)), Color.Green, 2); } if (Core.Config._Menu.Drawings.DrawingsOnHero) { String _Text = "Pulling..."; var _Pos = HUDInfo.GetHPbarPosition(Core.Config._Hero); var _TextSize = Core.Config._Renderer.MessureText(_Text); var _TextPos = _Pos - new Vector2(_TextSize.X + 10, 5); Core.Config._Renderer.DrawText(_TextPos, _Text, Color.White); } } //Core.Config._Renderer.DrawText(Drawing.WorldToScreen(Core.Config._Hero.Position), "!" + Core.Config.Test, Color.White); }
private static Vector2 GetTopPanelSize(Hero hero) { return(new Vector2((float)HUDInfo.GetTopPanelSizeX(hero) - 2, (float)HUDInfo.GetTopPanelSizeY(hero))); }