Example #1
0
 public override bool Buff()
 {
     if (Player.GetSpellRank("Aspect of the Hawk") != 0 && !Player.GotBuff("Aspect of the Hawk"))
     {
         Player.Cast("Aspect of the Hawk");
         return(false);
     }
     if (this.Player.GetSpellRank("Call Pet") != 0)
     {
         if (this.Player.GotPet())
         {
             if (this.Pet.HealthPercent == 0)
             {
                 Pet.Revive();
                 return(false);
             }
             if (this.Pet.HealthPercent <= 50)
             {
                 if (Player.GetSpellRank("Mend Pet") != 0)
                 {
                     Player.CastWait("Mend Pet", 500);
                 }
                 return(false);
             }
             if (!this.Pet.IsHappy())
             {
                 if (this.Pet.GotPetFood)
                 {
                     if (!Pet.GotBuff("Feed Pet Effect"))
                     {
                         this.Pet.Feed();
                     }
                     return(false);
                 }
                 else
                 {
                     string food = this.Player.GetLastItem(PetFoodName);
                     if (food != String.Empty)
                     {
                         if (!Pet.GotBuff("Feed Pet Effect"))
                         {
                             Feed(food);
                         }
                     }
                 }
             }
         }
         else
         {
             if (SummonPet)
             {
                 Pet.Call();
                 return(false);
             }
         }
     }
     else
     {
         return(true);
     }
     return(true);
 }
Example #2
0
        public override bool Buff()
        {
            // Do we have a pet?
            if (this.Player.GotPet())
            {
                // Is Pet dead?
                if (Pet.HealthPercent == 0)
                {
                    // Revive it. Tell bot we are not buffed (false)
                    Pet.Revive();
                    return(false);
                }

                if (Pet.HealthPercent <= 50)
                {
                    // Revive it. Tell bot we are not buffed (false)
                    if (Player.GetSpellRank("Mend Pet") != 0)
                    {
                        Player.CastWait("Mend Pet", 500);
                    }
                    return(false);
                }

                // Is our pet not happy?
                if (!this.Pet.IsHappy())
                {
                    //Do we have food set in UI?
                    if (Pet.GotPetFood)
                    {
                        // Is pet 'eating'?
                        if (!Pet.GotBuff("Feed Pet Effect"))
                        {
                            this.Pet.Feed();
                        }
                        // tell the bot we are not buffed
                        return(false);
                    }
                    else     // If we don't have food set in the UI
                    {
                        string food = this.Player.GetLastItem(PetFoodName);
                        if (food != String.Empty)
                        {
                            if (!Pet.GotBuff("Feed Pet Effect"))
                            {
                                Feed(food);
                            }
                        }
                    }
                }
            }
            else
            {
                if (SummonPet)
                {
                    // we dont have a pet? call it
                    Pet.Call();
                    return(false);
                }
            }
            // We dont have aspect of the hawk?
            if (Player.GetSpellRank("Aspect of the Hawk") != 0 && !Player.GotBuff("Aspect of the Hawk"))
            {
                // use it
                Player.Cast("Aspect of the Hawk");
                return(false);
            }
            return(true);
        }