I just made a down and dirty profile that prospects all ghost iron and kyparite. It crafts BOE's, and sends different materials to my enchanter, banker, and alchemist. The only issue I have run into, is to craft the blue BOE's, I need the serpent eyes. I have the sparkling shards in my bag, and I don't know how to get PB to use the item to turn them into serpent eyes. If someone knows how to please let me know. Also, I would like it to repeat until the sparkling shards in my bag is less then 10, basically make every serpent eye possible. If this is in the wrong section I apologize.
I put this in my xml and it only happened once. So I tried putting an if statement in like this: <If Condition="InbagCount(90407) > 10" IgnoreCanRun="True"> <CustomAction Code="Lua.DoString("UseItemByName(90407)"" /> </If> This also only runs once, even if I have 40+ sparkling shards in my bag. I copied and pasted code from other PB files because I am trying to teach myself to write my own. Im just assuming this would be the correct way.
Sorry, I read you were making your own profiles so I assume you just needed the code to use it. Code: <While Condition="InbagCount (90407) >= 10" IgnoreCanRun="False"> <CustomAction Code="Lua.DoString("UseItemByName(90407)");" /> <WaitAction Condition="false" Timeout="1500" /> </While> That will use it for as long as you have 10 shards or more. Hope it helps EDIT: Just to clarify, generally the IF action will run once, and the WHILE action will run for as long as the condition is true, that's why the code you tried was only doing it once. If you open the bot config (with PB selected of course) and click on help, a small tutorial will pop up. I'm sure you'll find if useful. I believe it's in a RTF file inside the PB directory as well.
Code: <!--Tidy Bags by LiquidAtoR-->[INDENT][B]<Settings DefaultValue="false" Type="Boolean" Name="[U]use something[/U]" Summary="Set this to true if you want to use something" Category="[/B][B]use something[/B][B]" Global="False" Hidden="False" />[/B] [B]<Declaration Code="Stopwatch sw = new Stopwatch();" />[/B] [B]<If Condition="(bool)Settings["[U]use something[/U]"] && HasItem([U][ItemID][/U]) && (GetItemCount([U][ItemID][/U]) >=10) && (Me.FreeNormalBagSlots >=1)" IgnoreCanRun="True"> [/B][/INDENT] [INDENT=2][B]<CustomAction Code="[/B][/INDENT] [INDENT=3][I]if (!sw.IsRunning) { sw.Start(); } if (sw.Elapsed.TotalSeconds > 1) { StyxWoW.SleepForLagDuration(); Lua.DoString("UseItemByName([/I][U][B][ItemID][/B][/U][I])"); StyxWoW.SleepForLagDuration(); } while (LootTargeting.LootFrameIsOpen) { StyxWoW.SleepForLagDuration(); if (sw.Elapsed.TotalSeconds >= 6) { break; } } sw.Reset(); sw.Start();[/I] [/INDENT] [INDENT=2][B]" />[/B] [/INDENT] [INDENT][B]</If>[/B][/INDENT]