Esempio n. 1
0
 private static void Load()
 {
     if (ObjectManager.LocalHero.ClassID != ClassID.CDOTA_Unit_Hero_Wisp)
     {
         return;
     }
     if (Members.MyHero == null || !Members.MyHero.IsValid)
     {
         Members.MyHero = ObjectManager.LocalHero;
         Members.MyTeam = ObjectManager.LocalHero.Team;
     }
     _attacker     = new Sleeper();
     _updater      = new Sleeper();
     _multiSleeper = new MultiSleeper();
     Orbwalking.Load();
     Members.Items = new List <string>();
     Members.Menu.AddToMainMenu();
     Game.OnUpdate  += Game_OnUpdate;
     Game.OnUpdate  += AutoSaver;
     Game.OnUpdate  += AutoTeaser;
     Drawing.OnDraw += Drawing_OnDraw;
     Entity.OnParticleEffectAdded += EntityOnOnParticleEffectAdded;
 }
Esempio n. 2
0
        public Lion(Unit9 owner, MultiSleeper abilitySleeper, Sleeper orbwalkSleeper, ControllableUnitMenu menu)
            : base(owner, abilitySleeper, orbwalkSleeper, menu)
        {
            this.ComboAbilities = new Dictionary <AbilityId, Func <ActiveAbility, UsableAbility> >
            {
                { AbilityId.lion_impale, x => this.impale = new DisableAbility(x) },
                { AbilityId.lion_mana_drain, x => this.drain = new ManaDrain(x) },
                { AbilityId.lion_voodoo, x => this.hex = new DisableAbility(x) },
                { AbilityId.lion_finger_of_death, x => this.finger = new NukeAbility(x) },

                { AbilityId.item_force_staff, x => this.force = new ForceStaff(x) },
                { AbilityId.item_veil_of_discord, x => this.veil = new DebuffAbility(x) },
                { AbilityId.item_blink, x => this.blink = new BlinkAbility(x) },
                { AbilityId.item_swift_blink, x => this.blink = new BlinkAbility(x) },
                { AbilityId.item_arcane_blink, x => this.blink = new BlinkAbility(x) },
                { AbilityId.item_overwhelming_blink, x => this.blink = new BlinkAbility(x) },
                { AbilityId.item_dagon_5, x => this.dagon = new NukeAbility(x) },
                { AbilityId.item_ethereal_blade, x => this.ethereal = new EtherealBlade(x) },
            };

            this.MoveComboAbilities.Add(AbilityId.lion_impale, _ => this.impale);
            this.MoveComboAbilities.Add(AbilityId.lion_voodoo, _ => this.hex);
        }
Esempio n. 3
0
        public SkywrathMage(Unit9 owner, MultiSleeper abilitySleeper, Sleeper orbwalkSleeper, ControllableUnitMenu menu)
            : base(owner, abilitySleeper, orbwalkSleeper, menu)
        {
            this.ComboAbilities = new Dictionary <AbilityId, Func <ActiveAbility, UsableAbility> >
            {
                { AbilityId.skywrath_mage_arcane_bolt, x => this.bolt = new NukeAbility(x) },
                { AbilityId.skywrath_mage_ancient_seal, x => this.seal = new DebuffAbility(x) },
                { AbilityId.skywrath_mage_concussive_shot, x => this.concussive = new DebuffAbility(x) },
                { AbilityId.skywrath_mage_mystic_flare, x => this.flare = new MysticFlare(x) },

                { AbilityId.item_rod_of_atos, x => this.atos = new DisableAbility(x) },
                { AbilityId.item_veil_of_discord, x => this.veil = new DebuffAbility(x) },
                { AbilityId.item_force_staff, x => this.force = new ForceStaff(x) },
                { AbilityId.item_blink, x => this.blink = new BlinkAbility(x) },
                { AbilityId.item_sheepstick, x => this.hex = new HexSkywrath(x) },
                { AbilityId.item_ethereal_blade, x => this.ethereal = new EtherealBlade(x) },
                { AbilityId.item_nullifier, x => this.nullifier = new Nullifier(x) },
                { AbilityId.item_dagon_5, x => this.dagon = new NukeAbility(x) },
            };

            this.MoveComboAbilities.Add(AbilityId.skywrath_mage_ancient_seal, _ => this.seal);
            this.MoveComboAbilities.Add(AbilityId.skywrath_mage_concussive_shot, _ => this.concussive);
        }
Esempio n. 4
0
 // Token: 0x06000973 RID: 2419 RVA: 0x0002985C File Offset: 0x00027A5C
 public Storm(Unit9 owner, MultiSleeper abilitySleeper, Sleeper orbwalkSleeper, ControllableUnitMenu menu) : base(owner, abilitySleeper, orbwalkSleeper, menu)
 {
     base.ComboAbilities = new Dictionary <AbilityId, Func <ActiveAbility, UsableAbility> >
     {
         {
             AbilityId.brewmaster_storm_cyclone,
             (ActiveAbility x) => this.cyclone = new Cyclone(x)
         },
         {
             AbilityId.brewmaster_storm_dispel_magic,
             (ActiveAbility x) => this.dispel = new Dispel(x)
         },
         {
             AbilityId.brewmaster_storm_wind_walk,
             (ActiveAbility x) => this.windWalk = new WindWalk(x)
         },
         {
             AbilityId.brewmaster_cinder_brew,
             (ActiveAbility x) => this.cender = new DebuffAbility(x)
         }
     };
     base.MoveComboAbilities.Add(AbilityId.brewmaster_storm_wind_walk, (ActiveAbility _) => this.windWalk);
 }
Esempio n. 5
0
        public ChaosKnight(Unit9 owner, MultiSleeper abilitySleeper, Sleeper orbwalkSleeper, ControllableUnitMenu menu)
            : base(owner, abilitySleeper, orbwalkSleeper, menu)
        {
            this.ComboAbilities = new Dictionary<AbilityId, Func<ActiveAbility, UsableAbility>>
            {
                { AbilityId.chaos_knight_chaos_bolt, x => this.bolt = new DisableAbility(x) },
                { AbilityId.chaos_knight_reality_rift, x => this.rift = new TargetableAbility(x) },
                { AbilityId.chaos_knight_phantasm, x => this.phantasm = new UntargetableAbility(x) },

                { AbilityId.item_blink, x => this.blink = new BlinkAbility(x) },
                { AbilityId.item_swift_blink, x => this.blink = new BlinkAbility(x) },
                { AbilityId.item_arcane_blink, x => this.blink = new BlinkAbility(x) },
                { AbilityId.item_overwhelming_blink, x => this.blink = new BlinkAbility(x) },
                { AbilityId.item_black_king_bar, x => this.bkb = new ShieldAbility(x) },
                { AbilityId.item_manta, x => this.manta = new BuffAbility(x) },
                { AbilityId.item_armlet, x => this.armlet = new BuffAbility(x) },
                { AbilityId.item_heavens_halberd, x => this.halberd = new DisableAbility(x) },
                { AbilityId.item_orchid, x => this.orchid = new DisableAbility(x) },
                { AbilityId.item_bloodthorn, x => this.bloodthorn = new Bloodthorn(x) },
            };

            this.MoveComboAbilities.Add(AbilityId.slardar_sprint, _ => this.bolt);
        }
Esempio n. 6
0
        public FacelessVoid(Unit9 owner, MultiSleeper abilitySleeper, Sleeper orbwalkSleeper, ControllableUnitMenu menu)
            : base(owner, abilitySleeper, orbwalkSleeper, menu)
        {
            this.ComboAbilities = new Dictionary <AbilityId, Func <ActiveAbility, UsableAbility> >
            {
                { AbilityId.faceless_void_time_walk, x => this.timeWalk = new TimeWalk(x) },
                { AbilityId.faceless_void_time_dilation, x => this.dilation = new TimeDilation(x) },
                { AbilityId.faceless_void_chronosphere, x => this.chronosphere = new Chronosphere(x) },

                { AbilityId.item_phase_boots, x => this.phase = new SpeedBuffAbility(x) },
                { AbilityId.item_mask_of_madness, x => this.mom = new BuffAbility(x) },
                { AbilityId.item_mjollnir, x => this.mjollnir = new ShieldAbility(x) },
                { AbilityId.item_manta, x => this.manta = new BuffAbility(x) },
                { AbilityId.item_diffusal_blade, x => this.diffusal = new DebuffAbility(x) },
                { AbilityId.item_black_king_bar, x => this.bkb = new ShieldAbility(x) },
                { AbilityId.item_silver_edge, x => this.silver = new BuffAbility(x) },
                { AbilityId.item_orchid, x => this.orchid = new DisableAbility(x) },
                { AbilityId.item_bloodthorn, x => this.bloodthorn = new Bloodthorn(x) },
                { AbilityId.item_necronomicon_3, x => this.necro = new BuffAbility(x) },
            };

            this.MoveComboAbilities.Add(AbilityId.faceless_void_time_walk, _ => this.timeWalk);
        }
Esempio n. 7
0
        public Juggernaut(Unit9 owner, MultiSleeper abilitySleeper, Sleeper orbwalkSleeper, ControllableUnitMenu menu)
            : base(owner, abilitySleeper, orbwalkSleeper, menu)
        {
            this.ComboAbilities = new Dictionary <AbilityId, Func <ActiveAbility, UsableAbility> >
            {
                { AbilityId.juggernaut_blade_fury, x => this.bladeFury = new NukeAbility(x) },
                { AbilityId.juggernaut_healing_ward, x => this.ward = new HealingWard(x) },
                { (AbilityId)419, x => this.slash = new Omnislash(x) },
                { AbilityId.juggernaut_omni_slash, x => this.omni = new Omnislash(x) },

                { AbilityId.item_phase_boots, x => this.phase = new SpeedBuffAbility(x) },
                { AbilityId.item_orchid, x => this.orchid = new DisableAbility(x) },
                { AbilityId.item_bloodthorn, x => this.bloodthorn = new Bloodthorn(x) },
                { AbilityId.item_nullifier, x => this.nullifier = new Nullifier(x) },
                { AbilityId.item_diffusal_blade, x => this.diffusal = new DebuffAbility(x) },
                { AbilityId.item_abyssal_blade, x => this.abyssal = new DisableAbility(x) },
                { AbilityId.item_manta, x => this.manta = new BuffAbility(x) },
                { AbilityId.item_blink, x => this.blink = new BlinkAbility(x) },
                { AbilityId.item_mjollnir, x => this.mjollnir = new ShieldAbility(x) },
            };

            this.MoveComboAbilities.Add(AbilityId.juggernaut_blade_fury, x => this.bladeFuryShield = new ShieldAbility(x));
        }
        public ControllableUnit(Unit9 owner, MultiSleeper abilitySleeper, Sleeper orbwalkSleeper, ControllableUnitMenu menu)
        {
            this.Owner          = owner;
            this.abilitySleeper = abilitySleeper;
            this.OrbwalkSleeper = orbwalkSleeper;
            this.Menu           = menu;
            this.Handle         = owner.Handle;

            this.MoveComboAbilities = new Dictionary <AbilityId, Func <ActiveAbility, UsableAbility> >
            {
                { AbilityId.item_blink, x => this.moveBlink = new BlinkAbility(x) },
                { AbilityId.item_swift_blink, x => this.moveBlink = new BlinkAbility(x) },
                { AbilityId.item_arcane_blink, x => this.moveBlink = new BlinkAbility(x) },
                { AbilityId.item_overwhelming_blink, x => this.moveBlink = new BlinkAbility(x) },
                { AbilityId.item_force_staff, x => this.moveForceStaff = new ForceStaff(x) },
                { AbilityId.item_hurricane_pike, x => this.movePike = new ForceStaff(x) },

                { AbilityId.item_butterfly, x => this.movePhaseBoots = new MoveBuffAbility(x) },
                { AbilityId.item_invis_sword, x => this.moveShadowBlade = new MoveBuffAbility(x) },
                { AbilityId.item_silver_edge, x => this.moveSilverEdge = new MoveBuffAbility(x) },
                { AbilityId.item_glimmer_cape, x => this.moveGlimmer = new ShieldAbility(x) },

                { AbilityId.item_black_king_bar, x => this.moveBkb = new ShieldAbility(x) },
                { AbilityId.item_blade_mail, x => this.moveBladeMail = new ShieldAbility(x) },
                { AbilityId.item_hood_of_defiance, x => this.moveHood = new ShieldAbility(x) },
                { AbilityId.item_lotus_orb, x => this.moveLotus = new ShieldAbility(x) },

                { AbilityId.item_diffusal_blade, x => this.moveDiffusal = new DebuffAbility(x) },
                { AbilityId.item_abyssal_blade, x => this.moveAbyssal = new DisableAbility(x) },
                { AbilityId.item_rod_of_atos, x => this.moveAtos = new DisableAbility(x) },
                { AbilityId.item_gungir, x => this.moveGungir = new DisableAbility(x) },
                { AbilityId.item_orchid, x => this.moveOrchid = new DisableAbility(x) },
                { AbilityId.item_sheepstick, x => this.moveHex = new DisableAbility(x) },
                { AbilityId.item_bloodthorn, x => this.moveBloodthorn = new Bloodthorn(x) },
                { AbilityId.item_ethereal_blade, x => this.moveEthereal = new DebuffAbility(x) },
            };
        }
Esempio n. 9
0
 // Token: 0x060004E2 RID: 1250 RVA: 0x00019A30 File Offset: 0x00017C30
 public Morphling(Unit9 owner, MultiSleeper abilitySleeper, Sleeper orbwalkSleeper, ControllableUnitMenu menu) : base(owner, abilitySleeper, orbwalkSleeper, menu)
 {
     this.morphling      = (Morphling)owner;
     base.ComboAbilities = new Dictionary <AbilityId, Func <ActiveAbility, UsableAbility> >
     {
         {
             AbilityId.morphling_waveform,
             (ActiveAbility x) => this.wave = new Wave(x)
         },
         {
             AbilityId.morphling_adaptive_strike_str,
             (ActiveAbility x) => this.str = new DisableAbility(x)
         },
         {
             AbilityId.morphling_adaptive_strike_agi,
             (ActiveAbility x) => this.agi = new NukeAbility(x)
         },
         {
             AbilityId.item_orchid,
             (ActiveAbility x) => this.orchid = new DisableAbility(x)
         },
         {
             AbilityId.item_bloodthorn,
             (ActiveAbility x) => this.bloodthorn = new Bloodthorn(x)
         },
         {
             AbilityId.item_ethereal_blade,
             (ActiveAbility x) => this.ethereal = new NukeAbility(x)
         },
         {
             AbilityId.item_manta,
             (ActiveAbility x) => this.manta = new MantaStyle(x)
         }
     };
     base.MoveComboAbilities.Add(AbilityId.morphling_waveform, (ActiveAbility x) => this.waveBlink = new BlinkAbility(x));
     Player.OnExecuteOrder += this.OnExecuteOrder;
 }
Esempio n. 10
0
        public LegionCommander(Unit9 owner, MultiSleeper abilitySleeper, Sleeper orbwalkSleeper, ControllableUnitMenu menu)
            : base(owner, abilitySleeper, orbwalkSleeper, menu)
        {
            this.ComboAbilities = new Dictionary <AbilityId, Func <ActiveAbility, UsableAbility> >
            {
                { AbilityId.legion_commander_overwhelming_odds, x => this.odds = new OverwhelmingOdds(x) },
                { AbilityId.legion_commander_press_the_attack, x => this.attack = new BuffAbility(x) },
                { AbilityId.legion_commander_duel, x => this.duel = new Duel(x) },

                { AbilityId.item_blink, x => this.blink = new LegionBlink(x) },
                { AbilityId.item_phase_boots, x => this.phase = new SpeedBuffAbility(x) },
                { AbilityId.item_blade_mail, x => this.bladeMail = new ShieldAbility(x) },
                { AbilityId.item_black_king_bar, x => this.bkb = new ShieldAbility(x) },
                { AbilityId.item_solar_crest, x => this.solar = new DebuffAbility(x) },
                { AbilityId.item_medallion_of_courage, x => this.medallion = new DebuffAbility(x) },
                { AbilityId.item_heavens_halberd, x => this.halberd = new DisableAbility(x) },
                { AbilityId.item_mjollnir, x => this.mjollnir = new ShieldAbility(x) },
                { AbilityId.item_armlet, x => this.armlet = new BuffAbility(x) },
                { AbilityId.item_abyssal_blade, x => this.abyssal = new DisableAbility(x) },
                { AbilityId.item_orchid, x => this.orchid = new DisableAbility(x) },
                { AbilityId.item_bloodthorn, x => this.bloodthorn = new Bloodthorn(x) },
                { AbilityId.item_nullifier, x => this.nullifier = new Nullifier(x) },
            };
        }
Esempio n. 11
0
        public Config(LegionCommanderPlus main)
        {
            Main = main;

            ActivatePlugins();
            Screen       = new Vector2(Drawing.Width - 160, Drawing.Height);
            MultiSleeper = new MultiSleeper();

            Menu       = new MenuManager(this);
            Extensions = new Extensions(this);

            UpdateMode        = new UpdateMode(this);
            DamageCalculation = new DamageCalculation(this);
            LinkenBreaker     = new LinkenBreaker(this);
            AutoKillSteal     = new AutoKillSteal(this);

            Menu.ComboKeyItem.Item.ValueChanged += ComboKeyChanged;
            var key = KeyInterop.KeyFromVirtualKey((int)Menu.ComboKeyItem.Value.Key);

            Mode = new Mode(key, this);
            main.Context.Orbwalker.RegisterMode(Mode);

            Renderer = new Renderer(this);
        }
Esempio n. 12
0
        public Tusk(Unit9 owner, MultiSleeper abilitySleeper, Sleeper orbwalkSleeper, ControllableUnitMenu menu)
            : base(owner, abilitySleeper, orbwalkSleeper, menu)
        {
            this.ComboAbilities = new Dictionary <AbilityId, Func <ActiveAbility, UsableAbility> >
            {
                { AbilityId.tusk_ice_shards, x => this.shards = new IceShards(x) },
                { AbilityId.tusk_snowball, x => this.snowball = new Snowball(x) },
                { AbilityId.tusk_tag_team, x => this.tag = new DebuffAbility(x) },
                { AbilityId.tusk_walrus_punch, x => this.punch = new NukeAbility(x) },
                { AbilityId.tusk_walrus_kick, x => this.kick = new Kick(x) },

                { AbilityId.item_blink, x => this.blink = new BlinkAbility(x) },
                { AbilityId.item_swift_blink, x => this.blink = new BlinkAbility(x) },
                { AbilityId.item_arcane_blink, x => this.blink = new BlinkAbility(x) },
                { AbilityId.item_overwhelming_blink, x => this.blink = new BlinkAbility(x) },
                { AbilityId.item_spirit_vessel, x => this.vessel = new DebuffAbility(x) },
                { AbilityId.item_urn_of_shadows, x => this.urn = new DebuffAbility(x) },
                { AbilityId.item_solar_crest, x => this.solar = new DebuffAbility(x) },
                { AbilityId.item_medallion_of_courage, x => this.medallion = new DebuffAbility(x) },
                { AbilityId.item_blade_mail, x => this.bladeMail = new ShieldAbility(x) },
                { AbilityId.item_orchid, x => this.orchid = new DisableAbility(x) },
                { AbilityId.item_bloodthorn, x => this.bloodthorn = new Bloodthorn(x) },
            };
        }
Esempio n. 13
0
        public Axe(Unit9 owner, MultiSleeper abilitySleeper, Sleeper orbwalkSleeper, ControllableUnitMenu menu)
            : base(owner, abilitySleeper, orbwalkSleeper, menu)
        {
            this.ComboAbilities = new Dictionary <AbilityId, Func <ActiveAbility, UsableAbility> >
            {
                { AbilityId.axe_berserkers_call, x => this.call = new DisableAbility(x) },
                { AbilityId.axe_battle_hunger, x => this.hunger = new DebuffAbility(x) },
                { AbilityId.axe_culling_blade, x => this.blade = new CullingBlade(x) },

                { AbilityId.item_blink, x => this.blink = new BlinkDaggerAOE(x) },
                { AbilityId.item_swift_blink, x => this.blink = new BlinkDaggerAOE(x) },
                { AbilityId.item_arcane_blink, x => this.blink = new BlinkDaggerAOE(x) },
                { AbilityId.item_overwhelming_blink, x => this.blink = new BlinkDaggerAOE(x) },
                { AbilityId.item_force_staff, x => this.force = new ForceStaff(x) },
                { AbilityId.item_blade_mail, x => this.bladeMail = new ShieldAbility(x) },
                { AbilityId.item_black_king_bar, x => this.bkb = new ShieldAbility(x) },
                { AbilityId.item_shivas_guard, x => this.shiva = new DebuffAbility(x) },
                { AbilityId.item_mjollnir, x => this.mjollnir = new ShieldAbility(x) },
                { AbilityId.item_meteor_hammer, x => this.meteor = new MeteorHammerAxe(x) },
                { AbilityId.item_dagon_5, x => this.dagon = new NukeAbility(x) },
            };

            this.MoveComboAbilities.Add(AbilityId.axe_berserkers_call, _ => this.call);
        }
Esempio n. 14
0
 // Token: 0x0600058B RID: 1419 RVA: 0x0001C074 File Offset: 0x0001A274
 public Lion(Unit9 owner, MultiSleeper abilitySleeper, Sleeper orbwalkSleeper, ControllableUnitMenu menu) : base(owner, abilitySleeper, orbwalkSleeper, menu)
 {
     base.ComboAbilities = new Dictionary <AbilityId, Func <ActiveAbility, UsableAbility> >
     {
         {
             AbilityId.lion_impale,
             (ActiveAbility x) => this.impale = new DisableAbility(x)
         },
         {
             AbilityId.lion_mana_drain,
             (ActiveAbility x) => this.drain = new TargetableAbility(x)
         },
         {
             AbilityId.lion_voodoo,
             (ActiveAbility x) => this.hex = new DisableAbility(x)
         },
         {
             AbilityId.lion_finger_of_death,
             (ActiveAbility x) => this.finger = new NukeAbility(x)
         },
         {
             AbilityId.item_force_staff,
             (ActiveAbility x) => this.force = new ForceStaff(x)
         },
         {
             AbilityId.item_blink,
             (ActiveAbility x) => this.blink = new BlinkAbility(x)
         },
         {
             AbilityId.item_ethereal_blade,
             (ActiveAbility x) => this.ethereal = new EtherealBlade(x)
         }
     };
     base.MoveComboAbilities.Add(AbilityId.lion_impale, (ActiveAbility _) => this.impale);
     base.MoveComboAbilities.Add(AbilityId.lion_voodoo, (ActiveAbility _) => this.hex);
 }
Esempio n. 15
0
 // Token: 0x06000689 RID: 1673 RVA: 0x0001F9A8 File Offset: 0x0001DBA8
 public Disruptor(Unit9 owner, MultiSleeper abilitySleeper, Sleeper orbwalkSleeper, ControllableUnitMenu menu) : base(owner, abilitySleeper, orbwalkSleeper, menu)
 {
     base.ComboAbilities = new Dictionary <AbilityId, Func <ActiveAbility, UsableAbility> >
     {
         {
             AbilityId.disruptor_thunder_strike,
             (ActiveAbility x) => this.thunder = new NukeAbility(x)
         },
         {
             AbilityId.disruptor_glimpse,
             (ActiveAbility x) => this.glimpse = new TargetableAbility(x)
         },
         {
             AbilityId.disruptor_kinetic_field,
             (ActiveAbility x) => this.field = new KineticField(x)
         },
         {
             AbilityId.disruptor_static_storm,
             (ActiveAbility x) => this.storm = new StaticStorm(x)
         },
         {
             AbilityId.item_blink,
             (ActiveAbility x) => this.blink = new BlinkAbility(x)
         },
         {
             AbilityId.item_force_staff,
             (ActiveAbility x) => this.force = new ForceStaff(x)
         },
         {
             AbilityId.item_veil_of_discord,
             (ActiveAbility x) => this.veil = new DebuffAbility(x)
         }
     };
     base.MoveComboAbilities.Add(AbilityId.disruptor_kinetic_field, (ActiveAbility _) => this.field);
     Entity.OnParticleEffectAdded += this.OnParticleEffectAdded;
 }
Esempio n. 16
0
 // Token: 0x06000497 RID: 1175 RVA: 0x00018500 File Offset: 0x00016700
 public Pangolier(Unit9 owner, MultiSleeper abilitySleeper, Sleeper orbwalkSleeper, ControllableUnitMenu menu) : base(owner, abilitySleeper, orbwalkSleeper, menu)
 {
     base.ComboAbilities = new Dictionary <AbilityId, Func <ActiveAbility, UsableAbility> >
     {
         {
             AbilityId.pangolier_swashbuckle,
             (ActiveAbility x) => this.swashbuckle = new Swashbuckle(x)
         },
         {
             AbilityId.pangolier_shield_crash,
             (ActiveAbility x) => this.crash = new ShieldCrash(x)
         },
         {
             AbilityId.pangolier_gyroshell,
             (ActiveAbility x) => this.thunder = new RollingThunder(x)
         },
         {
             AbilityId.item_diffusal_blade,
             (ActiveAbility x) => this.diffusal = new DebuffAbility(x)
         },
         {
             AbilityId.item_abyssal_blade,
             (ActiveAbility x) => this.abyssal = new DisableAbility(x)
         },
         {
             AbilityId.item_mjollnir,
             (ActiveAbility x) => this.mjollnir = new ShieldAbility(x)
         },
         {
             AbilityId.item_blink,
             (ActiveAbility x) => this.blink = new BlinkDaggerPangolier(x)
         }
     };
     base.MoveComboAbilities.Add(AbilityId.pangolier_swashbuckle, (ActiveAbility x) => this.moveSwashbuckle = new SwashbuckleBlink(x));
     Player.OnExecuteOrder += this.OnExecuteOrder;
 }
Esempio n. 17
0
        public Magnus(Unit9 owner, MultiSleeper abilitySleeper, Sleeper orbwalkSleeper, ControllableUnitMenu menu)
            : base(owner, abilitySleeper, orbwalkSleeper, menu)
        {
            this.ComboAbilities = new Dictionary <AbilityId, Func <ActiveAbility, UsableAbility> >
            {
                { AbilityId.magnataur_shockwave, x => this.shockwave = new Shockwave(x) },
                {
                    AbilityId.magnataur_skewer, x =>
                    {
                        this.skewer = new Skewer(x);
                        this.polarity?.AddSkewer(this.skewer);
                        return(this.skewer);
                    }
                },
                {
                    AbilityId.magnataur_reverse_polarity, x =>
                    {
                        this.polarity = new ReversePolarity(x);
                        if (this.skewer != null)
                        {
                            this.polarity.AddSkewer(this.skewer);
                        }

                        return(this.polarity);
                    }
                },

                { AbilityId.item_blink, x => this.blink = new BlinkDaggerMagnus(x) },
                { AbilityId.item_force_staff, x => this.force = new ForceStaff(x) },
                { AbilityId.item_shivas_guard, x => this.shiva = new ShivasGuard(x) },
                { AbilityId.item_refresher, x => this.refresher = new UntargetableAbility(x) },
                { AbilityId.item_refresher_shard, x => this.refresherShard = new UntargetableAbility(x) },
            };

            this.MoveComboAbilities.Add(AbilityId.magnataur_skewer, x => this.moveSkewer = new BlinkAbility(x));
        }
Esempio n. 18
0
        public Lina(Unit9 owner, MultiSleeper abilitySleeper, Sleeper orbwalkSleeper, ControllableUnitMenu menu)
            : base(owner, abilitySleeper, orbwalkSleeper, menu)
        {
            this.ComboAbilities = new Dictionary <AbilityId, Func <ActiveAbility, UsableAbility> >
            {
                { AbilityId.lina_dragon_slave, x => this.dragon = new NukeAbility(x) },
                { AbilityId.lina_light_strike_array, x => this.array = new DisableAbility(x) },
                { AbilityId.lina_laguna_blade, x => this.laguna = new NukeAbility(x) },

                { AbilityId.item_phase_boots, x => this.phase = new SpeedBuffAbility(x) },
                { AbilityId.item_force_staff, x => this.force = new ForceStaff(x) },
                { AbilityId.item_hurricane_pike, x => this.pike = new HurricanePike(x) },
                { AbilityId.item_ethereal_blade, x => this.ethereal = new EtherealBlade(x) },
                { AbilityId.item_blink, x => this.blink = new BlinkAbility(x) },
                { AbilityId.item_cyclone, x => this.euls = new EulsScepterOfDivinity(x) },
                { AbilityId.item_sheepstick, x => this.hex = new DisableAbility(x) },
                { AbilityId.item_orchid, x => this.orchid = new DisableAbility(x) },
                { AbilityId.item_bloodthorn, x => this.bloodthorn = new Bloodthorn(x) },
                { AbilityId.item_veil_of_discord, x => this.veil = new DebuffAbility(x) },
                { AbilityId.item_rod_of_atos, x => this.atos = new DisableAbility(x) },
            };

            this.MoveComboAbilities.Add(AbilityId.lina_light_strike_array, _ => this.array);
        }
Esempio n. 19
0
        public Grimstroke(Unit9 owner, MultiSleeper abilitySleeper, Sleeper orbwalkSleeper, ControllableUnitMenu menu)
            : base(owner, abilitySleeper, orbwalkSleeper, menu)
        {
            this.ComboAbilities = new Dictionary <AbilityId, Func <ActiveAbility, UsableAbility> >
            {
                { AbilityId.grimstroke_dark_artistry, x => this.stroke = new DebuffAbility(x) },
                { AbilityId.grimstroke_ink_creature, x => this.embrace = new DisableAbility(x) },
                { AbilityId.grimstroke_spirit_walk, x => this.ink = new InkSwell(x) },
                { AbilityId.grimstroke_soul_chain, x => this.bind = new Soulbind(x) },
                { (AbilityId)7852, x => this.portrait = new TargetableAbility(x) },

                { AbilityId.item_blink, x => this.blink = new BlinkAbility(x) },
                { AbilityId.item_ethereal_blade, x => this.ethereal = new EtherealBlade(x) },
                { AbilityId.item_sheepstick, x => this.hex = new DisableAbility(x) },
                { AbilityId.item_shivas_guard, x => this.shiva = new DebuffAbility(x) },
                { AbilityId.item_orchid, x => this.orchid = new DisableAbility(x) },
                { AbilityId.item_bloodthorn, x => this.bloodthorn = new Bloodthorn(x) },
                { AbilityId.item_nullifier, x => this.nullifier = new Nullifier(x) },
                { AbilityId.item_rod_of_atos, x => this.atos = new DisableAbility(x) },
                { AbilityId.item_veil_of_discord, x => this.veil = new DebuffAbility(x) },
                { AbilityId.item_heavens_halberd, x => this.halberd = new DisableAbility(x) },
                { AbilityId.item_dagon_5, x => this.dagon = new GrimstrokeDagon(x) },
            };
        }
Esempio n. 20
0
        public Morphling(Unit9 owner, MultiSleeper abilitySleeper, Sleeper orbwalkSleeper, ControllableUnitMenu menu)
            : base(owner, abilitySleeper, orbwalkSleeper, menu)
        {
            this.morphling = (BaseMorphling)owner;

            this.ComboAbilities = new Dictionary <AbilityId, Func <ActiveAbility, UsableAbility> >
            {
                { AbilityId.morphling_waveform, x => this.wave = new Wave(x) },
                { AbilityId.morphling_adaptive_strike_str, x => this.str = new DisableAbility(x) },
                { AbilityId.morphling_adaptive_strike_agi, x => this.agi = new NukeAbility(x) },

                //{ AbilityId.morphling_replicate, x => this.replicate = new Replicate(x) },
                //{ AbilityId.morphling_morph_replicate, x => this.morph = new Morph(x) },

                { AbilityId.item_orchid, x => this.orchid = new DisableAbility(x) },
                { AbilityId.item_bloodthorn, x => this.bloodthorn = new Bloodthorn(x) },
                { AbilityId.item_ethereal_blade, x => this.ethereal = new NukeAbility(x) },
                { AbilityId.item_manta, x => this.manta = new MantaStyle(x) },
            };

            this.MoveComboAbilities.Add(AbilityId.morphling_waveform, x => this.waveBlink = new BlinkAbility(x));

            OrderManager.OrderAdding += this.OnOrderAdding;
        }
Esempio n. 21
0
        public Pudge(Unit9 owner, MultiSleeper abilitySleeper, Sleeper orbwalkSleeper, ControllableUnitMenu menu)
            : base(owner, abilitySleeper, orbwalkSleeper, menu)
        {
            this.ComboAbilities = new Dictionary <AbilityId, Func <ActiveAbility, UsableAbility> >
            {
                { AbilityId.pudge_meat_hook, x => this.hook = new MeatHook(x) },
                { AbilityId.pudge_rot, x => this.rot = new Rot(x) },
                { AbilityId.pudge_dismember, x => this.dismember = new Dismember(x) },

                { AbilityId.item_blink, x => this.blink = new BlinkDaggerPudge(x) },
                { AbilityId.item_force_staff, x => this.force = new ForceStaff(x) },
                { AbilityId.item_blade_mail, x => this.bladeMail = new ShieldAbility(x) },
                { AbilityId.item_spirit_vessel, x => this.vessel = new DebuffAbility(x) },
                { AbilityId.item_urn_of_shadows, x => this.urn = new DebuffAbility(x) },
                { AbilityId.item_rod_of_atos, x => this.atos = new DisableAbility(x) },
                { AbilityId.item_shivas_guard, x => this.shiva = new DebuffAbility(x) },
                { AbilityId.item_ethereal_blade, x => this.ethereal = new DebuffAbility(x) },
                { AbilityId.item_dagon_5, x => this.dagon = new NukeAbility(x) },
                { AbilityId.item_nullifier, x => this.nullifier = new Nullifier(x) },
                { AbilityId.item_bloodthorn, x => this.bloodthorn = new Bloodthorn(x) },
                { AbilityId.item_black_king_bar, x => this.bkb = new ShieldAbility(x) },
                { AbilityId.item_lotus_orb, x => this.lotus = new ShieldAbility(x) },
            };
        }
Esempio n. 22
0
        public Pugna(Unit9 owner, MultiSleeper abilitySleeper, Sleeper orbwalkSleeper, ControllableUnitMenu menu)
            : base(owner, abilitySleeper, orbwalkSleeper, menu)
        {
            this.ComboAbilities = new Dictionary <AbilityId, Func <ActiveAbility, UsableAbility> >
            {
                { AbilityId.pugna_nether_blast, x => this.blast = new NukeAbility(x) },
                { AbilityId.pugna_decrepify, x => this.decrepify = new DebuffAbility(x) },
                { AbilityId.pugna_nether_ward, x => this.ward = new AoeAbility(x) },
                { AbilityId.pugna_life_drain, x => this.drain = new TargetableAbility(x) },

                { AbilityId.item_blink, x => this.blink = new BlinkAbility(x) },
                { AbilityId.item_swift_blink, x => this.blink = new BlinkAbility(x) },
                { AbilityId.item_arcane_blink, x => this.blink = new BlinkAbility(x) },
                { AbilityId.item_overwhelming_blink, x => this.blink = new BlinkAbility(x) },
                { AbilityId.item_dagon_5, x => this.dagon = new NukeAbility(x) },
                { AbilityId.item_sheepstick, x => this.hex = new DisableAbility(x) },
                { AbilityId.item_orchid, x => this.orchid = new DisableAbility(x) },
                { AbilityId.item_veil_of_discord, x => this.veil = new DebuffAbility(x) },
                { AbilityId.item_bloodthorn, x => this.bloodthorn = new Bloodthorn(x) },
                { AbilityId.item_nullifier, x => this.nullifier = new Nullifier(x) },
                { AbilityId.item_rod_of_atos, x => this.atos = new DisableAbility(x) },
                { AbilityId.item_gungir, x => this.gungir = new DisableAbility(x) },
            };
        }
Esempio n. 23
0
        private void OnUpdate()
        {
            var heroes = EntityManager <Hero> .Entities.Where(x => x.IsValid && !x.IsIllusion).ToList();

            DamageList.Clear();

            foreach (var target in heroes.Where(x => x.IsAlive && x.IsEnemy(Owner)).ToList())
            {
                List <BaseAbility> abilities = new List <BaseAbility>();

                var hitArcaneBolt = 0.0f;

                if (target.IsVisible)
                {
                    // AncientSeal
                    var ancientSeal = Abilities.AncientSeal;
                    if (ancientSeal.Ability.Level > 0 && Menu.AutoKillStealToggler.Value.IsEnabled(ancientSeal.ToString()))
                    {
                        abilities.Add(ancientSeal);
                    }

                    // Veil
                    var veil = Abilities.Veil;
                    if (veil != null && veil.Ability.IsValid && Menu.AutoKillStealToggler.Value.IsEnabled(veil.ToString()))
                    {
                        abilities.Add(veil);
                    }

                    // Ethereal
                    var ethereal = Abilities.Ethereal;
                    if (ethereal != null && ethereal.Ability.IsValid && Menu.AutoKillStealToggler.Value.IsEnabled(ethereal.ToString()))
                    {
                        abilities.Add(ethereal);
                    }

                    // Shivas
                    var shivas = Abilities.Shivas;
                    if (shivas != null && shivas.Ability.IsValid && Menu.AutoKillStealToggler.Value.IsEnabled(shivas.ToString()))
                    {
                        abilities.Add(shivas);
                    }

                    // ConcussiveShot
                    var concussiveShot = Abilities.ConcussiveShot;
                    if (concussiveShot.Ability.Level > 0 && Menu.AutoKillStealToggler.Value.IsEnabled(concussiveShot.ToString()) && target == concussiveShot.TargetHit)
                    {
                        abilities.Add(concussiveShot);
                    }

                    // ArcaneBolt
                    var arcaneBolt = Abilities.ArcaneBolt;
                    if (arcaneBolt.Ability.Level > 0 && Menu.AutoKillStealToggler.Value.IsEnabled(arcaneBolt.ToString()))
                    {
                        abilities.Add(arcaneBolt);

                        if (MultiSleeper.Sleeping($"arcanebolt_{ target.Name }"))
                        {
                            hitArcaneBolt += arcaneBolt.GetDamage(target);
                        }
                    }

                    // Dagon
                    var dagon = Abilities.Dagon;
                    if (dagon != null && dagon.Ability.IsValid && Menu.AutoKillStealToggler.Value.IsEnabled("item_dagon_5"))
                    {
                        abilities.Add(dagon);
                    }
                }

                var damageCalculation = new Combo(abilities.ToArray());
                var damageReduction   = -DamageReduction(target, heroes);
                var damageBlock       = DamageBlock(target, heroes);

                var livingArmor = LivingArmor(target, heroes, damageCalculation.Abilities);
                var damage      = DamageHelpers.GetSpellDamage((damageCalculation.GetDamage(target) + hitArcaneBolt) + damageBlock, 0, damageReduction) - livingArmor;
                var readyDamage = DamageHelpers.GetSpellDamage(damageCalculation.GetDamage(target, true, false) + damageBlock, 0, damageReduction) - livingArmor;
                var totalDamage = DamageHelpers.GetSpellDamage(damageCalculation.GetDamage(target, false, false) + damageBlock, 0, damageReduction) - livingArmor;

                if (target.IsInvulnerable() || target.HasAnyModifiers(BlockModifiers))
                {
                    damage      = 0.0f;
                    readyDamage = 0.0f;
                }

                DamageList.Add(new Damage(target, damage, readyDamage, totalDamage, target.Health));
            }
        }
Esempio n. 24
0
 // Token: 0x06000147 RID: 327 RVA: 0x0000C2D8 File Offset: 0x0000A4D8
 public Windranger(Unit9 owner, MultiSleeper abilitySleeper, Sleeper orbwalkSleeper, ControllableUnitMenu menu) : base(owner, abilitySleeper, orbwalkSleeper, menu)
 {
     this.windranger     = (owner as Windranger);
     base.ComboAbilities = new Dictionary <AbilityId, Func <ActiveAbility, UsableAbility> >
     {
         {
             AbilityId.windrunner_shackleshot,
             delegate(ActiveAbility x)
             {
                 this.shackleshot = new Shackleshot(x);
                 if (this.powershot != null)
                 {
                     this.powershot.Shackleshot = this.shackleshot;
                 }
                 return(this.shackleshot);
             }
         },
         {
             AbilityId.windrunner_powershot,
             delegate(ActiveAbility x)
             {
                 this.powershot = new Powershot(x);
                 if (this.shackleshot != null)
                 {
                     this.powershot.Shackleshot = this.shackleshot;
                 }
                 return(this.powershot);
             }
         },
         {
             AbilityId.windrunner_windrun,
             (ActiveAbility x) => this.windrun = new Windrun(x)
         },
         {
             AbilityId.windrunner_focusfire,
             (ActiveAbility x) => this.focusFire = new FocusFire(x)
         },
         {
             AbilityId.item_phase_boots,
             (ActiveAbility x) => this.phase = new SpeedBuffAbility(x)
         },
         {
             AbilityId.item_blink,
             (ActiveAbility x) => this.blink = new BlinkDaggerWindranger(x)
         },
         {
             AbilityId.item_orchid,
             (ActiveAbility x) => this.orchid = new DisableAbility(x)
         },
         {
             AbilityId.item_bloodthorn,
             (ActiveAbility x) => this.bloodthorn = new Bloodthorn(x)
         },
         {
             AbilityId.item_nullifier,
             (ActiveAbility x) => this.nullifier = new Nullifier(x)
         },
         {
             AbilityId.item_sheepstick,
             (ActiveAbility x) => this.hex = new DisableAbility(x)
         }
     };
     base.MoveComboAbilities.Add(AbilityId.windrunner_shackleshot, (ActiveAbility _) => this.shackleshot);
     base.MoveComboAbilities.Add(AbilityId.windrunner_windrun, (ActiveAbility x) => this.windrunMove = new MoveBuffAbility(x));
 }
Esempio n. 25
0
 public Helper([Import] IServiceContext context)
 {
     MultiSleeper = new MultiSleeper();
     Owner        = context.Owner as Hero;
 }
Esempio n. 26
0
 public AutoUsageLinkensBreakGroup(MultiSleeper sleeper, GroupSettings settings)
     : base(sleeper, settings)
 {
 }
Esempio n. 27
0
 public CanUseItems()
 {
     _multiSleeper = new MultiSleeper();
     _afterBlink   = new Sleeper();
     _afterInvis   = new Sleeper();
 }
 public CanUseAbilities()
 {
     _multiSleeper = new MultiSleeper();
 }
Esempio n. 29
0
        private async Task ExecuteAsync(CancellationToken token)
        {
            try
            {
                if (Game.IsPaused || !Owner.IsValid || !Owner.IsAlive || Owner.IsStunned() || Owner.IsInvisible())
                {
                    return;
                }

                if (Menu.AutoComboWhenComboItem && Menu.ComboKeyItem)
                {
                    return;
                }

                if (Menu.AutoOwnerMinHealthItem > ((float)Owner.Health / Owner.MaximumHealth) * 100)
                {
                    return;
                }

                var target = EntityManager <Hero> .Entities.Where(x =>
                                                                  x.IsValid &&
                                                                  x.IsVisible &&
                                                                  x.IsAlive &&
                                                                  !x.IsIllusion &&
                                                                  x.IsEnemy(Owner) &&
                                                                  Extensions.Active(x)).OrderBy(x => x.Distance2D(Owner)).FirstOrDefault();

                if (target == null)
                {
                    return;
                }

                if (!Extensions.Cancel(target) || Extensions.ComboBreaker(target, false))
                {
                    return;
                }

                if (Menu.BladeMailItem && target.HasModifier("modifier_item_blade_mail_reflect"))
                {
                    return;
                }

                if (target.IsBlockingAbilities())
                {
                    Config.LinkenBreaker.Handler.RunAsync();
                    return;
                }

                var stunDebuff = target.Modifiers.FirstOrDefault(x => x.IsStunDebuff);
                var hexDebuff  = target.Modifiers.FirstOrDefault(x => x.Name == "modifier_sheepstick_debuff");

                // Hex
                var hex = Main.Hex;
                if (hex != null &&
                    Menu.AutoItemToggler.Value.IsEnabled(hex.ToString()) &&
                    hex.CanBeCasted &&
                    hex.CanHit(target) &&
                    (stunDebuff == null || !stunDebuff.IsValid || stunDebuff.RemainingTime <= 0.3f) &&
                    (hexDebuff == null || !hexDebuff.IsValid || hexDebuff.RemainingTime <= 0.3f))
                {
                    hex.UseAbility(target);
                    await Await.Delay(hex.GetCastDelay(target), token);
                }

                // Orchid
                var orchid = Main.Orchid;
                if (orchid != null &&
                    Menu.AutoItemToggler.Value.IsEnabled(orchid.ToString()) &&
                    orchid.CanBeCasted &&
                    orchid.CanHit(target))
                {
                    orchid.UseAbility(target);
                    await Await.Delay(orchid.GetCastDelay(target), token);
                }

                // Bloodthorn
                var bloodthorn = Main.Bloodthorn;
                if (bloodthorn != null &&
                    Menu.AutoItemToggler.Value.IsEnabled(bloodthorn.ToString()) &&
                    bloodthorn.CanBeCasted &&
                    bloodthorn.CanHit(target))
                {
                    bloodthorn.UseAbility(target);
                    await Await.Delay(bloodthorn.GetCastDelay(target), token);
                }

                // Mystic Flare
                var mysticFlare = Main.MysticFlare;
                if (Menu.AutoAbilityToggler.Value.IsEnabled(mysticFlare.ToString()) &&
                    Menu.AutoMinHealthToUltItem <= ((float)target.Health / target.MaximumHealth) * 100 &&
                    mysticFlare.CanBeCasted &&
                    mysticFlare.CanHit(target))
                {
                    var enemies = EntityManager <Hero> .Entities.Where(x =>
                                                                       x.IsVisible &&
                                                                       x.IsAlive &&
                                                                       x.IsValid &&
                                                                       !x.IsIllusion &&
                                                                       x.IsEnemy(Owner) &&
                                                                       x.Distance2D(Owner) <= mysticFlare.CastRange).ToList();

                    var dubleMysticFlare = Owner.HasAghanimsScepter() && enemies.Count() == 1;
                    var input            = new PredictionInput
                    {
                        Owner  = Owner,
                        Range  = mysticFlare.CastRange,
                        Radius = dubleMysticFlare ? -250 : -100
                    };

                    var output = Prediction.GetPrediction(input.WithTarget(target));

                    mysticFlare.UseAbility(output.CastPosition);
                    await Await.Delay(mysticFlare.GetCastDelay(output.CastPosition), token);
                }

                // Nullifier
                var nullifier = Main.Nullifier;
                if (nullifier != null &&
                    Menu.ItemToggler.Value.IsEnabled(nullifier.ToString()) &&
                    nullifier.CanBeCasted &&
                    nullifier.CanHit(target) &&
                    (stunDebuff == null || !stunDebuff.IsValid || stunDebuff.RemainingTime <= 0.5f) &&
                    (hexDebuff == null || !hexDebuff.IsValid || hexDebuff.RemainingTime <= 0.5f))
                {
                    nullifier.UseAbility(target);
                    await Await.Delay(nullifier.GetCastDelay(target), token);
                }

                // RodofAtos
                var rodofAtos = Main.RodofAtos;
                if (rodofAtos != null &&
                    Menu.AutoItemToggler.Value.IsEnabled(rodofAtos.ToString()) &&
                    rodofAtos.CanBeCasted &&
                    rodofAtos.CanHit(target) &&
                    !target.Modifiers.Any(x => x.IsValid && x.Name == "modifier_rod_of_atos_debuff" && x.RemainingTime > 0.5f) &&
                    (stunDebuff == null || !stunDebuff.IsValid || stunDebuff.RemainingTime <= 0.5f))
                {
                    rodofAtos.UseAbility(target);
                    await Await.Delay(rodofAtos.GetCastDelay(target), token);
                }

                // AncientSeal
                var ancientSeal = Main.AncientSeal;
                if (Menu.AutoAbilityToggler.Value.IsEnabled(ancientSeal.ToString()) &&
                    ancientSeal.CanBeCasted &&
                    ancientSeal.CanHit(target))
                {
                    ancientSeal.UseAbility(target);
                    await Await.Delay(ancientSeal.GetCastDelay(target), token);

                    return;
                }

                // Veil
                var veil = Main.Veil;
                if (veil != null &&
                    Menu.AutoItemToggler.Value.IsEnabled(veil.ToString()) &&
                    veil.CanBeCasted &&
                    veil.CanHit(target))
                {
                    veil.UseAbility(target.Position);
                    await Await.Delay(veil.GetCastDelay(target.Position), token);
                }

                // Ethereal
                var ethereal = Main.Ethereal;
                if (ethereal != null &&
                    Menu.AutoItemToggler.Value.IsEnabled(ethereal.ToString()) &&
                    ethereal.CanBeCasted &&
                    ethereal.CanHit(target))
                {
                    ethereal.UseAbility(target);
                    MultiSleeper.Sleep(ethereal.GetHitTime(target), "ethereal");
                    await Await.Delay(ethereal.GetCastDelay(target), token);
                }

                // Shivas
                var shivas = Main.Shivas;
                if (shivas != null &&
                    Menu.AutoItemToggler.Value.IsEnabled(shivas.ToString()) &&
                    shivas.CanBeCasted &&
                    shivas.CanHit(target))
                {
                    shivas.UseAbility();
                    await Await.Delay(shivas.GetCastDelay(), token);
                }

                if (!MultiSleeper.Sleeping("ethereal") || target.IsEthereal())
                {
                    // ConcussiveShot
                    var concussiveShot = Main.ConcussiveShot;
                    if (Menu.AutoAbilityToggler.Value.IsEnabled(concussiveShot.ToString()) &&
                        Extensions.ConcussiveShotTarget(target, concussiveShot.TargetHit) &&
                        concussiveShot.CanBeCasted &&
                        Owner.Distance2D(target) < Menu.ConcussiveShotUseRadiusItem - Owner.HullRadius)
                    {
                        concussiveShot.UseAbility();
                        await Await.Delay(concussiveShot.GetCastDelay(), token);
                    }

                    // ArcaneBolt
                    var arcaneBolt = Main.ArcaneBolt;
                    if (Menu.AutoAbilityToggler.Value.IsEnabled(arcaneBolt.ToString()) &&
                        arcaneBolt.CanBeCasted &&
                        arcaneBolt.CanHit(target))
                    {
                        arcaneBolt.UseAbility(target);

                        UpdateManager.BeginInvoke(() =>
                        {
                            MultiSleeper.Sleep(arcaneBolt.GetHitTime(target) - (arcaneBolt.GetCastDelay(target) + 350), $"arcanebolt_{ target.Name }");
                        },
                                                  arcaneBolt.GetCastDelay(target) + 50);

                        await Await.Delay(arcaneBolt.GetCastDelay(target), token);

                        return;
                    }

                    // Dagon
                    var dagon = Main.Dagon;
                    if (dagon != null &&
                        Menu.AutoItemToggler.Value.IsEnabled("item_dagon_5") &&
                        dagon.CanBeCasted &&
                        dagon.CanHit(target))
                    {
                        dagon.UseAbility(target);
                        await Await.Delay(dagon.GetCastDelay(target), token);

                        return;
                    }
                }
            }
            catch (TaskCanceledException)
            {
                // canceled
            }
            catch (Exception e)
            {
                Main.Log.Error(e);
            }
        }
Esempio n. 30
0
        public static void Game_OnUpdate(EventArgs args)
        {
            if (!IsEnable)
            {
                return;
            }
            if (_combos == null)
            {
                _combos = new MultiSleeper();
            }
            var smash           = Abilities.FindAbility("earth_spirit_boulder_smash");
            var geomagneticGrip = Abilities.FindAbility("earth_spirit_geomagnetic_grip");
            var magnetize       = Abilities.FindAbility("earth_spirit_magnetize");
            var rollingBoulder  = Abilities.FindAbility("earth_spirit_rolling_boulder");
            var stoneCaller     = Abilities.FindAbility("earth_spirit_stone_caller");
            var petrify         = Abilities.FindAbility("earth_spirit_petrify");

            if (Combo1)
            {
                if (smash.CanBeCasted() && !_combos.Sleeping(smash))
                {
                    var remnant = Helper.FindRemnant();
                    if (stoneCaller.CanBeCasted() && remnant == null)
                    {
                        stoneCaller.UseAbility(Prediction.InFront(Members.MyHero, 75));
                    }
                    //stoneCaller.UseAbility(Members.MyHero.Position);
                    smash.UseAbility(Game.MousePosition);
                    _combos.Sleep(500, smash);
                }
            }
            else if (Combo2)
            {
                if (rollingBoulder.CanBeCasted() && !_combos.Sleeping(rollingBoulder))
                {
                    var myPos    = Members.MyHero.Position;
                    var mousePos = Game.MousePosition;

                    var angle = Members.MyHero.FindAngleBetween(mousePos, true);
                    var point = new Vector3(
                        (float)
                        (myPos.X +
                         75 *
                         Math.Cos(angle)),
                        (float)
                        (myPos.Y +
                         75 *
                         Math.Sin(angle)),
                        0);
                    var remnant = Helper.FindRemnant(range: 100);
                    if (stoneCaller.CanBeCasted() && remnant == null)
                    {
                        stoneCaller.UseAbility(point);
                    }
                    rollingBoulder.UseAbility(Game.MousePosition);
                    _combos.Sleep(500, rollingBoulder);
                }
            }
            else if (Combo3)
            {
                var myPos       = Members.MyHero.Position;
                var mousePos    = Game.MousePosition;
                var distance    = myPos.Distance2D(mousePos);
                var myInventory = Members.MyHero.Inventory.Items.ToList();
                var extraRange  = myInventory.Any(x => x.StoredName() == "item_aether_lens") ? 200 : 0;
                if (geomagneticGrip.CanBeCasted() && !_combos.Sleeping(geomagneticGrip) &&
                    distance <= 1100 + extraRange)
                {
                    var remnant = Helper.FindRemnant(mousePos);
                    if (stoneCaller.CanBeCasted() && remnant == null)
                    {
                        stoneCaller.UseAbility(mousePos);
                        geomagneticGrip.UseAbility(mousePos);
                    }
                    else
                    {
                        geomagneticGrip.UseAbility(remnant.NetworkPosition);
                    }

                    _combos.Sleep(500, geomagneticGrip);
                }
            }
            if (Combo4)
            {
                var myPos       = Members.MyHero.Position;
                var mousePos    = Game.MousePosition;
                var distance    = myPos.Distance2D(mousePos);
                var myInventory = Members.MyHero.Inventory.Items.ToList();
                var extraRange  = myInventory.Any(x => x.StoredName() == "item_aether_lens") ? 200 : 0;

                /*Printer.Print(
                 *  $"{rollingBoulder.CanBeCasted()}/{geomagneticGrip.CanBeCasted()}/{!_combos.Sleeping(stoneCaller)}/{distance <= 1000 + extraRange}");*/
                if (rollingBoulder.CanBeCasted() && geomagneticGrip.CanBeCasted() && !_combos.Sleeping(stoneCaller) &&
                    distance <= 11000 + extraRange)
                {
                    var remnant = Helper.FindRemnant(mousePos);
                    if (remnant != null)
                    {
                        geomagneticGrip.UseAbility(remnant.NetworkPosition);
                        rollingBoulder.UseAbility(mousePos);
                        _combos.Sleep(500, stoneCaller);
                    }
                }
            }
        }