Jump to content

Recommended Posts

... the level of the Pets in the Logfile before (or after) the fight. like:

Player (23/25/25) Attack Wolf.

 

... Autopause if 25/25/25 (or another Comination (Settings)) is reached.

 

...Change of the first Pet after the first spell (Key 1, see posts before)

 

...Anonymising of the logfile. With the information of date/time and coordinations I think its simple to compare it with the Blizzard-DB

 

...Actions with the Pets without running to near to it. The Pet battle  could be startet with a range from ca. 10-20 m. Its not nessessary to run to the pets.

 

...Detection of "no space for a fight". If a pet battle wont start after the second try , it could be a good idea to do a few steps backward (at the moment) or forward (if "far-battle" (see above) is realisied).

 

...Autochange the first  pet. This take only sense, if point 3 of this list is realised, because the blacklist of spells are not realy needed any more. The autochange should be realised with a few parameters, like level-between-range and Pet-Type (its not a good idea to level beasts against mech-types :-) ) . Pets should be changed after the level is reached, or the pet is dead and no revive is possible (i.e. 7 min to next revive)

 

...pause, if first pet is dead and no rive/change is possible.

 

...pause, if all pets are dead and no revive is possible. Dont start to run/flight to he next position.

 

...pause for a minute or so, if at all positions no pet fights possible.

 

...hmmm....(to be continued)

Link to comment
https://wrobot.eu/forums/topic/827-nice-to-have-10-wishes-to-xmasor-faster/
Share on other sites

  • 1 year later...

Hello,

 

In the next WRobot update I have added pet battle fightclass system (in C# or VB.net), with this you can customize how to WRobot manage pet.

 

Sample of fightclass (default code):

using System.Threading;
using robotManager.Helpful;
using wManager.Wow.Helpers;
using Timer = robotManager.Helpful.Timer;

public class Main : FightBattlePet.IFightClassPet
{
    // Called every 1000 ms in combat
    public void PulseInCombat()
    {
        if (!PetBattles.ActionSelected() && !PetBattles.IsWaitingOnOpponent())
        {

            if (!string.IsNullOrWhiteSpace(FightBattlePet.LuaCode))
            {
                Lua.LuaDoString(FightBattlePet.LuaCode);
                Thread.Sleep(Usefuls.Latency + 300);
                if (PetBattles.ActionSelected() || PetBattles.IsWaitingOnOpponent())
                    return;
            }

            if (PetBattles.IsDeadPet(PetBattles.PetFaction.Ally, PetBattles.GetActivePet(PetBattles.PetFaction.Ally)))
            {
                PetBattles.ChangeToBestPet();
                return;
            }

            if (TargetTypeIsWeaknesses())
                PetBattles.ChangeToBestPet();
            else if (PetBattles.GetNumberUsableAbility() <= 0)
                PetBattles.SkipTurn();
            else if (PetBattles.GetNumberUsableAbility() <= 0 && !PetBattles.ActionSelected() && !PetBattles.IsWaitingOnOpponent())
                PetBattles.ChangeToBestPet();
            else if (TrapUsable())
                PetBattles.UseTrap();
            else if (!FightBattlePet.PetBattlesDontFight)
                PetBattles.UseBestAbility();
        }
    }

    private Timer _timerAutoOrderPet = new Timer(-1);
    private Timer _timerSpellRevive = new Timer(-1);
    
    // Called every 200 ms out of combat
    public void PulseOutOfCombat()
    {
        if (PetBattles.ConditionResurrectBattlePets)
        {
            if (!PetBattles.ReviveBattlePets())
            {
                if (PetBattles.AllPetDead())
                {
                    ItemsManager.UseItem(86143); // Battle Pet Bandage
                    Usefuls.WaitIsCasting();

                    if (PetBattles.AllPetDead() && _timerSpellRevive.IsReady)
                    {
                        Logging.Write("[PetBattle] Revive Battle Pets spell not ready, wait");
                        _timerSpellRevive = new Timer(1000 * 20);

                        // Wait revive:
                        /*while (Conditions.InGameAndConnectedAndAliveAndProductStartedNotInPause &&
                               !Conditions.IsAttackedAndCannotIgnore)
                        {
                            if (_timerSpellRevive.IsReady)
                            {
                                PetBattles.ReviveBattlePets();
                                if (!PetBattles.AllPetDead())
                                    break;

                                AntiAfk.Pulse();
                                _timerSpellRevive.Reset();
                            }
                            Thread.Sleep(50);
                        }*/
                    }
                }
            }
        }

        if (FightBattlePet.AutoOrderPetByLevel && _timerAutoOrderPet.IsReady)
        {
            PetBattles.AutoOrderPetInJournalByLevel();
            _timerAutoOrderPet = new Timer(1000 * 60);
        }
    }


    private bool TargetTypeIsWeaknesses()
    {
        if (FightBattlePet.AutoChooseBestPet)
        {
            var typeEffects = PetBattles.TypeEffects.Find(effects => effects.Type == PetBattles.GetPetType(PetBattles.PetFaction.Ally, PetBattles.GetActivePet(PetBattles.PetFaction.Ally)));
            if (typeEffects != null)
            {
                if (typeEffects.Weak == PetBattles.GetPetType(PetBattles.PetFaction.Enemy, PetBattles.GetActivePet(PetBattles.PetFaction.Enemy)))
                {
                    return true;
                }
            }
        }
        return false;
    }

    private bool TrapUsable()
    {
        bool conditionsTrap = false;
        if (PetBattles.IsTrapAvailable())
        {
            if (FightBattlePet.CaptureAllPets)
            {
                conditionsTrap = true;
            }
            else if (FightBattlePet.CaptureRarePets)
            {
                var quality = PetBattles.GetBreedQuality(PetBattles.PetFaction.Enemy, PetBattles.GetActivePet(PetBattles.PetFaction.Enemy));
                if (quality == PetBattles.PetQuality.Rare ||
                    quality == PetBattles.PetQuality.Legendary ||
                    quality == PetBattles.PetQuality.Epic)
                    conditionsTrap = true;
            }
            if (FightBattlePet.CaptureIDontHavePets &&
                conditionsTrap &&
                PetBattles.PetJournalHavePet(PetBattles.GetPetSpeciesID(PetBattles.PetFaction.Enemy, PetBattles.GetActivePet(PetBattles.PetFaction.Enemy))))
            {
                conditionsTrap = false;
            }
        }
        return conditionsTrap;
    }
}
  • 1 year later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...