Basic Macro Making:
One thing to note here: This may seem like an awful lot of steps to follow for a simple
macro, but really, it goes very quick and once you get the hang of it, you'll be going even faster! Bear with me here and follow each step exactly.
Before we start the macro, farm some wood. 2 or 3 different types is best for the example macro. So, go grab 20 regular, 20 ash and 20 of another type of logs. Leave these in your pack for now and be sure you have your LJ keys in your pack as well.
1.) Make the new macro and name it Add wood to keys and press OK.
2.) Click RECORD
3.) In your pack, double click your LJ keys.
4.) On the LJ Keys menu, click Add Resources.
5.) Click ONLY the normal logs.
6.) Press STOP in RAZOR.
Now let's pause and see what your macro looks like. You should have the following lines in the macro box:
Double Click (9x405A1E4A)
Wait For Gump (Any)
Gump Response (Button 17)
Wait For Target
Absolute Target
Wait For Gump(Any)
Wait For Target
Here is a small explanation of what is going on:
Double Click (xxx) - The numbers and letters inside the parentheses are unique to certain items in the game. In this case, 9x405A1E4A stands for Wood Workers Keys (LJ keys)
Gump - A gump is any window that opens in the game, in this case, when you double click the woodworkers keys, you open the wood menu gump.
Gump Response - The button you press (17 in this case being "Add resources")
Wait for Target - Razor pauses until a targeting cursor comes up
Absolute Target - In this case, when you clicked on the regular logs, it was an absolute target. In other words, this macro will currently only choose REGULAR logs. We'll fix that in a bit.
Editing the macro:
In order for Razor to add ALL the logs in your bag to your LJ Keys, we have to tell it to do a few things differently than above. We want to make a macro that will keep searching in your pack for all logs, no matter what color, add them to keys, and then stop when your pack is empty of logs. So, we will make changes to do this. If your wood workers keys menu is not open, double click your keys again before continuing.
1.) Click the very bottom line in the macro (Wait For Target) so it is highlighted.
2.) Right click the now highlighted line and choose: Special Constructs and then choose Insert "IF" conditional.
3.) In the new box that opens, you will see three small boxes you can change. In the first box, choose SYSMESSAGE. Now you will only have one other box to work with. In this box, type: no item and then press OK.
4.) Your macro will auto-save. At this point, click on the tab for HOT KEYS.
5.) Click the + symbol next to the word Macros
6.) The very first line under macros should be STOP CURRENT MACRO. To the right, select a key combination not currently used by you in Ultima Online. Mine, for example, is set to Ctrl F10. So, you would check mark Ctrl, and in the key box, press F10. When finished, press SET.
7.) Go back to the macros tab and open your Add wood to keys macro. Again, highlight the very bottom line ( If (SysMessage "no item") ) and right click the line once highlighted. Choose BEGIN RECORDING HERE.
8.) Click your UO window to bring it back into focus and press Ctrl F10 (or whatever button you chose for "Stop Current Macro" in hot keys) This will add a new line to your macro at the very bottom which should read: Exec: > Stop Current Macro.
9.) Now we need to change the macro so it is not only searching for regular logs. In your macro, find the line that says "Absolute Target" and single click it to highlight it. When highlighted, right click the line and choose: Convert to Target By Type. Be careful not to choose any other option here or you may have to re-record your macro. Now, where it used to say Absolute Target, it should say: Target By Type log%s(1BDD).
10.) We're almost done now. We just have to add some pauses and fix a few other minor things. To start, highlight the first line: Double Click (xxx). When highlighted, right click and choose Special Constructs, followed by Insert Pause. Set the pause to 500 ms and press OK.
11.) Look for the first line that says Wait For Target, highlight it and press Delete. Press OK to delete this line. The line above where it was should still be Wait For Gump (any). Highlight that, right click it and choose Special Constructs --> Add Pause and choose 500 ms again.
12.) Highlight the line that says: Target By Type log%s(xxx), right click, Special Construct --> Add Pause and set this to 880ms (To allow time for the logs to go on keys and the system to respond)
13.) Make sure on your UO screen, your wood workers key menu is still open and then highlight the line that says: If (SysMessage "no item")and right click, choose Begin Recording Here. Click your UO window again to bring it into focus and then close your Wood Workers Keys menu. This will add the line: Close Gump below the SysMessage line so that when all is done, it will close your wood workers keys menu for you.
14.) Near the bottom of your macro text box, on the right, you will see a little check box with the word LOOP next to it. Check mark this box. 15.) Test your macro! Press the play button and watch while it (hopefully) adds the rest of the logs you had in your pack onto your keys. If it doesn't, go through the steps again and make sure your macro looks like this:
Double Click (xxx)
Pause .50sec
Gump Response (button 17)
Pause .50sec
Target By Type log%s(xxx)
Pause .88sec
If (SysMessage "no item")
Close Gump
Exec:> Stop current macro
Final step: Pick a key combination that is convenient for you (I.e. Alt F1, alt A, or whatever is not currently in use by UO) and go to the Hot Keys tab. If it's not already expanded, click the + symbol next to macros, find your macro and highlight it and enter your key combination to start the macro. Be sure to check mark SEND TO UO and then press SET.
In closing, I just want to say, this is only one of an endless number of macros you can use and design. You can do pretty much anything in the game. I would highly recommend you fool around with the macros and see what does what and eventually you'll be able to figure out how to get Razor to do whatever you want it to (almost, there ARE some limits). Good luck!
Admin Dante - Owner - UO Evolution Custom Ultima Online Shard
Website - http://www.uoevolution.com
Forum - http://www.uoevo.com/forum
Wiki - http://www.uoevo.com/wiki
Discord - http://www.discord.gg/JwEBhPH