public static void Draw(EventArgs args) { if (!Checker.IsActive()) { return; } if (!Members.Menu.Item("showmemore.Enable").GetValue <bool>()) { return; } if (Members.Menu.Item("Cour.Enable").GetValue <bool>()) { foreach (var courier in Manager.BaseManager.GetViableCouriersList()) { var pos = Helper.WorldToMinimap(courier.Position); if (pos.IsZero) { continue; } var courType = courier.IsFlying ? "courier_flying" : "courier"; string name = $"materials/ensage_ui/other/{courType}.vmat"; Drawing.DrawRect(pos - new Vector2(7, 7), new Vector2(15, 15), Drawing.GetTexture(name)); } } 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 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; } /*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 (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 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" }))); spellPanel.AddItem(new MenuItem("spellPanel.distBetweenSpells", "Distance spells").SetValue(new Slider(36, 0, 200))); spellPanel.AddItem(new MenuItem("spellPanel.DistBwtweenLvls", "Distance lvls").SetValue(new Slider(6, 0, 200))); spellPanel.AddItem(new MenuItem("spellPanel.SizeSpell", "Level size").SetValue(new Slider(3, 1, 25))); spellPanel.AddItem(new MenuItem("spellPanel.ExtraPosX", "Extra Position X").SetValue(new Slider(25))); spellPanel.AddItem(new MenuItem("spellPanel.ExtraPosY", "Extra Position Y").SetValue(new Slider(125, 0, 400))); //=========================== 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.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.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)); 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)); 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 dangItem = new Menu("Dangerous items", "dangitems"); dangItem.AddItem(new MenuItem("dangitems.Enable", "Enable").SetValue(false)).SetTooltip("show if enemy has Dangerous items"); 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_ward_dispenser", true } }; dangItem.AddItem(new MenuItem("dangitems.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 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)); //=========================== 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(scan); settings.AddSubMenu(showIllusion); settings.AddSubMenu(runevision); settings.AddSubMenu(dangItem); settings.AddSubMenu(itemPanel); settings.AddSubMenu(autoItems); settings.AddSubMenu(lastPosition); settings.AddSubMenu(netWorth); Members.Menu.AddSubMenu(settings); Members.Menu.AddSubMenu(devolper); Members.Menu.AddToMainMenu(); 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.PAisHere = null; Members.BaraIsHere = false; Members.Apparition = false; Members.Mirana = null; Members.Windrunner = null; 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; 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); }; 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"); }; }
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 = HudInfoNew.GetTopPanelSize(v); //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; } float lastTime; if (v.IsVisible) { if (!LastTimeDictionary.TryGetValue(v.Handle, out lastTime)) { LastTimeDictionary.Add(v.Handle, Game.RawGameTime); } else { LastTimeDictionary[v.Handle] = Game.RawGameTime; } } else { LastTimeDictionary.TryGetValue(v.Handle, out lastTime); } 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 = HudInfoNew.GetTopPanelSize(v); //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)); } var cooldown = v.IsVisible ? ultimate.Cooldown : ultimate.Cooldown - Game.RawGameTime + lastTime; cooldown = Math.Max(0, cooldown); 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) + new Vector2(Members.Menu.Item("extraPos.X").GetValue <Slider>().Value, Members.Menu.Item("extraPos.Y").GetValue <Slider>().Value); 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(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) + new Vector2(Members.Menu.Item("extraPos.X").GetValue <Slider>().Value, Members.Menu.Item("extraPos.Y").GetValue <Slider>().Value); var startPos = pos + new Vector2(0, 7 * 4 + size.Y); var cd = 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); } } }
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 DrawItems(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.ItemDictionary.TryGetValue(v.Handle, out items)) { continue; } } catch (Exception) { Printer.Print("[DrawItems]: " + v.StoredName()); continue; } var heroPos = pos + new Vector2(0, (size.Y / 7 + 3) * i + 2); Drawing.DrawRect(heroPos, size / 7, Textures.GetTexture("materials/ensage_ui/heroes_horizontal/" + v.StoredName().Substring("npc_dota_hero_".Length) + ".vmat")); var n = 0; 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, 0) + 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, 0) + 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 OnDraw(EventArgs args) { if (!Checker.IsActive()) { return; } if (!Members.Menu.Item("itempanel.new.Enable").GetValue <bool>()) { return; } var startPos = new Vector2(Members.Menu.Item("itempanel.X").GetValue <Slider>().Value, Members.Menu.Item("itempanel.Y").GetValue <Slider>().Value); var size = new Vector2(Members.Menu.Item("itempanel.SizeX").GetValue <Slider>().Value, Members.Menu.Item("itempanel.SizeY").GetValue <Slider>().Value); var mPos = Game.MouseScreenPosition; if (Utils.IsUnderRectangle(Game.MouseScreenPosition, startPos.X, startPos.Y, size.X, size.Y)) { if (Members.IsClicked) { if (!Sleeper.Sleeping) { _globalDif = mPos - startPos; Sleeper.Sleep(500); } startPos = mPos - _globalDif; Members.Menu.Item("itempanel.X").SetValue(new Slider((int)startPos.X, 0, 2000)); Members.Menu.Item("itempanel.Y").SetValue(new Slider((int)startPos.Y, 0, 2000)); } } var r = Members.Menu.Item("itempanel.Red").GetValue <Slider>().Value; var g = Members.Menu.Item("itempanel.Green").GetValue <Slider>().Value; var b = Members.Menu.Item("itempanel.Blue").GetValue <Slider>().Value; if (Members.Menu.Item("itempanel.Stash.Enable").GetValue <bool>()) { if (Utils.IsUnderRectangle(Game.MouseScreenPosition, startPos.X + size.X, startPos.Y, size.X, size.Y)) { if (Members.IsClicked && !Toggler.Sleeping) { Toggler.Sleep(250); Members.Menu.Item("itempanel.Stash.Enable") .SetValue(!Members.Menu.Item("itempanel.Stash.Enable").GetValue <bool>()); } } } else if (Members.Menu.Item("itempanel.Button.Enable").GetValue <bool>()) { var togglePos = new Vector2(startPos.X + size.X, startPos.Y); var toggleSize = new Vector2(10, size.Y); Drawing.DrawRect(togglePos, toggleSize, new Color(r, g, b), true); if (Utils.IsUnderRectangle(Game.MouseScreenPosition, togglePos.X, togglePos.Y, toggleSize.X, toggleSize.Y)) { if (Members.IsClicked && !Toggler.Sleeping) { Toggler.Sleep(250); Members.Menu.Item("itempanel.Stash.Enable") .SetValue(!Members.Menu.Item("itempanel.Stash.Enable").GetValue <bool>()); } Drawing.DrawRect(togglePos + 1, toggleSize - 2, new Color(0, 155, 0, 100)); } } Drawing.DrawRect(startPos, size + new Vector2(2, 0), new Color(0, 0, 0, 100)); Drawing.DrawRect(startPos, size + new Vector2(1, 5), new Color(0, 0, 0, 50)); Drawing.DrawRect(startPos - new Vector2(1), size + new Vector2(3, 5), new Color(r, g, b), true); var i = 0; if (Members.ItemDictionary.Count == 0) { return; } var stageSize = new Vector2(size.X / 6f, size.Y / 5f); var itemSize = new Vector2(stageSize.X * 70 / 100f, stageSize.Y); foreach (var v in Members.EnemyHeroes.Where(v => !Members.MeepoIgnoreList.Contains(v))) { var items = Manager.HeroManager.GetItemList(v); var heroIconPos = startPos + new Vector2(2) + new Vector2(0, stageSize.Y * i++); Drawing.DrawRect(heroIconPos, stageSize, Textures.GetHeroTexture(v.StoredName())); Drawing.DrawRect(heroIconPos, stageSize, new Color(r, g, b), true); if (!items.Any()) { continue; } for (int j = 0; j < 7; j++) { var itemTexture = Textures.GetTexture("materials/ensage_ui/items/emptyitembg.vmat"); Item item = null; if (j < items.Count) { item = items[j]; var curItem = item; try { itemTexture = Textures.GetItemTexture(curItem.StoredName()); if (item is Bottle) { var bottletype = item as Bottle; if (bottletype.StoredRune != RuneType.None) { itemTexture = Textures.GetTexture( $"materials/ensage_ui/items/{item.Name.Replace("item_", "") + "_" + bottletype.StoredRune}.vmat"); } } } catch { //Printer.PrintError($"[ItemPanel]: {v.Name}/ count: {j}/ {item?.Name}"); } } var curPos = heroIconPos + new Vector2(stageSize.X + 2, 0) + new Vector2(j * stageSize.X * 70 / 100f, 0); Drawing.DrawRect(curPos, stageSize, itemTexture); Drawing.DrawRect(curPos, itemSize, new Color(r, g, b), true); if (item != null) { DrawState(item, v, curPos, itemSize); } if (Members.Menu.Item("itempanel.Stash.Enable").GetValue <bool>()) { List <Item> stashItems; try { if (!Members.StashItemDictionary.TryGetValue(v.Handle, out stashItems)) { continue; } } catch (Exception) { continue; } itemTexture = Textures.GetTexture("materials/ensage_ui/items/emptyitembg.vmat"); var k = j + 7; if (j < stashItems.Count) { item = stashItems[j]; var curItem = item; try { itemTexture = Textures.GetItemTexture(curItem.StoredName()); if (item is Bottle) { var bottletype = item as Bottle; if (bottletype.StoredRune != RuneType.None) { itemTexture = Textures.GetTexture( $"materials/ensage_ui/items/{item.Name.Replace("item_", "") + "_" + bottletype.StoredRune}.vmat"); } } } catch { Printer.PrintError($"[ItemPanel]: {v.Name}/ count: {j}/ {item?.Name}"); } } curPos = heroIconPos + new Vector2(stageSize.X + 10, 0) + new Vector2(k * stageSize.X * 70 / 100f, 0); Drawing.DrawRect(curPos, stageSize, itemTexture); Drawing.DrawRect(curPos, itemSize, new Color(r, g, b), true); } } } }
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); Members.ItemDictionary.Add(courier.Handle, 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.MeepoDivided != null ? Members.MeepoDivided.UnitCount - 1 : 0)) { /*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(); /*Printer.Print($"---------------"); * foreach (var source in Members.Heroes.Where(x=>x.ClassId == ClassId.CDOTA_Unit_Hero_Meepo)) * { * var hero = source as Meepo; * var isIllusion = hero.IsIllusion(); * if (hero != null) Printer.Print($"Hero({isIllusion}): {hero.Name}"); * }*/ /*Members.Heroes = * ObjectManager.GetEntities<Hero>().Where( * x => * x != null && x.IsValid && !x.IsIllusion && !IgnoreList.Contains(x.StoredName())).ToList();*/ foreach ( var meepo in Members.Heroes.Where( x => { var dividedWeStand = x.Spellbook.SpellR as DividedWeStand; return(dividedWeStand != null && !Members.MeepoIgnoreList.Contains(x) && x.ClassId == ClassId.CDOTA_Unit_Hero_Meepo && dividedWeStand.UnitIndex > 0); })) { Members.MeepoIgnoreList.Add(meepo); } 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); } //DividedWeStand if (Members.Meepo == null && Members.Heroes.Any(x => x.ClassId == ClassId.CDOTA_Unit_Hero_Meepo)) { Printer.Print("Meepo detected"); Members.Meepo = Members.Heroes.FirstOrDefault(x => x.ClassId == ClassId.CDOTA_Unit_Hero_Meepo); Members.MeepoDivided = (DividedWeStand)Members.Meepo.Spellbook.SpellR; } } } 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.Handle)) { Members.AbilityDictionary.Add(hero.Handle, 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.Handle); Members.AbilityDictionary.Add(hero.Handle, hero.Spellbook.Spells.Where( x => x.IsValid && x.AbilityType != AbilityType.Attribute && x.AbilityType != AbilityType.Hidden && x.AbilitySlot.ToString() != "-1") .ToList()); } long worth = 0; /*if ((hero.ClassId == ClassId.CDOTA_Unit_Hero_Meepo) && * (hero.FindSpell("meepo_divided_we_stand") as DividedWeStand).UnitIndex > 0) * { * continue; * }*/ if (Members.MeepoIgnoreList.Contains(hero)) { continue; } 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.Handle); Members.ItemDictionary.Add(hero.Handle, 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.Stash.Where(x => x.IsValid).ToList())) { var items = hero.Inventory.Stash.ToList(); Members.StashItemDictionary.Remove(hero.Handle); Members.StashItemDictionary.Add(hero.Handle, 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 Main() { /*Entity.OnParticleEffectAdded += (entity, eventArgs) => * { * var partName = eventArgs.Name; * var name = entity.Name; * if (partName.Contains("generic_hit_blood")) * Printer.Print("hit! to "+ name); * if (partName.Contains("generic_hit_blood")) * return; * if (partName.Contains("ui_mouse")) * return; * if (name.Contains("portrait")) * return; * DelayAction.Add(5, () => * { * var effect = eventArgs.ParticleEffect; * var pos = effect.Position; * var a = effect.GetControlPoint(0); * var senderpos = entity.NetworkPosition; * Printer.Print(name + ": " + partName + $"a: ({pos.PrintVector()}) b: ({a.PrintVector()}) c: ({senderpos.PrintVector()})"); * }); * * };*/ 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"); var page1 = new Menu("Page 1", "Page 1"); var page2 = new Menu("Page 2", "Page 2"); //=========================== 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.Rect.Enable", "Draw red box").SetValue(false)); 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.Icon.Enable", "Draw icon near hero").SetValue(false)); lifestealer.AddItem(new MenuItem("lifestealer.creeps.Enable", "Draw icon near creep").SetValue(false)); 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 courEsp = new Menu("Courier on Minimap", "Cour"); courEsp.AddItem(new MenuItem("Cour.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)); showIllusion.AddItem( new MenuItem("showillusion.Type", "Type").SetValue(new StringList(new[] { "Smoke", "new 1", "new 2", "balloons" }, 2))); showIllusion.AddItem(new MenuItem("showillusion.X", "Red").SetValue(new Slider(255, 0, 255)).SetFontColor(Color.Red)); showIllusion.AddItem(new MenuItem("showillusion.Y", "Green").SetValue(new Slider(255, 0, 255)).SetFontColor(Color.Green)); showIllusion.AddItem(new MenuItem("showillusion.Z", "Blue").SetValue(new Slider(255, 0, 255)).SetFontColor(Color.Blue)); showIllusion.AddItem(new MenuItem("showillusion.Alpha", "Alpha").SetValue(new Slider(40, 0, 255))); showIllusion.AddItem(new MenuItem("showillusion.Size", "Size").SetValue(new Slider(120, 1, 250))); //=========================== 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)); itemOverlay.AddItem(new MenuItem("itemOverlay.Cour", "Enable for couriers").SetValue(true)).SetTooltip("only for enemy"); var tpCatcher = new Menu("TP Catcher", "TpCather"); tpCatcher.AddItem(new MenuItem("TpCather.Enable", "Enable").SetValue(true)); tpCatcher.AddItem(new MenuItem("TpCather.Ally", "For Ally").SetValue(true)); tpCatcher.AddItem(new MenuItem("TpCather.Enemy", "For Enemy").SetValue(true)); tpCatcher.AddItem(new MenuItem("TpCather.Map", "Draw on Map").SetValue(true)); tpCatcher.AddItem(new MenuItem("TpCather.MiniMap", "Draw on MiniMap").SetValue(true)); tpCatcher.AddItem( new MenuItem("TpCather.MiniMap.Type", "Draw on MiniMap Hero Icon or Rectangle").SetValue(true)) .SetTooltip("true=icon; false=rectangle"); tpCatcher.AddItem(new MenuItem("TpCather.MiniMap.Size", "MiniMap Size").SetValue(new Slider(20, 5, 30))); tpCatcher.AddItem(new MenuItem("TpCather.Map.Size", "Map Size").SetValue(new Slider(50, 5, 50))); /*var hitCather = new Menu("Hit Catcher", "HitCatcher"); * hitCather.AddItem(new MenuItem("HitCatcher.Enable", "Enable").SetValue(true)); * hitCather.AddItem(new MenuItem("HitCatcher.Map", "Draw on Map").SetValue(true)); * hitCather.AddItem(new MenuItem("HitCatcher.MiniMap", "Draw on MiniMap").SetValue(true)); * hitCather.AddItem(new MenuItem("HitCatcher.DrawLineOnMap", "Draw Line on Map").SetValue(true));*/ var manaBars = new Menu("Manabars", "manaBars"); manaBars.AddItem(new MenuItem("manaBars.Enable", "Enable").SetValue(true)); manaBars.AddItem(new MenuItem("manaBars.Nums.Enable", "Enable digital values").SetValue(true)); manaBars.AddItem(new MenuItem("manaBars.Nums.Size", "Dig Size").SetValue(new Slider(75, 1, 150))); 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)); autoItems.AddItem(new MenuItem("autoItems.Percent", "Health(%) for auto stick").SetValue(new Slider(15))); autoItems.AddItem(new MenuItem("autoItems.Percent2", "Mana(%) for auto stick").SetValue(new Slider(15))); var autoitemlist = new Dictionary <string, bool> { { "item_magic_wand", true }, { "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.Abilities", "Abilities: ").SetValue(new AbilityToggler(new Dictionary <string, bool>()))); var defCol = new Menu("Default Color", "clrDef"); var killableCol = new Menu("Color, When skills damage is enough", "clrEno"); defCol.AddItem(new MenuItem("defCol.Red", "Red").SetValue(new Slider(255, 0, 255)).SetFontColor(Color.Red)); defCol.AddItem(new MenuItem("defCol.Green", "Green").SetValue(new Slider(255, 0, 255)).SetFontColor(Color.Green)); defCol.AddItem(new MenuItem("defCol.Blue", "Blue").SetValue(new Slider(255, 0, 255)).SetFontColor(Color.Blue)); killableCol.AddItem(new MenuItem("killableCol.Red", "Red").SetValue(new Slider(255, 0, 255)).SetFontColor(Color.Red)); killableCol.AddItem(new MenuItem("killableCol.Green", "Green").SetValue(new Slider(100, 0, 255)).SetFontColor(Color.Green)); killableCol.AddItem(new MenuItem("killableCol.Blue", "Blue").SetValue(new Slider(100, 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)); devolper.AddItem(new MenuItem("Dev.CreepsDisabler.enable", "Disable spawn creeps").SetValue(false)) .ValueChanged += (sender, args) => { var type = args.GetNewValue <bool>() ? "enable" : "disable"; Game.ExecuteCommand($"dota_creeps_no_spawning_{type}"); }; //=========================== spellPanel.AddSubMenu(oldMethod); spellPanel.AddSubMenu(newMethod); topPanel.AddSubMenu(ultimate); topPanel.AddSubMenu(health); topPanel.AddSubMenu(mana); topPanel.AddSubMenu(status); topPanel.AddSubMenu(extraPos); page1.AddSubMenu(topPanel); page1.AddSubMenu(spellPanel); page1.AddSubMenu(roshanTimer); page1.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); showMeMore.AddSubMenu(courEsp); page1.AddSubMenu(showIllusion); page1.AddSubMenu(runevision); //settings.AddSubMenu(dangItem); settings.AddSubMenu(page1); settings.AddSubMenu(page2); page1.AddSubMenu(itemPanel); page1.AddSubMenu(itemOverlay); page2.AddSubMenu(manaBars); page2.AddSubMenu(autoItems); page2.AddSubMenu(lastPosition); page2.AddSubMenu(netWorth); page2.AddSubMenu(dmgCalc); page2.AddSubMenu(tpCatcher); dmgCalc.AddSubMenu(defCol); dmgCalc.AddSubMenu(killableCol); 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.MyClass = Members.MyHero.ClassID; Members.MyPlayer = ObjectManager.LocalPlayer; 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; Drawing.OnDraw += DrawHelper.Overlay; Drawing.OnDraw += ItemPanel.Draw; 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 += 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); /*Entity.OnParticleEffectAdded += Entity_OnParticleEffectAdded; * Drawing.OnDraw += Drawing_OnDraw;*/ try { Members.Menu.AddToMainMenu(); 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; 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 -= 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 async void PartyFake() { Log.Debug("starting fake"); if (true) { _loaded = true; for (uint i = 0; i < 10; i++) { try { Printer.PrintSuccess(new string('-', Console.BufferWidth)); uint steamId = 105248644; Log.Debug($"Player({i}): {"FAKE"} => id: {steamId}"); if (steamId <= 10) { Log.Error("Wrong steam id!"); continue; } var test = await FindWinRateAsync(steamId); if (test < 0 || test > 100) { Log.Error("Cant load this player!"); continue; } var playerReq = await GetPlayerAsync(steamId); var wr = await FindFullWinRateAsync(steamId); //var accName = GetValue("personaname\":", playerReq); int estimate = 0; int stdDev = 0; int solo = 0; int party = 0; string country = ""; string possibleMmr = ""; string matches = ""; /*int estimate = Convert.ToInt32(GetValue("estimate\":", playerReq)); * int stdDev = Convert.ToInt32(GetValue("stdDev\":", playerReq)); * int solo = Convert.ToInt32(GetValue("solo_competitive_rank\":", playerReq)); * int party = Convert.ToInt32(GetValue("competitive_rank\":", playerReq)); * var country = GetValue("loccountrycode\":", playerReq); * var possibleMmr = $"{estimate - stdDev}-{estimate + stdDev}";*/ try { //Console.WriteLine("estimate: "+ GetValue("estimate\":", playerReq)); estimate = Convert.ToInt32(GetValue("{\"estimate\":", playerReq)); } catch (Exception) { //Log.Error("1"); } try { var item = GetValue("stdDev\":", playerReq); item = item.Substring(0, item.IndexOf(".", StringComparison.Ordinal)); stdDev = Convert.ToInt32(item); } catch (Exception) { //Log.Error("2"); } try { var item = GetValue("solo_competitive_rank\":", playerReq); solo = Convert.ToInt32(item /*.Substring(1, item.Length - 2)*/); } catch (Exception) { //Log.Error("3"); } try { var item = GetValue("\"competitive_rank\":", playerReq); party = Convert.ToInt32(item /*.Substring(1, item.Length - 2)*/); } catch (Exception) { //Log.Error("4"); } try { country = GetValue("loccountrycode\":", playerReq); } catch (Exception) { //Log.Error("5"); } try { possibleMmr = $"{estimate - stdDev}-{estimate + stdDev}"; } catch (Exception) { //Log.Error("6"); } try { matches = await FindMatches(steamId); } catch (Exception) { //Log.Error("7"); } //Log.Debug("test: "+ matches); PlayerInfoList.Add(new PlayerInfo((int)i, solo, party, country, possibleMmr, wr, matches, "FAKE " + i)); Log.Debug( $"[WinRate: {wr}] [solo: {solo}] [party {party}] [estimate mmr: {possibleMmr}] [{country}] history: {matches}"); //var success = await TryToFindPlayerAsync(player.Name); //var success = TryToFindPlayer(player.Name); /*Log.Debug($"Try To Find player with search API -> player({i}): " + player.Name + " -> (steamId)" + * player.PlayerSteamID + * $" -> success: {success.Length != 2} bufferSize [{success.Length}]"); * * if (success.Length != 2) * { * var accId = GetValue("account_id\":", success); * var accName = GetValue("personaname\":", success); * Log.Debug("id: " + accId); * Log.Debug("personaname: " + accName); * Log.Debug("wr: " + FindWinRate(Convert.ToUInt32(accId)) + "%"); * //Log.Debug("GetPlayer: " + GetPlayer(accId)); * } * else * { * Log.Debug($"cant find {player.Name}!"); * }*/ } catch (Exception e) { Log.Debug($"error with player: ({i}) -> {e}"); } } } Log.Debug("ending fake"); }
private static async void Beeeeaaaaaar() { for (uint i = 0; i < Game.MaximumClients; i++) { var player = ObjectManager.GetPlayerById(i); if (player == null || !player.IsValid || player.IsFakeClient) { continue; } try { Printer.PrintSuccess(new string('-', Console.BufferWidth)); var steamId = player.PlayerSteamId; Log.Debug($"Player({i}): {player.Name} => id: {steamId}"); if (steamId <= 10) { Log.Error("Wrong steam id!"); continue; } var test = await FindWinRateAsync(steamId); if (test < 0 || test > 100) { Log.Error("Cant load this player!"); continue; } var playerReq = await GetPlayerAsync(steamId); var wr = await FindFullWinRateAsync(steamId); //var accName = GetValue("personaname\":", playerReq); int estimate = 0; int stdDev = 0; int solo = 0; int party = 0; string country = ""; string possibleMmr = ""; string matches = ""; string infoAboutHero = ""; /*int estimate = Convert.ToInt32(GetValue("estimate\":", playerReq)); * int stdDev = Convert.ToInt32(GetValue("stdDev\":", playerReq)); * int solo = Convert.ToInt32(GetValue("solo_competitive_rank\":", playerReq)); * int party = Convert.ToInt32(GetValue("competitive_rank\":", playerReq)); * var country = GetValue("loccountrycode\":", playerReq); * var possibleMmr = $"{estimate - stdDev}-{estimate + stdDev}";*/ try { //Console.WriteLine("estimate: "+ GetValue("estimate\":", playerReq)); estimate = Convert.ToInt32(GetValue("{\"estimate\":", playerReq)); } catch (Exception) { //Log.Error("1"); } try { var item = GetValue("stdDev\":", playerReq); item = item.Substring(0, item.IndexOf(".", StringComparison.Ordinal)); stdDev = Convert.ToInt32(item); } catch (Exception) { //Log.Error("2"); } try { var item = GetValue("solo_competitive_rank\":", playerReq); solo = Convert.ToInt32(item /*.Substring(1, item.Length - 2)*/); } catch (Exception) { //Log.Error("3"); } try { var item = GetValue("\"competitive_rank\":", playerReq); party = Convert.ToInt32(item /*.Substring(1, item.Length - 2)*/); } catch (Exception) { //Log.Error("4"); } try { country = GetValue("loccountrycode\":", playerReq); } catch (Exception) { //Log.Error("5"); } try { possibleMmr = $"{estimate - stdDev}-{estimate + stdDev}"; } catch (Exception) { //Log.Error("6"); } try { matches = await FindMatches(steamId); } catch (Exception) { //Log.Error("7"); } try { infoAboutHero = await FindInfoAboutHero(steamId, (uint)player.Hero.HeroId); } catch (Exception) { //Log.Error("8"); } //Log.Debug("test: "+ matches); Log.Debug( $"[WinRate: {wr}] [solo: {solo}] [party {party}] [estimate mmr: {possibleMmr}] [{country}] history: {matches}"); string totalGames = ""; string wins = ""; try { totalGames = GetValue("games", infoAboutHero).TrimStart(':'); } catch (Exception) { } try { wins = GetValue("win", infoAboutHero).TrimStart(':'); } catch (Exception) { } var wrOnCurrentHero = 0; try { wrOnCurrentHero = (int)((float)Convert.ToInt32(wins) / Convert.ToInt32(totalGames) * 100.0f); } catch (Exception) { } try { Log.Debug( $"[Hero: {player?.Hero?.GetRealName()} -> [Games {totalGames}] [Wins {wins}] [WR {wrOnCurrentHero}%]"); } catch (Exception) { } PlayerInfoList.Add(new PlayerInfo((int)i, solo, party, country, possibleMmr, wr, matches, player?.Name, player?.Hero, totalGames, wins, wrOnCurrentHero)); } catch (Exception e) { Log.Debug($"error with player: {player.Name} ({i}) -> {e}"); } } }
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); } 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}"); } } }
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.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"); } } }
public static void Update(EventArgs args) { if (!Checker.IsActive()) { return; } 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.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)) { 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()); } } } }