my code stock.com

Snippet options

Download: Download snippet as vehicle-1.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[
    while (Me.InVehicle)
    {
        if (Unit(60483, o => o.IsAlive) != null && Me.InVehicle && !IsObjectiveComplete(2, 30991))
        {
            WoWMovement.ClickToMove(Unit(60483, o => o.IsAlive).Location);
            if (Me.Location.Distance(Unit(60483, o => o.IsAlive).Location) < 30)
            {
                Lua.DoString("if GetPetActionCooldown(1) == 0 then CastPetAction(1) end");
                await Coroutine.Wait(10000, () => !Me.InVehicle);
            }
        }
        if (Unit(60455, o => o.IsAlive) != null && Me.InVehicle && !IsObjectiveComplete(1, 30991))
        {
            WoWMovement.ClickToMove(Unit(60455, u => u.IsAlive).Location);
            if (Me.Location.Distance(Unit(60455, u => u.IsAlive).Location) < 30)
            {
                Lua.DoString("if GetPetActionCooldown(1) == 0 then CastPetAction(1) end");
                await Coroutine.Wait(10000, () => !Me.InVehicle);
            }
        }

        if (Me.Z < 415)
        {
                Lua.DoString("if GetPetActionCooldown(1) == 0 then CastPetAction(1) end"); // We went too far!
        }

        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.