Razor Attack Macro
From UO Excelsior Wiki - Ultima Online Free Shard
Razor is by far the most useful tool of UO. Razor allows you to macro skills, open doors automatically, bind keys to your mouse (something UO cannot do), equip gear with one click of a button and more. This is a short run down of the better aspects of Razor. Make sure you bind this to something easy, like scroll up/down.
You can write a simple macro to attack targets for you. With this macro you will never have to double click again. By far this is the best macro you can create with razor. UO is nothing but double clicking/dragging a lot of random pixels. This macro will help you level weapons, target champ bosses easier and reduce carpal tunnel syndrome in a lot of players.
This macro requires you to record three things. Target Closest Non-Friendly, Attack Last Target, Cancel Current Target. All of these can be found in the "Hot Keys" section on Razor, under "Targets". Record these three things in a row and your character will attack when this macro is activated.
Also, you can bind weapon abilities to your razor macro, though there is a catch; you cannot record ML abilities, meaning Armor Pierce on Yumi's will not work, nor will Dbl Strike. There is an easy fix to this, however. Add this line to the .txt file of your macro. Assistant.Macros.SetAbilityAction|23 This will queue Armor Pierce (though it will not show up toggled red on the tab) If you wish to use Double Strike instead, it is 22, not 23.
Note: This will attack the CLOSEST, GRAY monster to you. It will not attack blue monsters (such as unicorns or kirin. MOST blue GoC monsters will still be targeted). You can edit what type of monster this macro attacks by adding different Targets. Murderer = reds, innocent = blues, enemy = for orange targets (Enemy of One targets). Non-friendly groups a few targets and therefore is the best to use.
Note2: You MUST keep the "cancel curent target" in there. If you do not, the next spell you cast (99% of the time it is a heal) will target the monster you are attacking, meaning you must cast twice before you can target yourself/pets.
Note3: Target Non-Friendly will target players that are in Angel Form. It sucks, but hey, still better than clicking forever. Try binding your attack macro to scroll down and your chivalry spells to scroll up for an easy set up.