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.

fly when dead

Featured Replies

Hello, why is bot not flying when im killed, when there is fly mount available for that, aways chose to walk to the corpse. Is there any option to make it use fly in ghost form?

  • 1 month later...

Hi,

It's not the default behavior, the bot only flies to your corpse when it can't make a ground path to it.

You can try this plugin (not tested), put it in your Plugins folder and stay on a flying mount when you die: Fly to corpse when dead.cs

using System;
using System.ComponentModel;
using System.Threading;
using robotManager.Helpful;
using wManager.Events;
using wManager.Wow.Helpers;

// Force the bot to fly back to its corpse (corpse run on a flying mount).

public class Main : wManager.Plugin.IPlugin
{
    private const float MinDistanceToFly = 30f;
    private const int AscendRetestMs = 5 * 60 * 1000;
    private const int MinActionIntervalMs = 500;

    private static bool _testedThisDeath;
    private static bool _isFlyingMount;
    private static int _lastAscendTick;
    private static int _lastActionTick;
    [ThreadStatic] private static bool _reentry;

    public void Initialize()
    {
        OthersEvents.OnPathFinderFindPath += OnPathFinderFindPath;
        Logging.Write("[FlyToCorpse] Loaded.");
    }

    public void Dispose()
    {
        OthersEvents.OnPathFinderFindPath -= OnPathFinderFindPath;
        Logging.Write("[FlyToCorpse] Unloaded.");
    }

    public void Settings()
    {
    }

    private static void OnPathFinderFindPath(Vector3 from, Vector3 to, string continentNameMpq, CancelEventArgs cancelable)
    {
        if (_reentry)
            return;
        _reentry = true;
        try
        {
            var me = wManager.Wow.ObjectManager.ObjectManager.Me;
            if (me == null || !me.IsValid)
                return;

            if (!me.IsDeadMe)
            {
                _testedThisDeath = false;
                _isFlyingMount = false;
                return;
            }

            if (!me.IsMounted)
                return;

            Vector3 corpse = me.PositionCorpse;
            if (corpse == null || corpse.DistanceTo(Vector3.Zero) <= 0)
                return;
            if (to == null || to.DistanceTo(corpse) > 12)
                return;
            if (corpse.DistanceTo(me.Position) < MinDistanceToFly)
                return;

            int now = Environment.TickCount;

            if (_lastActionTick != 0 && (uint)(now - _lastActionTick) < MinActionIntervalMs)
                return;

            if (!me.IsFlying)
            {
                bool mayTest = !_testedThisDeath || (uint)(now - _lastAscendTick) >= AscendRetestMs;
                if (!mayTest)
                    return;

                _testedThisDeath = true;
                _lastAscendTick = now;
                Move.JumpOrAscend(Move.MoveAction.DownKey);
                Thread.Sleep(Others.Random(300, 700));
                Move.JumpOrAscend(Move.MoveAction.UpKey);
                Thread.Sleep(Others.Random(300, 700));
                _isFlyingMount = me.IsFlying;
            }

            if (!me.IsFlying)
                return;

            to.Type = "Flying";
            _lastActionTick = now;
            cancelable.Cancel = true;
        }
        catch (Exception e)
        {
            Logging.WriteError("[FlyToCorpse] " + e);
        }
        finally
        {
            _reentry = 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.