public static Print ( string str, bool print = false ) : void | ||
str | string | |
bool | ||
Résultat | void |
public void Add(ParticleEffect effect, Vector3 position, Vector3 color) { var id = (uint)ColorList.FindIndex(x => x == color); var player = ObjectManager.GetPlayerByID(id); if (player == null || !player.IsValid) { Printer.Print("error #" + id); return; } if ((player.Team == Members.MyPlayer.Team && ForAlly) || (player.Team != Members.MyPlayer.Team && ForEnemy)) { _effectList.Add(new TeleportEffect(effect, position, color)); //Printer.Print($"Player: {player.Name} ({id}) | Hero: {player.Hero.GetRealName()} | Color: {color}"); //Console.WriteLine($"Color: {color.PrintVector()}"); } }
public static Vector2 GetTopPanelPosition(Hero v) { try { Vector2 pos; if (Members.TopPanelPostiion.TryGetValue(v.StoredName(), out pos)) { return(pos); } Members.TopPanelPostiion.Add(v.StoredName(), HUDInfo.GetTopPanelPosition(v)); return(HUDInfo.GetTopPanelPosition(v)); } catch (Exception e) { Printer.Print("GetTopPanelPosition: " + e.Message); return(new Vector2()); } }
public static void Entity_OnParticleEffectAdded(Entity sender, ParticleEffectAddedEventArgs args) { if (!Checker.IsActive()) { return; } var name = args.Name; if (true)//(Members.Invoker != null && Members.Invoker.IsValid) { if (name.Contains("particles/units/heroes/hero_invoker/invoker_emp.vpcf")) { DelayAction.Add(10, async() => { var effect = args.ParticleEffect; var a = effect.GetControlPoint(0); var rangeEffect = new ParticleEffect("materials/ensage_ui/particles/range_display_mod.vpcf", a); var range = 675; rangeEffect.SetControlPoint(1, new Vector3(range, 255, 0)); rangeEffect.SetControlPoint(2, new Vector3(139, 0, 255)); //EmpRanger.Add(effect, rangeEffect); await Task.Delay(2900); rangeEffect.Dispose(); }); } } if (!IsEnableTpCather) { return; } if (name.Contains("teleport_start") || name.Contains("teleport_end")) { DelayAction.Add(10, () => { var isStart = name.Contains("teleport_start"); var effect = args.ParticleEffect; var a = effect.GetControlPoint(0); var b = effect.GetControlPoint(2); Printer.Print($"{(isStart ? "start" : "end")} => pos: {a.PrintVector()} color: {b.PrintVector()}"); TeleportCatcher.Add(effect, a, b, isStart); }); } }
public static void Entity_OnParticleEffectAdded(Entity sender, ParticleEffectAddedEventArgs args) { if (!IsEnableTpCather) { return; } var name = args.Name; if (name.Contains("teleport_start") || name.Contains("teleport_end")) { DelayAction.Add(10, () => { var effect = args.ParticleEffect; var a = effect.GetControlPoint(0); var b = effect.GetControlPoint(2); Printer.Print($"{(name.Contains("start")?"start":"end")}=>A:{a.PrintVector()} B:{b.PrintVector()}"); TeleportCatcher.Add(effect, a, b); }); } }
private static void TestShit() { ObjectManager.OnAddEntity += args => { Printer.Print($"new: {args.Entity.ClassID}/{args.Entity.Name}/{(args.Entity as Unit)?.DayVision}"); }; Entity.OnParticleEffectAdded += (entity, eventArgs) => { var partName = eventArgs.Name; var name = entity.Name; if (partName.Contains("generic_hit_blood")) { return; } if (partName.Contains("ui_mouse")) { return; } if (name.Contains("portrait")) { return; } DelayAction.Add(200, () => { var effect = eventArgs.ParticleEffect; var pos = effect.Position; var a = effect.GetControlPoint(0); var senderpos = entity.NetworkPosition; var hero = Manager.HeroManager.GetHeroes().FirstOrDefault(x => x.Name.Equals(name)); Printer.Print($"{name} || {partName} || {pos.Equals(hero?.Position)}"); Printer.PrintInfo($"{name} || {partName} || {pos.Equals(hero?.Position)}"); //Printer.Print($"{name}/{partName}/{pos.PrintVector()}/{a.PrintVector()}/{senderpos.PrintVector()}"); }); }; Unit.OnModifierAdded += (sender, args) => { Printer.Print($"modifier: {sender.Name}/{args.Modifier.Name}"); Printer.PrintInfo($"modifier: {sender.Name}/{args.Modifier.Name}"); }; }
private static void Drawing_OnDraw(EventArgs args) { if (!Checker.IsActive()) { return; } if (!IsEnable) { return; } DefSize = HUDInfo.GetHPBarSizeX() / 6 * Size; if (IsAlly) { foreach (var v in Manager.HeroManager.GetAllyViableHeroes()) { try { DrawItems(v, false); } catch (Exception) { Printer.Print($"[ItemOverlay][ally]: {v.StoredName()}"); } } } if (IsEnemy) { foreach (var v in Manager.HeroManager.GetEnemyViableHeroes()) { try { DrawItems(v, true); } catch (Exception) { Printer.Print($"[ItemOverlay][enemy]: {v.StoredName()}"); } } } }
public static void ShowMeMoreSpells() { if (!Members.Menu.Item("showmemore.Enable").GetValue <bool>()) { return; } //Printer.Print(Manager.BaseManager.GetBaseList().Count.ToString()); //Manager.BaseManager.GetBaseList().ForEach(x=>Printer.Print(x.Handle+": "+x.DayVision)); var baseList = Manager.BaseManager.GetBaseList().Where(x => x.IsValid && x.IsAlive).ToList(); if (Members.Apparition) { foreach (var t in baseList.Where(t => !InSys.Contains(t) && t.DayVision == 550).Where(t => !Members.AAlist.Contains(t.Handle))) { InSys.Add(t); Members.AAlist.Add(t.Handle); AAunit = t; Helper.GenerateSideMessage("ancient_apparition", "ancient_apparition_ice_blast"); } } if (Members.Kunkka != null && Members.Kunkka.IsValid) { const string modname = "modifier_kunkka_torrent_thinker"; foreach (var t in baseList.Where(x => !InSys.Contains(x) && x.HasModifier(modname))) { InSys.Add(t); ParticleEffect effect; if (!ShowMeMoreEffect.TryGetValue(t, out effect)) { effect = t.AddParticleEffect(@"particles\ui_mouseactions\range_display.vpcf"); effect.SetControlPoint(1, new Vector3(225, 0, 0)); ShowMeMoreEffect.Add(t, effect); } } } if (Members.Invoker != null && Members.Invoker.IsValid) { const string modname = "modifier_invoker_sun_strike"; foreach (var t in baseList.Where(x => !InSys.Contains(x) && x.HasModifier(modname))) { InSys.Add(t); ParticleEffect effect; if (!ShowMeMoreEffect.TryGetValue(t, out effect)) { effect = t.AddParticleEffect(@"particles\ui_mouseactions\range_display.vpcf"); effect.SetControlPoint(1, new Vector3(175, 0, 0)); ShowMeMoreEffect.Add(t, effect); } } } if (Members.Lina != null && Members.Lina.IsValid) { const string modname = "modifier_lina_light_strike_array"; foreach (var t in baseList.Where(x => !InSys.Contains(x) && x.HasModifier(modname))) { InSys.Add(t); ParticleEffect effect; if (!ShowMeMoreEffect.TryGetValue(t, out effect)) { effect = t.AddParticleEffect(@"particles\ui_mouseactions\range_display.vpcf"); effect.SetControlPoint(1, new Vector3(225, 0, 0)); ShowMeMoreEffect.Add(t, effect); } } } if (Members.Leshrac != null && Members.Leshrac.IsValid) { const string modname = "modifier_leshrac_split_earth_thinker"; foreach (var t in baseList.Where(x => x.HasModifier(modname))) { ParticleEffect effect; if (!ShowMeMoreEffect.TryGetValue(t, out effect)) { effect = t.AddParticleEffect(@"particles\ui_mouseactions\range_display.vpcf"); effect.SetControlPoint(1, new Vector3(225, 0, 0)); ShowMeMoreEffect.Add(t, effect); } } } if (!Members.Menu.Item("showmemore.Enable").GetValue <bool>()) { return; } if (Members.Windrunner != null && Members.Windrunner.IsValid) { DrawForWr(Members.Windrunner); } if (Members.Mirana != null && Members.Mirana.IsValid) { try { DrawForMirana(Members.Mirana, baseList); } catch (Exception) { Printer.Print("[ShowMeMore]: mirana"); } } }
private static void DrawItems(Hero v, bool forEnemy) { var pos = HUDInfo.GetHPbarPosition(v); if (pos.IsZero) { return; } List <Item> items; try { if (!Members.ItemDictionary.TryGetValue(v.Handle, out items)) { return; } } catch (Exception) { Printer.Print("[ItemOverlay][DrawItems]: " + v.StoredName()); return; } var count = 0; var itemBoxSizeY = (float)(_defSize / 1.24); var newSize = new Vector2(_defSize, itemBoxSizeY); var halfSize = HUDInfo.GetHPBarSizeX() / 2; var maxSizeX = Math.Max((float)items.Count / 2 * newSize.X + _defSize / (float)2.6, halfSize); pos -= new Vector2(-halfSize + maxSizeX, _defSize + _defSize / Extra); if (DangeItems && forEnemy) { items = items.Where(Check).ToList(); if (DangOldMethod) { DrawOldMethod(v, items); return; } } foreach (var item in items) { try { var tex = Textures.GetItemTexture(item.StoredName()); if (item is Bottle) { var bottletype = item as Bottle; if (bottletype.StoredRune != RuneType.None) { tex = Textures.GetTexture( $"materials/ensage_ui/items/{item.Name.Replace("item_", "") + "_" + bottletype.StoredRune}.vmat"); } } var extraPos = new Vector2(_defSize * count, 0); var itemPos = pos + extraPos; var normalSize = newSize + new Vector2(4, _defSize / (float)2.6 + 4); var normalPos = itemPos - new Vector2(2, 2); Drawing.DrawRect(normalPos, newSize + new Vector2(4, _defSize / (float)2.6 + 4), Color.Black); Drawing.DrawRect(itemPos, newSize + _defSize / (float)2.6, tex); DrawState(item, normalPos, normalSize, v.Mana); count++; } catch (Exception) { // ignored } } }
public static void Draw(EventArgs args) { if (!Checker.IsActive()) { return; } if (!Members.Menu.Item("showmemore.Enable").GetValue <bool>()) { return; } if (Members.Menu.Item("apparition.Enable").GetValue <bool>() && AAunit != null && AAunit.IsValid) { try { var aapos = Drawing.WorldToScreen(AAunit.Position); if (!aapos.IsZero) { var myHeroPos = Drawing.WorldToScreen(Members.MyHero.Position); if (!myHeroPos.IsZero) { Drawing.DrawLine(Drawing.WorldToScreen(Members.MyHero.Position), aapos, Color.AliceBlue); const string name = "materials/ensage_ui/spellicons/ancient_apparition_ice_blast.vmat"; Drawing.DrawRect(aapos, new Vector2(50, 50), Drawing.GetTexture(name)); } } } catch (Exception) { Printer.Print("[Draw]: Apparation"); } } if (Members.Menu.Item("tinker.Enable").GetValue <bool>()) { try { if (Members.Tinker != null && Members.Tinker.IsValid) { var baseList = Manager.BaseManager.GetBaseList() .Where(x => x.IsAlive && x.HasModifier("modifier_tinker_march_thinker")); foreach (var unit in baseList) { var realPos = unit.Position; var pos = Drawing.WorldToScreen(realPos); var texture = Textures.GetSpellTexture("tinker_march_of_the_machines"); if (pos.X > 0 && pos.Y > 0) { Drawing.DrawRect(pos, new Vector2(50, 50), texture); } var pos2 = Helper.WorldToMinimap(realPos); Drawing.DrawRect(pos2 - new Vector2(10, 10), new Vector2(10, 10), texture); } } } catch (Exception) { Printer.Print("[Draw]: Tinker"); } } if (Members.Menu.Item("tech.Enable").GetValue <bool>()) { try { if (Members.Techies != null && Members.Techies.IsValid) { var baseList = ObjectManager.GetEntities <Unit>() .Where(x => x.IsAlive && x.ClassID == ClassID.CDOTA_NPC_TechiesMines && x.Team != Members.MyHero.Team && !Bombs.Contains(x)); foreach (var unit in baseList) { Bombs.Add(unit); } foreach (var bomb in Bombs) { if (!bomb.IsValid) { continue; } if (bomb.IsVisible) { continue; } var realPos = bomb.Position; var pos = Drawing.WorldToScreen(realPos); var texture = bomb.Spellbook.Spell1 != null ? Textures.GetTexture("materials/ensage_ui/other/npc_dota_techies_remote_mine.vmat") : Textures.GetTexture("materials/ensage_ui/other/npc_dota_techies_land_mine.vmat"); if (pos.X > 0 && pos.Y > 0) { Drawing.DrawRect(pos, new Vector2(50, 50), texture); } var pos2 = Helper.WorldToMinimap(realPos); Drawing.DrawRect(pos2 - new Vector2(15, 15), new Vector2(15, 15), texture); } } } catch (Exception) { Printer.Print("[Draw]: Techies"); } } if (Members.Menu.Item("scan.Enable").GetValue <bool>()) { if (Members.ScanEnemy != null && Members.ScanEnemy.IsValid) { try { var position = Members.ScanEnemy.Position; var w2S = Drawing.WorldToScreen(position); if (!w2S.IsZero) { Drawing.DrawText( "Scan Ability " + Members.ScanEnemy.FindModifier("modifier_radar_thinker").RemainingTime.ToString("F1"), w2S, new Vector2(15, 15), Color.White, FontFlags.AntiAlias | FontFlags.StrikeOut); } } catch (Exception) { Printer.Print("[Draw]: scan"); } } } if (Members.Menu.Item("charge.Enable").GetValue <bool>() && Members.BaraIsHere) { try { foreach (var v in Manager.HeroManager.GetAllyViableHeroes()) { var mod = v.HasModifier("modifier_spirit_breaker_charge_of_darkness_vision"); if (mod) { if (Equals(Members.MyHero, v)) { Drawing.DrawRect(new Vector2(0, 0), new Vector2(Drawing.Width, Drawing.Height), new Color(Members.Menu.Item("charge" + ".Red").GetValue <Slider>().Value, Members.Menu.Item("charge" + ".Green").GetValue <Slider>().Value, Members.Menu.Item("charge" + ".Blue").GetValue <Slider>().Value, Members.Menu.Item("charge" + ".Alpha").GetValue <Slider>().Value)); } if (!InSys.Contains(v)) { Helper.GenerateSideMessage(v.Name.Replace("npc_dota_hero_", ""), "spirit_breaker_charge_of_darkness"); InSys.Add(v); } else { var pos = HUDInfo.GetHPbarPosition(v); if (!pos.IsZero) { Drawing.DrawRect(pos - new Vector2(50, 0), new Vector2(30, 30), Textures.GetSpellTexture("spirit_breaker_charge_of_darkness")); Drawing.DrawRect(pos - new Vector2(50, 0), new Vector2(30, 30), Color.Red, true); } } } else { if (InSys.Contains(v)) { InSys.Remove(v); } } } } catch (Exception e) { Printer.Print("[Draw]: charge " + e.Message); } } if (Members.Menu.Item("lifestealer.Enable").GetValue <bool>() && Members.LifeStealer != null && Members.LifeStealer.IsValid && !Members.LifeStealer.IsVisible) { try { const string modname = "modifier_life_stealer_infest_effect"; foreach (var t in Manager.HeroManager.GetEnemyViableHeroes().Where(x => x.HasModifier(modname))) { var size3 = new Vector2(10, 20) + new Vector2(13, -6); var w2SPos = HUDInfo.GetHPbarPosition(t); if (w2SPos.IsZero) { continue; } var name = "materials/ensage_ui/miniheroes/" + Members.LifeStealer.StoredName().Replace("npc_dota_hero_", "") + ".vmat"; Drawing.DrawRect(w2SPos - new Vector2(size3.X / 2, size3.Y / 2), size3, Drawing.GetTexture(name)); } if (Members.Menu.Item("lifestealer.creeps.Enable").GetValue <bool>()) { foreach (var t in Creeps.All.Where(x => x != null && x.IsAlive && x.HasModifier(modname))) { var size3 = new Vector2(10, 20) + new Vector2(13, -6); var w2SPos = HUDInfo.GetHPbarPosition(t); if (w2SPos.IsZero) { continue; } var name = "materials/ensage_ui/miniheroes/" + Members.LifeStealer.StoredName().Replace("npc_dota_hero_", "") + ".vmat"; Drawing.DrawRect(w2SPos - new Vector2(size3.X / 2, size3.Y / 2), size3, Drawing.GetTexture(name)); } } } catch (Exception) { Printer.Print("[Draw]: lifestealer"); } } if (Members.Menu.Item("blur.Enable").GetValue <bool>() && Members.PAisHere != null && Members.PAisHere.IsValid) { try { var mod = Members.PAisHere.HasModifier("modifier_phantom_assassin_blur_active"); if (mod && Members.PAisHere.StoredName() == "npc_dota_hero_phantom_assassin") { var size3 = new Vector2(10, 20) + new Vector2(13, -6); var w2M = Helper.WorldToMinimap(Members.PAisHere.NetworkPosition); var name = "materials/ensage_ui/miniheroes/" + Members.PAisHere.StoredName().Replace("npc_dota_hero_", "") + ".vmat"; Drawing.DrawRect(w2M - new Vector2(size3.X / 2, size3.Y / 2), size3, Drawing.GetTexture(name)); } } catch (Exception) { Printer.Print("[Draw]: phantom assasin"); } } }
public static void ShowMeMoreSpells() { if (!Members.Menu.Item("showmemore.Enable").GetValue <bool>()) { return; } //Printer.Print(Manager.BaseManager.GetBaseList().Count.ToString()); //Manager.BaseManager.GetBaseList().ForEach(x=>Printer.Print(x.Handle+": "+x.DayVision)); var baseList = Manager.BaseManager.GetBaseList().Where(x => x.IsValid && x.IsAlive).ToList(); /*foreach (var source in ObjectManager.GetEntities<Unit>().Where(x => x.Distance2D(Members.MyHero) <= 350 && !(x is Hero))) * { * Printer.Print(source.Name + "-->" + source.DayVision+" & "+source.NightVision); * foreach (var modifier in source.Modifiers) * { * Printer.Print(modifier.Name); * } * }*/ if (Members.Menu.Item("scan.Enable").GetValue <bool>()) { if (Members.ScanEnemy == null || !Members.ScanEnemy.IsValid) { Members.ScanEnemy = baseList.Find(x => !InSys.Contains(x) && x.HasModifier("modifier_radar_thinker")); } if (Members.ScanEnemy != null) { InSys.Add(Members.ScanEnemy); ParticleEffect effect; if (!ShowMeMoreEffect.TryGetValue(Members.ScanEnemy, out effect)) { effect = Members.ScanEnemy.AddParticleEffect(@"particles\ui_mouseactions\range_display.vpcf"); effect.SetControlPoint(1, new Vector3(900, 0, 0)); ShowMeMoreEffect.Add(Members.ScanEnemy, effect); } } } if (Members.Menu.Item("arc.Enable").GetValue <bool>()) { if (Members.ArcWarden != null && Members.ArcWarden.IsValid) { foreach (var arc in baseList.Where(x => !InSys.Contains(x) && x.HasModifier("modifier_arc_warden_spark_wraith_thinker")) ) { InSys.Add(arc); ParticleEffect effect; if (!ShowMeMoreEffect.TryGetValue(arc, out effect)) { effect = arc.AddParticleEffect(@"particles\ui_mouseactions\range_display.vpcf"); effect.SetControlPoint(1, new Vector3(375, 0, 0)); ShowMeMoreEffect.Add(arc, effect); } } } } if (Members.Menu.Item("apparition.Enable").GetValue <bool>() && Members.Apparition) { foreach (var t in baseList.Where(t => !InSys.Contains(t) && t.DayVision == 550).Where(t => !Members.AAlist.Contains(t.Handle))) { InSys.Add(t); Members.AAlist.Add(t.Handle); AAunit = t; Helper.GenerateSideMessage("ancient_apparition", "ancient_apparition_ice_blast"); } } if (Members.Menu.Item("kunkka.Enable").GetValue <bool>() && Members.Kunkka != null && Members.Kunkka.IsValid) { const string modname = "modifier_kunkka_torrent_thinker"; try { foreach (var t in baseList.Where(x => !InSys.Contains(x) && x.HasModifier(modname))) { InSys.Add(t); ParticleEffect effect; if (!ShowMeMoreEffect.TryGetValue(t, out effect)) { /*effect = t.AddParticleEffect(@"particles\ui_mouseactions\range_display.vpcf"); * effect.SetControlPoint(1, new Vector3(225, 0, 0));*/ effect = t.AddParticleEffect(@"particles\ui_mouseactions\drag_selected_ring.vpcf"); var r = Members.Menu.Item("kunkka.Red").GetValue <Slider>().Value; var g = Members.Menu.Item("kunkka.Green").GetValue <Slider>().Value; var b = Members.Menu.Item("kunkka.Blue").GetValue <Slider>().Value; effect.SetControlPoint(1, new Vector3(r, g, b)); effect.SetControlPoint(2, new Vector3(225, 255, 0)); ShowMeMoreEffect.Add(t, effect); } } } catch { Printer.Print("[ShowMeMore]: kunkka"); } } if (Members.Menu.Item("invoker.Enable").GetValue <bool>() && Members.Invoker != null && Members.Invoker.IsValid) { //string[] modname = {"modifier_invoker_emp", "modifier_invoker_sun_strike"}; const string modname = "modifier_invoker_sun_strike"; try { foreach (var t in baseList.Where(x => !InSys.Contains(x) && x.HasModifier(modname))) { InSys.Add(t); ParticleEffect effect; if (!ShowMeMoreEffect.TryGetValue(t, out effect)) { //effect = t.AddParticleEffect(@"particles\ui_mouseactions\range_display.vpcf"); var range = 175; effect = t.AddParticleEffect(@"particles\ui_mouseactions\drag_selected_ring.vpcf"); var r = Members.Menu.Item("invoker.Red").GetValue <Slider>().Value; var g = Members.Menu.Item("invoker.Green").GetValue <Slider>().Value; var b = Members.Menu.Item("invoker.Blue").GetValue <Slider>().Value; effect.SetControlPoint(1, new Vector3(r, g, b)); effect.SetControlPoint(2, new Vector3(range, 255, 0)); ShowMeMoreEffect.Add(t, effect); } } } catch (Exception) { Printer.Print("[ShowMeMore]: invoker"); } } if (Members.Menu.Item("tech.Enable").GetValue <bool>() && Members.Techies != null && Members.Techies.IsValid) { try { foreach (var t in Bombs) { ParticleEffect effect; if (!t.IsValid || !t.IsAlive) { if (ShowMeMoreEffect.TryGetValue(t, out effect)) { effect.Dispose(); ShowMeMoreEffect.Remove(t); } continue; } if (!InSys.Contains(t)) { InSys.Add(t); if (!ShowMeMoreEffect.TryGetValue(t, out effect) && t.Spellbook.Spell1 != null) { //effect = t.AddParticleEffect(@"particles\ui_mouseactions\range_display.vpcf"); effect = new ParticleEffect(@"particles\ui_mouseactions\range_display.vpcf", t.Position); effect.SetControlPoint(1, new Vector3(425, 0, 0)); ShowMeMoreEffect.Add(t, effect); } } } } catch { Printer.Print("[ShowMeMore]: tech"); } } if (Members.Menu.Item("lina.Enable").GetValue <bool>() && Members.Lina != null && Members.Lina.IsValid) { const string modname = "modifier_lina_light_strike_array"; foreach (var t in baseList.Where(x => !InSys.Contains(x) && x.HasModifier(modname))) { InSys.Add(t); ParticleEffect effect; if (!ShowMeMoreEffect.TryGetValue(t, out effect)) { effect = t.AddParticleEffect(@"particles\ui_mouseactions\range_display.vpcf"); effect.SetControlPoint(1, new Vector3(225, 0, 0)); ShowMeMoreEffect.Add(t, effect); } } } if (Members.Menu.Item("lesh.Enable").GetValue <bool>() && Members.Leshrac != null && Members.Leshrac.IsValid) { const string modname = "modifier_leshrac_split_earth_thinker"; foreach (var t in baseList.Where(x => x.HasModifier(modname))) { ParticleEffect effect; if (!ShowMeMoreEffect.TryGetValue(t, out effect)) { effect = t.AddParticleEffect(@"particles\ui_mouseactions\range_display.vpcf"); effect.SetControlPoint(1, new Vector3(225, 0, 0)); ShowMeMoreEffect.Add(t, effect); } } } if (Members.Menu.Item("wr.Enable").GetValue <bool>() && Members.Windrunner != null && Members.Windrunner.IsValid) { DrawForWr(Members.Windrunner); } if (Members.Menu.Item("mirana.Enable").GetValue <bool>() && Members.Mirana != null && Members.Mirana.IsValid) { try { DrawForMirana(Members.Mirana, baseList); } catch (Exception) { Printer.Print("[ShowMeMore]: mirana"); } } }
private static void Main() { Members.Menu.AddItem(new MenuItem("Enable", "Enable").SetValue(true)); var topPanel = new Menu("Top Panel", "toppanel"); var spellPanel = new Menu("Spell Panel", "spellPanel"); var ultimate = new Menu("Ultimate", "ultimate"); var health = new Menu("Health Panel", "health"); var mana = new Menu("Mana Panel", "mana"); var status = new Menu("Status panel", "status"); var extraPos = new Menu("Extra Position", "extraPos"); var itemPanel = new Menu("Item panel", "itempanel"); var roshanTimer = new Menu("Roshan Timer", "roshanTimer"); var showMeMore = new Menu("Show Me More", "showmemore"); var showIllusion = new Menu("Show Illusion", "showillusion"); var runevision = new Menu("Rune Vision", "runevision"); var autoItems = new Menu("Auto Items", "autoitems"); var settings = new Menu("Settings", "Settings"); //=========================== itemPanel.AddItem(new MenuItem("itempanel.Enable", "Enable").SetValue(true)); itemPanel.AddItem(new MenuItem("itempanel.Stash.Enable", "Draw Stash Items").SetValue(true)); itemPanel.AddItem(new MenuItem("itempanel.Button.Enable", "Draw Button for toggle").SetValue(true)); itemPanel.AddItem(new MenuItem("itempanel.X", "Panel Position X").SetValue(new Slider(100, 0, 2000))); itemPanel.AddItem(new MenuItem("itempanel.Y", "Panel Position Y").SetValue(new Slider(200, 0, 2000))); itemPanel.AddItem(new MenuItem("itempanel.SizeX", "SizeX").SetValue(new Slider(255, 1, 255))); itemPanel.AddItem(new MenuItem("itempanel.SizeY", "SizeY").SetValue(new Slider(174, 1, 255))); itemPanel.AddItem(new MenuItem("itempanel.Red", "Red").SetValue(new Slider(141, 0, 255)).SetFontColor(Color.Red)); itemPanel.AddItem(new MenuItem("itempanel.Green", "Green").SetValue(new Slider(182, 0, 255)).SetFontColor(Color.Green)); itemPanel.AddItem(new MenuItem("itempanel.Blue", "Blue").SetValue(new Slider(98, 0, 255)).SetFontColor(Color.Blue)); //=========================== topPanel.AddItem(new MenuItem("toppanel.Enable", "Enable").SetValue(true)); topPanel.AddItem( new MenuItem("toppanel.Targets", "Draw For: ").SetValue( new StringList(new[] { "Both", "Ally Team", "Enemy Team" }))); //=========================== spellPanel.AddItem(new MenuItem("spellpanel.Enable", "Enable").SetValue(true)); spellPanel.AddItem( new MenuItem("spellpanel.Targets", "Draw For: ").SetValue( new StringList(new[] { "Both", "Ally Team", "Enemy Team" }))); var oldMethod = new Menu("OldMethod", "Without Textures"); oldMethod.AddItem(new MenuItem("spellpanel.OldMethod.Enable", "Enable").SetValue(true)); oldMethod.AddItem(new MenuItem("spellPanel.distBetweenSpells", "Distance spells").SetValue(new Slider(36, 0, 200))); oldMethod.AddItem(new MenuItem("spellPanel.DistBwtweenLvls", "Distance lvls").SetValue(new Slider(6, 0, 200))); oldMethod.AddItem(new MenuItem("spellPanel.SizeSpell", "Level size").SetValue(new Slider(3, 1, 25))); oldMethod.AddItem(new MenuItem("spellPanel.ExtraPosX", "Extra Position X").SetValue(new Slider(25))); oldMethod.AddItem(new MenuItem("spellPanel.ExtraPosY", "Extra Position Y").SetValue(new Slider(125, 0, 400))); //---0-0-0-0-0- var newMethod = new Menu("New Method", "With Textures"); newMethod.AddItem(new MenuItem("spellpanel.NewMethod.Enable", "Enable").SetValue(false)); newMethod.AddItem(new MenuItem("spellpanel.NewMethod.IconSize", "Icon Size").SetValue(new Slider(25, 1, 100))); newMethod.AddItem(new MenuItem("spellpanel.NewMethod.SizeLevel", "Text Size (for level)").SetValue(new Slider(50, 0, 150))); newMethod.AddItem(new MenuItem("spellpanel.NewMethod.Size", "Text Size (for cooldown/mana)").SetValue(new Slider(50, 0, 150))); newMethod.AddItem(new MenuItem("spellpanel.NewMethod.ExtraX", "Extra position X").SetValue(new Slider(0, -150, 150))); newMethod.AddItem(new MenuItem("spellpanel.NewMethod.ExtraY", "Extra position Y").SetValue(new Slider(0, -150, 150))); //=========================== ultimate.AddItem(new MenuItem("ultimate.Enable", "Enable").SetValue(true)); ultimate.AddItem(new MenuItem("ultimate.Icon.Enable", "Draw Icon").SetValue(true)); ultimate.AddItem( new MenuItem("ultimate.Icon.Extra.Enable", "Draw Mana req with cd").SetValue(true) .SetTooltip("render lack of mana when spell on cooldown")); ultimate.AddItem( new MenuItem("ultimate.Type", "Type of drawing").SetValue( new StringList(new[] { "Draw Icon", "Draw Line" }))).ValueChanged += (sender, args) => { var newArg = args.GetNewValue <StringList>().SelectedIndex; var newColor = newArg == 1 ? Color.DarkSlateGray : new Color(195, 186, 173, 255); var newColor2 = newArg == 0 ? Color.DarkSlateGray : new Color(195, 186, 173, 255); Members.Menu.Item("ultimate.Info").SetFontColor(newColor); Members.Menu.Item("ultimate.InfoAlways").SetFontColor(newColor); Members.Menu.Item("ultimate.Line.Size").SetFontColor(newColor2); }; ultimate.AddItem( new MenuItem("ultimate.Info", "Show details").SetValue(true) .SetTooltip("show Ultimate's CD if u put ur mouse on icon")); ultimate.AddItem( new MenuItem("ultimate.InfoAlways", "Show details all time").SetValue(true) .SetTooltip("Show Details should be enabled")); ultimate.AddItem( new MenuItem("ultimate.Line.Size", "Line Size").SetValue(new Slider(15, 7, 30))); //=========================== health.AddItem(new MenuItem("toppanel.Health.Enable", "Enable").SetValue(true)); //=========================== mana.AddItem(new MenuItem("toppanel.Mana.Enable", "Enable").SetValue(true)); //=========================== status.AddItem(new MenuItem("toppanel.Status.Enable", "Enable").SetValue(true)); status.AddItem(new MenuItem("toppanel.AllyVision.Enable", "Vision on Ally Heroes").SetValue(true)); status.AddItem(new MenuItem("toppanel.EnemiesStatus.Enable", "Enemies status").SetValue(true)); //=========================== extraPos.AddItem( new MenuItem("extraPos.X", "Extra Position for top panel: X").SetValue(new Slider(0, -25, 25))); extraPos.AddItem( new MenuItem("extraPos.Y", "Extra Position for top panel: Y").SetValue(new Slider(0, -25, 25))); //=========================== roshanTimer.AddItem(new MenuItem("roshanTimer.Enable", "Enable").SetValue(true)); //=========================== showMeMore.AddItem(new MenuItem("showmemore.Enable", "Enable").SetValue(true)); var charge = new Menu("", "charge", false, "spirit_breaker_charge_of_darkness", true); charge.AddItem(new MenuItem("tooltip", "When Charge on your Main Hero").SetFontColor(Color.Red)); charge.AddItem(new MenuItem("charge.Enable", "Enable").SetValue(true)); charge.AddItem(new MenuItem("charge.Red", "Red").SetValue(new Slider(255, 0, 255)).SetFontColor(Color.Red)); charge.AddItem(new MenuItem("charge.Green", "Green").SetValue(new Slider(0, 0, 255)).SetFontColor(Color.Green)); charge.AddItem(new MenuItem("charge.Blue", "Blue").SetValue(new Slider(0, 0, 255)).SetFontColor(Color.Blue)); charge.AddItem(new MenuItem("charge.Alpha", "Alpha").SetValue(new Slider(4, 0, 255)).SetFontColor(Color.WhiteSmoke)); //=========================== var blur = new Menu("", "blur", false, "phantom_assassin_blur", true); blur.AddItem(new MenuItem("blur.Enable", "Show PA on minimap").SetValue(true)); //=========================== var wr = new Menu("", "wr", false, "windrunner_powershot", true); wr.AddItem(new MenuItem("wr.Enable", "Enable").SetValue(true)); wr.AddItem(new MenuItem("wr.Red", "Red").SetValue(new Slider(255, 0, 255)).SetFontColor(Color.Red)); wr.AddItem(new MenuItem("wr.Green", "Green").SetValue(new Slider(255, 0, 255)).SetFontColor(Color.Green)); wr.AddItem(new MenuItem("wr.Blue", "Blue").SetValue(new Slider(255, 0, 255)).SetFontColor(Color.Blue)); //=========================== var mirana = new Menu("", "mirana", false, "mirana_arrow", true); mirana.AddItem(new MenuItem("mirana.Enable", "Enable").SetValue(true)); mirana.AddItem(new MenuItem("mirana.Red", "Red").SetValue(new Slider(255, 0, 255)).SetFontColor(Color.Red)); mirana.AddItem(new MenuItem("mirana.Green", "Green").SetValue(new Slider(255, 0, 255)).SetFontColor(Color.Green)); mirana.AddItem(new MenuItem("mirana.Blue", "Blue").SetValue(new Slider(255, 0, 255)).SetFontColor(Color.Blue)); var apparition = new Menu("", "apparition", false, "ancient_apparition_ice_blast", true); apparition.AddItem(new MenuItem("apparition.Enable", "Enable").SetValue(true)); var lina = new Menu("", "lina", false, "lina_light_strike_array", true); lina.AddItem(new MenuItem("lina.Enable", "Enable").SetValue(true)); var invoker = new Menu("", "invoker", false, "invoker_sun_strike", true); invoker.AddItem(new MenuItem("invoker.Enable", "Enable").SetValue(true)); invoker.AddItem(new MenuItem("invoker.Red", "Red").SetValue(new Slider(255, 0, 255)).SetFontColor(Color.Red)); invoker.AddItem(new MenuItem("invoker.Green", "Green").SetValue(new Slider(255, 0, 255)).SetFontColor(Color.Green)); invoker.AddItem(new MenuItem("invoker.Blue", "Blue").SetValue(new Slider(255, 0, 255)).SetFontColor(Color.Blue)); var lesh = new Menu("", "lesh", false, "leshrac_split_earth", true); lesh.AddItem(new MenuItem("lesh.Enable", "Enable").SetValue(true)); var kunkka = new Menu("", "kunkka", false, "kunkka_torrent", true); kunkka.AddItem(new MenuItem("kunkka.Enable", "Enable").SetValue(true)); kunkka.AddItem(new MenuItem("kunkka.Red", "Red").SetValue(new Slider(255, 0, 255)).SetFontColor(Color.Red)); kunkka.AddItem(new MenuItem("kunkka.Green", "Green").SetValue(new Slider(255, 0, 255)).SetFontColor(Color.Green)); kunkka.AddItem(new MenuItem("kunkka.Blue", "Blue").SetValue(new Slider(255, 0, 255)).SetFontColor(Color.Blue)); var tech = new Menu("", "tech", false, "npc_dota_hero_techies", true); tech.AddItem(new MenuItem("tech.Enable", "Enable").SetValue(true)); var tinker = new Menu("", "tinker", false, "npc_dota_hero_tinker", true); tinker.AddItem(new MenuItem("tinker.Enable", "Enable").SetValue(true)); var lifestealer = new Menu("", "life stealer", false, "life_stealer_infest", true); lifestealer.AddItem(new MenuItem("lifestealer.Enable", "Enable").SetValue(true)); lifestealer.AddItem(new MenuItem("lifestealer.creeps.Enable", "Enable for creeps").SetValue(true)); var arc = new Menu("", "arc", textureName: "arc_warden_spark_wraith", showTextWithTexture: true); arc.AddItem(new MenuItem("arc.Enable", "Enable").SetValue(true)); var scan = new Menu("Enemy Scanning Ability", "Scan"); scan.AddItem(new MenuItem("scan.Enable", "Enable").SetValue(true)); //var cour = new Menu("Courier", "Courier"); //cour.AddItem(new MenuItem("Courier.Enable", "Enable").SetValue(true)).SetTooltip("draw courier position on minimap"); //=========================== showIllusion.AddItem(new MenuItem("showillusion.Enable", "Enable").SetValue(true)); //=========================== runevision.AddItem(new MenuItem("runevision.Enable", "Enable").SetValue(true)); runevision.AddItem(new MenuItem("runevision.PrintText.Enable", "Print text on rune-spawning").SetValue(true)); runevision.AddItem(new MenuItem("runevision.DrawOnMinimap.Enable", "Draw rune on minimap").SetValue(true)); //=========================== var itemOverlay = new Menu("Item overlay", "itemOverlay"); itemOverlay.AddItem(new MenuItem("itemOverlay.Enable", "Enable").SetValue(false)).SetTooltip("will show all items on heroes"); itemOverlay.AddItem(new MenuItem("itemOverlay.DrawCharges", "Draw Charges").SetValue(true)); itemOverlay.AddItem(new MenuItem("itemOverlay.Size", "Size").SetValue(new Slider(100, 1, 200))); itemOverlay.AddItem(new MenuItem("itemOverlay.Extra", "Extra").SetValue(new Slider(26, 1, 100))); itemOverlay.AddItem(new MenuItem("itemOverlay.Ally", "Enable for ally").SetValue(true)); itemOverlay.AddItem(new MenuItem("itemOverlay.Enemy", "Enable for enemy").SetValue(true)); var manaBars = new Menu("Manabars", "manaBars"); manaBars.AddItem(new MenuItem("manaBars.Enable", "Enable").SetValue(true)); manaBars.AddItem(new MenuItem("manaBars.Size", "Size").SetValue(new Slider(75, 1, 150))); manaBars.AddItem(new MenuItem("manaBars.Red", "Red").SetValue(new Slider(65, 0, 255)).SetFontColor(Color.Red)); manaBars.AddItem(new MenuItem("manaBars.Green", "Green").SetValue(new Slider(105, 0, 255)).SetFontColor(Color.Green)); manaBars.AddItem(new MenuItem("manaBars.Blue", "Blue").SetValue(new Slider(255, 0, 255)).SetFontColor(Color.Blue)); //var dangItem = new Menu("Dangerous items", "dangitems"); itemOverlay.AddItem(new MenuItem("itemOverlay.DangItems", "Draw only dangerous items").SetValue(false)).SetTooltip("show if enemy has Dangerous items. Working only for enemy heroes"); itemOverlay.AddItem(new MenuItem("itemOverlay.OldMethod", "Use old method for drawing dangItems").SetValue(false)); var dict = new Dictionary <string, bool> { { "item_gem", true }, { "item_dust", true }, { "item_sphere", true }, { "item_blink", true }, { "item_ward_observer", true }, { "item_ward_sentry", true }, { "item_black_king_bar", true }, { "item_invis_sword", true }, { "item_silver_edge", true }, { "item_ward_dispenser", true } }; itemOverlay.AddItem(new MenuItem("itemOverlay.List", "Items: ").SetValue(new AbilityToggler(dict))); //=========================== autoItems.AddItem(new MenuItem("autoitems.Enable", "Enable").SetValue(true)); var autoitemlist = new Dictionary <string, bool> { { "item_phase_boots", true }, { "item_hand_of_midas", true } }; autoItems.AddItem(new MenuItem("autoitems.List", "Items:").SetValue(new AbilityToggler(autoitemlist))); //=========================== var lastPosition = new Menu("Last position", "lastPosition"); lastPosition.AddItem(new MenuItem("lastPosition.Enable", "Enable").SetValue(true)).SetTooltip("show last positions of enemies"); lastPosition.AddItem(new MenuItem("lastPosition.Enable.Prediction", "Enable Prediction").SetValue(true)); lastPosition.AddItem(new MenuItem("lastPosition.Enable.Map", "on Map").SetValue(false)); lastPosition.AddItem(new MenuItem("lastPosition.Map.X", "icon size").SetValue(new Slider(50, 10, 150))); lastPosition.AddItem(new MenuItem("lastPosition.Enable.Minimap", "on Minimap").SetValue(true)); lastPosition.AddItem(new MenuItem("lastPosition.Minimap.X", "icon size").SetValue(new Slider(20, 10, 150))); //=========================== var netWorth = new Menu("NetWorth Graph", "netWorth"); netWorth.AddItem(new MenuItem("netWorth.Enable", "Enable").SetValue(true)).SetTooltip("draw networth graph based on item cost"); netWorth.AddItem(new MenuItem("netWorth.Order", "Sort Players").SetValue(true)); netWorth.AddItem( new MenuItem("netWorth.X", "Position: X").SetValue(new Slider(0, 0, 2000))); netWorth.AddItem( new MenuItem("netWorth.Y", "Position: Y").SetValue(new Slider(0, 0, 2000))); netWorth.AddItem(new MenuItem("netWorth.SizeX", "SizeX").SetValue(new Slider(255, 1, 255))); netWorth.AddItem(new MenuItem("netWorth.SizeY", "SizeY").SetValue(new Slider(174, 1, 255))); netWorth.AddItem(new MenuItem("netWorth.Red", "Red").SetValue(new Slider(141, 0, 255)).SetFontColor(Color.Red)); netWorth.AddItem(new MenuItem("netWorth.Green", "Green").SetValue(new Slider(182, 0, 255)).SetFontColor(Color.Green)); netWorth.AddItem(new MenuItem("netWorth.Blue", "Blue").SetValue(new Slider(98, 0, 255)).SetFontColor(Color.Blue)); //=========================== var dmgCalc = new Menu("Damage Calculation", "dmgCalc"); dmgCalc.AddItem(new MenuItem("dmgCalc.Enable", "Enable").SetValue(true)).SetTooltip("showing dmg from ur abilities"); dmgCalc.AddItem(new MenuItem("dmgCalc.Red", "Red").SetValue(new Slider(255, 0, 255)).SetFontColor(Color.Red)); dmgCalc.AddItem(new MenuItem("dmgCalc.Green", "Green").SetValue(new Slider(255, 0, 255)).SetFontColor(Color.Green)); dmgCalc.AddItem(new MenuItem("dmgCalc.Blue", "Blue").SetValue(new Slider(255, 0, 255)).SetFontColor(Color.Blue)); //=========================== var devolper = new Menu("Developer", "Developer"); devolper.AddItem(new MenuItem("Dev.Hax.enable", "Hax in lobby").SetValue(false)); devolper.AddItem(new MenuItem("Dev.Text.enable", "Debug messages").SetValue(false)); //=========================== spellPanel.AddSubMenu(oldMethod); spellPanel.AddSubMenu(newMethod); topPanel.AddSubMenu(ultimate); topPanel.AddSubMenu(health); topPanel.AddSubMenu(mana); topPanel.AddSubMenu(status); topPanel.AddSubMenu(extraPos); settings.AddSubMenu(topPanel); settings.AddSubMenu(spellPanel); settings.AddSubMenu(roshanTimer); settings.AddSubMenu(showMeMore); showMeMore.AddSubMenu(charge); showMeMore.AddSubMenu(blur); showMeMore.AddSubMenu(wr); showMeMore.AddSubMenu(mirana); showMeMore.AddSubMenu(apparition); showMeMore.AddSubMenu(lina); showMeMore.AddSubMenu(invoker); showMeMore.AddSubMenu(kunkka); showMeMore.AddSubMenu(lesh); showMeMore.AddSubMenu(lifestealer); showMeMore.AddSubMenu(tech); showMeMore.AddSubMenu(tinker); showMeMore.AddSubMenu(arc); showMeMore.AddSubMenu(scan); settings.AddSubMenu(showIllusion); settings.AddSubMenu(runevision); //settings.AddSubMenu(dangItem); settings.AddSubMenu(itemPanel); settings.AddSubMenu(itemOverlay); settings.AddSubMenu(manaBars); settings.AddSubMenu(autoItems); settings.AddSubMenu(lastPosition); settings.AddSubMenu(netWorth); settings.AddSubMenu(dmgCalc); Members.Menu.AddSubMenu(settings); Members.Menu.AddSubMenu(devolper); Members.HeroesList = new HeroesList(); Members.Manabars = new Manabars(); Members.ItemOverlay = new ItemOverlay(); Members.DamageCalculation = new DamageCalculation(); Members.AbilityOverlay = new AbilityOverlay(); if (Drawing.Direct3DDevice9 != null) { Members.RoshanFont = new Font( Drawing.Direct3DDevice9, new FontDescription { FaceName = "Tahoma", Height = 15, OutputPrecision = FontPrecision.Default, Quality = FontQuality.Default }); } Events.OnLoad += (sender, args) => { Members.MyHero = ObjectManager.LocalHero; Members.MyPlayer = ObjectManager.LocalPlayer; Members.AbilityDictionary = new Dictionary <string, List <Ability> >(); Members.ItemDictionary = new Dictionary <string, List <Item> >(); Members.StashItemDictionary = new Dictionary <string, List <Item> >(); Members.NetWorthDictionary = new Dictionary <string, long>(); Members.Heroes = new List <Hero>(); Members.AllyHeroes = new List <Hero>(); Members.EnemyHeroes = new List <Hero>(); Members.Players = new List <Player>(); Members.AllyPlayers = new List <Player>(); Members.EnemyPlayers = new List <Player>(); Members.BaseList = new List <Unit>(); Members.PAisHere = null; Members.BaraIsHere = false; Members.Apparition = false; Members.Mirana = null; Members.Windrunner = null; Updater.HeroList.Flush(); Updater.BaseList.Flush(); Updater.PlayerList.Flush(); Game.OnUpdate += Updater.HeroList.Update; //Game.OnUpdate += Updater.PlayerList.Update; Game.OnUpdate += Updater.BaseList.Update; Game.OnUpdate += Devolp.ConsoleCommands; RoshanAction.Flush(); AutoItems.Flush(); Game.OnUpdate += RoshanAction.Roshan; Game.OnUpdate += Game_OnUpdate; Drawing.OnDraw += DrawHelper.Overlay; Drawing.OnDraw += ItemPanel.Draw; ShowMeMore.Flush(); Drawing.OnDraw += ShowMeMore.Draw; Runes.Flush(); Drawing.OnDraw += Runes.Draw; Drawing.OnPreReset += DrawHelper.Render.Drawing_OnPreReset; Drawing.OnPostReset += DrawHelper.Render.Drawing_OnPostReset; Drawing.OnEndScene += DrawHelper.Render.Drawing_OnEndScene; Game.OnWndProc += Game_OnWndProc; AppDomain.CurrentDomain.DomainUnload += DrawHelper.Render.CurrentDomainDomainUnload; Game.OnFireEvent += FireEvent.Game_OnGameEvent; Game.PrintMessage( "<font face='Comic Sans MS, cursive'><font color='#00aaff'>" + Members.Menu.DisplayName + " By Jumpering" + " loaded!</font> <font color='#aa0000'>v" + Assembly.GetExecutingAssembly().GetName().Version, MessageType.LogMessage); Printer.PrintSuccess("> " + Members.Menu.DisplayName + " loaded v" + Assembly.GetExecutingAssembly().GetName().Version); try { Members.Menu.AddToMainMenu(); } catch (Exception) { Printer.Print("Members.Menu.AddToMainMenu();"); } }; Events.OnClose += (sender, args) => { Game.OnUpdate -= Updater.HeroList.Update; //Game.OnUpdate += Updater.PlayerList.Update; Game.OnUpdate -= Updater.BaseList.Update; Game.OnUpdate -= Devolp.ConsoleCommands; Game.OnUpdate -= RoshanAction.Roshan; Game.OnUpdate -= Game_OnUpdate; Drawing.OnDraw -= DrawHelper.Overlay; Drawing.OnDraw -= ItemPanel.Draw; Drawing.OnDraw -= ShowMeMore.Draw; Drawing.OnDraw -= Runes.Draw; Drawing.OnPreReset -= DrawHelper.Render.Drawing_OnPreReset; Drawing.OnPostReset -= DrawHelper.Render.Drawing_OnPostReset; Drawing.OnEndScene -= DrawHelper.Render.Drawing_OnEndScene; Game.OnWndProc -= Game_OnWndProc; AppDomain.CurrentDomain.DomainUnload -= DrawHelper.Render.CurrentDomainDomainUnload; Game.OnFireEvent -= FireEvent.Game_OnGameEvent; Members.TopPanelPostiion.Clear(); Members.Heroes.Clear(); Members.EnemyHeroes.Clear(); Members.AllyHeroes.Clear(); Printer.PrintInfo("> " + Members.Menu.DisplayName + " unloaded"); try { Members.Menu.RemoveFromMainMenu(); } catch (Exception) { Printer.PrintError("Members.Menu.RemoveFromMainMenu();"); } }; }
private static void DrawStashItems(Vector2 pos, Vector2 size, int r, int g, int b) { var i = 0; if (Members.ItemDictionary.Count == 0) { return; } foreach (var v in Members.EnemyHeroes) { List <Item> items; try { if (!Members.StashItemDictionary.TryGetValue(v.Name, out items)) { continue; } } catch (Exception) { Printer.Print("[DrawStashItems]: " + v.StoredName()); continue; } var n = 0; var heroPos = pos + new Vector2(0, (size.Y / 7 + 3) * i + 2); foreach (var item in items) { try { string texturename; if (item.IsRecipe) { texturename = "materials/ensage_ui/items/recipe.vmat"; } else { texturename = string.Format("materials/ensage_ui/items/{0}.vmat", item.Name.Replace("item_", "")); } if (item is Bottle) { var bottletype = item as Bottle; if (bottletype.StoredRune != RuneType.None) { texturename = string.Format("materials/ensage_ui/items/{0}.vmat", item.Name.Replace("item_", "") + "_" + bottletype.StoredRune); } } var itemPos = heroPos + new Vector2(size.X / 7 * n + 5, 0); DrawItem(itemPos, size / 6, texturename, r, g, b); //DrawState(item, v, itemPos, size / 6); n++; } catch (Exception) { //Printer.Print("Hero: "+v.Name+". Item: "+item.Name); } } for (var j = 0; j < 6 - n; j++) { var itemPos = heroPos + new Vector2(size.X / 7 * (n + j) + 5, 0); DrawItem(itemPos, size / 6, "materials/ensage_ui/items/emptyitembg.vmat", r, g, b); } i++; } }
public static void Update(EventArgs args) { if (!Checker.IsActive()) { return; } if (!HeroUpdate.Sleeping) { HeroUpdate.Sleep(2000); if (Members.Heroes.Count < 10) { Members.Heroes = Heroes.All.Where(x => x != null && x.IsValid && !x.IsIllusion).ToList(); Members.AllyHeroes = Members.Heroes.Where(x => x.Team == Members.MyHero.Team).ToList(); Members.EnemyHeroes = Members.Heroes.Where(x => x.Team == Members.MyHero.GetEnemyTeam()).ToList(); //Printer.Print("STATUS:[all] " + Members.Heroes.Count+ " [enemy] " + Members.EnemyHeroes.Count + " [ally] " + Members.AllyHeroes.Count); if (!Members.Apparition && Members.EnemyHeroes.Any(x => x.ClassID == ClassID.CDOTA_Unit_Hero_AncientApparition)) { Members.Apparition = true; } if (Members.PAisHere == null && Members.EnemyHeroes.Any(x => x.ClassID == ClassID.CDOTA_Unit_Hero_PhantomAssassin)) { Members.PAisHere = Members.EnemyHeroes.FirstOrDefault(x => x.ClassID == ClassID.CDOTA_Unit_Hero_PhantomAssassin); } if (!Members.BaraIsHere && Members.EnemyHeroes.Any(x => x.ClassID == ClassID.CDOTA_Unit_Hero_SpiritBreaker)) { Members.BaraIsHere = true; } if (Members.Mirana == null && Members.EnemyHeroes.Any(x => x.ClassID == ClassID.CDOTA_Unit_Hero_Mirana)) { Members.Mirana = Members.EnemyHeroes.FirstOrDefault(x => x.ClassID == ClassID.CDOTA_Unit_Hero_Mirana); } if (Members.Windrunner == null && Members.EnemyHeroes.Any(x => x.ClassID == ClassID.CDOTA_Unit_Hero_Windrunner)) { Members.Windrunner = Members.EnemyHeroes.FirstOrDefault(x => x.ClassID == ClassID.CDOTA_Unit_Hero_Windrunner); } if (Members.Invoker == null && Members.EnemyHeroes.Any(x => x.ClassID == ClassID.CDOTA_Unit_Hero_Invoker)) { Members.Invoker = Members.EnemyHeroes.FirstOrDefault(x => x.ClassID == ClassID.CDOTA_Unit_Hero_Invoker); } if (Members.Kunkka == null && Members.EnemyHeroes.Any(x => x.ClassID == ClassID.CDOTA_Unit_Hero_Kunkka)) { Members.Kunkka = Members.EnemyHeroes.FirstOrDefault(x => x.ClassID == ClassID.CDOTA_Unit_Hero_Kunkka); } if (Members.Lina == null && Members.EnemyHeroes.Any(x => x.ClassID == ClassID.CDOTA_Unit_Hero_Lina)) { Members.Lina = Members.EnemyHeroes.FirstOrDefault(x => x.ClassID == ClassID.CDOTA_Unit_Hero_Lina); } if (Members.Leshrac == null && Members.EnemyHeroes.Any(x => x.ClassID == ClassID.CDOTA_Unit_Hero_Leshrac)) { Members.Leshrac = Members.EnemyHeroes.FirstOrDefault(x => x.ClassID == ClassID.CDOTA_Unit_Hero_Leshrac); } } } if (!AbilityUpdate.Sleeping) { AbilityUpdate.Sleep(1000); foreach (var hero in /*Members.Heroes */ Manager.HeroManager.GetViableHeroes()) { /*if ((hero.ClassID==ClassID.CDOTA_Unit_Hero_DoomBringer || hero.ClassID==ClassID.CDOTA_Unit_Hero_Rubick) && !hero.IsVisible) * continue;*/ try { if (!Members.AbilityDictionary.ContainsKey(hero.StoredName())) { Members.AbilityDictionary.Add(hero.StoredName(), hero.Spellbook.Spells.Where( x => x != null && x.IsValid && x.AbilityType != AbilityType.Attribute && x.AbilityType != AbilityType.Hidden && x.AbilitySlot.ToString() != "-1") .ToList()); } if ( !Members.AbilityDictionary.ContainsValue( hero.Spellbook.Spells.Where(x => x.AbilitySlot.ToString() != "-1").ToList())) { Members.AbilityDictionary.Remove(hero.StoredName()); Members.AbilityDictionary.Add(hero.StoredName(), hero.Spellbook.Spells.Where( x => x != null && x.IsValid && x.AbilityType != AbilityType.Attribute && x.AbilityType != AbilityType.Hidden && x.AbilitySlot.ToString() != "-1") .ToList()); } if (!Members.ItemDictionary.ContainsValue( hero.Inventory.Items.Where(x => x != null && x.IsValid).ToList())) { Members.ItemDictionary.Remove(hero.StoredName()); Members.ItemDictionary.Add(hero.StoredName(), hero.Inventory.Items.Where(x => x != null && x.IsValid).ToList()); } if (Members.Menu.Item("itempanel.Stash.Enable").GetValue <bool>() && !Members.StashItemDictionary.ContainsValue( hero.Inventory.StashItems.Where(x => x != null && x.IsValid).ToList())) { Members.StashItemDictionary.Remove(hero.StoredName()); Members.StashItemDictionary.Add(hero.StoredName(), hero.Inventory.StashItems.Where(x => x != null && x.IsValid).ToList()); } } catch (Exception) { Printer.Print("[UPDATER.ITEMS/ABILITY: ] " + hero.StoredName()); } } } }
private static void Main() { //TestShit(); Events.OnLoad += (sender, args) => { MenuManager.Init(); DelayAction.Add(500, () => { Members.MyHero = ObjectManager.LocalHero; Members.MyClass = Members.MyHero.ClassId; Members.MyPlayer = ObjectManager.LocalPlayer; _openDota = new OpenDota(); ShrineHelper.Init(); Members.AbilityDictionary = new Dictionary <uint, List <Ability> >(); Members.ItemDictionary = new Dictionary <uint, List <Item> >(); Members.StashItemDictionary = new Dictionary <uint, List <Item> >(); Members.NetWorthDictionary = new Dictionary <string, long>(); Members.Heroes = new List <Hero>(); Members.AllyHeroes = new List <Hero>(); Members.EnemyHeroes = new List <Hero>(); Members.Players = new List <Player>(); Members.AllyPlayers = new List <Player>(); Members.EnemyPlayers = new List <Player>(); Members.BaseList = new List <Unit>(); Members.PAisHere = null; Members.BaraIsHere = false; Members.Apparition = false; Members.Mirana = null; Members.Windrunner = null; Updater.HeroList.Flush(); Updater.BaseList.Flush(); Updater.PlayerList.Flush(); Game.OnUpdate += Updater.HeroList.Update; Game.OnUpdate += Updater.PlayerList.Update; Game.OnUpdate += Updater.BaseList.Update; Game.OnUpdate += Devolp.ConsoleCommands; RoshanAction.Flush(); AutoItems.Flush(); Game.OnUpdate += RoshanAction.Roshan; Game.OnUpdate += Game_OnUpdate; DelayAction.Add(500, () => { Drawing.OnDraw += DrawHelper.Overlay; Drawing.OnDraw += ItemPanel.Draw; Drawing.OnDraw += NewItemPanel.OnDraw; ShowMeMore.Flush(); Drawing.OnDraw += ShowMeMore.Draw; }); Entity.OnParticleEffectAdded += ShowMeMore.Entity_OnParticleEffectAdded; Unit.OnModifierAdded += ShowMeMore.OnModifierAdded; Unit.OnModifierRemoved += ShowMeMore.OnModifierRemoved; Runes.Flush(); Drawing.OnDraw += Runes.Draw; Drawing.OnPreReset += DrawHelper.Render.Drawing_OnPreReset; Drawing.OnPostReset += DrawHelper.Render.Drawing_OnPostReset; Drawing.OnEndScene += DrawHelper.Render.Drawing_OnEndScene; Game.OnWndProc += Game_OnWndProc; AppDomain.CurrentDomain.DomainUnload += DrawHelper.Render.CurrentDomainDomainUnload; Game.OnFireEvent += RoshanAction.Game_OnGameEvent; Entity.OnInt32PropertyChange += VisionHelper.OnChange; Game.PrintMessage( "<font face='Comic Sans MS, cursive'><font color='#00aaff'>" + Members.Menu.DisplayName + " By Jumpering" + " loaded!</font> <font color='#aa0000'>v" + Assembly.GetExecutingAssembly().GetName().Version); Printer.PrintSuccess("> " + Members.Menu.DisplayName + " loaded v" + Assembly.GetExecutingAssembly().GetName().Version); /*Entity.OnParticleEffectAdded += Entity_OnParticleEffectAdded; * Drawing.OnDraw += Drawing_OnDraw;*/ DelayAction.Add(100, () => { try { if (Members.Menu.Item("Dev.CreepsDisabler.enable").GetValue <bool>()) { Game.ExecuteCommand("dota_creeps_no_spawning_enable"); } } catch (Exception) { Printer.Print("Members.Menu.AddToMainMenu();"); } }); }); }; Events.OnClose += (sender, args) => { Game.OnUpdate -= Updater.HeroList.Update; //Game.OnUpdate += Updater.PlayerList.Update; Game.OnUpdate -= Updater.BaseList.Update; Game.OnUpdate -= Devolp.ConsoleCommands; Game.OnUpdate -= RoshanAction.Roshan; Game.OnUpdate -= Game_OnUpdate; Entity.OnInt32PropertyChange -= VisionHelper.OnChange; Drawing.OnDraw -= DrawHelper.Overlay; Drawing.OnDraw -= ItemPanel.Draw; Drawing.OnDraw -= ShowMeMore.Draw; Entity.OnParticleEffectAdded -= ShowMeMore.Entity_OnParticleEffectAdded; Unit.OnModifierAdded -= ShowMeMore.OnModifierAdded; Unit.OnModifierRemoved -= ShowMeMore.OnModifierRemoved; Drawing.OnDraw -= Runes.Draw; Drawing.OnPreReset -= DrawHelper.Render.Drawing_OnPreReset; Drawing.OnPostReset -= DrawHelper.Render.Drawing_OnPostReset; Drawing.OnEndScene -= DrawHelper.Render.Drawing_OnEndScene; Game.OnWndProc -= Game_OnWndProc; AppDomain.CurrentDomain.DomainUnload -= DrawHelper.Render.CurrentDomainDomainUnload; Game.OnFireEvent -= RoshanAction.Game_OnGameEvent; Members.TopPanelPostiion.Clear(); Members.Heroes.Clear(); Members.EnemyHeroes.Clear(); Members.AllyHeroes.Clear(); Printer.PrintInfo("> " + Members.Menu.DisplayName + " unloaded"); VisionHelper.Flush(); }; }
private static void DrawSpellPanel(int type) { List <Hero> selectedHeroes = null; switch (type) { case 0: selectedHeroes = Manager.HeroManager.GetViableHeroes(); break; case 1: selectedHeroes = Manager.HeroManager.GetAllyViableHeroes(); break; case 2: selectedHeroes = Manager.HeroManager.GetEnemyViableHeroes(); break; } if (selectedHeroes == null) { return; } foreach (var v in selectedHeroes) { try { Vector2 mypos; if (!Drawing.WorldToScreen(v.Position, out mypos)) { continue; } if (mypos.X <= -5000 || mypos.X >= 5000) { continue; } if (mypos.Y <= -5000 || mypos.Y >= 5000) { continue; } var start = HUDInfo.GetHPbarPosition(v) + new Vector2(-Members.Menu.Item("spellPanel.ExtraPosX").GetValue <Slider>().Value, Members.Menu.Item("spellPanel.ExtraPosY").GetValue <Slider>().Value); var distBetweenSpells = Members.Menu.Item("spellPanel.distBetweenSpells").GetValue <Slider>().Value; var distBwtweenLvls = Members.Menu.Item("spellPanel.DistBwtweenLvls").GetValue <Slider>().Value; var sizeSpell = Members.Menu.Item("spellPanel.SizeSpell").GetValue <Slider>().Value; const int sizey = 9; var spells = Manager.HeroManager.GetAbilityList(v); //Members.AbilityDictionary[v.StoredName()]; if (spells == null || spells.Count == 0) { continue; } foreach (var spell in spells /*.Where(x => x.AbilitySlot.ToString() != "-1")*/) { var size2 = distBetweenSpells; var extrarange = spell.Level > 4 ? spell.Level - 4 : 0; size2 = (int)(size2 + extrarange * 7); var cd = spell.Cooldown; Drawing.DrawRect(start, new Vector2(size2, spell.AbilityState != AbilityState.OnCooldown ? sizey : 22), new ColorBGRA(0, 0, 0, 100)); Drawing.DrawRect(start, new Vector2(size2, spell.AbilityState != AbilityState.OnCooldown ? sizey : 22), new ColorBGRA(255, 255, 255, 100), true); if (spell.AbilityState == AbilityState.NotEnoughMana) { Drawing.DrawRect(start, new Vector2(size2, spell.AbilityState != AbilityState.OnCooldown ? sizey : 22), new ColorBGRA(0, 0, 150, 150)); } if (spell.AbilityState == AbilityState.OnCooldown) { var text = $"{cd:0.#}"; var textSize = Drawing.MeasureText(text, "Arial", new Vector2(10, 200), FontFlags.None); var textPos = start + new Vector2(10 - textSize.X / 2, -textSize.Y / 2 + 12); Drawing.DrawText(text, textPos, /*new Vector2(10, 150),*/ Color.White, FontFlags.AntiAlias | FontFlags.DropShadow); } if (spell.Level > 0) { for (var lvl = 1; lvl <= spell.Level; lvl++) { Drawing.DrawRect(start + new Vector2(distBwtweenLvls * lvl, sizey - 6), new Vector2(sizeSpell, sizey - 6), new ColorBGRA(255, 255, 0, 255)); } } start += new Vector2(size2, 0); } } catch { Printer.Print("[SpellPanel]: " + v.StoredName()); } } }
private static void DrawNetWorthBarStageOne(Vector2 startPos, Vector2 size) { if (Members.ItemDictionary.Count == 0) { return; } long radiantNetworh = 0, direNetwoth = 0; foreach (var v in Members.Heroes) { try { long worth; if (!Members.NetWorthDictionary.TryGetValue(v.StoredName(), out worth)) { continue; } /*var dividedWeStand = v.FindSpell("meepo_divided_we_stand") as DividedWeStand; * if (dividedWeStand != null && (v.ClassID == ClassID.CDOTA_Unit_Hero_Meepo) && dividedWeStand.UnitIndex > 0) * { * continue; * }*/ if (Members.MeepoIgnoreList.Contains(v)) { continue; } if (v.Team == Team.Radiant) { radiantNetworh += worth; } else { direNetwoth += worth; } } catch (Exception) { Printer.Print("[NetWorthBar][findMaxNetWorth]: " + v.StoredName()); continue; } } var percent = 100 * radiantNetworh / Math.Max(1, radiantNetworh + direNetwoth); var currentSize = size.X / 100 * percent; var lineSize = new Vector2(currentSize, size.Y); var endOfGreen = startPos + new Vector2(lineSize.X, 0); //var color2 = worth == maxWorth ? Color.Yellow : Color.Black; Color leftClr, rightClr; if (Members.MyPlayer.Team != Team.Radiant) { rightClr = GetNetworthBarColorForRadiant; leftClr = GetNetworthBarColorForDire; percent = 100 - percent; } else { leftClr = GetNetworthBarColorForRadiant; rightClr = GetNetworthBarColorForDire; } Drawing.DrawRect(startPos, lineSize, leftClr); Drawing.DrawRect(endOfGreen, new Vector2(size.X - lineSize.X, lineSize.Y), rightClr); Drawing.DrawRect(startPos, size, new Color(0, 0, 0, 255), true); var text = $"{percent}%"; var textSize = Drawing.MeasureText(text, "Arial", new Vector2((float)(size.Y * .95), size.Y / 2), FontFlags.AntiAlias); var textPos = endOfGreen - new Vector2(textSize.X / 2, /*lineSize.Y / 2 - textSize.Y / 2*/ 0); var coef = GetNetworthBarCoef / 10; if (IsDrawPercents) { Drawing.DrawText( text, textPos, new Vector2(textSize.Y, 0), Color.White, FontFlags.AntiAlias | FontFlags.StrikeOut); } if (IsDrawTeamWorth) { text = $"{radiantNetworh}"; Drawing.DrawText( text, startPos + new Vector2(0, size.Y), new Vector2(textSize.Y / coef, 0), Color.White, FontFlags.AntiAlias | FontFlags.StrikeOut); text = $"{direNetwoth}"; Drawing.DrawText( text, startPos + new Vector2(size.X - textSize.X / coef, size.Y), new Vector2(textSize.Y / coef, 0), Color.White, FontFlags.AntiAlias | FontFlags.StrikeOut); } }
private static void Drawing_OnDraw(EventArgs args) { if (!Checker.IsActive()) { return; } if (!IsEnable) { return; } if (InSys == null || InSys.Count == 0) { return; } var haveEb = InSys.Any( x => IsAbilityEnable(x.StoredName()) && x.StoredName() == "item_ethereal_blade" && x.CanBeCasted()); var haveVeil = InSys.Any( x => IsAbilityEnable(x.StoredName()) && x.StoredName() == "item_veil_of_discord" && x.CanBeCasted()); foreach (var v in Manager.HeroManager.GetEnemyViableHeroes()) { try { var pos = HUDInfo.GetHPbarPosition(v); if (pos.IsZero) { continue; } var extraDamage = haveEb && !v.HasModifier("modifier_item_ethereal_blade_ethereal") ? 40 : 0; extraDamage += haveVeil && !v.HasModifier("modifier_item_veil_of_discord_debuff") ? 25 : 0; var myDmg = InSys.Where(x => x.CanBeCasted() && IsAbilityEnable(x.StoredName())) .Sum( x => AbilityDamage.CalculateDamage(x, Members.MyHero, v, minusMagicResistancePerc: extraDamage)); var health = v.Health; var extraLife = (uint)(Manager.HeroManager.GetItemList(v) .Any(x => x.StoredName() == "item_infused_raindrop" && x.Cooldown <= 0) ? 120 : 0); if (extraLife > 100) { var needToCalcExtraLife = InSys.Any( x => x.DamageType == DamageType.Magical && AbilityDamage.CalculateDamage(x, Members.MyHero, v, minusMagicResistancePerc: haveEb ? 40 : 0) > 120); health += needToCalcExtraLife ? extraLife : 0; } var healthAfterShit = (int)(health - myDmg); var size = HUDInfo.GetHpBarSizeY(); var text = $"{healthAfterShit} ({(int) myDmg})"; var textSize = Drawing.MeasureText(text, "Arial", new Vector2((float)(size * 1.5), 500), FontFlags.AntiAlias); var textPos = pos + new Vector2(HUDInfo.GetHPBarSizeX() + 4, 0); var isEno = healthAfterShit < 0; var name = isEno ? "killableCol" : "defCol"; Drawing.DrawText( text, textPos, new Vector2(textSize.Y, 0), new Color(R(name), G(name), B(name), 255), FontFlags.AntiAlias | FontFlags.StrikeOut); } catch (Exception) { Printer.Print($"[DamageCalculation]: {v.StoredName()}"); } } }
private static void Drawing_OnDraw(EventArgs args) { if (!Checker.IsActive()) { return; } if (!IsEnable) { return; } List <Hero> selectedHeroes = null; switch (SelectedIndex) { case 0: selectedHeroes = Manager.HeroManager.GetViableHeroes(); break; case 1: selectedHeroes = Manager.HeroManager.GetAllyViableHeroes(); break; case 2: selectedHeroes = Manager.HeroManager.GetEnemyViableHeroes(); break; } if (selectedHeroes == null) { return; } foreach (var v in selectedHeroes) { try { var pos = HUDInfo.GetHPbarPosition(v); if (pos.IsZero) { continue; } var spells = Manager.HeroManager.GetAbilityList(v); pos += new Vector2(0, HUDInfo.GetHPBarSizeX()); pos += new Vector2(ExtraX, ExtraY); var counter = 0; var size = new Vector2(IconSize, IconSize); foreach (var ability in spells) { var itemPos = pos + new Vector2(-2 + size.X * counter, 2); Drawing.DrawRect(itemPos, size, Textures.GetSpellTexture(ability.StoredName())); Drawing.DrawRect(itemPos, size, Color.Black, true); var abilityState = ability.AbilityState; if (abilityState == AbilityState.NotEnoughMana) { Drawing.DrawRect(itemPos, size, new Color(0, 0, 155, 155)); var neededMana = ((int)Math.Min(Math.Abs(v.Mana - ability.ManaCost), 99)).ToString( CultureInfo.InvariantCulture); var textSize = Drawing.MeasureText(neededMana, "Arial", new Vector2( (float)(size.Y * TextSize), size.Y / 2), FontFlags.AntiAlias); var textPos = itemPos + new Vector2(/*size.X-textSize.X*/ 1, 0); Drawing.DrawRect(textPos - new Vector2(0, 0), new Vector2(textSize.X, textSize.Y), new Color(0, 0, 0, 200)); Drawing.DrawText( neededMana, textPos, new Vector2(textSize.Y, 0), Color.White, FontFlags.AntiAlias | FontFlags.StrikeOut); } if (abilityState != AbilityState.NotLearned) { var level = ability.Level; var levelString = level.ToString(); var textSize = Drawing.MeasureText(levelString, "Arial", new Vector2( (float)(size.Y * TextSizeLevel), size.Y / 2), FontFlags.AntiAlias); var textPos = itemPos + new Vector2(1, size.Y - textSize.Y); Drawing.DrawRect(textPos - new Vector2(0, 0), new Vector2(textSize.X, textSize.Y), new Color(0, 0, 0, 240)); Drawing.DrawText( levelString, textPos, new Vector2(textSize.Y, 0), Color.White, FontFlags.AntiAlias | FontFlags.StrikeOut); if (ability.IsInAbilityPhase) { Drawing.DrawRect(itemPos, size, new Color(255, 255, 50, 50)); } } else { Drawing.DrawRect(itemPos, size, new Color(0, 0, 0, 150)); } if (abilityState == AbilityState.OnCooldown) { var remTime = ability.Cooldown; var cooldown = Math.Min(remTime + 0.1, 99).ToString("0.0"); var textSize = Drawing.MeasureText(cooldown, "Arial", new Vector2( (float)(size.Y * TextSize), size.Y / 2), FontFlags.AntiAlias); var textPos = itemPos + new Vector2(0, 0); Drawing.DrawRect(textPos - new Vector2(1, 0), new Vector2(textSize.X, textSize.Y), new Color(0, 0, 0, 200)); Drawing.DrawText( cooldown, textPos, new Vector2(textSize.Y, 0), Color.White, FontFlags.AntiAlias | FontFlags.StrikeOut); } counter++; } } catch (Exception e) { Printer.Print($"[AbilityOverlay]: {v.StoredName()} : {e.HelpLink}"); } } }
private static void DrawStashItems(Vector2 pos, Vector2 size, int r, int g, int b) { var i = 0; if (Members.ItemDictionary.Count == 0) { return; } foreach (var v in Members.EnemyHeroes) { if (Members.MeepoIgnoreList.Contains(v)) { continue; } /*var dividedWeStand = v.FindSpell("meepo_divided_we_stand") as DividedWeStand; * if (dividedWeStand != null && v.ClassID == ClassID.CDOTA_Unit_Hero_Meepo && dividedWeStand.ID > 0) * continue;*/ List <Item> items; try { if (!Members.StashItemDictionary.TryGetValue(v.Handle, out items)) { continue; } } catch (Exception) { Printer.Print("[DrawStashItems]: " + v.StoredName()); continue; } var n = 0; var heroPos = pos + new Vector2(0, (size.Y / 7 + 3) * i + 2); foreach (var item in items) { try { var texturename = item.IsRecipe ? "materials/ensage_ui/items/recipe.vmat" : $"materials/ensage_ui/items/{item.Name.Replace("item_", "")}.vmat"; if (item is Bottle) { var bottletype = item as Bottle; if (bottletype.StoredRune != RuneType.None) { texturename = $"materials/ensage_ui/items/{item.Name.Replace("item_", "") + "_" + bottletype.StoredRune}.vmat"; } } var itemPos = heroPos + new Vector2(size.X / 7 * n + 5, 0); DrawItem(itemPos, size / 6, texturename, r, g, b); //DrawState(item, v, itemPos, size / 6); n++; } catch (Exception) { //Printer.Print("Hero: "+v.Name+". Item: "+item.Name); } } for (var j = 0; j < 6 - n; j++) { var itemPos = heroPos + new Vector2(size.X / 7 * (n + j) + 5, 0); DrawItem(itemPos, size / 6, "materials/ensage_ui/items/emptyitembg.vmat", r, g, b); } i++; } }
private static void DrawTopPanel(int type) { List <Hero> selectedHeroes = null; switch (type) { case 0: selectedHeroes = Manager.HeroManager.GetHeroes(); break; case 1: selectedHeroes = Members.AllyHeroes; break; case 2: selectedHeroes = Members.EnemyHeroes; break; } if (selectedHeroes == null) { return; } if (Members.Menu.Item("toppanel.Status.Enable").GetValue <bool>() || Members.Menu.Item("toppanel.Health.Enable").GetValue <bool>() || Members.Menu.Item("toppanel.Mana.Enable").GetValue <bool>()) { foreach (var v in selectedHeroes) { try { var pos = Helper.GetTopPanelPosition(v) + new Vector2(Members.Menu.Item("extraPos.X").GetValue <Slider>().Value, Members.Menu.Item("extraPos.Y").GetValue <Slider>().Value); var temp = HUDInfo.GetTopPanelSize(v); var size = new Vector2((float)temp[0], (float)temp[1]); var healthDelta = new Vector2(v.Health * size.X / v.MaximumHealth, 0); var manaDelta = new Vector2(v.Mana * size.X / v.MaximumMana, 0); DrawHealthPanel(pos, size, healthDelta); DrawManaPanel(pos, size, manaDelta); DrawStatus(pos, v, size); } catch (Exception) { Printer.Print($"[DrawTopPanel: selectedHeroes] --> {v!=null && v.IsValid}"); } } } if (!Members.Menu.Item("ultimate.Enable").GetValue <bool>()) { return; } /*if (!Members.Menu.Item("ultimate.Icon.Enable").GetValue<bool>() && * !Members.Menu.Item("ultimate.Info").GetValue<bool>() && * !Members.Menu.Item("ultimate.InfoAlways").GetValue<bool>()) return;*/ foreach (var v in Members.EnemyHeroes) { var ablist = Manager.HeroManager.GetAbilityList(v); if (ablist == null) { continue; } try { Ability ultimate; if (!Ultimate.TryGetValue(v.StoredName(), out ultimate)) { var spell = ablist.FirstOrDefault(x => x.IsAbilityType(AbilityType.Ultimate)); if (spell != null) { Ultimate.Remove(v.StoredName()); Ultimate.Add(v.StoredName(), spell); } continue; } if (ultimate == null || !ultimate.IsValid || ultimate.Level <= 0) { continue; } var pos = Helper.GetTopPanelPosition(v) + new Vector2(Members.Menu.Item("extraPos.X").GetValue <Slider>().Value, Members.Menu.Item("extraPos.Y").GetValue <Slider>().Value); var tempS = HUDInfo.GetTopPanelSize(v); var size = new Vector2((float)tempS[0], (float)tempS[1]); var ultPos = pos + new Vector2(size[0] / 2 - 5, size[1] + 1); string path; switch (ultimate.AbilityState) { case AbilityState.NotEnoughMana: path = "materials/ensage_ui/other/ulti_nomana.vmat"; break; case AbilityState.OnCooldown: path = "materials/ensage_ui/other/ulti_cooldown.vmat"; break; default: path = "materials/ensage_ui/other/ulti_ready.vmat"; break; } if (Members.Menu.Item("ultimate.Icon.Enable").GetValue <bool>()) { Drawing.DrawRect(ultPos, new Vector2(14, 14), Drawing.GetTexture(path)); } if (Members.Menu.Item("ultimate.Type").GetValue <StringList>().SelectedIndex == 0 && Members.Menu.Item("ultimate.Info").GetValue <bool>() && (Members.Menu.Item("ultimate.InfoAlways").GetValue <bool>() && ( ultimate.AbilityState == AbilityState.OnCooldown || ultimate.AbilityState == AbilityState.NotEnoughMana) || Utils.IsUnderRectangle(Game.MouseScreenPosition, ultPos.X, ultPos.Y, 15, 15))) { var texturename = $"materials/ensage_ui/spellicons/{ultimate.StoredName()}.vmat"; pos = Helper.GetTopPanelPosition(v); var startPos = pos + new Vector2(0, 7 * 4 + size.Y); size = new Vector2(size.X, size.Y + 15); Drawing.DrawRect(startPos, size, Textures.GetTexture(texturename)); string ultimateCd; Vector2 textSize; Vector2 textPos; switch (ultimate.AbilityState) { case AbilityState.OnCooldown: ultimateCd = ((int)Math.Min(ultimate.Cooldown, 999)).ToString(CultureInfo.InvariantCulture); textSize = Drawing.MeasureText(ultimateCd, "Arial", new Vector2((float)(size.Y * .50), size.Y / 2), FontFlags.AntiAlias); //Print(v.Name + " cd: " + ultimateCd); textPos = startPos + new Vector2(0, size.Y - textSize.Y); Drawing.DrawRect(textPos - new Vector2(0, 0), new Vector2(textSize.X, textSize.Y), new Color(0, 0, 0, 200)); Drawing.DrawText( ultimateCd, textPos, new Vector2(textSize.Y, 0), Color.White, FontFlags.AntiAlias | FontFlags.StrikeOut); if (Members.Menu.Item("ultimate.Icon.Extra.Enable").GetValue <bool>() && ultimate.ManaCost > v.Mana) { ultimateCd = ((int)Math.Min(Math.Abs(v.Mana - ultimate.ManaCost), 999)).ToString( CultureInfo.InvariantCulture); textSize = Drawing.MeasureText(ultimateCd, "Arial", new Vector2((float)(size.Y * .50), size.Y / 2), FontFlags.AntiAlias); textPos = startPos + new Vector2(size.X - textSize.X, 0); Drawing.DrawRect(textPos - new Vector2(0, 0), new Vector2(textSize.X, textSize.Y), new Color(0, 0, 0, 200)); Drawing.DrawText( ultimateCd, textPos, new Vector2(textSize.Y, 0), Color.White, FontFlags.AntiAlias | FontFlags.StrikeOut); Drawing.DrawRect(startPos, new Vector2(size.X, size.Y), new Color(0, 50, 155, 100)); } break; case AbilityState.NotEnoughMana: ultimateCd = ((int)Math.Min(Math.Abs(v.Mana - ultimate.ManaCost), 999)).ToString( CultureInfo.InvariantCulture); textSize = Drawing.MeasureText(ultimateCd, "Arial", new Vector2((float)(size.Y * .50), size.Y / 2), FontFlags.AntiAlias); textPos = startPos + new Vector2(size.X - textSize.X, 0); Drawing.DrawRect(textPos - new Vector2(0, 0), new Vector2(textSize.X, textSize.Y), new Color(0, 0, 0, 200)); Drawing.DrawText( ultimateCd, textPos, new Vector2(textSize.Y, 0), Color.White, FontFlags.AntiAlias | FontFlags.StrikeOut); Drawing.DrawRect(startPos, new Vector2(size.X, size.Y), new Color(0, 50, 155, 100)); break; } } else if (ultimate.AbilityState == AbilityState.OnCooldown) { pos = Helper.GetTopPanelPosition(v); var startPos = pos + new Vector2(0, 7 * 4 + size.Y); var cd = ultimate.Cooldown; var manaDelta = new Vector2(cd * size.X / ultimate.CooldownLength, 0); //size = new Vector2(manaDelta.X, 7); DrawUltimatePanel(startPos, size, manaDelta, (int)cd, Members.Menu.Item("ultimate.Line.Size").GetValue <Slider>().Value); /*Drawing.DrawRect(startPos, * size, Color.Yellow);*/ } } catch (Exception) { Printer.Print("[DrawTopPanel:ultimate] " + v.StoredName() + " Type: " + type); } } }
public static void Update(EventArgs args) { if (!Checker.IsActive()) { return; } if (!_courUpdater.Sleeping) { _courUpdater.Sleep(100); Members.CourList = ObjectManager.GetEntities <Courier>().Where(x => x.Team != Members.MyHero.Team).ToList(); foreach (var courier in Members.CourList) { if (Members.ItemDictionary.ContainsValue( courier.Inventory.Items.Where(x => x.IsValid).ToList())) { continue; } var items = courier.Inventory.Items.ToList(); Members.ItemDictionary.Remove(courier.Handle.ToString()); Members.ItemDictionary.Add(courier.Handle.ToString(), items.Where(x => x.IsValid).ToList()); } } if (!_heroUpdate.Sleeping) { /*foreach (var enemyHero in Members.EnemyHeroes) * { * var worth = enemyHero.Inventory.Items.Aggregate<Item, long>(0, (current, item) => current + item.Cost); * Printer.Print(enemyHero.Name + " --> " + worth); * }*/ _heroUpdate.Sleep(2000); if (Members.Heroes.Count < 10) { /*Members.Heroes = * Heroes.All.Where( * x => * x != null && x.IsValid && !x.IsIllusion && !IgnoreList.Contains(x.StoredName())).ToList();*/ Members.Heroes = HeroesList.All.Where( x => x != null && x.IsValid && !x.IsIllusion && !IgnoreList.Contains(x.StoredName())) .ToList(); /*Members.Heroes = * ObjectManager.GetEntities<Hero>().Where( * x => * x != null && x.IsValid && !x.IsIllusion && !IgnoreList.Contains(x.StoredName())).ToList();*/ Members.AllyHeroes = Members.Heroes.Where(x => x.Team == Members.MyHero.Team).ToList(); Members.EnemyHeroes = Members.Heroes.Where(x => x.Team == Members.MyHero.GetEnemyTeam()).ToList(); //Printer.Print($"Heroes.All: {Heroes.All.Count}; Members.Heroes: {Members.Heroes.Count}"); //Printer.Print("STATUS:[all] " + Members.Heroes.Count+ " [enemy] " + Members.EnemyHeroes.Count + " [ally] " + Members.AllyHeroes.Count); if (!Members.Apparition && Members.EnemyHeroes.Any(x => x.ClassID == ClassID.CDOTA_Unit_Hero_AncientApparition)) { Printer.Print("Apparition detected"); Members.Apparition = true; } if (Members.PAisHere == null && Members.EnemyHeroes.Any(x => x.ClassID == ClassID.CDOTA_Unit_Hero_PhantomAssassin)) { Printer.Print("PhantomAssss detected"); Members.PAisHere = Members.EnemyHeroes.FirstOrDefault(x => x.ClassID == ClassID.CDOTA_Unit_Hero_PhantomAssassin); } if (!Members.BaraIsHere && Members.EnemyHeroes.Any(x => x.ClassID == ClassID.CDOTA_Unit_Hero_SpiritBreaker)) { Printer.Print("BaraIsHere detected"); Members.BaraIsHere = true; } if (Members.Mirana == null && Members.EnemyHeroes.Any(x => x.ClassID == ClassID.CDOTA_Unit_Hero_Mirana)) { Printer.Print("Mirana detected"); Members.Mirana = Members.EnemyHeroes.FirstOrDefault(x => x.ClassID == ClassID.CDOTA_Unit_Hero_Mirana); } if (Members.Windrunner == null && Members.EnemyHeroes.Any(x => x.ClassID == ClassID.CDOTA_Unit_Hero_Windrunner)) { Printer.Print("Windrunner detected"); Members.Windrunner = Members.EnemyHeroes.FirstOrDefault(x => x.ClassID == ClassID.CDOTA_Unit_Hero_Windrunner); } if (Members.Invoker == null && Members.EnemyHeroes.Any(x => x.ClassID == ClassID.CDOTA_Unit_Hero_Invoker)) { Printer.Print("Invoker detected"); Members.Invoker = Members.EnemyHeroes.FirstOrDefault(x => x.ClassID == ClassID.CDOTA_Unit_Hero_Invoker); } if (Members.Kunkka == null && Members.EnemyHeroes.Any(x => x.ClassID == ClassID.CDOTA_Unit_Hero_Kunkka)) { Printer.Print("Kunkka detected"); Members.Kunkka = Members.EnemyHeroes.FirstOrDefault(x => x.ClassID == ClassID.CDOTA_Unit_Hero_Kunkka); } if (Members.Lina == null && Members.EnemyHeroes.Any(x => x.ClassID == ClassID.CDOTA_Unit_Hero_Lina)) { Printer.Print("Lina detected"); Members.Lina = Members.EnemyHeroes.FirstOrDefault(x => x.ClassID == ClassID.CDOTA_Unit_Hero_Lina); } if (Members.Leshrac == null && Members.EnemyHeroes.Any(x => x.ClassID == ClassID.CDOTA_Unit_Hero_Leshrac)) { Printer.Print("Leshrac detected"); Members.Leshrac = Members.EnemyHeroes.FirstOrDefault(x => x.ClassID == ClassID.CDOTA_Unit_Hero_Leshrac); } if (Members.LifeStealer == null && Members.EnemyHeroes.Any(x => x.ClassID == ClassID.CDOTA_Unit_Hero_Life_Stealer)) { Printer.Print("LifeStealer detected"); Members.LifeStealer = Members.EnemyHeroes.FirstOrDefault(x => x.ClassID == ClassID.CDOTA_Unit_Hero_Life_Stealer); } if (Members.Techies == null && Members.EnemyHeroes.Any(x => x.ClassID == ClassID.CDOTA_Unit_Hero_Techies)) { Printer.Print("Techies detected"); Members.Techies = Members.EnemyHeroes.FirstOrDefault(x => x.ClassID == ClassID.CDOTA_Unit_Hero_Techies); } if (Members.Tinker == null && Members.EnemyHeroes.Any(x => x.ClassID == ClassID.CDOTA_Unit_Hero_Tinker)) { Printer.Print("Tinker detected"); Members.Tinker = Members.EnemyHeroes.FirstOrDefault(x => x.ClassID == ClassID.CDOTA_Unit_Hero_Tinker); } if (Members.ArcWarden == null && Members.EnemyHeroes.Any(x => x.ClassID == ClassID.CDOTA_Unit_Hero_ArcWarden)) { Printer.Print("ArcWarden detected"); Members.ArcWarden = Members.EnemyHeroes.FirstOrDefault(x => x.ClassID == ClassID.CDOTA_Unit_Hero_ArcWarden); } } } if (!_updatePrediction.Sleeping /*&& Members.Menu.Item("lastPosition.Enable.Prediction").GetValue<bool>()*/) { _updatePrediction.Sleep(1); var time = Game.GameTime; foreach (var v in Members.EnemyHeroes.Where(x => x.IsAlive)) { if (v.IsVisible) { if (Members.PredictionTimes.ContainsKey(v.StoredName())) { Members.PredictionTimes.Remove(v.StoredName()); } } else { float test; if (!Members.PredictionTimes.TryGetValue(v.StoredName(), out test)) { Members.PredictionTimes.Add(v.StoredName(), time); } /*else * { * Members.PredictionTimes[v.StoredName()] = time; * }*/ } } } if (!_abilityUpdate.Sleeping) { _abilityUpdate.Sleep(1000); foreach (var hero in /*Members.Heroes */ Manager.HeroManager.GetViableHeroes()) { /*if ((hero.ClassID==ClassID.CDOTA_Unit_Hero_DoomBringer || hero.ClassID==ClassID.CDOTA_Unit_Hero_Rubick) && !hero.IsVisible) * continue;*/ try { if (!Members.AbilityDictionary.ContainsKey(hero.StoredName())) { Members.AbilityDictionary.Add(hero.StoredName(), hero.Spellbook.Spells.Where( x => x != null && x.IsValid && x.AbilityType != AbilityType.Attribute && x.AbilityType != AbilityType.Hidden && x.AbilitySlot.ToString() != "-1") .ToList()); } if ( !Members.AbilityDictionary.ContainsValue( hero.Spellbook.Spells.Where(x => x.AbilitySlot.ToString() != "-1").ToList())) { Members.AbilityDictionary.Remove(hero.StoredName()); Members.AbilityDictionary.Add(hero.StoredName(), hero.Spellbook.Spells.Where( x => x.IsValid && x.AbilityType != AbilityType.Attribute && x.AbilityType != AbilityType.Hidden && x.AbilitySlot.ToString() != "-1") .ToList()); } long worth = 0; Members.NetWorthDictionary.Remove(hero.StoredName()); if (!Members.ItemDictionary.ContainsValue( hero.Inventory.Items.Where(x => x.IsValid).ToList())) { var items = hero.Inventory.Items.ToList(); Members.ItemDictionary.Remove(hero.StoredName()); Members.ItemDictionary.Add(hero.StoredName(), items.Where(x => x.IsValid).ToList()); worth += items.Aggregate <Item, long>(0, (current, item) => current + item.Cost); } if ((Members.Menu.Item("itempanel.Stash.Enable").GetValue <bool>() || Members.Menu.Item("netWorth.Enable").GetValue <bool>()) && !Members.StashItemDictionary.ContainsValue( hero.Inventory.StashItems.Where(x => x.IsValid).ToList())) { var items = hero.Inventory.StashItems.ToList(); Members.StashItemDictionary.Remove(hero.StoredName()); Members.StashItemDictionary.Add(hero.StoredName(), items.Where(x => x.IsValid).ToList()); worth += items.Aggregate <Item, long>(0, (current, item) => current + item.Cost); } Members.NetWorthDictionary.Add(hero.StoredName(), worth); } catch (Exception) { Printer.Print("[UPDATER.ITEMS/ABILITY: ] " + hero.StoredName()); } } } }
private static void DrawPlayer(Vector2 pos, Vector2 size, int r, int g, int b) { var i = 0; if (Members.ItemDictionary.Count == 0) { return; } long maxWorth = 0; var PlayersWithWorth = new List <Hero>(); foreach (var v in Members.Heroes) { try { long worth; if (!Members.NetWorthDictionary.TryGetValue(v.StoredName(), out worth)) { continue; } if (maxWorth < worth) { maxWorth = worth; } PlayersWithWorth.Add(v); } catch (Exception) { Printer.Print("[NetWorth][findMaxNetWorth]: " + v.StoredName()); continue; } } if (Members.Menu.Item("netWorth.Order").GetValue <bool>()) { PlayersWithWorth = new List <Hero>(PlayersWithWorth.OrderByDescending(x => Members.NetWorthDictionary[x.StoredName()])); } foreach (var v in PlayersWithWorth) { long worth; try { if (!Members.NetWorthDictionary.TryGetValue(v.Name, out worth)) { continue; } } catch (Exception) { Printer.Print("[NetWorth]: " + v.StoredName()); continue; } var heroPos = pos + new Vector2(0, (size.Y / 10 + 3) * i + 2); Drawing.DrawRect(heroPos, size / 10, Textures.GetTexture("materials/ensage_ui/heroes_horizontal/" + v.StoredName().Substring("npc_dota_hero_".Length) + ".vmat")); var defaultSize = size.X - (size.X / 10 + 10); var percent = 100 * worth / Math.Max(1, maxWorth); var currentSize = defaultSize / 100 * percent; var color = v.Team == Members.MyHero.Team ? new Color(0, 155, 0, 155) : new Color(155, 0, 0, 155); var lineStartPos = heroPos + new Vector2(size.X / 10 + 5, 0); var lineSize = new Vector2(currentSize, size.Y / 10); //var color2 = worth == maxWorth ? Color.Yellow : Color.Black; Drawing.DrawRect(lineStartPos, lineSize, color); Drawing.DrawRect(lineStartPos, lineSize, Color.Black, true); var heroWorthText = worth.ToString(); var textSize = Drawing.MeasureText(heroWorthText, "Arial", new Vector2((float)(lineSize.Y * .95), lineSize.Y / 2), FontFlags.AntiAlias); var textPos = lineStartPos + new Vector2(2, lineSize.Y / 2 - textSize.Y / 2); Drawing.DrawText( heroWorthText, textPos, new Vector2(textSize.Y, 0), Color.White, FontFlags.AntiAlias | FontFlags.StrikeOut); i++; } }
private static void Drawing_OnDraw(EventArgs args) { if (!Checker.IsActive()) { return; } if (!IsEnable) { return; } if (InSys == null || InSys.Count == 0) { return; } var haveEb = InSys.Any( x => IsAbilityEnable(x.StoredName()) && x.StoredName() == "item_ethereal_blade" && x.CanBeCasted()); var haveVeil = InSys.Any( x => IsAbilityEnable(x.StoredName()) && x.StoredName() == "item_veil_of_discord" && x.CanBeCasted()); var myPhysDmg = 0f; if (Members.MyHero.ClassID == ClassID.CDOTA_Unit_Hero_MonkeyKing) { var extraMkAbility = Members.MyHero.FindSpell("special_bonus_unique_monkey_king", true)?.Level == 1; var passiveDmg = MkDmg[Members.MyHero.FindSpell("monkey_king_jingu_mastery", true).Level]; myPhysDmg = Members.MyHero.MinimumDamage + Members.MyHero.BonusDamage + (Members.MyHero.HasModifier("modifier_monkey_king_quadruple_tap_bonuses") ? passiveDmg : 0); var boundless = Members.MyHero.FindSpell("monkey_king_boundless_strike", true).Level; var coef = 1.2f + 0.20f * boundless; myPhysDmg *= extraMkAbility ? 3f : coef; } foreach (var v in Manager.HeroManager.GetEnemyViableHeroes()) { try { var pos = HUDInfo.GetHPbarPosition(v); if (pos.IsZero) { continue; } var extraDamage = haveEb && !v.HasModifier("modifier_item_ethereal_blade_ethereal") ? 40 : 0; extraDamage += haveVeil && !v.HasModifier("modifier_item_veil_of_discord_debuff") ? 25 : 0; var myDmg = InSys.Where(x => x.CanBeCasted() && IsAbilityEnable(x.StoredName())) .Sum( x => WhiteList.Contains(x.Name) ? Calculations.DamageTaken(v, myPhysDmg, DamageType.Physical, Members.MyHero) : AbilityDamage.CalculateDamage(x, Members.MyHero, v, minusMagicResistancePerc: extraDamage)); var health = v.Health; var extraLife = (uint)(Manager.HeroManager.GetItemList(v) .Any(x => x.StoredName() == "item_infused_raindrop" && x.Cooldown <= 0) ? 120 : 0); if (extraLife > 100) { var needToCalcExtraLife = InSys.Any( x => x.DamageType == DamageType.Magical && AbilityDamage.CalculateDamage(x, Members.MyHero, v, minusMagicResistancePerc: haveEb ? 40 : 0) > 120); health += needToCalcExtraLife ? extraLife : 0; } var healthAfterShit = (int)(health - myDmg); var size = HUDInfo.GetHpBarSizeY(); var text = $"{healthAfterShit} ({(int) myDmg})"; var textSize = Drawing.MeasureText(text, "Arial", new Vector2((float)(size * 1.5), 500), FontFlags.AntiAlias); var textPos = pos + new Vector2(HUDInfo.GetHPBarSizeX() + 4, 0); var isEno = healthAfterShit < 0; var name = isEno ? "killableCol" : "defCol"; Drawing.DrawText( text, textPos, new Vector2(textSize.Y, 0), new Color(R(name), G(name), B(name), 255), FontFlags.AntiAlias | FontFlags.StrikeOut); } catch (Exception) { Printer.Print($"[DamageCalculation]: {v.StoredName()}"); } } }