Page 1 of 1

Running a Potion Keg-Making Macro, Need help debugging.

Posted: Sat Jan 04, 2014 2:34 am
by Krakklin
Not really sure how to approach this in terms of reporting to you all; but for what its worth, here goes!

I recently made a macro that

1. Restocks boards and ingots from a stocking chest
2. Makes 3 Barrel Staves
3. Makes 2 Lids
4. Makes 1 Spigot
5. Makes 1 Barrel Hoops
6. Uses Carpentry to make a keg
7. Restocks 10 Bottles from Stocking Chest
8. Uses tinkering on the keg to create potion keg

My issue comes at step 4. It seems the macro wants to use the ingots from the stocking chest instead of my inventory (i have the macro set to use tinker tools, then target ingots by type). Obviously those ingots are not available to use and the macro gets stuck. It does not get stuck on the 5th step however (which uses the exact same command [use tinker tools by type, use target ingots by type]) Any ideas why? or how to fix it?

// 1. Restock Ingots and Boards
Assistant.Macros.HotKeyAction|0|Restock Agent-2
Assistant.Macros.AbsoluteTargetAction|0|0|1080038581|1683|675|25|3651
Assistant.Macros.PauseAction|00:00:02
// 2. Barrel Staves
Assistant.Macros.ForAction|3
Assistant.Macros.DoubleClickTypeAction|4146|True
Assistant.Macros.WaitForMenuAction|0|300
Assistant.Macros.MenuResponseAction|1|7127|0
Assistant.Macros.WaitForMenuAction|0|300
Assistant.Macros.MenuResponseAction|2|7857|0
Assistant.Macros.PauseAction|00:00:10
Assistant.Macros.EndForAction
// 3. 2 Lids
Assistant.Macros.ForAction|2
Assistant.Macros.DoubleClickTypeAction|4146|True
Assistant.Macros.WaitForMenuAction|0|300
Assistant.Macros.MenuResponseAction|1|7127|0
Assistant.Macros.WaitForMenuAction|0|300
Assistant.Macros.MenuResponseAction|3|7608|0
Assistant.Macros.PauseAction|00:00:10
Assistant.Macros.EndForAction
// 4. Spigot
Assistant.Macros.DoubleClickTypeAction|7868|True
Assistant.Macros.WaitForTargetAction|30
Assistant.Macros.TargetTypeAction|False|7154
Assistant.Macros.WaitForMenuAction|0|300
Assistant.Macros.MenuResponseAction|2|4179|0
Assistant.Macros.WaitForMenuAction|0|300
Assistant.Macros.MenuResponseAction|3|4100|0
Assistant.Macros.PauseAction|00:00:10
// 5. Hoops
Assistant.Macros.DoubleClickTypeAction|7868|True
Assistant.Macros.WaitForTargetAction|30
Assistant.Macros.TargetTypeAction|False|7154
Assistant.Macros.WaitForMenuAction|0|300
Assistant.Macros.MenuResponseAction|2|4179|0
Assistant.Macros.WaitForMenuAction|0|300
Assistant.Macros.MenuResponseAction|6|4321|0
Assistant.Macros.PauseAction|00:00:10
// 6. Make Keg
Assistant.Macros.DoubleClickTypeAction|4146|True
Assistant.Macros.WaitForMenuAction|0|300
Assistant.Macros.MenuResponseAction|3|3651|0
Assistant.Macros.WaitForMenuAction|0|300
Assistant.Macros.MenuResponseAction|9|3711|0
Assistant.Macros.PauseAction|00:00:10
// 7. Restock Empty Bottles
Assistant.Macros.HotKeyAction|0|Restock Agent-5
Assistant.Macros.AbsoluteTargetAction|0|0|1080038581|1683|675|25|3651
Assistant.Macros.PauseAction|00:00:02
// 8. Make Potion Keg
Assistant.Macros.DoubleClickTypeAction|7868|True
Assistant.Macros.WaitForTargetAction|30
Assistant.Macros.TargetTypeAction|False|3711
Assistant.Macros.WaitForMenuAction|0|300
Assistant.Macros.MenuResponseAction|1|6464|0
Assistant.Macros.PauseAction|00:00:01

Thanks
-Llama Herder

Re: Running a Potion Keg-Making Macro, Need help debugging.

Posted: Sat Jan 04, 2014 2:51 am
by UsualSuspect
just have the restock pull more than you need and target the ones in your inventory rather than by type.

Re: Running a Potion Keg-Making Macro, Need help debugging.

Posted: Sat Jan 04, 2014 6:08 am
by UsualSuspect
Did that work? you're welcome.

Re: Running a Potion Keg-Making Macro, Need help debugging.

Posted: Sat Jan 04, 2014 11:33 am
by Krakklin
Yes that worked beautifully. Ran into another snag with the kegs doing the same thing, but it was because there were some kegs in reach in a chest nearby. Once I moved them all to my inventory no problem!

thanks a bunch.

-Llama Herder

Re: Running a Potion Keg-Making Macro, Need help debugging.

Posted: Tue Jan 10, 2017 10:50 pm
by randale
I'm trying to do a keg macro while I've already made each part and restock each from it's own chest, it's not working. But, since I already made each part, I don't want to start over making them and using them to make them as I go. Check out this thread, with the last 2 posts, to see the problems I'm having.

viewtopic.php?f=11&t=66126

Re: Running a Potion Keg-Making Macro, Need help debugging.

Posted: Thu Jan 12, 2017 6:00 am
by SighelmofWyrmgard
Here's a hint that might help: when you use a set of tinker tools on itself, it will make again the last item that that set of tools made.

In my own keg-making macro, I use multiple tinker tools targeted on themselves (they need to be 'primed' before running the macro), so I do not need to use "target by type" in order to turn the keg into a potion-keg ...

SS

Re: Running a Potion Keg-Making Macro, Need help debugging.

Posted: Thu Jan 12, 2017 8:19 am
by Swunk
yours is just missing control imo. hmm.. i'd split mine up into parts.. gonna work on this today

somethin like

if materials exist
make a part
if system message 'create' (if appropriate)
play next macro
else
play this macro

if you insist on doing it all in one macro though, maybe a bunch of ifs would do

if 'tinkering part' <=0
make part
endif
if 'next part' <=0
make part
endif....then just make it kinda spammy.. many ways to go about doing this keg-making business I am sure

Re: Running a Potion Keg-Making Macro, Need help debugging.

Posted: Thu Jan 12, 2017 10:27 pm
by randale
SighelmofWyrmgard wrote:Here's a hint that might help: when you use a set of tinker tools on itself, it will make again the last item that that set of tools made.

In my own keg-making macro, I use multiple tinker tools targeted on themselves (they need to be 'primed' before running the macro), so I do not need to use "target by type" in order to turn the keg into a potion-keg ...

SS
Thanks didn't knot that. Anyway, I went ahead and made over 250 potion kegs manually, before I read this (already had the parts made) it's done now.