Discussion in   Coding Corner   started     8 years ago   March 09, 2016, 12:38:54 PM   by   Evolution

How to make a Macro - Ultima Online

Evolution
Offline
1299 Posts
Topic :   How to make a Macro - Ultima Online
8 years ago  March 09, 2016, 12:38:54 PM

Ultima Online Hotkey Macros

The word "macro" is just a way of saying "I want to push one key and get this action to happen" It is just a fast way to complete complicated tasks in the game.

It is most commonly used to gain skills or to cast a complicated series of spells/weapon special abilities with the push of one key

For example I use this combo before I enter combat:
I push my F1 macro and Cast Enemy of One
I push my F2 macro and that sets my weapons Primary Ability
I push my F3 macro and it casts Consecrate Weapon

Now I can use these keys to fight very fast and cast spells with 1 keystroke

The Macros screen can be accessed from the paperdoll by clicking on the options menu

Macros are an important feature of the game that allow you to fully customize your interface. Macros let you string together complex command combinations to fit any circumstance that you think may arise. You can have as many Macros as you like (at least until you run out of keyboard commands), and a Macro can contain as many actions as you wish (of course, the more actions a Macro has, the less likely it is to be useful on a regular basis during play).

You can scroll through your current list of Macros using the previous and next buttons on the Macro screen.

To enter a new Macro: Click on the add button for an empty command field. Enter the key you want to use to trigger the new Macro (numbers, letters and punctuation may be used). You may also toggle the Shift, Alt or Ctrl keys on or off. For example, if you want to enter four Macros for use in battle, they can be triggered by B, Shift-B, Alt-B and Ctrl-B. (Note that Macro commands using only letters, or Shift + letters, may be unintentionally triggered during normal text communication).

Once you've selected the trigger, enter the commands that will make up the Macro itself in the field below the command field. Click on the field to see a list of available options. Each time you set an option, a new command field will open up for any further commands you wish to apply to your Macro. When your Macro is done, just stop adding commands and click Okay or Apply to save it.

You can delete an existing Macro by clicking the delete button, then clicking Okay or Apply.

Razor Macros

WARNING: Setting macros that are too complicated, too fast or for crafting can cause your razor client to bug in game. I would prefer no one use craft macros in general.

Do not ever uses macros to afk craft or gather resources

Do not use macros to afk chat messages

How to make a Macro - Ultima Online - UO Evolution Wiki


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

Evolution
Offline
1299 Posts
#1 Re :   How to make a Macro - Ultima Online
8 years ago  March 09, 2016, 12:44:13 PM


Macro Commands

Ultima Online Macro Commands

The following commands are available in the Macro window:

Say - Open a text window where you can enter a line of dialog that your character will speak when the Macro is used.

Emote - As Say, but may be a different text color than normal speech (see "Change Emote Color" above). Also, any Emote text will be placed between two asterisks, for example *grin* or *Broods darkly*. The traditional function of emote text is to convey actions, attitudes, or emotions rather than simple speech.

Whisper - As Say, but whispered text (e.g., "Psst, wanna buy a chicken?") can only be "heard" by characters immediately adjacent to you.

Yell - As Say, but yelled text (e.g., "HELP!") can be "heard" by any character up to a screen and a half away.

Walk - Opens a menu of compass directions from which you choose one. Using this menu causes your character to face and take a step in the selected direction.

War/Peace - Toggles you between War mode and Peace mode.

Paste - Pastes text from your Windows clipboard into a book or speech. Text length is limited. Speech can be only a few words, while books can receive a few sentences.

Open - Opens one of your informational windows. Selecting this option will present you with a list of windows from which to select. Your Character Window is listed as "Paperdoll" and your Options screen as "Configuration".

Close - Closes the window you specify.

Minimize - Minimizes all open windows.

Maximize - Fully opens all minimized windows on screen.

Open Door - Opens any door within reach.

Use Skill - Presents you with a list of all applicable skills, from which to select the specific skill you want to try to Use when you trigger this Macro. This command can only be used to initiate those skills which are normally begun from the skill list in your Character Window. It does not apply to skills initiated by using a specific item or taking a certain action.

Last Skill - Attempts to again Use the last skill you Used.

Cast Spell - Presents you with a list of all the spells in the game, from which you must select the specific spell you want to cast. It's up to you to ensure the spell you select is, in fact, one that you actually know how to cast.

Last Spell - Attempts to recast the last spell you cast.

Last Object - Attempt to again use the last item you Used.

Bow - Your character will bow from the waist.

Salute - Your character will perform a military salute.

Quit Game - Disconnects you and closes the game.

Allnames - Displays the names of every creature and character currently on screen.

LastTarget - Automatically target the last object, creature, or player that you clicked on with the targeting cursor.

TargetSelf - Targets you. Used in conjunction with other macros.

Arm/Disarm - Arms or Disarms your current or chosen weapon. You must specify an arm (right or left).

Wait for Target - Waits for the target cursor to become available.

Target Next - Moves your target cursor to the next available target.

Attack Last - Attacks the creature or player your last targeted.

Delay - Allows you to set a "wait" delay with a complex macro.

CircleTrans - Allows you to toggle Circle Transparency with a macro.

CloseGumps - Closes all open pop-up messages.

AlwaysRun - Toggles the Always Run setting, which makes you always run whenever you move.

SaveDesktop -

KillGumpOpen -

PrimaryAbility - Activates your weapon's primary special ability.

SecondaryAbility - Activates your weapon's secondary special ability.

EquipLastWeapon - Allows you to quickly switch between two weapons. Clickhere for more information.

SetUpdateRange -

ModifyUpdateRange -

IncreaseUpdateRange -

DecreaseUpdateRange -

MaxUpdateRange -

MinUpdateRange -

DefaultUpdateRange -

UpdateRangeInfo -

EnableRangeColor -

DisableRangeColor -

ToggleRangeColor -

InvokeVirtue - Allows you to specify a virtue to be activated.

NONE - Choose this to erase a step in your macro.
The following Macros have been pre-set, and can be used immediately upon entering the game. If you don't like the way a pre-set Macro is set up, you can change it at any time.

Alt + S - Open Status window
Alt + B - Open Spellbook
Alt + C - Toggle between War/Peace modes
Alt + P - Open Character Window
Alt + K - Open Skills
Alt + J - Open Journal
Alt + I - Open Backpack
Alt + R - Open Overhead View
Alt + O - Open Options window
Alt + X - Quit game
Alt + B - Bow
Alt + S - Salute
The Number Pad keys - This is a series of commands useful in navigating ships.


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

Evolution
Offline
1299 Posts
#2 Re :   How to make a Macro - Ultima Online
8 years ago  March 17, 2016, 01:50:01 PM


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