my code stock.com

Andreas Spegel

Scan Bags and Open/Use Items
by Andreas Spegel

Dieser Code scannt die Taschen nach den definierten Items.
Wenn eins gefunden wird benutzt er es.

Snippet options

Download: Download snippet as scan-bags-and-openuse-items.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!

<!-- Use Baleful tokens -->
<CustomBehavior File="Hooks\DoWhen" ActivityName="Use Baleful tokens"
                                    UseWhen="StyxWoW.Me.BagItems.FirstOrDefault(i => new[]{128348,124550,124551,124552,124553,124554,124555,124556,124557,124558,124559,124560,124561,124562}.Contains((int)i.Entry)) != null"
                                    AllowUseWhileMounted="true">
    <CustomBehavior File="RunCode"><![CDATA[
        HashSet<uint> _BalefulTokens = new HashSet<uint>(new uint[]
        {
            128348, // Baleful Spaulders
            124550, // Baleful Bracers
            124551, // Baleful Tunic
            124552, // Baleful Treads
            124553, // Baleful Gauntlets
            124554, // Baleful Hood
            124555, // Baleful Leggings
            124556, // Baleful Spaulders
            124557, // Baleful Girdle
            124558, // Baleful Ring
            124559, // Baleful Choker
            124560, // Baleful Cloak
            124561, // Baleful Trinket
            124562, // Baleful Armament		
        });
        foreach (var item in StyxWoW.Me.BagItems.Where(i => _BalefulTokens.Contains(i.Entry)))
        {
            Logging.Write(System.Windows.Media.Colors.Yellow, "[Notification]: Using Baleful token: {0}", item.Name);
            await CommonCoroutines.StopMoving(); 
            item.UseContainerItem();
            await Coroutine.Sleep(3100);
        }
    ]]></CustomBehavior>    
</CustomBehavior>            
<!-- Use Baleful tokens --> 

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.