Recall Mining Macro

Discussion in 'Guides' started by CaptainMorgan, Sep 2, 2015.

  1. CaptainMorgan

    CaptainMorgan Well-Known Member
    UO:R Subscriber

    Joined:
    Jul 14, 2014
    Messages:
    4,658
    Likes Received:
    2,791
    I've been meaning to post this for a while. Here is a functional recall mining macro that I've used. Be good citizens and use it at the keyboard. No AFKing (you will get gumped and jailed if you do)




    Pre-macro Setup

    To run this you will need:

    1) A bag in your bank with recall regs
    2) A separate bag in your bank with shovels
    3) A third bag for dumping the ore
    4) A rune to the bank of your choice
    5) A runebook in your bank with mining spots ***
    6) Agents - Restock agent 1 - Each recall reg BP, MR and BM set to quantity 10
    7) Agents - Restock agent 2 - Shovel set to quantity 3
    8) Agents - Organization agent 10 - each of the 4 ore sizes, with the hot bag set to your ore dump bag in the bank


    *** To build your book, start simple. Go mine a wall until there is no metal to dig there. Now, move slowly down the wall, testing each spot until you find the next vein. Where you're standing is the intersection of two veins. Mark the spot and drop it in your book. Mark a full book at least




    Setting up the macro

    First of all, locate the directory where Razor stores your macros. This is in %appdata%\Razor\macros

    You can copy/paste that into Start - Run and it will open

    Each macro is essentially a text file with the extension .macro

    First, click on Tools - Folder options (in Windows 7, you have to hit the Alt key to get the menus). Go to the View tab. Uncheck the option that says "Hide extensions of known file types" and OK out

    Now, in the macros folder, make a new folder called Recall Mining

    In that folder is where you're going to create your new macros. Go ahead right click, and create a new text file and call it "Mining 1.macro" (make sure you remove the .txt extension)

    Now, open that file and copy/paste the following code into it. Go ahead and save it, then I will break down what's in the macro:





    Assistant.Macros.SpeechAction|0|52|3|ENU|2|16|2|Bank Start 1
    // Restock Regs
    Assistant.Macros.HotKeyAction|0|Restock Agent-1
    Assistant.Macros.AbsoluteTargetAction|0|0|1130659273|100|145|0|3701
    Assistant.Macros.PauseAction|00:00:02.5000000
    // Restock Shovels
    Assistant.Macros.HotKeyAction|0|Restock Agent-2
    Assistant.Macros.AbsoluteTargetAction|0|0|1120798059|117|145|0|3701
    Assistant.Macros.PauseAction|00:00:01.5000000
    // Recall to Location
    Assistant.Macros.DoubleClickAction|1078532053|3834
    Assistant.Macros.WaitForGumpAction|1431013363|False|300
    Assistant.Macros.GumpResponseAction|5|0|0
    Assistant.Macros.PauseAction|00:00:02.5000000
    // Mine Vein 1
    Assistant.Macros.ForAction|16
    Assistant.Macros.IfAction|5|0|378
    Assistant.Macros.DoubleClickTypeAction|3897|True
    Assistant.Macros.WaitForTargetAction|5
    Assistant.Macros.AbsoluteTargetAction|1|0|0|2374|918|3|0
    Assistant.Macros.PauseAction|00:00:01.8000000
    Assistant.Macros.EndIfAction
    Assistant.Macros.EndForAction
    // Mine Vein 2
    Assistant.Macros.ForAction|16
    Assistant.Macros.IfAction|5|0|378
    Assistant.Macros.DoubleClickTypeAction|3897|True
    Assistant.Macros.WaitForTargetAction|30
    Assistant.Macros.AbsoluteTargetAction|1|0|0|2378|916|2|0
    Assistant.Macros.PauseAction|00:00:01.8000000
    Assistant.Macros.EndIfAction
    Assistant.Macros.EndForAction
    // Recall to Bank
    Assistant.Macros.MacroCastSpellAction|32
    Assistant.Macros.WaitForTargetAction|30
    Assistant.Macros.AbsoluteTargetAction|0|0|1121924637|46|129|0|7956
    // Bank Ore
    Assistant.Macros.SpeechAction|0|52|3|ENU|2|16|2|Bank Finish 1
    Assistant.Macros.HotKeyAction|0|Organizer Agent-10
    Assistant.Macros.PauseAction|00:00:02
    Assistant.Macros.HotKeyAction|0|Organizer Agent-10
    Assistant.Macros.PauseAction|00:00:02
    // GoTo Next
    Assistant.Macros.HotKeyAction|0|Play: Recall Mining\Mining 2







    Now, if you're already logged in, you'll need to right click the left pane in Razor and choose Update macro list. You'll now see your new macros.

    Now we'll look at the various parts of the macro, and what you need to update

    The first two sections are to restock, you're going to open your bank, where you have two bags/containers...one with recall regs and one with shovels

    The macro uses restock agents 1 & 2, but you can use whichever you want, just update the numbers. I recommend you add 10 of each recall reg to one, and 3 shovels to the other.


    // Restock Regs
    Assistant.Macros.HotKeyAction|0|Restock Agent-1
    Assistant.Macros.AbsoluteTargetAction|0|0|1130659273|100|145|0|3701
    Assistant.Macros.PauseAction|00:00:02.5000000
    // Restock Shovels
    Assistant.Macros.HotKeyAction|0|Restock Agent-2
    Assistant.Macros.AbsoluteTargetAction|0|0|1120798059|117|145|0|3701
    Assistant.Macros.PauseAction|00:00:01.5000000


    The red lines are the target for your restock agents. In Razor, right click the Absolute target line and choose Retarget. Target the bag in your bank that you'll be using for that agent (regs or shovels).



    The next section is where you'll open a runebook with your mining spots and recall to the next location


    // Recall to Location
    Assistant.Macros.DoubleClickAction|1078532053|3834
    Assistant.Macros.WaitForGumpAction|1431013363|False|300
    Assistant.Macros.GumpResponseAction|5|0|0
    Assistant.Macros.PauseAction|00:00:02.5000000



    First, the yellow line is the runebook you'll open. In Razor, right click the Double click item and Retarget your runebook in your bank. We'll talk about the other line in a minute...


    The next two sections are the actual mining...we'll deal with those later, but for now just note that the blue lines are the target.

    // Mine Vein 1
    Assistant.Macros.ForAction|16
    Assistant.Macros.IfAction|5|0|378
    Assistant.Macros.DoubleClickTypeAction|3897|True
    Assistant.Macros.WaitForTargetAction|5
    Assistant.Macros.AbsoluteTargetAction|1|0|0|2374|918|3|0
    Assistant.Macros.PauseAction|00:00:01.8000000
    Assistant.Macros.EndIfAction
    Assistant.Macros.EndForAction
    // Mine Vein 2
    Assistant.Macros.ForAction|16
    Assistant.Macros.IfAction|5|0|378
    Assistant.Macros.DoubleClickTypeAction|3897|True
    Assistant.Macros.WaitForTargetAction|30
    Assistant.Macros.AbsoluteTargetAction|1|0|0|2378|916|2|0
    Assistant.Macros.PauseAction|00:00:01.8000000
    Assistant.Macros.EndIfAction
    Assistant.Macros.EndForAction




    The next section is recalling to your home bank (I recommend Cove because of the forge nearby)


    // Recall to Bank
    Assistant.Macros.MacroCastSpellAction|32
    Assistant.Macros.WaitForTargetAction|30
    Assistant.Macros.AbsoluteTargetAction|0|0|1121924637|46|129|0|7956



    The magenta line is your recall rune. Right click the target line in Razor and retarget the rune to the bank.


    Now, right click in Razor and Save. Go to the macros folder and make a backup copy of that file right now.


    OK...now you have your first recall macro and it's time to create the others. You're going to copy that file and paste it 15 times into the folder. Rename each to Mining 2, 3, ... 16

    Almost there...


    Now, open each file in Notepad and update all of the green lines



    Assistant.Macros.SpeechAction|0|52|3|ENU|2|16|2|Bank Start 1
    ...
    Assistant.Macros.SpeechAction|0|52|3|ENU|2|16|2|Bank Finish 1
    ...
    Assistant.Macros.HotKeyAction|0|Play: Recall Mining\Mining 2



    The first two lines will be the number of the file you are currently in...and the last one is the next file to call. On your last macro, you can remove that last line, or send it back to 1 (you'll need more than 16 spots to loop it)


    One last update to the file...The magenta line after the runebook. This one is a little tricky. You're going to update the 5 to the correct button...but which is the correct button? It's the number of the macro times 6 minus 1. So, spot 10 is 59 because (10 x 6) - 1 = 59


    Assistant.Macros.GumpResponseAction|5|0|0


    Save each file after you get them updated.


    Now, you have one last task. You have to retarget the veins to mine.

    For each mining spot, you have to recall out to the spot and, right click each of the target lines in Razor and retarget one left and one right to the two veins you marked earlier. Right click - save after you do.



    Once you have all of this done, you will be able to start the first macro and it will chain each one until done. Make sure you do this at the keyboard, though, as you will get AFK gumps
    Infantry, Seba, Crunk Juice and 7 others like this.
  2. Eldstorm

    Eldstorm Active Member

    Joined:
    Sep 2, 2016
    Messages:
    108
    Likes Received:
    85
    bumping this up due to unfathomably awesomeness!
    CaptainMorgan likes this.

Share This Page