public static void Init() { ui = new EzGUI(Drawing.Width - 350, 60, "AutoArmlet " + VERSION); enabled = new EzElement(ElementType.CHECKBOX, "Enabled / Активен", true); enabledAuto = new EzElement(ElementType.CHECKBOX, "Auto Toggle / Авто армлет [without key]", false); keys = new EzElement(ElementType.CATEGORY, "Key / Клавиша", false); for (int i = 65; (i >= 65 && i <= 91); i++) { if (i == 91) { i = 32; } EzElement element = new EzElement(ElementType.CHECKBOX, ((char)i).ToString(), false); if (i == 32) { element.Content = "SPACE"; } if ((char)i == 'F') { element.isActive = true; } keys.AddElement(element); keyDic.Add(i, element); } ui.AddMainElement(enabled); ui.AddMainElement(enabledAuto); ui.AddMainElement(new EzElement(ElementType.TEXT, "Other / Прочее", true)); ui.AddMainElement(keys); Game.OnUpdate += Game_OnUpdate; Game.OnWndProc += Game_OnWndProc; }
static void Main(string[] args) { Game.OnUpdate += Game_OnUpdate; Game.OnWndProc += Game_OnWndProc; txt = new Font( Drawing.Direct3DDevice9, new FontDescription { FaceName = "Tahoma", Height = 12, OutputPrecision = FontPrecision.Default, Quality = FontQuality.Default }); not = new Font( Drawing.Direct3DDevice9, new FontDescription { FaceName = "Tahoma", Height = 20, OutputPrecision = FontPrecision.Default, Quality = FontQuality.Default }); gui = new EzGUI(200, 570, "Broodmother#"); toggle = new EzElement(ElementType.CHECKBOX, "Enabled", true); toggleQ = new EzElement(ElementType.CHECKBOX, "Toggle Q", true); toggleLasthit = new EzElement(ElementType.CHECKBOX, "Toggle Lasthit", true); combo = new EzElement(ElementType.CATEGORY, "Combo", true); toggles = new EzElement(ElementType.CATEGORY, "Toggles", true); chasing = new EzElement(ElementType.CHECKBOX, "Chasing", true); combing = new EzElement(ElementType.CHECKBOX, "Combing", true); chasingDisplay = new EzElement(ElementType.TEXT, "Press " + keyCHASING + " for Chasing", false); combingDisplay = new EzElement(ElementType.TEXT, "Press " + keyCOMBO + " for Combing", false); gui.AddMainElement(toggle); gui.AddMainElement(toggles); toggles.AddElement(toggleQ); toggles.AddElement(toggleLasthit); gui.AddMainElement(combo); combo.AddElement(chasing); combo.AddElement(chasingDisplay); combo.AddElement(combing); combo.AddElement(combingDisplay); }
private static void CreateInterface() { Interface = new EzGUI(Drawing.Width - 350, 60, AName); Interface.AddMainElement(new EzElement(ElementType.TEXT, "Main", false)); Enabled = new EzElement(ElementType.CHECKBOX, "Enabled", true); Interface.AddMainElement(Enabled); Interface.AddMainElement(new EzElement(ElementType.TEXT, "Options", false)); // Creeps var creepsCategory = new EzElement(ElementType.CATEGORY, "Creeps", false); CreepsFarm = new EzElement(ElementType.CHECKBOX, "Farm", true); CKillIndicator = new EzElement(ElementType.CHECKBOX, "Marker [-FPS]", true); CKillCountIndicator = new EzElement(ElementType.CHECKBOX, "Show required stacks [-FPS]", false); CKillOnlyRange = new EzElement(ElementType.CHECKBOX, "Farm only in shadow poison range [+FPS]", true); creepsCategory.AddElement(CreepsFarm); creepsCategory.AddElement(CKillIndicator); creepsCategory.AddElement(CKillCountIndicator); creepsCategory.AddElement(CKillOnlyRange); // Heroes var heroesCategory = new EzElement(ElementType.CATEGORY, "Heroes", false); HeroKill = new EzElement(ElementType.CHECKBOX, "Kill", false); HKillIndicator = new EzElement(ElementType.CHECKBOX, "Marker [-FPS]", false); HKillCountIndicator = new EzElement(ElementType.CHECKBOX, "Show required stacks [-FPS]", false); HKillOnlyRange = new EzElement(ElementType.CHECKBOX, "Kill only in shadow poison range [+FPS]", true); heroesCategory.AddElement(HeroKill); heroesCategory.AddElement(HKillIndicator); heroesCategory.AddElement(HKillCountIndicator); heroesCategory.AddElement(HKillOnlyRange); // Interface.AddMainElement(creepsCategory); Interface.AddMainElement(heroesCategory); Interface.AddMainElement(new EzElement(ElementType.TEXT, "Version: " + Release, false)); // offset :3 }
public static void Init() { Interface = new EzGUI(Drawing.Width - 350, 60, "Ez Unit Control"); Interface.AddMainElement(new EzElement(ElementType.TEXT, "Main", false)); Enabled = new EzElement(ElementType.CHECKBOX, "Enabled", true); Interface.AddMainElement(Enabled); Interface.AddMainElement(new EzElement(ElementType.TEXT, "Main options", false)); UseAbilities = new EzElement(ElementType.CHECKBOX, "Use abilities", true); AttackTarget = new EzElement(ElementType.CHECKBOX, "Attack target (if can)", true); Interface.AddMainElement(AttackTarget); Interface.AddMainElement(UseAbilities); var Moving = new EzElement(ElementType.CATEGORY, "Moving", false); MoveTheSameWayAsHero = new EzElement(ElementType.CHECKBOX, "Move the same way as hero if no target", true); FollowIfNoTarget = new EzElement(ElementType.CHECKBOX, "Follow my hero if no target", false); Moving.AddElement(MoveTheSameWayAsHero); Moving.AddElement(FollowIfNoTarget); MoveTuskSigil = new EzElement(ElementType.CHECKBOX, "Move Tusk Sigil", true); Moving.AddElement(MoveTuskSigil); Interface.AddMainElement(Moving); var Abilities = new EzElement(ElementType.CATEGORY, "Abilities", false); var stoneForms = new EzElement(ElementType.CATEGORY, "StoneForms [Visage]", false); UseStoneForm = new EzElement(ElementType.CHECKBOX, "Use StoneForm", true); stoneForms.AddElement(UseStoneForm); Abilities.AddElement(stoneForms); var primalForms = new EzElement(ElementType.CATEGORY, "PrimalForms [Brewmaster]", false); PrimalForms = new EzElement(ElementType.CHECKBOX, "Use abilities", true); UseHurlBoulder = new EzElement(ElementType.CHECKBOX, "Use Hurl Boulder [EARTH]", true); UseThunderClap = new EzElement(ElementType.CHECKBOX, "Use Thunder Clap [EARTH]", true); UseDispelMagic = new EzElement(ElementType.CHECKBOX, "Use Dispel Magic [STORM]", true); UseCyclone = new EzElement(ElementType.CHECKBOX, "Use Cyclone [STORM]", true); UseDrunkenHaze = new EzElement(ElementType.CHECKBOX, "Use Drunken Haze [STORM]", true); primalForms.AddElement(PrimalForms); primalForms.AddElement(UseHurlBoulder); primalForms.AddElement(UseThunderClap); primalForms.AddElement(UseDispelMagic); primalForms.AddElement(UseCyclone); primalForms.AddElement(UseDrunkenHaze); Abilities.AddElement(primalForms); var neutrals = new EzElement(ElementType.CATEGORY, "Neutrals", false); UseHeal = new EzElement(ElementType.CHECKBOX, "Use Heal [Priest]", true); PriestsHealHero = new EzElement(ElementType.CHECKBOX, "Priests heal hero [Priest]", true); UseIceArmor = new EzElement(ElementType.CHECKBOX, "Use Ice Armor on allied heroes [Ogre Magi]", true); UseIceArmorAllies = new EzElement(ElementType.CHECKBOX, "Use Ice Armor on creeps (his) [Ogre Magi]", false); PriestsHealAlliesCreeps = new EzElement(ElementType.CHECKBOX, "Priests heal allied units (controllable) [Priest]", false); UseChainLightning = new EzElement(ElementType.CHECKBOX, "Use Chain Lightning [Harpy Storm]", true); UseSlam = new EzElement(ElementType.CHECKBOX, "Use Slam [Big Thunder Lizard]", true); UseFrenzy = new EzElement(ElementType.CHECKBOX, "Use Frenzy [Big Thunder Lizard]", true); UseNThunderClap = new EzElement(ElementType.CHECKBOX, "Use Thunder Clap [Ursa Warrior]", true); UseEnsnare = new EzElement(ElementType.CHECKBOX, "Use Ensnare [Troll Warlord]", true); UseWarStomp = new EzElement(ElementType.CHECKBOX, "Use War Stomp [Centaur Khan]", true); UseShockWave = new EzElement(ElementType.CHECKBOX, "Use ShockWave [Hellcaller]", true); neutrals.AddElement(UseHeal); neutrals.AddElement(PriestsHealHero); neutrals.AddElement(PriestsHealAlliesCreeps); neutrals.AddElement(UseIceArmor); neutrals.AddElement(UseIceArmorAllies); neutrals.AddElement(UseChainLightning); neutrals.AddElement(UseSlam); neutrals.AddElement(UseFrenzy); neutrals.AddElement(UseNThunderClap); neutrals.AddElement(UseEnsnare); neutrals.AddElement(UseWarStomp); neutrals.AddElement(UseShockWave); Abilities.AddElement(neutrals); var necronomicon = new EzElement(ElementType.CATEGORY, "Necronomicon", false); UseArcherManaBurn = new EzElement(ElementType.CHECKBOX, "Use Mana Burn [ARCHER]", true); necronomicon.AddElement(UseArcherManaBurn); Abilities.AddElement(necronomicon); Interface.AddMainElement(Abilities); Interface.AddMainElement(new EzElement(ElementType.TEXT, "Chasing", false)); Chasing = new EzElement(ElementType.CHECKBOX, "Current ChasingKey: " + Utils.KeyToText(ChasingKey), false); Interface.AddMainElement(Chasing); Interface.AddMainElement(new EzElement(ElementType.TEXT, "Info", false)); Target = new EzElement(ElementType.TEXT, "Current Target: None", false); Interface.AddMainElement(Target); Interface.AddMainElement(new EzElement(ElementType.TEXT, "Version: 1.0.0.5", true)); SupportedUnits.Add(ClassID.CDOTA_BaseNPC_Invoker_Forged_Spirit); SupportedUnits.Add(ClassID.CDOTA_BaseNPC_Warlock_Golem); SupportedUnits.Add(ClassID.CDOTA_BaseNPC_Venomancer_PlagueWard); SupportedUnits.Add(ClassID.CDOTA_Unit_Brewmaster_PrimalEarth); SupportedUnits.Add(ClassID.CDOTA_Unit_Brewmaster_PrimalFire); SupportedUnits.Add(ClassID.CDOTA_Unit_Brewmaster_PrimalStorm); SupportedUnits.Add(ClassID.CDOTA_Unit_Broodmother_Spiderling); SupportedUnits.Add(ClassID.CDOTA_BaseNPC_Creep); SupportedUnits.Add(ClassID.CDOTA_BaseNPC_Creep_Lane); SupportedUnits.Add(ClassID.CDOTA_Unit_VisageFamiliar); SupportedUnits.Add(ClassID.CDOTA_BaseNPC_Tusk_Sigil); SupportedUnits.Add(ClassID.CDOTA_Unit_SpiritBear); SupportedUnits.Add(ClassID.CDOTA_NPC_WitchDoctor_Ward); SupportedUnits.Add(ClassID.CDOTA_BaseNPC_ShadowShaman_SerpentWard); SupportedUnits.Add(ClassID.CDOTA_BaseNPC_Creep_Neutral); Game.OnUpdate += Game_OnUpdate; Player.OnExecuteOrder += Player_OnExecuteOrder; Game.OnWndProc += Game_OnWndProc; }
static void Game_OnUpdate(EventArgs args) { if (!Game.IsInGame) { loaded = false; return; } if (Game.GameState == GameState.Picking || Game.GameState == GameState.WaitingForLoaders || Game.GameState == GameState.Scoreboard) { return; } #region If assembly not loaded if (loaded == false) { gui = new EzGUI(Drawing.Width - 350, 60, "PRubick " + VERSION); enabled = new EzElement(ElementType.CHECKBOX, "Enabled / Активен", true); spcat = new EzElement(ElementType.CATEGORY, "Spell Steal / Кража скиллов", false); stealIfHave = new EzElement(ElementType.CHECKBOX, "Steal if no cd / Красть если нет кд [if selected]", false); lastSpell = new EzElement(ElementType.CHECKBOX, "Steal if last spell selected [unstable]", false); gui.AddMainElement(new EzElement(ElementType.TEXT, "Main / Главная", false)); gui.AddMainElement(enabled); gui.AddMainElement(stealIfHave); gui.AddMainElement(lastSpell); gui.AddMainElement(new EzElement(ElementType.TEXT, "Rubick / Рубик (heroes appear gradually)", false)); gui.AddMainElement(spcat); uiHeroes.Clear(); myHero = ObjectMgr.LocalHero; spellSteal = myHero.Spellbook.SpellR; loaded = true; } #endregion if (myHero.ClassID != ClassID.CDOTA_Unit_Hero_Rubick) { return; } // if (enabled.isActive) { Hero[] enemies = ObjectMgr.GetEntities <Hero>().Where(x => x.Team != myHero.Team && !x.IsIllusion() && x.IsAlive && x.IsVisible).ToArray(); #region GUI Checks if (Utils.SleepCheck("GUI_ABILITIES") && heroes != null) { foreach (EzElement hero in heroes.GetElements()) { foreach (EzElement spell in hero.GetElements()) { if (spell.isActive && !includedAbilities.Contains(spell.Content)) { includedAbilities.Add(spell.Content); } if (!spell.isActive && includedAbilities.Contains(spell.Content)) { includedAbilities.Remove(spell.Content); } } } Utils.Sleep(1000, "GUI_ABILITIES"); } if (Utils.SleepCheck("uiheroesupdate")) { if (heroes == null) { heroes = new EzElement(ElementType.CATEGORY, "Heroes / Герои", false); spcat.AddElement(heroes); } List <Hero> _heroes = ObjectMgr.GetEntities <Hero>().Where(p => !p.IsIllusion && p.Team != myHero.Team).ToList(); foreach (Hero enemy in _heroes) { if (!uiHeroes.Contains(enemy)) { var hero = new EzElement(ElementType.CATEGORY, enemy.Name.Replace("_", "").Replace("npcdotahero", ""), false); foreach (Ability ability in enemy.Spellbook.Spells) { if (ability.AbilityBehavior == AbilityBehavior.Passive || ability.AbilityType == AbilityType.Attribute) { continue; } bool ac = false; if (ability.AbilityType == AbilityType.Ultimate) { ac = true; includedAbilities.Add(ability.Name); } hero.AddElement(new EzElement(ElementType.CHECKBOX, ability.Name, ac)); } heroes.AddElement(hero); uiHeroes.Add(enemy); } } Utils.Sleep(2000, "uiheroesupdate"); } #endregion foreach (Hero enemy in enemies) { if (Utils.SleepCheck(enemy.ClassID.ToString())) { foreach (Ability ability in enemy.Spellbook.Spells) { if ((lastSpellIsChecked.Contains(enemy) && (isCasted(ability) && !includedAbilities.Contains(ability.Name))) && lastSpell.isActive) { lastSpellIsChecked.Remove(enemy); } if (includedAbilities.Contains(ability.Name) && (isCasted(ability) || lastSpellIsChecked.Contains(enemy)) && !spellOnCooldown(ability.Name) && iCanSteal(enemy) && myHero.Spellbook.SpellD.Name != ability.Name && ability.CooldownLength != 0) { if (stealIfHave.isActive == false && myHero.Spellbook.SpellD.Cooldown == 0 && includedAbilities.Contains(myHero.Spellbook.SpellD.Name)) { continue; } if (spellSteal.CanBeCasted()) { spellSteal.UseAbility(enemy); } else if (lastSpell.isActive) { lastSpellIsChecked.Add(enemy); } } } Utils.Sleep(125, enemy.ClassID.ToString()); } } } }