my code stock.com

Snippet options

Download: Download snippet as buy-equip-bags.xml.
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!

        <!-- Buy & Equip Bags --> 
            <If Condition="Me.Gold &gt;= 25 &amp;&amp; Lua.GetReturnValues(&quot;for i=1,4 do local Slots = GetContainerNumSlots(i) if (Slots &lt; 10) then return 1 end end return 0&quot;).First() == &quot;1&quot;">
            	  <CustomBehavior File="Message" Text="[Profile]: Go Buy &amp; Equip Bags in Orgrimmar!" LogColor="Yellow" />
                <While Condition="Lua.GetReturnValues(&quot;for i=1,4 do local Slots = GetContainerNumSlots(i) if (Slots &lt; 10) then return 1 end end return 0&quot;).First() == &quot;1&quot;">
                    <CustomBehavior File="InteractWith" InteractByBuyingItemId="4497" MobId="3369" TerminateWhen="Me.BagItems.FirstOrDefault(i =&gt; i.Entry == 4497) != null" MovementBy="NavigatorOnly" NonCompeteDistance="0" X="1778.911" Y="-4505.396" Z="27.73926" />       
                    <If Condition="Lua.GetReturnVal&lt;int&gt;(&quot;return GetContainerNumSlots(1)&quot;, 0) &lt; 10 &amp;&amp; Me.BagItems.FirstOrDefault(i =&gt; i.Entry == 4497) != null">
                        <CustomBehavior File="Message" Text="[Profile]: Equip Heavy Brown Bag in BagSlot1!" LogColor="Yellow" />
                        <CustomBehavior File="EquipItem" ItemId="4497" Slot="Bag0Slot" />
                    </If>
                    <If Condition="Lua.GetReturnVal&lt;int&gt;(&quot;return GetContainerNumSlots(2)&quot;, 0) &lt; 10 &amp;&amp; Me.BagItems.FirstOrDefault(i =&gt; i.Entry == 4497) != null">
                        <CustomBehavior File="Message" Text="[Profile]: Equip Heavy Brown Bag in BagSlot2!" LogColor="Yellow" />
                        <CustomBehavior File="EquipItem" ItemId="4497" Slot="Bag1Slot" />
                    </If>
                    <If Condition="Lua.GetReturnVal&lt;int&gt;(&quot;return GetContainerNumSlots(3)&quot;, 0) &lt; 10 &amp;&amp; Me.BagItems.FirstOrDefault(i =&gt; i.Entry == 4497) != null">
                        <CustomBehavior File="Message" Text="[Profile]: Equip Heavy Brown Bag in BagSlot3!" LogColor="Yellow" />
                        <CustomBehavior File="EquipItem" ItemId="4497" Slot="Bag2Slot" />
                    </If>        	        	
                    <If Condition="Lua.GetReturnVal&lt;int&gt;(&quot;return GetContainerNumSlots(4)&quot;, 0) &lt; 10 &amp;&amp; Me.BagItems.FirstOrDefault(i =&gt; i.Entry == 4497) != null">
                        <CustomBehavior File="Message" Text="[Profile]: Equip Heavy Brown Bag in BagSlot4!" LogColor="Yellow" />
                        <CustomBehavior File="EquipItem" ItemId="4497" Slot="Bag3Slot" />
                    </If>
                </While>         	
            </If>  	 
        <!-- Buy & Equip Bags -->  

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.