Skip to content
View in the app

A better way to browse. Learn more.

WRobot

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Hunter Pet Management (Fight Class)

Featured Replies

Hi, quick questions regarding this method to CheckPet() inside my fight class.  The code below is somewhat a derivative from converting the Fight Class Editor into C#.
The mana required to use the spell "Revive Pet" varies based on level, If the player does not have enough mana, It will just keep spamming the ability until their is enough.
Is there a way to keep this from happening?

I also am noticing the issue that when I mount or dismount, it will try and cast the Call Pet ability in that brief moment of getting on the mount, or jumping off every single
time (This also includes taxis). It even gets so bad that when I mount up and try to ride off, it dismounts me to use the ability, call pet again!

So far I have had to comment this sort of thing out of my fight class all together as it was just more of hassle than to worry about it. I do believe it is important though if I
plan on using any portion of the bot like Grinder, Quester, Automaton, etc...

Any help with the simple Pet Management would be greatly appreciated! Thanks!

internal void CheckPet()
{
    if (ObjectManager.Me.IsDeadMe || Me.IsMounted || Me.IsStunned || Me.Pacified || Me.GetMove) return;

    if (!ObjectManager.Pet.IsValid)
    {
        _callPet.Launch();                                      // Call Pet
    }
    if (!ObjectManager.Pet.IsValid || ObjectManager.Pet.IsDead)
    {
        //if (Me.Mana >= 1040)
            _revivePet.Launch(true);                            // Revive Pet
    }
}

 

 

Quote

The mana required to use the spell "Revive Pet" varies based on level, If the player does not have enough mana, It will just keep spamming the ability until their is enough.
Is there a way to keep this from happening?

Hello, I assume you check if the spell is usable before.
So, I've looking on Russian Database (Wotlk) and it seems Take 80% of mana Player.

If is true by checking this way out, that gonna be ok

 

Edit: For the seconds part maybe because you're not Explicitly tell ObjectManager.Me.IsMounted .

  • Author

I added a small sleep time before trying to launch the spell and it seems to help.

public static bool CallPet()
{
    try
    {
        if (!Me.IsCast &&
            !Me.IsMounted &&
            _callPet.KnownSpell &&
            _callPet.IsDistanceGood &&
            _callPet.IsSpellUsable)
        {
            Thread.Sleep(800);
            _callPet.Launch();
            Thread.Sleep(SpellManager.GlobalCooldownTimeLeft() + Usefuls.Latency);
            return true;
        }
    }
    catch (Exception e) { Logging.WriteError("CallPet() ERROR: " + Environment.NewLine + e); }
    return false;
}
public static bool RevivePet()
{
    try
    {
        if (!Me.IsCast &&
            !Me.IsMounted &&
            Me.ManaPercentage > 80 &&
            _revivePet.KnownSpell &&
            _revivePet.IsDistanceGood &&
            _revivePet.IsSpellUsable)
        {
            Thread.Sleep(800);
            _revivePet.Launch();
            Thread.Sleep(SpellManager.GlobalCooldownTimeLeft() + Usefuls.Latency);
            return true;
        }
    }
    catch (Exception e) { Logging.WriteError("RevivePet() ERROR: " + Environment.NewLine + e); }
    return false;
}

 

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.