protected override void OnBeforeAction(ActionBase action)
 {
     if (WoWParty.NumPartyMembers > 0 && HelpfulTarget.IsValid && HelpfulTarget.HealthPercentage > 60)
     {
         var tank = HelpfulTargets.OrderByDescending(m => m.MaxHealth).First() ?? WoWPlayer.Invalid;
         if (tank.IsValid && !tank.IsDead && tank.Distance < Globals.MaxDistance)
         {
             var beacon = WoWSpell.GetSpell("Beacon of Light");
             if (beacon.IsValid &&
                 beacon.IsReady &&
                 !tank.Auras["Beacon of Light"].IsValid)
             {
                 Log.WriteLine("Casting {0} on {1}", beacon.Name, tank.Name);
                 beacon.Cast(tank);
                 Sleep(Globals.SpellWait);
             }
         }
     }
     if (action != null)
     {
         var aw = WoWSpell.GetSpell("Avenging Wrath");
         if (aw.IsValid && aw.IsReady)
         {
             Log.WriteLine("Popping {0}", aw.Name);
             aw.Cast();
             Sleep(Globals.SpellWait);
         }
     }
 }
Exemple #2
0
        protected override void OnBeforeAction(ActionBase action)
        {
            if (Leader == null || !Leader.IsValid)
            {
                Leader = WoWParty.Members.FirstOrDefault() ?? WoWPlayer.Invalid;
            }

            if (action is CatSpellAction && Manager.LocalPlayer.Shapeshift != ShapeshiftForm.Cat)
            {
                WoWSpell.GetSpell("Cat Form").Cast();
                Sleep(Globals.SpellWait);
            }

            if (action is BearSpellAction && Manager.LocalPlayer.Shapeshift != ShapeshiftForm.Bear)
            {
                WoWSpell.GetSpell("Bear Form").Cast();
                Sleep(Globals.SpellWait);
            }

            var cd = WoWSpell.GetSpell("Tiger's Fury");

            if (action is CatSpellAction && cd.IsValid && cd.IsReady)
            {
                Log.WriteLine("Popping {0}", cd.Name);
                cd.Cast();
                Sleep(Globals.SpellWait);
            }
        }
Exemple #3
0
 protected override void OnAfterAction(ActionBase action)
 {
     if (Manager.LocalPlayer.Power < Manager.LocalPlayer.MaxPower * 0.4 && WoWSpell.GetSpell("Shadowfiend").IsReady&& HarmfulTarget.IsValid)
     {
         Log.WriteLine("Casting Shadowfiend on {0} to regenerate some mana", HarmfulTarget.Name);
         WoWSpell.GetSpell("Shadowfiend").Cast();
         Sleep(Globals.SpellWait);
     }
 }
Exemple #4
0
        protected override void OnAfterAction(ActionBase action)
        {
            var healer = WoWParty.Members.OrderBy(x => x.MaxPower).FirstOrDefault() ?? WoWPlayer.Invalid;

            if (healer.IsValid && healer.PowerPercentage < 40 && WoWSpell.GetSpell("Innervate").IsValid&& WoWSpell.GetSpell("Innervate").IsReady)
            {
                WoWSpell.GetSpell("Innervate").Cast(healer);
                Log.WriteLine("Casting Innervate on {0}", healer.Name);
            }
        }
        protected override void OnBeforeAction(ActionBase action)
        {
            var cd = WoWSpell.GetSpell("Avenging Wrath");

            if (cd.IsValid && cd.IsReady)
            {
                Log.WriteLine("Popping {0}", cd.Name);
                cd.Cast();
                Sleep(Globals.SpellWait);
            }
        }
Exemple #6
0
        public static bool CallTotems()
        {
            var CotE = WoWSpell.GetSpell("Call of the Elements");

            if (CotE.IsValid && CotE.IsReady)
            {
                Log.WriteLine("Call of the Elements");
                CotE.Cast();
                return(true);
            }
            return(false);
        }
        protected override void OnAfterAction(ActionBase action)
        {
            var seal     = WoWSpell.GetSpell("Seal of Truth");
            var sealBuff = Manager.LocalPlayer.Auras[seal.Name];

            if (seal.IsValid && (!sealBuff.IsValid || sealBuff.Remaining < 60))
            {
                Log.WriteLine("Buffing {0}", seal.Name);
                seal.Cast();
                Sleep(Globals.SpellWait);
            }
        }
Exemple #8
0
        protected override void OnAfterAction(ActionBase action)
        {
            var innervate = WoWSpell.GetSpell("Innervate");

            if (Manager.LocalPlayer.PowerPercentage < 30 &&
                innervate.IsValid &&
                innervate.IsReady)
            {
                innervate.Cast();
                Sleep(500);
            }
        }
Exemple #9
0
        public static bool CallTotem(Totem totem)
        {
            var spell = WoWSpell.GetSpell((int)totem);

            if (spell.IsValid && spell.IsReady)
            {
                Log.WriteLine("Calling {0} totem", totem.ToString());
                spell.Cast();
                return(true);
            }
            return(false);
        }
        protected override void OnAfterAction(ActionBase action)
        {
            var ws = WoWSpell.GetSpell("Water Shield");

            if (ws.IsValid &&
                ws.IsReady &&
                !Manager.LocalPlayer.Auras[ws.Name].IsValid)
            {
                Log.WriteLine("Refreshing {0}", ws.Name);
                ws.Cast();
                Sleep(Globals.SpellWait);
            }
        }
Exemple #11
0
 public static bool RecallTotems()
 {
     if (NeedToRecall)
     {
         var tr = WoWSpell.GetSpell("Totemic Recall");
         if (tr.IsValid && tr.IsReady)
         {
             Log.WriteLine("Recalling totems");
             tr.Cast();
             return(true);
         }
     }
     return(false);
 }
Exemple #12
0
 public override void OnTick()
 {
     if (Leader.IsValid)
     {
         if (Helper.InCombat)
         {
             if (FollowingLeader)
             {
                 WoWScript.ExecuteNoResults("MoveForwardStop()");
                 FollowingLeader = false;
             }
             if (Leader.IsCasting && !Manager.LocalPlayer.IsCasting)
             {
                 var id = Leader.CastingId;
                 if (id == 0)
                 {
                     id = Leader.ChanneledCastingId;
                 }
                 var spell = WoWSpell.GetSpell(id);
                 if (spell.IsValid)
                 {
                     var target = Leader.Target;
                     if (target.IsValid)
                     {
                         if (Manager.LocalPlayer.Target != target)
                         {
                             target.Select();
                         }
                         spell.Cast(target as WoWUnit);
                         Print("Casting {0} on {1}", spell.Name, target.Name);
                     }
                     else
                     {
                         spell.Cast(Manager.LocalPlayer);
                         Print("Casting {0} on self", spell.Name);
                     }
                 }
             }
         }
         else
         {
             if (!FollowingLeader)
             {
                 Leader.Select();
                 WoWScript.ExecuteNoResults("FollowUnit(\"target\")");
                 FollowingLeader = true;
             }
         }
     }
 }
            public override void Execute()
            {
                var unit = GetLowestThreatUnit();

                if (unit.IsValid)
                {
                    Log.WriteLine("Casting {0} on {1} to get aggro", unit.Name, SpellName);
                    WoWSpell.GetSpell(SpellName).Cast(unit);
                    Sleep(Globals.SpellWait);
                }
                else
                {
                    base.Execute();
                }
            }
Exemple #14
0
        public override void OnStart()
        {
            CurrentState = FishingState.Lure;
            Fishes       = 0;
            Fishing      = WoWSpell.GetSpell("Fishing");
            if (!Fishing.IsValid)
            {
                Print("You don't know fishing!");
                Stop();
            }

            foreach (var ev in EventSubscription)
            {
                Events.Register(ev, HandleFishingEvents);
            }
        }
        protected override void OnBeforeAction(ActionBase action)
        {
            if (!_totemsSet)
            {
                SetTotems();
                _totemsSet = true;
            }

            if (Helper.InCombat && Manager.LocalPlayer.Totems.Count == 0)
            {
                if (TotemHelper.CallTotems())
                {
                    Sleep(Globals.SpellWait);
                }
            }

            var ft = WoWSpell.GetSpell("Flametongue Weapon");

            if (ft.IsValid && ft.IsReady) // 5 appears to be flametongue weapon
            {
                var mainhand = Manager.LocalPlayer.GetEquippedItem(EquipSlot.MainHand);
                if (!mainhand.Enchants.Contains(5))
                {
                    Log.WriteLine("Applying Flametongue Weapon to main-hand");
                    ft.Cast();
                    Sleep(Globals.SpellWait);
                }
            }

            // Instant Lava Burst
            if (action is HarmfulSpellAction)
            {
                var haction = action as HarmfulSpellAction;
                if (haction.SpellName == "Lava Burst")
                {
                    var cd = WoWSpell.GetSpell("Elemental Mastery");
                    if (cd.IsValid && cd.IsReady)
                    {
                        Log.WriteLine("Popping Elemental Mastery for instant Lava Burst");
                        cd.Cast();
                        Sleep(Globals.SpellWait);
                    }
                }
            }
        }
Exemple #16
0
            public override void Execute()
            {
                var target    = Brain.HelpfulTarget;
                var altTarget = Brain.AlternativeHelpfulTarget;

                if (altTarget.IsValid && target.Auras["Beacon of Light"].IsValid && altTarget.HealthPercentage < target.HealthPercentage)
                {
                    Log.WriteLine("Casting {0} on {1} (beacon {2})", SpellName, altTarget.Name, target.Name);
                    WoWSpell.GetSpell(SpellName).Cast(altTarget);
                    Sleep(Globals.SpellWait);
                }
                else
                {
                    Log.WriteLine("Casting {0} on {1}", SpellName, target.Name);
                    WoWSpell.GetSpell(SpellName).Cast(target);
                    Sleep(Globals.SpellWait);
                }
            }
 protected override void OnBeforeAction(ActionBase action)
 {
     if (WoWParty.NumPartyMembers > 0 && HelpfulTarget.IsValid && HelpfulTarget.HealthPercentage > 60)
     {
         var tank = WoWParty.Members.OrderByDescending(m => m.MaxHealth).First() ?? WoWPlayer.Invalid;
         if (tank.IsValid && !tank.IsDead && tank.Distance < 40)
         {
             var es = WoWSpell.GetSpell("Earth Shield");
             if (es.IsValid &&
                 es.IsReady &&
                 !tank.Auras[es.Name].IsValid)
             {
                 Log.WriteLine("Casting {0} on {1}", es.Name, tank.Name);
                 es.Cast(tank);
                 Sleep(Globals.SpellWait);
             }
         }
     }
 }
Exemple #18
0
        protected override void OnBeforeAction(ActionBase action)
        {
            PartyTank = WoWParty.Members.OrderByDescending(m => m.MaxHealth).First() ?? WoWPlayer.Invalid;
            var ns = WoWSpell.GetSpell("Nature's Swiftness");

            if (action is HealingTouch)
            {
                if (HelpfulTarget.IsValid &&
                    HelpfulTarget.Distance < Globals.MaxDistance &&
                    HelpfulTarget.HealthPercentage < 20 &&
                    ns.IsValid &&
                    ns.IsReady)
                {
                    Log.WriteLine("Casting {0} for instant Healing Touch", ns.Name);
                    ns.Cast(HelpfulTarget);
                    Sleep(200);
                }
            }
        }
Exemple #19
0
 protected override void OnBeforeAction(ActionBase action)
 {
     if (!Manager.LocalPlayer.IsInCombat)
     {
         if (WoWSpell.GetSpell("Power Infusion").IsReady)
         {
             Log.WriteLine("Casting Power Infusion on myself");
             WoWSpell.GetSpell("Power Infusion").Cast();
             Sleep(Globals.SpellWait);
         }
     }
     else if (WoWParty.NumPartyMembers > 0 && HelpfulTarget.IsValid && HelpfulTarget.HealthPercentage > 60)
     {
         var tank = WoWParty.Members.OrderByDescending(m => m.MaxHealth).First() ?? WoWPlayer.Invalid;
         if (tank.IsValid && WoWSpell.GetSpell("Pain Suppresion").IsReady)
         {
             Log.WriteLine("Casting Pain Suppression on ", tank.Name);
             WoWSpell.GetSpell("Pain Suppresion").Cast(tank);
             Sleep(Globals.SpellWait);
         }
     }
 }
Exemple #20
0
        protected override void OnAfterAction(ActionBase action)
        {
            var dp  = WoWSpell.GetSpell("Divine Plea");
            var soi = WoWSpell.GetSpell("Seal of Insight");

            if (dp.IsValid &&
                dp.IsReady &&
                !Manager.LocalPlayer.IsInCombat &&
                Manager.LocalPlayer.PowerPercentage < 80)
            {
                Log.WriteLine("Popping {0}", dp.Name);
                dp.Cast();
                Sleep(Globals.SpellWait);
            }
            else if (soi.IsValid &&
                     soi.IsReady &&
                     !Manager.LocalPlayer.Auras["Seal of Insight"].IsValid)
            {
                Log.WriteLine("Buffing {0}", soi.Name);
                soi.Cast();
                Sleep(Globals.SpellWait);
            }
        }
 public override void Execute()
 {
     Log.WriteLine("Casting {0} on {1}", SpellName, Brain.HelpfulTarget.Name);
     WoWSpell.GetSpell(SpellName).Cast(Brain.HelpfulTarget);
     Sleep(Globals.SpellWait);
 }
 public void ExecuteEx(WoWUnit unit)
 {
     Log.WriteLine("Casting {0} on {1}", SpellName, unit.Name);
     WoWSpell.GetSpell(SpellName).Cast(unit);
     Sleep(Globals.SpellWait);
 }
Exemple #23
0
 public override void Execute()
 {
     Log.WriteLine("Casting {0}", SpellName);
     WoWSpell.GetSpell(SpellName).Cast();
     Sleep(Globals.SpellWait);
 }