Razor: How To Setup A Restock Macro

Discussion in 'Guides' started by Lightshade, Sep 19, 2013.

  1. Lightshade

    Lightshade Well-Known Member
    UO:R Subscriber

    Joined:
    Sep 12, 2013
    Messages:
    1,894
    Likes Received:
    2,448
    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.
    [​IMG]

    Then go to the "Agents" tab in Razor and scroll down to Restock-1.
    [​IMG]
    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.
    [​IMG]

    Go to the "Hot Keys" tab in Razor and go to the Agents [+] and expand the menu for Agents.
    [​IMG]
    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.
    [​IMG]
    Your macro should look something like this.

    Now you need to add in a Pause after the Restock.
    [​IMG]
    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 more than 500ms. So if you're restocking 5 items, you should enter in a MINIMUM of 2,500ms. This will depend on your internet connection.

    To be safe and cautious, you can set this to 1,000ms for each item that you restock. You can also tweak with it and set it to 500ms + your Ping and see how that works for you. It will not be safe from lag spikes. Consider random lag and its effects on your macros when setting this.

    You can get a rough approximation of your in-game Ping by typing "-ping" without the quotes in-game.

    Then you need to verify that you have the appropriate Object Delay for the UOR Server:
    [​IMG]
    Go to the "More Options" tab and look for "Object Delay:" near the top left. This needs to be set for at least 500ms 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 500ms 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.

    -L/S
    Last edited: Oct 18, 2017
  2. Wise

    Wise Well-Known Member
    UO:R Subscriber

    Joined:
    Aug 21, 2012
    Messages:
    1,901
    Likes Received:
    476
    Excellent guide, thank you kindly dear sir!

Share This Page