private int CheckBloodlust()
 {
     if (WoW.PlayerHasBuff("Bloodlust"))
     {
         return(WoW.PlayerBuffTimeRemaining("Bloodlust"));
     }
     if (WoW.PlayerHasBuff("Heroism"))
     {
         return(WoW.PlayerBuffTimeRemaining("Heroism"));
     }
     if (WoW.PlayerHasBuff("Time Warp"))
     {
         return(WoW.PlayerBuffTimeRemaining("Time Warp"));
     }
     if (WoW.PlayerHasBuff("Ancient Hysteria"))
     {
         return(WoW.PlayerBuffTimeRemaining("Ancient Hysteria"));
     }
     if (WoW.PlayerHasBuff("Netherwinds"))
     {
         return(WoW.PlayerBuffTimeRemaining("Netherwinds"));
     }
     if (WoW.PlayerHasBuff("Drums of Fury"))
     {
         return(WoW.PlayerBuffTimeRemaining("Drums of Fury"));
     }
     return(0);
 }
Exemplo n.º 2
0
        public override void Pulse()
        {
            new Thread(PulseUpdateSpells).Start();

            PulseTick    = Environment.TickCount;
            Gcd          = CooldownWithHaste(1500);
            HolyPower    = WoW.CurrentHolyPower;
            InMeleeRange = WoW.CanCast("Templar Verdict", false, false, true, false, true);
            BloodLustUp  = WoW.PlayerHasBuff("Bloodlust") || WoW.PlayerHasBuff("Time Warp") || WoW.PlayerHasBuff("Netherwinds") || WoW.PlayerHasBuff("Drums of War");


            //Log.Write("11 " + BladeOfJustice.SpellCanCast);

            if (WoW.HasTarget && WoW.TargetIsEnemy && WoW.IsInCombat && !WoW.PlayerIsChanneling && !WoW.PlayerIsCasting && !WoW.PlayerHasBuff("Mount"))
            {
                if (false)
                {
                    //System.Diagnostics.Stopwatch sw = new Stopwatch();
                    //sw.Start();

                    //PulseRotattion();

                    //sw.Stop();
                    //Log.Write("## " + sw.ElapsedMilliseconds);
                }
                PulseRotattion();
            }
        }
        private void interruptcast()
        {
            Random random       = new Random();
            int    randomNumber = random.Next(interMin, interMax);

            if (WoW.TargetPercentCast > randomNumber && WoW.TargetIsCastingAndSpellIsInterruptible)
            {
                if (WoW.CanCast("Wind Shear") && !WoW.IsSpellOnCooldown("Wind Shear") && WoW.TargetIsCasting && WoW.IsSpellInRange("Wind Shear")) //interupt every spell, not a boss.
                {
                    WoW.CastSpell("Wind Shear");
                    return;
                }
                if (WoW.PlayerRace == "BloodElf" && WoW.CanCast("Arcane Torrent", true, true, false, false, true) && !WoW.IsSpellOnCooldown("Wind Shear") && WoW.IsSpellInRange("Stormstrike")) //interupt every spell, not a boss.
                {
                    WoW.CastSpell("Arcane Torrent");
                    return;
                }
                if (WoW.PlayerRace == "Pandaren" && WoW.CanCast("Quaking palm", true, true, true, false, true)) //interupt every spell, not a boss.
                {
                    WoW.CastSpell("Quaking palm");
                    return;
                }
            }

            /*  for (int i = 1; i < 5; i++)
             *    if (WoW.BossPercentCast(i) > randomNumber && WoW.BossIsCastingAndSpellIsInterruptible(i))
             *    {
             *
             *        if (WoW.CanCast("Wind Shear")) //interupt every spell, not a boss.
             *        {
             *            WoW.CastSpell("Wind Shear");
             *            return;
             *        }
             *    }*/
        }
Exemplo n.º 4
0
 /// <summary>
 ///     Maintain a debuff if it is not currently on the target or if it's about to expire.
 /// </summary>
 /// <param name="debuffName">The name of the debuff we are maintaining.</param>
 /// <param name="spellName">The name of the spell that applies the debuff.</param>
 /// <param name="minTimeToExpire">The minimum amount of time to allow on the debuff before renewing.</param>
 /// <returns>True if the debuff was renewed, otherwise fasle.</returns>
 private void maintainDebuff(string debuffName, string spellName, float minTimeToExpire)
 {
     if (!WoW.TargetHasDebuff(debuffName) || WoW.TargetDebuffTimeRemaining(debuffName) < minTimeToExpire)
     {
         castWithRangeCheck(spellName);
     }
 }
Exemplo n.º 5
0
        public override void Pulse()
        {
            if (WoW.TargetHealthPercent == 0)
            {
                return;
            }

            if (!WoW.TargetIsEnemy)
            {
                return;
            }
            WoW.CastSpell("Rebuke", WoW.TargetIsCastingAndSpellIsInterruptible && WoW.TargetPercentCast > 60);
            WoW.CastSpell("ArdentDefender", WoW.PlayerHealthPercent < 15);
            WoW.CastSpell("LayOnHands", WoW.CanCast("LayOnHands") && !WoW.PlayerHasDebuff("Forbearance") && WoW.PlayerHealthPercent < 20 && !WoW.PlayerHasBuff("ArdentDefender"));
            WoW.CastSpell("GuardianOfAncientKings", WoW.PlayerHealthPercent < 50 && !WoW.PlayerHasBuff("ArdentDefender"));
            if (!WoW.HasTarget)
            {
                return;
            }
            WoW.CastSpell("AvengingWrath", UseCooldowns, false); // Off the GCD no return needed.
            WoW.CastSpell("AvengersShield", true);
            WoW.CastSpell("EyeOfTyr", WoW.PlayerHealthPercent < 100);
            WoW.CastSpell("Judgment", true);
            WoW.CastSpell("Consecration", true);
            WoW.CastSpell("LightOfTheProtector", WoW.PlayerHasBuff("Consecration") && WoW.PlayerHealthPercent < 70);
            WoW.CastSpell("BlessedHammer", WoW.Talent(1) == 2);
            WoW.CastSpell("BastionOfLight", WoW.PlayerSpellCharges("ShieldOfTheRighteous") == 0 && !WoW.PlayerHasBuff("ShieldOfTheRighteous"));
            WoW.CastSpell("ShieldOfTheRighteous", WoW.PlayerHasBuff("Consecration") &&
                          WoW.PlayerSpellCharges("ShieldOfTheRighteous") > 0 &&
                          !WoW.PlayerHasBuff("ShieldOfTheRighteous"));
            WoW.CastSpell("Seraphim", WoW.Talent(7) == 2);
            WoW.CastSpell("BlessedHammer", true);
        }
 public override void Initialize()
 {
     Log.Write("Welcome to Enhancement Shaman by Jedix", Color.Green);
     Log.Write("Suggested build: 2212222 (HotHand+Overcharge+FoA)", Color.Green);
     Log.Write("If you got no set t19, use this rotation for most dps. Numpad * controls cooldowns on/off", Color.Green);
     WoW.Speak("PixelMagic Enhancement");
 }
Exemplo n.º 7
0
 public override void Initialize()
 {
     Log.DrawHorizontalLine();
     Log.WriteFrozen("Welcome to Frozen Protection", Color.Black);
     Log.Write("Supported Talents: 2212321");
     Log.Write("Current Talents  : " + WoW.Talent(1) + WoW.Talent(2) + WoW.Talent(3) + WoW.Talent(4) + WoW.Talent(5) + WoW.Talent(6) + WoW.Talent(7));
 }
Exemplo n.º 8
0
 public override void Initialize()
 {
     Log.Write("Demonology Warlock", Color.Red);
     Log.Write("Suggested build: 2211232 - single target", Color.Red);
     Log.Write("Suggested build: 2311232 - AOE", Color.Red);
     WoW.Speak("Welcome to PixelMagic Demonology");
 }
Exemplo n.º 9
0
 private void Defensive()
 {
     if (WoW.PlayerRace == "Dreanei" && WoW.HealthPercent < 80 && !WoW.IsSpellOnCooldown("Gift Naaru"))
     {
         WoW.CastSpell("Gift Naaru");
     }
 }
Exemplo n.º 10
0
 private void UsePotion()
 {
     if (!WoW.ItemOnCooldown("Prolonged Power"))
     {
         WoW.CastSpell("Prolonged Power");
         return;
     }
 }
Exemplo n.º 11
0
        public void PulseTargetDebuffRemaining()
        {
            var remaining = WoW.TargetDebuffTimeRemaining(this._name);

            if (_lastTargetDebuffRemaining - remaining == 1)
            {
                _endTargetDebuffRemaining = Environment.TickCount + 1000 * _lastTargetDebuffRemaining;
            }
            _lastTargetDebuffRemaining = remaining;
        }
Exemplo n.º 12
0
        public void PulseSpellCooldownRemaining()
        {
            var remaining = WoW.SpellCooldownTimeRemaining(this._name);

            if (_lastSpellCooldownRemaining - remaining == 1)
            {
                _endSpellCooldownRemaining = Environment.TickCount + 1000 * _lastSpellCooldownRemaining;
            }
            _lastSpellCooldownRemaining = remaining;
        }
Exemplo n.º 13
0
        public void PulsePlayerBuffRemaining()
        {
            var remaining = WoW.PlayerBuffTimeRemaining(this._name);

            if (_lastPlayerBuffRemaining - remaining == 1)
            {
                _endPlayerBuffRemaining = Environment.TickCount + 1000 * _lastPlayerBuffRemaining;
            }
            _lastPlayerBuffRemaining = remaining;
        }
 private bool MoveCheck()
 {
     if (WoW.PlayerHasBuff(LEG_BOOTS) || !WoW.IsMoving)
     {
         return(false);
     }
     else
     {
         return(true);
     }
 }
 private bool DotsUp()
 {
     if (WoW.TargetHasDebuff(SHADOW_WORD_PAIN) && WoW.TargetHasDebuff(VAMPIRIC_TOUCH))
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
Exemplo n.º 16
0
        public override void Pulse()
        {
            if (jumpInterval.ElapsedMilliseconds < 5000 + random.Next(5000, 20000) || WoW.PlayerIsCasting || WoW.PlayerIsChanneling)
            {
                return;
            }

            Log.Write("Jumping is so much fun...", Color.Aqua);
            WoW.KeyPressRelease(Keys.Space);
            jumpInterval.Restart();
        }
Exemplo n.º 17
0
 private void Stuns()
 {
     if (!WoW.PlayerIsCasting)
     {
         if (WoW.PlayerRace == "Tauren​" && !WoW.IsMoving && WoW.CanCast("War Stomp") && !WoW.IsSpellOnCooldown("War Stomp"))
         {
             WoW.CastSpell("War Stomp");
             return;
         }
     }
 }
Exemplo n.º 18
0
 private void DBMPrePull()
 {
     if (dbmOn && dbmTimer <= 18 && dbmTimer > 0 && WoW.HasTarget)
     {
         if (!WoW.ItemOnCooldown("Prolonged Power"))
         {
             WoW.CastSpell("Prolonged Power");
             return;
         }
     }
 }
 private void EnhancementBuffs()
 {
     //actions +=/ windstrike,if= (variable.heartEquipped | set_bonus.tier19_2pc) & (!talent.earthen_spike.enabled | (cooldown.earthen_spike.remains > 1 & cooldown.doom_winds.remains > 1) | debuff.earthen_spike.up)
     if (WoW.CanCast("Windstrike", true, true, true) && WoW.PlayerHasBuff("Ascendance") && WoW.Maelstrom >= 8 && (/*heart equip place holder*/ WoW.SetBonus(19) >= 2) && (WoW.Talent(7) != 3 || (WoW.SpellCooldownTimeRemaining("Earthen spike") > 1 && WoW.SpellCooldownTimeRemaining("Doom winds") > 1 || WoW.TargetHasDebuff("Earthen spike"))))
     {
         WoW.CastSpell("Windstrike", "Top prioity spell");
         return;
     }
     //actions.buffs = rockbiter,if= talent.landslide.enabled & !buff.landslide.up
     if (WoW.CanCast("Rockbiter", true, true, true) && WoW.Talent(1) == 3 && !WoW.PlayerHasBuff("Landslide"))
     {
         WoW.CastSpell("Rockbiter", "Buff spell");
         return;
     }
     //actions.buffs +=/ fury_of_air,if= buff.ascendance.up | (feral_spirit.remains > 5) | level < 100
     if (WoW.CanCast("FoA") && WoW.Maelstrom >= 5 && WoW.Talent(6) == 2 && !WoW.PlayerHasBuff("FoA") && (WoW.PlayerHasBuff("Ascendance") && Pets.IsRunning))
     {
         WoW.CastSpell("FoA", "Buff spell");
         return;
     }
     //actions.buffs +=/ crash_lightning,if= artifact.alpha_wolf.rank & prev_gcd.1.feral_spirit
     if (WoW.CanCast("Crash lightning") && WoW.Maelstrom >= 20 && WoW.IsSpellInRange("Rockbiter") && Pets.IsRunning && !Crash.IsRunning)
     {
         Crash.Restart();
         WoW.CastSpell("Crash lightning", "Buff spell");
         return;
     }
     //actions.buffs +=/ flametongue,if= !buff.flametongue.up
     if (!WoW.PlayerHasBuff("Flametongue") && WoW.CanCast("Flametongue", true, true, true))
     {
         WoW.CastSpell("Flametongue", "Buff spell");
         return;
     }
     //actions.buffs +=/ frostbrand,if= talent.hailstorm.enabled & !buff.frostbrand.up & variable.furyCheck45
     if (WoW.CanCast("Frostbrand", true, true, true) && WoW.Maelstrom >= 20 && WoW.Talent(4) == 3 && !WoW.PlayerHasBuff("Frostbrand") && furyCheck45)
     {
         WoW.CastSpell("Frostbrand", "Buff spell");
         return;
     }
     //actions.buffs +=/ flametongue,if= buff.flametongue.remains < 6 + gcd & cooldown.doom_winds.remains < gcd * 2
     if (WoW.CanCast("Flametongue", true, true, true) && WoW.PlayerBuffTimeRemaining("Flametongue") < 600 + GCD && WoW.SpellCooldownTimeRemaining("Doom Winds") < GCD * 2)
     {
         WoW.CastSpell("Flametongue", "Buff spell");
         return;
     }
     //actions.buffs +=/ frostbrand,if= talent.hailstorm.enabled & buff.frostbrand.remains < 6 + gcd & cooldown.doom_winds.remains < gcd * 2
     if (WoW.CanCast("Frostbrand", true, true, true) && WoW.Maelstrom >= 20 && WoW.PlayerBuffTimeRemaining("Frostbrand") < 600 + GCD && WoW.SpellCooldownTimeRemaining("Doom Winds") < GCD * 2)
     {
         WoW.CastSpell("Frostbrand", "Buff spell");
         return;
     }
 }
        private void SingleTargetRotation()
        {
            if (WoW.HasTarget && WoW.TargetIsEnemy && WoW.IsInCombat && WoW.TargetIsVisible && !WoW.IsMounted)
            {
                if (!WoW.PlayerHasBuff(VOIDFORM_AURA) && WoW.Insanity >= 65 && !MoveCheck() && DotsUp())
                {
                    SpellCast(VOID_ERUPTION);
                }

                if (WoW.PlayerHasBuff(VOIDFORM_AURA))
                {
                    if (!MoveCheck() && VoidTorrentRadio2.Checked && DotsUp() && !WoW.PlayerHasBuff(T19_VOID) && WoW.IsSpellOnCooldown(MIND_BLAST) && WoW.IsSpellOnCooldown(VOID_BOLT))
                    {
                        SpellCast(VOID_TORRENT);
                    }
                    if (WoW.PlayerHasBuff(T19_VOID) || DotsUp())
                    {
                        SpellCast(VOID_BOLT);
                    }
                }

                if (!MoveCheck() && DotsUp() && !WoW.PlayerHasBuff(T19_VOID) && WoW.LastSpell != VOID_ERUPTION)
                {
                    SpellCast(MIND_BLAST);
                }

                if (WoW.PlayerSpellCharges(SHADOW_WORD_DEATH) == 2 && (WoW.Insanity <= 80 || (WoW.IsSpellOnCooldown(MIND_BLAST) && WoW.IsSpellOnCooldown(VOID_BOLT))) && WoW.TargetHealthPercent <= 20 && DotsUp())
                {
                    SpellCast(SHADOW_WORD_DEATH);
                }
                if (WoW.PlayerSpellCharges(SHADOW_WORD_DEATH) == 1 && WoW.Insanity <= txtSWD && WoW.TargetHealthPercent <= 20 && DotsUp())
                {
                    SpellCast(SHADOW_WORD_DEATH);
                }

                if ((!WoW.TargetHasDebuff(VAMPIRIC_TOUCH) || WoW.TargetDebuffTimeRemaining(VAMPIRIC_TOUCH) <= 400) && !MoveCheck() && WoW.LastSpell != VAMPIRIC_TOUCH && !WoW.PlayerHasBuff(T19_VOID))                //Messy workaround to fix the double VT-Cast, since addon/BLizz API is returning weird values
                {
                    SpellCast(VAMPIRIC_TOUCH);
                }

                if ((!WoW.TargetHasDebuff(SHADOW_WORD_PAIN) || WoW.TargetDebuffTimeRemaining(SHADOW_WORD_PAIN) <= 300) && !WoW.PlayerHasBuff(T19_VOID))
                {
                    SpellCast(SHADOW_WORD_PAIN);
                }

                if (WoW.TargetHasDebuff(SHADOW_WORD_PAIN) && WoW.TargetHasDebuff(VAMPIRIC_TOUCH) && !MoveCheck() && WoW.IsSpellOnCooldown(MIND_BLAST) && !WoW.PlayerHasBuff(T19_VOID) && WoW.LastSpell != VOID_ERUPTION)
                {
                    SpellCast(MIND_FLAY);
                }
            }
        }
        //-Pulse--------------------//
        public override void Pulse()
        {
            if (DetectKeyPress.GetKeyState(0x76) < 0)
            {
                UseCooldowns = !UseCooldowns;
                Thread.Sleep(150);
            }


            if (WoW.IsInCombat)
            {
                interruptwatch.Start();
            }
            else
            {
                return;
            }

            if (combatRoutine.Type != RotationType.SingleTarget && combatRoutine.Type != RotationType.AOE)
            {
                return;
            }
            if (!WoW.HasTarget || !WoW.TargetIsEnemy)
            {
                return;
            }

            if (WoW.HealthPercent < txtPWS && !WoW.PlayerHasBuff(POWER_WORD_SHIELD) && !WoW.IsSpellOnCooldown(POWER_WORD_SHIELD))
            {
                Log.Write("Health below " + txtPWS + "% - Using PWS now", Color.Red);
                SpellCast(POWER_WORD_SHIELD);
                return;
            }
            if (SilenceBox.Checked && WoW.TargetIsCastingAndSpellIsInterruptible && interruptwatch.ElapsedMilliseconds > 900)
            {
                if (!WoW.IsSpellOnCooldown(SILENCE))
                {
                    SpellCast(SILENCE);
                    interruptwatch.Reset();
                    interruptwatch.Start();
                    return;
                }
            }

            if (!(WoW.PlayerHasBuff(SHADOWFORM_AURA) || WoW.PlayerHasBuff(VOIDFORM_AURA)))
            {
                SpellCast(SHADOWFORM);
            }
            CooldownUsage();
            SingleTargetRotation();
        }
Exemplo n.º 22
0
        private void cmdRefresh_Click(object sender, EventArgs e)
        {
            WoW.KeyPressRelease(WoW.Keys.D0);
            Thread.Sleep(400);

            Log.Clear();
            // Row 1 Pixel Testing
            Log.Write("Player Health: " + WoW.HealthPercent);
            Log.Write("Player Level: " + WoW.Level);
            Log.Write("Player Power: " + WoW.Power);
            Log.Write("Target Health: " + WoW.TargetHealthPercent);
            Log.Write("Unit In Combat: " + WoW.IsInCombat);
            Log.Write("Unit Power: " + WoW.UnitPower);
            Log.Write("Target Is Friend: " + WoW.TargetIsFriend);
            Log.Write("Has Target: " + WoW.HasTarget);
            Log.Write("Player Is Casting: " + WoW.PlayerIsCasting);
            Log.Write("Target Is Casting: " + WoW.TargetIsCasting);
            Log.Write("Player Haste Percent: " + WoW.HastePercent);
            Log.Write("Target Visible: " + WoW.TargetIsVisible);
            Log.Write("Pet Out: " + WoW.HasPet);
            Log.Write("Pet Health: " + WoW.PetHealthPercent);
            Log.Write("Wild Imps Count: " + WoW.WildImpsCount);
            Log.Write("Dreadstalkers Count: " + WoW.DreadstalkersCount);
            // Row 2 Pixel Testing

            Log.Write("Is Moving: " + WoW.IsMoving);
            Log.Write("Auto Attacking: " + WoW.AutoAtacking);
            Log.Write("Target Is Player: " + WoW.TargetIsPlayer);
            Log.Write("Flag: " + WoW.Flag);
            Log.Write("Last Casted Id: " + WoW.LastSpellCastedID);
            Log.Write("Target Casting Id: " + WoW.TargetCastingSpellID);
            for (int i = 1; i < 8; i++)
            {
                Log.Write($"Talent {i} : " + WoW.Talent(i));
            }
            Log.Write($"Race : " + WoW.PlayerRace + " Spec : " + WoW.PlayerSpec);
            for (int i = 19; i < 21; i++)
            {
                Log.Write($"SetBonus T{i}: " + WoW.SetBonus(i));
            }
            for (int i = 1; i < 3; i++)
            {
                Log.Write($"Legendary {i}: " + WoW.Legendary(i));
            }

            while (WoW.TargetCastingSpellID != 0)
            {
                Log.Write("Target % Cast: " + WoW.TargetPercentCast);
                Thread.Sleep(100);
            }
        }
Exemplo n.º 23
0
 /// <summary>
 ///     Cast a spell by name. Will check range, cooldown, and visibility. After the spell is cast, the thread will sleep
 ///     for GCD.
 /// </summary>
 /// <param name="spellName">The name of the spell in the spell databse.</param>
 /// <param name="ignoreMovement">Can we cast while moving.</param>
 /// <param name="ignoreChanneling"></param>
 /// <returns>True if the spell was cast, false if it was not.</returns>
 private bool castWithRangeCheck(string spellName, bool ignoreMovement = false, bool ignoreChanneling = true)
 {
     //Can't do range check.
     if (!isPlayerBusy(ignoreMovement, ignoreChanneling) && WoW.CanCast(spellName))
     {
         WoW.CastSpell(spellName);
         if (WoW.IsSpellOnGCD(spellName))
         {
             Thread.Sleep(WoW.SpellCooldownTimeRemaining(spellName));
         }
         return(true);
     }
     return(false);
 }
Exemplo n.º 24
0
        private void DPSRacial()
        {
            if (!WoW.PlayerIsCasting)
            {
                if (WoW.PlayerRace == "Troll" && WoW.CanCast("Berserking") && !WoW.IsSpellOnCooldown("Berserking"))
                {
                    WoW.CastSpell("Berserking");
                    return;
                }

                if (WoW.PlayerRace == "Orc" && WoW.CanCast("Blood Fury") && !WoW.IsSpellOnCooldown("Blood Fury"))
                {
                    WoW.CastSpell("Blood Fury");
                    return;
                }
            }
        }
 public void useCDDef()
 {
     if (CanCastNoRange("Anti-Magic Shell") && WoW.HealthPercent < 70 && !WoW.IsSpellOnCooldown("Anti-Magic Shell") && WoW.Level >= 57)
     {
         WoW.CastSpell("Anti-Magic Shell");
         return;
     }
     if (CanCastNoRange("Icebound Fortitude") && WoW.HealthPercent < 40 && !WoW.IsSpellOnCooldown("Icebound Fortitude") && WoW.Level >= 65)
     {
         WoW.CastSpell("Icebound Fortitude");
         return;
     }
     if (CanCastNoRange("Vampiric Blood") && WoW.HealthPercent < 50 && !WoW.IsSpellOnCooldown("Vampiric Blood") && WoW.Level >= 57)
     {
         WoW.CastSpell("Vampiric Blood");
     }
 }
 private void EnhancementBuffs()
 {
     //actions.buffs = rockbiter,if= talent.landslide.enabled & !buff.landslide.up
     if (WoW.CanCast("Rockbiter", true, true, true) && WoW.Talent(1) == 3 && !WoW.PlayerHasBuff("Landslide"))
     {
         WoW.CastSpell("Rockbiter", "Buff spell");
         return;
     }
     //actions.buffs +=/ fury_of_air,if= buff.ascendance.up | (feral_spirit.remains > 5) | level < 100
     if (WoW.CanCast("FoA") && WoW.Talent(6) == 2 && !WoW.PlayerHasBuff("FoA") && (WoW.PlayerHasBuff("Ascendance") && Pets.IsRunning))
     {
         WoW.CastSpell("FoA", "Buff spell");
         return;
     }
     //actions.buffs +=/ crash_lightning,if= artifact.alpha_wolf.rank & prev_gcd.1.feral_spirit
     if (WoW.CanCast("Crash lightning") && WoW.IsSpellInRange("Rockbiter") && Pets.IsRunning && !Crash.IsRunning)
     {
         Crash.Restart();
         WoW.CastSpell("Crash lightning", "Buff spell");
         return;
     }
     //actions.buffs +=/ flametongue,if= !buff.flametongue.up
     if (!WoW.PlayerHasBuff("Flametongue") && WoW.CanCast("Flametongue", true, true, true))
     {
         WoW.CastSpell("Flametongue", "Buff spell");
         return;
     }
     //actions.buffs +=/ frostbrand,if= talent.hailstorm.enabled & !buff.frostbrand.up & variable.furyCheck45
     if (WoW.CanCast("Frostbrand", true, true, true) && WoW.Talent(4) == 3 && !WoW.PlayerHasBuff("Frostbrand") && furyCheck45)
     {
         WoW.CastSpell("Frostbrand", "Buff spell");
         return;
     }
     //actions.buffs +=/ flametongue,if= buff.flametongue.remains < 6 + gcd & cooldown.doom_winds.remains < gcd * 2
     if (WoW.CanCast("Flametongue", true, true, true) && WoW.PlayerBuffTimeRemaining("Flametongue") < 600 + GCD && WoW.SpellCooldownTimeRemaining("Doom Winds") < GCD * 2)
     {
         WoW.CastSpell("Flametongue", "Buff spell");
         return;
     }
     //actions.buffs +=/ frostbrand,if= talent.hailstorm.enabled & buff.frostbrand.remains < 6 + gcd & cooldown.doom_winds.remains < gcd * 2
     if (WoW.CanCast("Frostbrand", true, true, true) && WoW.PlayerBuffTimeRemaining("Frostbrand") < 600 + GCD && WoW.SpellCooldownTimeRemaining("Doom Winds") < GCD * 2)
     {
         WoW.CastSpell("Frostbrand", "Buff spell");
         return;
     }
 }
Exemplo n.º 27
0
        private void interruptcast()
        {
            Random random       = new Random();
            int    randomNumber = random.Next(60, 80);

            if (WoW.TargetPercentCast > randomNumber && WoW.TargetIsCastingAndSpellIsInterruptible)
            {
                if (WoW.PlayerRace == "BloodElf" && WoW.CanCast("Arcane Torrent", true, true, false, false, true) && !WoW.IsSpellOnCooldown("Wind Shear") && WoW.TargetIsCastingAndSpellIsInterruptible) //interupt every spell, not a boss.
                {
                    WoW.CastSpell("Arcane Torrent");
                    return;
                }
                if (WoW.PlayerRace == "Pandaren" && WoW.CanCast("Quaking palm", true, true, true, false, true)) //interupt every spell, not a boss.
                {
                    WoW.CastSpell("Quaking palm");
                    return;
                }
            }
        }
 private void SpellCast(string spellName)
 {
     if (WoW.PlayerIsCasting || (WoW.LastSpell == VOID_TORRENT && WoW.PlayerIsChanneling))
     {
         return;
     }
     if (spellName == MIND_FLAY && WoW.LastSpell == MIND_FLAY && WoW.PlayerIsChanneling)
     {
         return;
     }
     if (WoW.CanCast(spellName) && WoW.IsSpellInRange(SHADOW_WORD_PAIN))
     {
         WoW.CastSpell(spellName);
         if (WoW.IsSpellOnGCD(spellName))
         {
             Thread.Sleep(WoW.SpellCooldownTimeRemaining(spellName));
         }
     }
 }
 public override void Pulse()
 {
     resetStopwatch();
     if (!WoW.CooldownsOn)
     {
         if (shouldUseTrinketOneAlways || shouldUseTrinketOneCd)
         {
             if (!trinketOne.IsRunning)
             {
                 WoW.CastSpell("TrinketOne");
                 trinketOne.Start();
             }
         }
         if (shouldUseTrinketTwoAlways || shouldUseTrinketTwoCd)
         {
             if (!trinketTwo.IsRunning)
             {
                 WoW.CastSpell("TrinketTwo");
                 trinketTwo.Start();
             }
         }
     }
     else
     {
         if (shouldUseTrinketOneAlways)
         {
             if (!trinketOne.IsRunning)
             {
                 WoW.CastSpell("TrinketOne");
                 trinketOne.Start();
             }
         }
         if (shouldUseTrinketTwoAlways)
         {
             if (!trinketTwo.IsRunning)
             {
                 WoW.CastSpell("TrinketTwo");
                 trinketTwo.Start();
             }
         }
     }
 }
        public void EnhancementCD()
        {
            if (UseCooldowns)
            {
                //actions.CDs = bloodlust,if= target.health.pct < 25 | time > 0.500

                //actions.CDs +=/ berserking,if= buff.ascendance.up | (feral_spirit.remains > 5)
                if (WoW.PlayerRace == "Troll" && WoW.CanCast("Berserking") && !WoW.IsSpellOnCooldown("Berserking") && ((WoW.Talent(7) != 1 || WoW.PlayerHasBuff("Ascendance")) || Pets.ElapsedMilliseconds < 10000))
                {
                    WoW.CastSpell("Berserking");
                    return;
                }
                //actions.CDs +=/ blood_fury,if= buff.ascendance.up | (feral_spirit.remains > 5) | level < 100
                if (WoW.PlayerRace == "Orc" && WoW.CanCast("Blood Fury") &&
                    ((WoW.Talent(7) != 1 || WoW.PlayerHasBuff("Ascendance")) || Pets.ElapsedMilliseconds < 10000))
                {
                    WoW.CastSpell("Blood Fury");
                    return;
                }
                //actions.CDs +=/ feral_spirit
                if (WoW.CanCast("Feral Spirit", true, true, false, false, true) && WoW.IsSpellInRange("Rockbiter") && WoW.Maelstrom >= 20 && (WoW.CanCast("Crash lightning", true, true, false, false, true) || WoW.SpellCooldownTimeRemaining("Crash lightning") < GCD))  //feral spirit on boss - normally cast manually
                {
                    Pets.Start();
                    WoW.CastSpell("Feral Spirit");
                    return;
                }
                //actions.CDs +=/ potion,if= buff.ascendance.up | !talent.ascendance.enabled & feral_spirit.remains > 5 | target.time_to_die <= 60

                //actions.CDs +=/ doom_winds,if= debuff.earthen_spike.up & talent.earthen_spike.enabled | !talent.earthen_spike.enabled
                if (WoW.CanCast("Doom Winds") && WoW.IsSpellInRange("Rockbiter") && (WoW.Talent(7) == 3 && WoW.TargetHasDebuff("Earthen spike") || WoW.Talent(7) != 3))
                {
                    WoW.CastSpell("Doom Winds");
                    return;
                }
                //actions.CDs +=/ ascendance,if= buff.doom_winds.up
                if (WoW.CanCast("Ascendance") && WoW.PlayerHasBuff("Doom Winds"))
                {
                    WoW.CastSpell("Ascendance");
                    return;
                }
            }
        }
        public static void AddGameObjectSpawn(WoW.GameObject gameobject)
        {
            var gameobjectspawn = new Custom.gameobject_spawn()
            {
                guid = gameobject.Guid.Full,
                map = (ushort?)gameobject.MapID,
                clientbuild =  gameobject.Core.ClientBuildAmount,
                phasemask = (ushort?)gameobject.PhaseMask,
                position_x = gameobject.MovementInfo.PositionInfo_0x100.X,
                position_y = gameobject.MovementInfo.PositionInfo_0x100.Y,
                position_z = gameobject.MovementInfo.PositionInfo_0x100.Z,
                orientation = gameobject.MovementInfo.PositionInfo_0x100_2.O,
                rotation0 = gameobject.MovementInfo.GameObjectRotation.X,
                rotation1 = gameobject.MovementInfo.GameObjectRotation.Y,
                rotation2 = gameobject.MovementInfo.GameObjectRotation.Z,
                rotation3 = gameobject.MovementInfo.GameObjectRotation.W,
                state = 1,
            };

            if (gameobject.MovementInfo.UpdateFlags.HasFlag(MaximusParserX.OBJECT_UPDATE_FLAGS.UPDATEFLAG_TRANSPORT))
            {
                gameobjectspawn.position_x = gameobject.MovementInfo.PositionInfo_0x40.X;
                gameobjectspawn.position_y = gameobject.MovementInfo.PositionInfo_0x40.Y;
                gameobjectspawn.position_z = gameobject.MovementInfo.PositionInfo_0x40.Z;
                gameobjectspawn.orientation = gameobject.MovementInfo.PositionInfo_0x40.O;
            }

            var key = string.Format("{0}_{1}_{2}_{3}_{4}_{5}_{6}", gameobject.Core.ClientBuildAmount, gameobject.Guid.Full, gameobjectspawn.position_x, gameobjectspawn.position_y, gameobjectspawn.position_z, gameobjectspawn.orientation, gameobjectspawn.phasemask);

            if (gameobjectspawn.position_x == 0 && gameobjectspawn.position_y == 0 && gameobjectspawn.position_z == 0)
            {

            }
            else
            {
                if (!GameObjectSpawnList.ContainsKey(key))
                {
                    var shouldcommit = true;

                    foreach (var updatefield in gameobject.UpdateFields)
                    {
                        var updatefieldname = MaximusParserX.Parsing.ParsingHandler.GetGameObjectUpdateFieldName(updatefield.Key, (ClientBuild)gameobject.Core.ClientBuildAmount);

                        switch (updatefieldname)
                        {
                            case "OBJECT_FIELD_CREATED_BY":
                                {
                                    shouldcommit = false;
                                    break;
                                }
                            case "OBJECT_FIELD_ENTRY":
                                {
                                    gameobjectspawn.entry = (uint?)updatefield.Value.Int32Value;
                                    break;
                                }
                            case "GAMEOBJECT_ANIMPROGRESS":
                                {
                                    gameobjectspawn.animprogress = (byte?)updatefield.Value.Int32Value;
                                    break;
                                }
                            case "GAMEOBJECT_STATE":
                                {
                                    gameobjectspawn.state = (byte?)updatefield.Value.Int32Value;
                                    break;
                                }
                            case "GAMEOBJECT_ROTATION":
                                {
                                    if (gameobject.Core.ClientBuildAmount >= 9183 && gameobject.Core.ClientBuildAmount <= 9551)
                                    {
                                        var low = (uint)gameobject.UpdateFields[updatefield.Key].Int32Value;
                                        var high = (uint)0;

                                        if (gameobject.UpdateFields.ContainsKey(updatefield.Key + 1)) high = (uint)gameobject.UpdateFields[updatefield.Key + 1].Int32Value;
                                        long packed = (long)((ulong)high << 32 | low);

                                        var x = (packed >> 42) * (1.0f / 2097152.0f);
                                        var y = (((packed << 22) >> 32) >> 11) * (1.0f / 1048576.0f);
                                        var z = (packed << 43 >> 43) * (1.0f / 1048576.0f);

                                        var w = x * x + y * y + z * z;
                                        if (Math.Abs(w - 1.0f) >= (1 / 1048576.0f))
                                            w = (float)Math.Sqrt(1.0f - w);
                                        else
                                            w = 0.0f;

                                        var t = new Quaternion(x, y, z, w);

                                        gameobjectspawn.rotation0 = x;
                                        gameobjectspawn.rotation1 = y;
                                        gameobjectspawn.rotation2 = z;
                                        gameobjectspawn.rotation3 = w;
                                    }
                                    else if (gameobject.Core.ClientBuildAmount <= 8125)
                                    {
                                        gameobjectspawn.rotation0 = updatefield.Value.FloatValue;
                                    }
                                    break;
                                }

                            case "GAMEOBJECT_ROTATION_1":
                                {
                                    gameobjectspawn.rotation1 = updatefield.Value.FloatValue;
                                    break;
                                }
                            case "GAMEOBJECT_ROTATION_2":
                                {
                                    gameobjectspawn.rotation2 = updatefield.Value.FloatValue;
                                    break;
                                }
                            case "GAMEOBJECT_ROTATION_3":
                                {
                                    gameobjectspawn.rotation3 = updatefield.Value.FloatValue;
                                    break;
                                }
                            case "GAMEOBJECT_PARENTROTATION":
                                {
                                    gameobjectspawn.parentrotation0 = updatefield.Value.FloatValue;
                                    break;
                                }
                            case "GAMEOBJECT_PARENTROTATION_1":
                                {
                                    gameobjectspawn.parentrotation1 = updatefield.Value.FloatValue;
                                    break;
                                }
                            case "GAMEOBJECT_PARENTROTATION_2":
                                {
                                    gameobjectspawn.parentrotation2 = updatefield.Value.FloatValue;
                                    break;
                                }
                            case "GAMEOBJECT_PARENTROTATION_3":
                                {
                                    gameobjectspawn.parentrotation3 = updatefield.Value.FloatValue;
                                    break;
                                }
                        }

                        if (gameobjectspawn.animprogress == 100)
                        {
                            gameobjectspawn.parentrotation0 = null;
                            gameobjectspawn.parentrotation1 = null;
                            gameobjectspawn.parentrotation2 = null;
                            gameobjectspawn.parentrotation3 = null;
                        }

                        if (!shouldcommit) break;
                    }

                    if (shouldcommit)
                        GameObjectSpawnList.Add(key, gameobjectspawn);
                }
            }
        }
Exemplo n.º 32
0
 // /!\ WARNING /!\
 // The OnPull function should NOT be blocking function !
 // The bot will handle calling it in loop until the combat is over.
 // Blocking function may lead to slow behavior.
 public override void OnPull(WoW.Classes.ObjectManager.WowUnit unit)
 {
 }