I played back in 98-01' and T2A Era UO was the most fun I ever had playing any game, period. I wrote for PKGHOST.com, anyone remember me?
Anyways, I decided to officially say hello by sharing this tailoring macro I created last night and successfully tested. It's not the simplest of macros but I will try to provide easy instructions that anyone can follow as well as a brief rundown of pros versus cons of this macro against others.
If anyone has suggestions that could improve my macro's efficiency, please share them!
NOTE: This is NOT for resource gathering. This is for CRAFTING ONLY, as per shard rules.
Goal of this macro: To autonomously craft the same item repeatedly, using a large quantity of materials and tools. This macro can be used for hours without intervention, as it will fill up to 4 containers with the products of your crafting and restock on tools and materials without breaking the macro.
WHAT YOU'LL NEED: A house. A locked down container with a supply of sewing kits and your pile of hides. up to 4 locked down boxes for depositing finished goods. I used about 25 sewing kits and a pile of 6000 leather, and the macro took care of itself all night long.
STEP 1, INSTALLING MACRO: Make sure razor and UO are closed. Open your RAZOR Directory. Inside should be a folder titled "Macros". Open it. Use notepad to make a new text file in Macros, and cut and paste the following code into it:
Code: Select all
Save this file and name it to whatever.macro
Choose an appropriate name for your macro, I picked tailoring for mine. So the resulting filename looks like: tailoring.macro
STEP 2: CONFIGURING MACRO
Before this macro will function you will have to perform the following tasks:
Under the Agents tab in Razor
A. Set Organizing Agents 2, 3, 4, and 5. Click the "Add item" button and add the items you will be crafting to each agent. For me from 70 to 80, this was leather bustiers. Then have 4 locked down containers near your character. Set the hot bag for each organizing agent to each of the locked down containers. This will allow the macro to sort your finished products into the containers, allowing you to craft 500 items and then fill up your backpack before intervening in your macro.
B. Set Restock Agents 2, 3 The macro will use Restock 2 to restock sewing kits and Restock 3 to restock leather. Add these items to their respective agent. Set your sewing kit restock quantity to 1. THIS IS IMPORTANT. Razor doesn't handle more than one kit at a time very well using T2A style crafting.
Make sure that your Restock 3 quantity allows you to have materials left over in your stack after crafting at least two iterations, this will allow razor to keep your materials on an Absolute Target, which works more smoothly. If the materials are fully consumed in your pack before restocking, it will break the macro.
C. Set your targets. Go to the Macros tab in Razor. Select the macro from the list, it should be named after whatever you called the textfile from step 1. Scroll down the macro and highlight the "Absolute Target" after each of the restocks in Razor. Right click them and "retarget" them, and make sure to target the box containing your leather and your kits.
STEP 3: Record crafting your item
Look at these lines of the macro in Razor:
Double Click (sewing kit)
wait for target
wait for menu (any)
wait for menu (any)
These lines tells razor to craft Studded Gorgets specifically. If you want to craft something else, you will have to delete them and right click to "Record from here". Then record yourself crafting your item by selecting it in the gump menu. Make sure your double click for the tool is set to TYPE. Make sure your material is set to that second ABSOLUTE TARGET.
Voila, you're ready to go.
This macro makes razor select the item from a gump menu. While the item is crafting, each of the 4 organizing agents go off and deposits any items from the last iteration in one of the four locked boxes. If container #2 is full, then #3 will start filling up. If both #2 and #3 are full, #4 begins to fill, etc. As soon as the crafting sequence is finished and the item is either created or fails, the restock agent 3 first refills your leather supply, then 2 refills your sewing kit. Make sure the count on the sewing kit agent is set to 1, or the macro might get confused!
This agent is set to the end of the macro, because the server checks to see if a kit was destroyed on use only after the item is successfully crafted. Otherwise it would check for restock, see you don't need a kit, and then the kit would be destroyed, breaking the macro until timeout. I like to individual set timeout values on pertinent steps in the macro to 15, which is sufficient to account for worldsaves and lets your macro get going in about a minute after a step fails.
-Can craft thousands of materials into 500+ items without any intervention whatsoever.
-Hands off after setup.
-Can be used for almost any crafting skill with little editing.
-Not perfectly efficient. Crafting time (for me tailoring) seems to be about 9 1/2 seconds. This macro iterates in about 13 seconds, give or take some. This is because all of the restocking and organizing occurs every single iteration The macro uses the crafting time to run the agents, but it takes a few extra seconds to avoid hangups with all 6 agents.
-You need to have a house for maximum efficiency. Altering the macro to restock from a bank would work fine, but the bank is not sufficient to store the hundreds of items you can make over the course of a few hours. If you do this, cut out the organizing agents and manually sell/cut/whatever every time your pack fills up.
-Slightly tricky setup.
It seems to me I could make this macro perfect if I could figure out how If Conditionals work in Razor. My first attempt involved these but I could never get it to work right. Only restocking when necessary would cut a lot of the time out of each iteration.
Let me know your thoughts, guys. Happy mule-ing!