Razor: How To Setup A Restock Macro
I get asked how to setup a Razor Restock Macro all the time, so I figured i'd write up a guide on how to do it. Here's the basics.
First off, create your macro and give it a name.
Then go to the "Agents" tab in Razor and scroll down to Restock-1.
Click on "Add (Target)..." button and select the items that you would like to restock. A box will pop up asking you to enter in the amount of said item that you would like to restock. This is the amount that Razor will make sure is in your bag. If you have 53 of something and your restock is set for 100, it will restock 47 of them. This will give you a total of 100 items again.
Now, go back to the "Macros" tab in Razor and click the "Record" button.
Go to the "Hot Keys" tab in Razor and go to the Agents [+] and expand the menu for Agents.
Scroll down till you see "Restock Agent-1 (not assigned)". Click "Execute Selected" and then target the container in UO that you want to Restock from.
In Razor, click on the "Macros" tab and click the "Stop" button.
Your macro should look something like this.
Now you need to add in a Pause after the Restock.
Left Click on the last line in your "Actions" box in Razor. This should highlight it blue. Then Right Click on that line and go to "Special Constructs" --> Then "Insert Pause/Wait..." This will bring up a Popup box where you need to select the radio button for "Pause for:" and should enter in a pause. For each item you should enter in 1,000ms. So if you're restocking 5 items, you should enter in 5,000ms.
Then you need to verify that you have the appropriate Object Delay for the UOSA Server:
Go to the "More Options" tab and look for "Object Delay:" near the top left. This needs to be set for 1,000ms as this is the default for this server. Some people modify this value based off of how they write their macros or how much lag they have. If you have a higher ping, you may need to adjust this value accordingly. Many people use values between 1,000ms and 1,250ms.
Now, one thing that people often find is that their macros "break" after a while. This is often times due to them running out of particular resources, then restocking said resources. Once you restock from Zero, you give that "Absolute Target" in other parts of your macro a new ID in razor.
In order to get around this, you need to make sure you restock before you run out of all of your resources for a particular "Absolute Target". A good way to do this is to use for loops. If you have a macro that uses up 25 of each reagent, and then goes to restock...make sure you restock 100 of each reagent. This way, if a world save or lag hits you and you miss restocking that item, your macro will not break. Well, unless you're lucky enough to hit a huge lag spike on 4 consecutive restocks...in which case you just need to get a different internet provider.
Hope this helps.