my code stock.com

Andreas Spegel

Move to Object and Interact #2
by Andreas Spegel

Snippet options

Download: Download snippet as move-to-object-and-interact-2.cpp.
Copy snippet: For this you need a free my code stock.com account.
Embed code : You will find the embed code for this snippet at the end of the page, if you want to embed it into a website or a blog!

<CustomBehavior File="RunCode"><![CDATA[
    WoWGameObject vinePoi = ObjectManager.GetObjectsOfType<WoWGameObject>().FirstOrDefault(x => x.Entry == 235381 && x.Distance <= 15);
    while (vinePoi != null)
    {
        if (vinePoi.Distance > 5)
        {
            Navigator.MoveTo(new WoWPoint(6940.604, 796.3497, 148.7876)); //Object .Location is messing with navigator.
        }
        else
        {
            await CommonCoroutines.StopMoving();
            vinePoi.Interact();
            await Coroutine.Wait(8000, () => vinePoi == null);
        }
        await Coroutine.Yield();
    }
]]></CustomBehavior>

Create a free my code stock.com account now.

my code stok.com is a free service, which allows you to save and manage code snippes of any kind and programming language. We provide many advantages for your daily work with code-snippets, also for your teamwork. Give it a try!

Find out more and register now

You can customize the height of iFrame-Codes as needed! You can find more infos in our API Reference for iframe Embeds.