Beispiel #1
0
    internal static void Under10Rotation()
    {
        if (lowlevel != true)
        {
            lowlevel = true;
        }

        if (MyTarget.GetDistance < 20)
        {
            TotemManager.CastTotems();
        }
        if (Me.Level < 4)
        {
            Extension.FightSpell(LightningBolt);
        }
        if (MyTarget.GetDistance > 7)
        {
            Extension.FightSpell(LightningBolt);
        }
        Extension.FightSpell(EarthShock);
        if (Me.ManaPercentage > 40)
        {
            Extension.BuffSpell(LightningShield);
        }
    }
    internal static void CombatRotation()
    {
        bool    _lowMana             = Me.ManaPercentage <= _lowManaThreshold;
        bool    _mediumMana          = Me.ManaPercentage >= _mediumManaThreshold;
        bool    _isPoisoned          = ToolBox.HasPoisonDebuff();
        bool    _hasDisease          = ToolBox.HasDiseaseDebuff();
        bool    _shouldBeInterrupted = false;
        WoWUnit Target = ObjectManager.Target;

        // Check Auto-Attacking
        ToolBox.CheckAutoAttack(Attack);

        // Check if we need to interrupt
        int channelTimeLeft = Lua.LuaDoString <int>(@"local spell, _, _, _, endTimeMS = UnitChannelInfo('target')
                                    if spell then
                                     local finish = endTimeMS / 1000 - GetTime()
                                     return finish
                                    end");

        if (channelTimeLeft < 0 || Target.CastingTimeLeft > Usefuls.Latency)
        {
            _shouldBeInterrupted = true;
        }

        // Melee ?
        if (_pullMeleeTimer.ElapsedMilliseconds > 0)
        {
            _pullMeleeTimer.Reset();
        }

        if (_meleeTimer.ElapsedMilliseconds <= 0 &&
            !_goInMelee)
        {
            _meleeTimer.Start();
        }

        if ((_shouldBeInterrupted || _meleeTimer.ElapsedMilliseconds > 8000) &&
            !_goInMelee)
        {
            Main.LogDebug("Going in melee range");
            if (!_casterEnemies.Contains(Target.Name))
            {
                _casterEnemies.Add(Target.Name);
            }
            _fightingACaster = true;
            _goInMelee       = true;
            _meleeTimer.Stop();
        }

        // Shamanistic Rage
        if (!_mediumMana &&
            ((Target.HealthPercent > 80 && !_settings.ShamanisticRageOnMultiOnly) || ObjectManager.GetNumberAttackPlayer() > 1))
        {
            if (Cast(ShamanisticRage))
            {
                return;
            }
        }

        // Gift of the Naaru
        if (ObjectManager.GetNumberAttackPlayer() > 1 &&
            Me.HealthPercent < 50)
        {
            if (Cast(GiftOfTheNaaru))
            {
                return;
            }
        }

        // Blood Fury
        if (Target.HealthPercent > 70)
        {
            if (Cast(BloodFury))
            {
                return;
            }
        }

        // Berserking
        if (Target.HealthPercent > 70)
        {
            if (Cast(Berserking))
            {
                return;
            }
        }

        // Warstomp
        if (ObjectManager.GetNumberAttackPlayer() > 1 &&
            Target.GetDistance < 8)
        {
            if (Cast(WarStomp))
            {
                return;
            }
        }

        // Lesser Healing Wave
        if (Me.HealthPercent < 50 &&
            LesserHealingWave.KnownSpell &&
            (Target.HealthPercent > 15 || Me.HealthPercent < 25))
        {
            if (Cast(LesserHealingWave))
            {
                return;
            }
        }

        // Healing Wave
        if (Me.HealthPercent < 50 &&
            !LesserHealingWave.KnownSpell &&
            (Target.HealthPercent > 15 || Me.HealthPercent < 25))
        {
            if (Cast(HealingWave))
            {
                return;
            }
        }

        // Cure Poison
        if (_isPoisoned && !_lowMana)
        {
            Thread.Sleep(Main._humanReflexTime);
            if (Cast(CurePoison))
            {
                return;
            }
        }

        // Cure Disease
        if (_hasDisease && !_lowMana)
        {
            Thread.Sleep(Main._humanReflexTime);
            if (Cast(CureDisease))
            {
                return;
            }
        }

        // Lightning Shield
        if (!_lowMana && !Me.HaveBuff("Lightning Shield") &&
            !Me.HaveBuff("Water Shield") &&
            _settings.UseLightningShield &&
            (!WaterShield.KnownSpell || !_settings.UseWaterShield))
        {
            if (Cast(LightningShield))
            {
                return;
            }
        }

        // Earth Shock Focused
        if (Me.HaveBuff("Focused") &&
            Target.GetDistance < 19f)
        {
            if (Cast(EarthShock))
            {
                return;
            }
        }

        // Frost Shock
        if ((Target.CreatureTypeTarget == "Humanoid" || Target.Name.Contains("Plainstrider")) &&
            _settings.FrostShockHumanoids &&
            Target.HealthPercent < 40 &&
            !Target.HaveBuff("Frost Shock"))
        {
            if (Cast(FrostShock))
            {
                return;
            }
        }

        // Earth Shock Interupt Rank 1
        if (_shouldBeInterrupted &&
            Target.GetDistance < 19f &&
            (_settings.InterruptWithRankOne || _lowMana))
        {
            _fightingACaster = true;
            if (!_casterEnemies.Contains(Target.Name))
            {
                _casterEnemies.Add(Target.Name);
            }
            Thread.Sleep(Main._humanReflexTime);
            Lua.RunMacroText("/cast Earth Shock(Rank 1)");
            return;
        }

        // Earth Shock Interupt
        if (_shouldBeInterrupted &&
            Target.GetDistance < 19f &&
            !_settings.InterruptWithRankOne)
        {
            if (!_casterEnemies.Contains(Target.Name))
            {
                _casterEnemies.Add(Target.Name);
            }
            _fightingACaster = true;
            Thread.Sleep(Main._humanReflexTime);
            if (Cast(EarthShock))
            {
                return;
            }
        }

        // Water Shield
        if (!Me.HaveBuff("Water Shield") &&
            !Me.HaveBuff("Lightning Shield") &&
            (_settings.UseWaterShield || !_settings.UseLightningShield || _lowMana))
        {
            if (Cast(WaterShield))
            {
                return;
            }
        }

        // Flame Shock DPS
        if (!_lowMana &&
            Target.GetDistance < 19f &&
            !Target.HaveBuff("Flame Shock") &&
            Target.HealthPercent > 20 &&
            !_fightingACaster &&
            _settings.UseFlameShock)
        {
            if (Cast(FlameShock))
            {
                return;
            }
        }

        // Totems
        if (!_lowMana &&
            Target.GetDistance < 20)
        {
            if (totemManager.CastTotems())
            {
                return;
            }
        }

        // Stormstrike
        if (!_lowMana &&
            Stormstrike.IsDistanceGood)
        {
            if (Cast(Stormstrike))
            {
                return;
            }
        }

        // Earth Shock DPS
        if (!_lowMana &&
            Target.GetDistance < 19f &&
            !FlameShock.KnownSpell &&
            Target.HealthPercent > 25 &&
            Me.ManaPercentage > 30)
        {
            if (Cast(EarthShock))
            {
                return;
            }
        }

        // Low level lightning bolt
        if (!EarthShock.KnownSpell &&
            Me.ManaPercentage > 30 &&
            !_lowMana &&
            Target.GetDistance < 29f &&
            Target.HealthPercent > 40)
        {
            if (Cast(LightningBolt))
            {
                return;
            }
        }
    }
Beispiel #3
0
    internal static void EnhancementRotation()
    {
        bool Poison  = Extension.HasPoisonDebuff();
        bool Disease = Extension.HasDiseaseDebuff();

        if (Extension.InterruptableUnit(10f) != null && WindShear.KnownSpell && WindShear.IsSpellUsable)
        {
            Logging.Write("Interrupt Target found");
            ObjectManager.Me.FocusGuid = Extension.InterruptableUnit(10f).Guid;
            Logging.Write("Interrupt Target Set" + Extension.InterruptableUnit(10f).Guid);
            Extension.FightSpell(WindShear, true);
        }

        if (Me.HealthPercent < 30 && MyTarget.HealthPercent > ShamanLevelSettings.CurrentSetting.Enemylife)
        {
            Extension.HealSpell(HealingWave);
        }
        if (Poison)
        {
            Extension.BuffSpell(CurePoison);
        }
        if (Disease)
        {
            Extension.BuffSpell(CurePoison);
        }
        if (Extension.GetAttackingUnits(20).Count() > 1)
        {
            Extension.FightSpell(FeralSpirit);
        }

        if (Me.Level < 10)
        {
            if (lowlevel != true)
            {
                lowlevel = true;
            }

            if (MyTarget.GetDistance < 20)
            {
                TotemManager.CastTotems();
            }
            if (Me.Level < 4)
            {
                Extension.FightSpell(LightningBolt);
            }
            if (MyTarget.GetDistance > 7)
            {
                Extension.FightSpell(LightningBolt);
            }
            Extension.FightSpell(EarthShock);
            if (Me.ManaPercentage > 40)
            {
                Extension.BuffSpell(LightningShield);
            }
        }
        if (Me.Level > 9 && Me.Level < 20)
        {
            if (lowlevel != true)
            {
                lowlevel = true;
            }
            if (MyTarget.GetDistance < 20)
            {
                TotemManager.CastTotems();
            }
            //_lastTotemPosition.DistanceTo(ObjectManager.Me.Position)

            //if (_fireTotemPosition.DistanceTo(Me.Position) < 10 && Extension.GetAttackingUnits(5).Count() > 1 && ShamanLevelSettings.CurrentSetting.UseFireNova)
            //{
            //    Extension.FightSpell(FireNova);
            //}
            if (MyTarget.GetDistance > 7)
            {
                Extension.FightSpell(LightningBolt);
            }
            if (!FlameShock.KnownSpell)
            {
                Extension.FightSpell(EarthShock);
            }
            Extension.FightSpell(FlameShock);
            if (Me.ManaPercentage > 40)
            {
                Extension.BuffSpell(LightningShield);
            }
        }
        if (Me.Level > 19 && Me.Level < 40)
        {
            if (lowlevel == true)
            {
                lowlevel = false;
            }
            if (MyTarget.GetDistance < 20)
            {
                TotemManager.CotE();
                TotemManager.CastTotems();
            }
            if (MyTarget.GetDistance > 20)
            {
                Extension.FightSpell(LightningBolt);
            }
            Extension.FightSpell(EarthShock);
            if (Me.ManaPercentage < 20)
            {
                Extension.BuffSpell(WaterShield);
            }
            if (Me.ManaPercentage > 20 && !Me.HaveBuff(WaterShield.Id))
            {
                Extension.BuffSpell(LightningShield);
            }
        }
        if (Me.Level > 39 && Me.Level < 50)
        {
            if (MyTarget.GetDistance < 20)
            {
                TotemManager.CotE();
                TotemManager.CastTotems();
            }
            if (lowlevel == true)
            {
                lowlevel = false;
            }
            if (MyTarget.GetDistance > 20)
            {
                Extension.FightSpell(LightningBolt);
            }
            Extension.FightSpell(Stormstrike);
            Extension.FightSpell(EarthShock);
            Extension.FightSpell(LavaLash);
            if (Me.ManaPercentage < 20)
            {
                Extension.BuffSpell(WaterShield);
            }
            if (Me.ManaPercentage > 20 && !Me.HaveBuff(WaterShield.Id))

            {
                Extension.BuffSpell(LightningShield);
            }
        }
        if (Me.Level > 49 && Me.Level <= 80)
        {
            if (lowlevel == true)
            {
                lowlevel = false;
            }
            if (MyTarget.GetDistance < 20)
            {
                TotemManager.CotE();
                TotemManager.CastTotems();
            }
            if (MyTarget.GetDistance > 20 && ShamanLevelSettings.CurrentSetting.LNB)
            {
                Extension.FightSpell(LightningBolt);
            }
            if (Me.BuffStack(53817) >= 4)
            {
                if (Extension.GetAttackingUnits(5).Count() == 1)
                {
                    Extension.FightSpell(LightningBolt);
                }
                if (Extension.GetAttackingUnits(5).Count() > 1)
                {
                    Extension.FightSpell(ChainLightning);
                }
            }
            if (MyTarget.GetDistance < 7)
            {
                Extension.BuffSpell(ShamanisticRage);
            }
            Extension.FightSpell(Stormstrike);
            Extension.FightSpell(EarthShock);
            Extension.FightSpell(LavaLash);
            if (Me.ManaPercentage < 30)
            {
                Extension.BuffSpell(WaterShield);
            }
            if (Me.ManaPercentage > 30 && !Me.HaveBuff(WaterShield.Id))

            {
                Extension.BuffSpell(LightningShield);
            }
        }
    }