Code:
<?xml version="1.0" encoding="utf-8"?>
<Professionbuddy ChildrenCount="18">
<Comment Text="Replace Dummy with the name of the buyer." />
<CustomAction Code="Lua.DoString("MailRecipent = \"Efredo\"");" />
<Comment Text="Edit the prices. All prices are per stack, except for volatiles which is per unit." />
<CustomAction Code="Lua.DoString("ElementiumPrice = 100");" />
<CustomAction Code="Lua.DoString("WhiptailPrice = 100");" />
<CustomAction Code="Lua.DoString("CinderbloomPrice = 100");" />
<CustomAction Code="Lua.DoString("JasminePrice = 100");" />
<CustomAction Code="Lua.DoString("PyritePrice = 100");" />
<CustomAction Code="Lua.DoString("AirPrice = 100");" />
<CustomAction Code="Lua.DoString("EarthPrice = 100");" />
<CustomAction Code="Lua.DoString("FirePrice = 100");" />
<CustomAction Code="Lua.DoString("LifePrice = 100");" />
<CustomAction Code="Lua.DoString("WaterPrice = 100");" />
<Comment Text="Ignore these below" />
<Settings Type="Boolean" DefaultValue="true" Name="COD or AH" Summary="True for COD, False for AH" />
<CustomAction Code="Lua.DoString("totalprice = 0");" />
<Comment Text="To change AH settings, open this "While"" />
<While Condition="true" IgnoreCanRun="True" ChildrenCount="7">
<If Condition="MailCount > 0 && InbagCount (52185) < 10 && InbagCount (52988) < 10 && InbagCount (52983) < 10 && InbagCount (52183) < 10 && InbagCount (52328) < 10 && InbagCount (52327) < 10 && InbagCount (52325) < 10 && InbagCount (52329) < 10 && InbagCount (52326) < 10 && InbagCount (52987) < 10" IgnoreCanRun="True" ChildrenCount="1">
<GetMailAction ItemID="" CheckNewMail="True" GetMailType="AllItems" AutoFindMailBox="True" X="0" Y="0" Z="0" MinFreeBagSlots="2" />
</If>
<If Condition="MailCount == 0 && InbagCount (52185) < 10 && InbagCount (52988) < 10 && InbagCount (52983) < 10 && InbagCount (52183) < 10 && InbagCount (52328) < 10 && InbagCount (52327) < 10 && InbagCount (52325) < 10 && InbagCount (52329) < 10 && InbagCount (52326) < 10 && InbagCount (52987) < 10" IgnoreCanRun="True" ChildrenCount="2">
<MoveToAction MoveType="Location" Pathing="Navigator" Entry="0" X="-8928.005" Y="616.8072" Z="100.2266" />
<GetItemfromBankAction ItemID="52185,52988,52983,52183,52328,52327,52325,52329,52326,52987" Amount="0" Bank="Guild" GetItemfromBankType="SpecificItem" NpcEntry="0" AutoFindBank="True" X="0" Y="0" Z="0" MinFreeBagSlots="2" WithdrawAdditively="True" />
</If>
<StackItemsAction />
<If Condition="(bool)Settings["COD or AH"]" IgnoreCanRun="True" ChildrenCount="21">
<MoveToAction MoveType="NearestMailbox" Pathing="Navigator" Entry="0" X="-8861.501" Y="636.7444" Z="96.17851" />
<Comment Text="Elementium Ore" />
<While Condition="InbagCount (52185) >= 5" IgnoreCanRun="True" ChildrenCount="3">
<InteractionAction Entry="0" InteractDelay="0" InteractType="GameObject" GameObjectType="Mailbox" SpellFocus="Anvil" />
<CustomAction Code="Thread.Sleep(300); Lua.DoString("RunMacroText(\"/click MailFrameTab2\")"); Thread.Sleep(300);" />
<CustomAction Code="Lua.DoString("local j=0 local i=0 for b=0,4 do for s=1,GetContainerNumSlots(b) do local n=GetContainerItemLink(b,s) if n then if strfind(n,\"52185\") and i<12 then _,c=GetContainerItemInfo(b,s) j=j+c UseContainerItem(b,s) i=i+1 end end end end codprice=j*(ElementiumPrice/20) SetSendMailCOD(codprice*10000) SendMail(MailRecipent,\"Elementium Ore\",\"\") totalprice = totalprice+codprice DEFAULT_CHAT_FRAME:AddMessage(\"Sending \"..string.format(\"%.0f\",j)..\" Elementium Ores (\"..string.format(\"%.0f\",j/20)..\" stacks) C.O.D to \".. MailRecipent .. \" for \"..string.format(\"%.0f\",codprice)..\" gold.\"..\" Totally sent for \"..string.format(\"%.0f\",totalprice)..\" gold this session.\",0.0,1.0,0.0)"); Thread.Sleep(500);" />
</While>
<Comment Text="Twilight Jasmine" />
<While Condition="InbagCount (52987) >= 5" IgnoreCanRun="True" ChildrenCount="3">
<InteractionAction Entry="0" InteractDelay="0" InteractType="GameObject" GameObjectType="Mailbox" SpellFocus="Anvil" />
<CustomAction Code="Thread.Sleep(300); Lua.DoString("RunMacroText(\"/click MailFrameTab2\")"); Thread.Sleep(300);" />
<CustomAction Code="Lua.DoString("local j=0 local i=0 for b=0,4 do for s=1,GetContainerNumSlots(b) do local n=GetContainerItemLink(b,s) if n then if strfind(n,\"52987\") and i<12 then _,c=GetContainerItemInfo(b,s) j=j+c UseContainerItem(b,s) i=i+1 end end end end codprice=j*(JasminePrice/20) SetSendMailCOD(codprice*10000) SendMail(MailRecipent,\"Twilight Jasmine\",\"\") totalprice = totalprice+codprice DEFAULT_CHAT_FRAME:AddMessage(\"Sending \"..string.format(\"%.0f\",j)..\" Twilight Jasmines (\"..string.format(\"%.0f\",j/20)..\" stacks) C.O.D to \".. MailRecipent .. \" for \"..string.format(\"%.0f\",codprice)..\" gold.\"..\" Totally sent for \"..string.format(\"%.0f\",totalprice)..\" gold this session.\",0.0,1.0,0.0)"); Thread.Sleep(500);" />
</While>
<Comment Text="Whiptail" />
<While Condition="InbagCount (52988) >= 5" IgnoreCanRun="True" ChildrenCount="3">
<InteractionAction Entry="0" InteractDelay="0" InteractType="GameObject" GameObjectType="Mailbox" SpellFocus="Anvil" />
<CustomAction Code="Thread.Sleep(300); Lua.DoString("RunMacroText(\"/click MailFrameTab2\")"); Thread.Sleep(300);" />
<CustomAction Code="Lua.DoString("local j=0 local i=0 for b=0,4 do for s=1,GetContainerNumSlots(b) do local n=GetContainerItemLink(b,s) if n then if strfind(n,\"52988\") and i<12 then _,c=GetContainerItemInfo(b,s) j=j+c UseContainerItem(b,s) i=i+1 end end end end codprice=j*(WhiptailPrice/20) SetSendMailCOD(codprice*10000) SendMail(MailRecipent,\"Whiptail\",\"\") totalprice = totalprice+codprice DEFAULT_CHAT_FRAME:AddMessage(\"Sending \"..string.format(\"%.0f\",j)..\" Whiptails (\"..string.format(\"%.0f\",j/20)..\" stacks) C.O.D to \".. MailRecipent .. \" for \"..string.format(\"%.0f\",codprice)..\" gold.\"..\" Totally sent for \"..string.format(\"%.0f\",totalprice)..\" gold this session.\",0.0,1.0,0.0)"); Thread.Sleep(500);" />
</While>
<Comment Text="Cinderbloom" />
<While Condition="InbagCount (52983) >= 5" IgnoreCanRun="True" ChildrenCount="3">
<InteractionAction Entry="0" InteractDelay="0" InteractType="GameObject" GameObjectType="Mailbox" SpellFocus="Anvil" />
<CustomAction Code="Thread.Sleep(300); Lua.DoString("RunMacroText(\"/click MailFrameTab2\")"); Thread.Sleep(300);" />
<CustomAction Code="Lua.DoString("local j=0 local i=0 for b=0,4 do for s=1,GetContainerNumSlots(b) do local n=GetContainerItemLink(b,s) if n then if strfind(n,\"52983\") and i<12 then _,c=GetContainerItemInfo(b,s) j=j+c UseContainerItem(b,s) i=i+1 end end end end codprice=j*(CinderbloomPrice/20) SetSendMailCOD(codprice*10000) SendMail(MailRecipent,\"Cinderbloom\",\"\") totalprice = totalprice+codprice DEFAULT_CHAT_FRAME:AddMessage(\"Sending \"..string.format(\"%.0f\",j)..\" Cinderblooms (\"..string.format(\"%.0f\",j/20)..\" stacks) C.O.D to \".. MailRecipent .. \" for \"..string.format(\"%.0f\",codprice)..\" gold.\"..\" Totally sent for \"..string.format(\"%.0f\",totalprice)..\" gold this session.\",0.0,1.0,0.0)"); Thread.Sleep(500);" />
</While>
<Comment Text="Pyrite Ore" />
<While Condition="InbagCount (52183) >= 5" IgnoreCanRun="True" ChildrenCount="3">
<InteractionAction Entry="0" InteractDelay="0" InteractType="GameObject" GameObjectType="Mailbox" SpellFocus="Anvil" />
<CustomAction Code="Thread.Sleep(300); Lua.DoString("RunMacroText(\"/click MailFrameTab2\")"); Thread.Sleep(300);" />
<CustomAction Code="Lua.DoString("local j=0 local i=0 for b=0,4 do for s=1,GetContainerNumSlots(b) do local n=GetContainerItemLink(b,s) if n then if strfind(n,\"52183\") and i<12 then _,c=GetContainerItemInfo(b,s) j=j+c UseContainerItem(b,s) i=i+1 end end end end codprice=j*(PyritePrice/20) SetSendMailCOD(codprice*10000) SendMail(MailRecipent,\"Pyrite Ore\",\"\") totalprice = totalprice+codprice DEFAULT_CHAT_FRAME:AddMessage(\"Sending \"..string.format(\"%.0f\",j)..\" Pyrite Ores (\"..string.format(\"%.0f\",j/20)..\" stacks) C.O.D to \".. MailRecipent .. \" for \"..string.format(\"%.0f\",codprice)..\" gold.\"..\" Totally sent for \"..string.format(\"%.0f\",totalprice)..\" gold this session.\",0.0,1.0,0.0)"); Thread.Sleep(500);" />
</While>
<Comment Text="Volatile Air" />
<While Condition="InbagCount (52328) >= 5" IgnoreCanRun="True" ChildrenCount="3">
<InteractionAction Entry="0" InteractDelay="0" InteractType="GameObject" GameObjectType="Mailbox" SpellFocus="Anvil" />
<CustomAction Code="Thread.Sleep(300); Lua.DoString("RunMacroText(\"/click MailFrameTab2\")"); Thread.Sleep(300);" />
<CustomAction Code="Lua.DoString("local j=0 local i=0 for b=0,4 do for s=1,GetContainerNumSlots(b) do local n=GetContainerItemLink(b,s) if n then if strfind(n,\"52328\") and i<12 then _,c=GetContainerItemInfo(b,s) j=j+c UseContainerItem(b,s) i=i+1 end end end end codprice=j*(AirPrice) SetSendMailCOD(codprice*10000) SendMail(MailRecipent,\"Volatile Air\",\"\") totalprice = totalprice+codprice DEFAULT_CHAT_FRAME:AddMessage(\"Sending \"..string.format(\"%.0f\",j)..\" Volatile Airs (\"..string.format(\"%.0f\",j)..\" stacks) C.O.D to \".. MailRecipent .. \" for \"..string.format(\"%.0f\",codprice)..\" gold.\"..\" Totally sent for \"..string.format(\"%.0f\",totalprice)..\" gold this session.\",0.0,1.0,0.0)"); Thread.Sleep(500);" />
</While>
<Comment Text="Volatile Earth" />
<While Condition="InbagCount (52327) >= 5" IgnoreCanRun="True" ChildrenCount="3">
<InteractionAction Entry="0" InteractDelay="0" InteractType="GameObject" GameObjectType="Mailbox" SpellFocus="Anvil" />
<CustomAction Code="Thread.Sleep(300); Lua.DoString("RunMacroText(\"/click MailFrameTab2\")"); Thread.Sleep(300);" />
<CustomAction Code="Lua.DoString("local j=0 local i=0 for b=0,4 do for s=1,GetContainerNumSlots(b) do local n=GetContainerItemLink(b,s) if n then if strfind(n,\"52327\") and i<12 then _,c=GetContainerItemInfo(b,s) j=j+c UseContainerItem(b,s) i=i+1 end end end end codprice=j*(EarthPrice) SetSendMailCOD(codprice*10000) SendMail(MailRecipent,\"Volatile Earth\",\"\") totalprice = totalprice+codprice DEFAULT_CHAT_FRAME:AddMessage(\"Sending \"..string.format(\"%.0f\",j)..\" Volatile Earths (\"..string.format(\"%.0f\",j)..\" stacks) C.O.D to \".. MailRecipent .. \" for \"..string.format(\"%.0f\",codprice)..\" gold.\"..\" Totally sent for \"..string.format(\"%.0f\",totalprice)..\" gold this session.\",0.0,1.0,0.0)"); Thread.Sleep(500);" />
</While>
<Comment Text="Volatile Fire" />
<While Condition="InbagCount (52325) >= 5" IgnoreCanRun="True" ChildrenCount="3">
<InteractionAction Entry="0" InteractDelay="0" InteractType="GameObject" GameObjectType="Mailbox" SpellFocus="Anvil" />
<CustomAction Code="Thread.Sleep(300); Lua.DoString("RunMacroText(\"/click MailFrameTab2\")"); Thread.Sleep(300);" />
<CustomAction Code="Lua.DoString("local j=0 local i=0 for b=0,4 do for s=1,GetContainerNumSlots(b) do local n=GetContainerItemLink(b,s) if n then if strfind(n,\"52325\") and i<12 then _,c=GetContainerItemInfo(b,s) j=j+c UseContainerItem(b,s) i=i+1 end end end end codprice=j*(FirePrice) SetSendMailCOD(codprice*10000) SendMail(MailRecipent,\"Volatile Fire\",\"\") totalprice = totalprice+codprice DEFAULT_CHAT_FRAME:AddMessage(\"Sending \"..string.format(\"%.0f\",j)..\" Volatile Fires (\"..string.format(\"%.0f\",j)..\" stacks) C.O.D to \".. MailRecipent .. \" for \"..string.format(\"%.0f\",codprice)..\" gold.\"..\" Totally sent for \"..string.format(\"%.0f\",totalprice)..\" gold this session.\",0.0,1.0,0.0)"); Thread.Sleep(500);" />
</While>
<Comment Text="Volatile Life" />
<While Condition="InbagCount (52329) >= 5" IgnoreCanRun="True" ChildrenCount="3">
<InteractionAction Entry="0" InteractDelay="0" InteractType="GameObject" GameObjectType="Mailbox" SpellFocus="Anvil" />
<CustomAction Code="Thread.Sleep(300); Lua.DoString("RunMacroText(\"/click MailFrameTab2\")"); Thread.Sleep(300);" />
<CustomAction Code="Lua.DoString("local j=0 local i=0 for b=0,4 do for s=1,GetContainerNumSlots(b) do local n=GetContainerItemLink(b,s) if n then if strfind(n,\"52329\") and i<12 then _,c=GetContainerItemInfo(b,s) j=j+c UseContainerItem(b,s) i=i+1 end end end end codprice=j*(LifePrice) SetSendMailCOD(codprice*10000) SendMail(MailRecipent,\"Volatile Life\",\"\") totalprice = totalprice+codprice DEFAULT_CHAT_FRAME:AddMessage(\"Sending \"..string.format(\"%.0f\",j)..\" Volatile Lifes (\"..string.format(\"%.0f\",j)..\" stacks) C.O.D to \".. MailRecipent .. \" for \"..string.format(\"%.0f\",codprice)..\" gold.\"..\" Totally sent for \"..string.format(\"%.0f\",totalprice)..\" gold this session.\",0.0,1.0,0.0)"); Thread.Sleep(500);" />
</While>
<Comment Text="Volatile Water" />
<While Condition="InbagCount (52326) >= 5" IgnoreCanRun="True" ChildrenCount="3">
<InteractionAction Entry="0" InteractDelay="0" InteractType="GameObject" GameObjectType="Mailbox" SpellFocus="Anvil" />
<CustomAction Code="Thread.Sleep(300); Lua.DoString("RunMacroText(\"/click MailFrameTab2\")"); Thread.Sleep(300);" />
<CustomAction Code="Lua.DoString("local j=0 local i=0 for b=0,4 do for s=1,GetContainerNumSlots(b) do local n=GetContainerItemLink(b,s) if n then if strfind(n,\"52326\") and i<12 then _,c=GetContainerItemInfo(b,s) j=j+c UseContainerItem(b,s) i=i+1 end end end end codprice=j*(WaterPrice) SetSendMailCOD(codprice*10000) SendMail(MailRecipent,\"Volatile Water\",\"\") totalprice = totalprice+codprice DEFAULT_CHAT_FRAME:AddMessage(\"Sending \"..string.format(\"%.0f\",j)..\" Volatile Waters (\"..string.format(\"%.0f\",j)..\" stacks) C.O.D to \".. MailRecipent .. \" for \"..string.format(\"%.0f\",codprice)..\" gold.\"..\" Totally sent for \"..string.format(\"%.0f\",totalprice)..\" gold this session.\",0.0,1.0,0.0)"); Thread.Sleep(500);" />
</While>
</If>
<Comment Text="AH Settings can be changed below." />
<SellItemOnAhAction ItemID="" MinBuyout="0g10s0c" MaxBuyout="100g0s0c" RunTime="_24_Hours" Amount="10" StackSize="20" AmountType="Everything" AutoFindAh="True" BidPrecent="95" UndercutPrecent="0.1" UseCategory="True" Category="Gem" SubCategoryType="WoWItemGemClass" SubCategory="None" X="0" Y="0" Z="0" PostIfBelowMinBuyout="True" />
<If Condition="(bool)Settings["COD or AH"] == false" IgnoreCanRun="True" ChildrenCount="19">
<MoveToAction MoveType="Location" Pathing="Navigator" Entry="0" X="-8818.79" Y="658.3963" Z="98.0942" />
<Comment Text="Elementium Ore" />
<SellItemOnAhAction ItemID="52185" MinBuyout="0g10s0c" MaxBuyout="100g0s0c" RunTime="_24_Hours" Amount="10" StackSize="20" AmountType="Everything" AutoFindAh="True" BidPrecent="95" UndercutPrecent="0.1" UseCategory="False" Category="TradeGoods" SubCategoryType="WoWItemTradeGoodsClass" SubCategory="None" X="0" Y="0" Z="0" PostIfBelowMinBuyout="True" />
<Comment Text="Whiptail" />
<SellItemOnAhAction ItemID="52988" MinBuyout="0g10s0c" MaxBuyout="100g0s0c" RunTime="_24_Hours" Amount="10" StackSize="20" AmountType="Everything" AutoFindAh="True" BidPrecent="95" UndercutPrecent="0.1" UseCategory="False" Category="TradeGoods" SubCategoryType="WoWItemTradeGoodsClass" SubCategory="None" X="0" Y="0" Z="0" PostIfBelowMinBuyout="True" />
<Comment Text="Cinderbloom" />
<SellItemOnAhAction ItemID="52983" MinBuyout="0g10s0c" MaxBuyout="100g0s0c" RunTime="_24_Hours" Amount="10" StackSize="20" AmountType="Everything" AutoFindAh="True" BidPrecent="95" UndercutPrecent="0.1" UseCategory="False" Category="TradeGoods" SubCategoryType="WoWItemTradeGoodsClass" SubCategory="None" X="0" Y="0" Z="0" PostIfBelowMinBuyout="True" />
<Comment Text="Pyrite Ore" />
<SellItemOnAhAction ItemID="52183" MinBuyout="0g10s0c" MaxBuyout="100g0s0c" RunTime="_24_Hours" Amount="10" StackSize="20" AmountType="Everything" AutoFindAh="True" BidPrecent="95" UndercutPrecent="0.1" UseCategory="False" Category="TradeGoods" SubCategoryType="WoWItemTradeGoodsClass" SubCategory="None" X="0" Y="0" Z="0" PostIfBelowMinBuyout="True" />
<Comment Text="Volatile Air" />
<SellItemOnAhAction ItemID="52328" MinBuyout="0g10s0c" MaxBuyout="100g0s0c" RunTime="_24_Hours" Amount="10" StackSize="20" AmountType="Everything" AutoFindAh="True" BidPrecent="95" UndercutPrecent="0.1" UseCategory="False" Category="TradeGoods" SubCategoryType="WoWItemTradeGoodsClass" SubCategory="None" X="0" Y="0" Z="0" PostIfBelowMinBuyout="True" />
<Comment Text="Volatile Earth" />
<SellItemOnAhAction ItemID="52327" MinBuyout="0g10s0c" MaxBuyout="100g0s0c" RunTime="_24_Hours" Amount="10" StackSize="20" AmountType="Everything" AutoFindAh="True" BidPrecent="95" UndercutPrecent="0.1" UseCategory="False" Category="TradeGoods" SubCategoryType="WoWItemTradeGoodsClass" SubCategory="None" X="0" Y="0" Z="0" PostIfBelowMinBuyout="True" />
<Comment Text="Volatile Fire" />
<SellItemOnAhAction ItemID="52325" MinBuyout="0g10s0c" MaxBuyout="100g0s0c" RunTime="_24_Hours" Amount="10" StackSize="20" AmountType="Everything" AutoFindAh="True" BidPrecent="95" UndercutPrecent="0.1" UseCategory="False" Category="TradeGoods" SubCategoryType="WoWItemTradeGoodsClass" SubCategory="None" X="0" Y="0" Z="0" PostIfBelowMinBuyout="True" />
<Comment Text="Volatile Life" />
<SellItemOnAhAction ItemID="52329" MinBuyout="0g10s0c" MaxBuyout="100g0s0c" RunTime="_24_Hours" Amount="10" StackSize="20" AmountType="Everything" AutoFindAh="True" BidPrecent="95" UndercutPrecent="0.1" UseCategory="False" Category="TradeGoods" SubCategoryType="WoWItemTradeGoodsClass" SubCategory="None" X="0" Y="0" Z="0" PostIfBelowMinBuyout="True" />
<Comment Text="Volatile Water" />
<SellItemOnAhAction ItemID="52326" MinBuyout="0g10s0c" MaxBuyout="100g0s0c" RunTime="_24_Hours" Amount="10" StackSize="20" AmountType="Everything" AutoFindAh="True" BidPrecent="95" UndercutPrecent="0.1" UseCategory="False" Category="TradeGoods" SubCategoryType="WoWItemTradeGoodsClass" SubCategory="None" X="0" Y="0" Z="0" PostIfBelowMinBuyout="True" />
</If>
</While>
</Professionbuddy>