UO Auto-Pilot v2.3a
(Formerly the UO Auto-Trainer)
(Currently maintained and rights retained by CrazyDole)
Disclaimer
UO Auto-Pilot has not been through EA\OSI's UO 3rd Party Program. While UO Auto-Pilot itself is not dectable by EA\OSI, unattended macroing of your character for long periods of time by using a very basic, repetative motion macro can be detected. I'm not responsible for any damage, be it software or hardware related, that you may occur as a result of using this software product. UO Auto-Pilot works on my computer without any problems and I'll try to help weed out bugs as they might occur. I'm not resonsible if UO Auto-Pilot is carelessly used and it results in the banning for macro abuse of your character. Furthermore, I'm not responsible for the well being of your UO character or any lost items, etc if you are caught using or killed while macroing with UO Auto-Pilot.
About this version
Scripts from UO Auto-Pilot v2.0 and older will still work with UO Auto-Pilot. These additions have been added to v2.3a:
- New "Random" function added and is assignable to variables and useable by the "Wait" function.
- Documented "Text" and "Say" commands.
- Documentation updated.
- The script system has been sped up and some internal changes have be made.
- Modifications for use with 2UO (2UO Auto-Pilot for now).
Terms of Use
UO Auto-Pilot may not be sold and is to be remain free to the public. You can use it for non-commercial use only. If you're a commercial company that would like to use UO Auto-Pilot then email me directly and we'll discuss terms for commercial use. Furthermore, UO Auto-Pilot may not be bundled or sold as a part of a commercial product without my written expressed consent.
Using old scripts from the previous version
Scripts from UO Auto-Pilot v2.x and older will still work with UO Auto-Pilot. Unfortunately scripts from older versions aren't supported.
Using the UO Auto-Pilot
Getting started is fairly simple. The Auto-Pilot provides you with 5 pages to work in: Notes, Macros, Locations, Variables and the Script page. The first page is there for you to add some notes or a description of your script. The next three pages provide the settings used by the script, which is written on the final page, the script page. We'll walk through each page, setting up a sample script as we go.
First, let's get a few things clear. To use the Auto-Pilot you must obviously be running UO in a window on your desktop. To toggle between desktop window and full-screen mode in UO, hit Alt+Enter on your keyboard. Next, open the UO Auto-Pilot window and place it side-by-side with the UO game window, this makes it easier to use the Auto-Pilot and still see the game action.
While running a script you may not be able to use your computer. When mouse clicks, color tests, and key-combinations are sent to the UO Game window, the Auto-Pilot needs to temporarily take over the desktop. While a script is running that contains mouse events, you'll see the mouse jump around the screen sending it's commands to the game window. Likewise, when sending key combinations such as Alt+Q or Alt+Ctrl+W, the Auto-Pilot needs to take over the keyboard in order to fool the UO game window into thinking you are hitting those keys. Color tests need to pop your UO game window into view so all the colors can be seen. Therefore, when running a script using mouse input, color tests, or key-combinations, it's best to just leave your computer alone. Go read a book or have a nice cup of tea.
However, if you write a script that does not use mouse commands or color testing, and only needs to send single keys like F9 or F2, the Auto-Pilot does not need to take over your system. The program will automatically detect this and make the appropriate changes. While running a script using only single keys, no mouse input and no color testing, you will still be able to use your computer. You can even minimize the UO game window and Auto-Pilot to the taskbar while you work!
The Notes Page
This page is a handy place to put a description of your script, and any special instructions it will need. Reusing scripts later, and sharing them with others, can be made much easier with a good description.
Let's start building a sample script to whack at a training dummy and practice hiding, a fairly common training technique. If you've ever seen people at a training dummy disappear occasionally, this is the type of training they are probably doing. If you wish, jot down a quick description of this macro here on the Notes page before we move on.
Figure 1
The Macro Page
Our script will use mouse clicks to hit the dummy, but it will need to know what keys to hit in order to hide. Let's suppose you have your UO Game configured to use Alt+H as "Use Skill: Hiding". We'll need to enter Alt+H into the Auto-Pilot to use in our script. Simply click on the 'Key Combination" area for Macro #1 (so you see the blinking cursor in it) and hit Alt+H. You should see the following
Figure 2
Now, just to make things clear the next time you use this script (or share it with another player), lets label that macro so we'll remember what it's setup to do. Click on the "description" for Macro #1 and type in 'Hiding'. Like so
Figure 3
This is all our sample needs to know about Macros, so we'll leave the rest as "Unused". If you were writing a more complicated script, you could set up Macros 2-8 to do other functions.
The Locations Page
Now let's jump over to locations. This is where you define places where mouse clicks and color tests will happen. Our sample script is going to need to double-click on the draining dummy, so well enter that location here.
To set up a location, just click on the "SET" button for the Location number you wish to record, then just click anywhere on the UO Game window to record those coordinates. When the location has been recorded, a small dialog message will pop up telling you so, and also giving you the color value of the location you entered. If you wish to use this location for a color test in your script, write this number down.
For our sample script, we'll need to enter the location of the training dummy. Run your character over to a training dummy and hit the "SET" button for Location #1, then click on the dummy. After recording the location, enter a name for it such as "Training dummy". Your screen should look something like this, but the coordinates may be different
Figure 4
The Variables Page
Variables can be used in scripts to record values - either numbers or colors. You can then use variables in IF statements, or as counters for repeat loops. To set up a new variable, simply enter a starting value for it in the "Value" field and then name it appropriately in the description box.
The Variable page always shows the current value for a variable, so be careful when saving your file. For instance, let's say you had a script that used Variable #1 to count from 1 to 10. You set up Variable #1 as the number 1 and run the script. After ending the script, you'll see that Variable #1 is now 10. If you saved your script now, the next time you loaded it Variable #1 would still be 10 and your script would then count from 10 to 20. Make sure you save your scripts with the variable's Starting values in place, so they'll be ready the next time you load the script.
Our little sample script will need to know how many times to hit the dummy before Hiding. We could just put a number right in the script, but we'll use a variable for this example. Enter a value of 10 for Variable #1 and label it "Total Dummy Hits". Like so
Figure 5
The Script Page
Here's where you actually write your script using the Auto-Pilot's simple script language. Script writing is pretty straight-forward. Each line can contain one command, blank lines or lines beginning with a double slash "//" are skipped. Use the double slash to add comments to your script.
Here's a sample script to repeat hitting our training dummy (at Location #1) using the value in Variable #1, then execute Macro #1 -which we currently have set to be Alt+H, or Hiding.
// Hit the Dummy a few times
Repeat (Variable #1) times
Double left click at Location #1
Wait 1 second
End Repeat// Now try to hide
Send Macro #1That's it. Pretty simple huh. Enter it into the Auto-Pilot and try it out by hitting the run button. You'll begin hitting the dummy and hiding over and over again until you hit the Stop button.
What this script will do is Hit the dummy 10 times, then try to use the hiding skill. You'll see the mouse snap to the location on the dummy each time it tries to click on it, which may make hitting the STOP button of the Auto-Pilot difficult! When this happens, just hit the Pause-Break key on your keyboard. The Auto-Pilot constantly monitors that key and knows to stop when you hit it.
Figure 6
The Script Language
Several changes were made to the script language since the previous version to make script writing simple. First of all, an entire command is now contained on one line. Blank lines and lines containing comments are permitted, and new commands have been added. Ctrl-Enter is no longer needed to end a line, just hitting plain old Enter will do.
The format for script commands is also a bit looser than before. The script parser in UO Auto-Pilot is very similar to speaking to an NPC in UO. For instance, to buy something in UO from a shopkeeper you can say "Hail, my fine friend. I wish to buy supplies from your shop", or just "Hail Buy". All UO cares about is that the word "Hail" comes first, getting the shop keepers attention, followed by the command "Buy" meaning you wish to buy something. Whatever words you use in-between are just fluff, as long as they are not other command words.
UO Auto-Pilot works the same way. In the commands listed below, the command words are underlined. The other text is just my suggestion of the format you should follow to make your scripts more readable for others, and yourself. Also, where you see brackets like [ or ] in the commands below, that means more than one option is possible. The options are listed between the brackets.
Another good way to learn the script language is to load and read through the sample scripts included with the program. I've tried to include examples of just about every command possible.
The Script Commands
Sending Macros
To send a macro key combination, simply use the syntax:
Send Macro #X
Where X is the macro number you wish to send. For example
Send Macro #1
Sends the key combination for Macro #1, which is listed on the Macros page.
Sending Mouse Button Commands
To send a mouse click to some location on the UO game window, use the following command syntax:
[Double] [Left/Right] click at Location #X
Where X is the location number you wish to use. For example
// Sending a left click to location 1
Left click at Location #1// Sending a right click to location 1
Left click at Location #1// Sending a double-left click to location 1
Double Left click at Location #1Sending Mouse Drag Commands
Dragging an object requires two Locations: where to drag from and where to drag to. In the case of a pile of objects (like gold, for example) you can also specify how many objects to move. As in the following syntax:
Drag [Variable #X or some number] objects from Location #Y to Location #Z
Where Variable #X is the number of objects to move, Y and Z are the location numbers you wish to drag between. For example
// Drag some object
Drag 1 object from Location #1 to Location #2Will drag 1 object from the pile specified by Location #1 to the point specified by Location #2.
When not taking objects from a pile, or if you wish to drag the entire pile, be sure to use the following syntax instead:
Drag All objects from Location #Y to Location #Z
If you intend to drag a non-stacking object, like a hammer, use the 'All Objects' version. If you use 'Drag 1 Object " the result will be the same, except your character will speak the number "1".
NOTE: Please be careful when using this command! I'd hate to see people drag all their gold away because of some mistake in their script.
Setting or Changing Variables
Variables can be used for Color Tests, Repeat Loops, and If statements. You can either set their starting values on the Variables page of the Auto-Pilot, or just code the script to load the values for you using the syntax:
Set Variable #X to [Variable #Y or some number] [+, -, *, /] [Variable #Z or some number]
For instance, any of these lines are valid:
Set Variable #1 to 700
Set Variable #1 to Variable #2
Set Variable #1 to Variable #2 + 300NOTE: Only one math operation is allowed per Set command. For example:
Set Variable #1 to Variable #2 + 300 - Variable #4
Set Variable #1 to Variable #2 + 300 + 200
Set Variable #1 to 1 * 2 * 3Are all invalid because they contain more than on math operation each. In these cases, only the first math operation will be done and the rest ignored.
Variables can also be set to color values using the syntax
Set Variable #X to the Color at Location #Y
For instance, the line
Set Variable #1 to the color at Location #5
Will record the color at the pixel location given by Location #5 and store it as Variable #1
Variables can also be set to a random value using the syntax
Set Variable #X to the Random of Y
For instance, the line
Set Variable #1 to the Random of 20
This will record the random value (between 1 and 20) and store it as Variable #1.
If you'd like to vary your random number between a higher number range such as 30 to 40, then you'd use two set commands such as
Set Variable #1 to the Random of 10
Set Variable #1 to Variable #1 + 30Repeat Loops
Repeat loops repeat a block of code as many times as use specify by number or some variable:
Repeat [Variable #X or some number] times
Remember to end each repeat block with an End Repeat - as in these samples
// Repeat the number of times held in Variable #1
Repeat (Variable #1) times
do something
End Repeat// Repeat this code block 25 times
Repeat 25 times
do something
End RepeatIf Statements
If Statements come in two basic flavors: Testing color values at a given location, or comparing values. Here's the syntax of each. Notice 'Not' can be used in Color tests to see if a pixel color has changed.
If [Variable #X or some number] [<,>,=,!=] [Variable #Y or some number]
If Color at Location #X is [Variable #Y or some number]
If Color at Location #X is Not [Variable #Y or some number]Here's some samples using IF commands. Remember all IF blocks must be ended by an 'End If' command. And If statements can be nested inside each other, as long as each If has it's own End If command.
// Test to see if color at location #1 has the value of Variable #1
If Color at Location #1 is the same as Variable #1
do something
End If// Test to see if color at location #1does NOT have the value of Variable #1
If Color at Location #1 is Not the same as Variable #1
do something
End If// Is variable 1 greater than variable 2?
If Variable #1 > Variable #2
do something
End If// Is variable 1 not equal to 5? (!= means not equal)
If Variable #1 != 5
do something
End IfSpeech Commands
UO Auto-Pilot has two speech related commands:
Say Text to be said
Text Text to be saidThe Say command will send the text message to UO and your character will say that. For example
// The result will be "Vendor buy" appearing in UO.
Say Vendor BuyThe Text command will send the text message to UO but will not actually trigger the text message to be spoken. By using both the Text and Say commands together, your macros can be enhanced to say more complex statements...
// The result will be "One, Two, and Three".
Text One,
Text Two,
Say and Three
Wait Variable #1 secondsThe Wait command
To pause for a specified number of seconds, simply use the syntax:
Wait [Variable #X or some number] seconds
Where X is the number of seconds that you wish to wait. For example
Wait 10 seconds
Variables can also be used, as in
Wait Variable #1 seconds
To pause for a random amount of time, use this syntax:
Wait [Random X] seconds
An example of waiting for a random number of seconds between 1 and 10 seconds:
Wait Random 10 seconds
To pause for a fixed amount of time plus a random amount of seconds then use this syntax:
Wait [Random X] + [Y] seconds
An example of waiting for a random number of seconds between 6 and 15 seconds:
Wait random 10 + 5 seconds
Ending the script
Scripts automatically repeat by looping back to the top statement when the last line is reached. To have a script exit itself, you need to use the End Script command like so
End Script
This will stop the script from running - just as you would expect. Use it at the end of scripts you do not wish to repeat, or at any other point in your script where you would want the program to stop. For example
// Stop the script from running
End Script
Conclusion
I would encourage every to use this program with care because the constant abuse of it can result in the banning of your account. I would also like encourage you to not engage in "unattended macroing." UO Auto-Pilot is best used with repetitive tasks that you'll be at or near your computer while they process.
There are still a lot of things that I want to implament in UO Auto-Pilot and will strive to add these features.
Finally, upon Greg's request, please send all email regarding UO Auto-Pilot to me. Greg no longer maintains UO Auto-Pilot and has expressed to me his wishes that he no longer be emailed or contacted regarding the support of UO Auto-Pilot. Upon his request I've removed his email address, etc.
Please send all support and ideas to:
CrazyDole
CrazyDole@hotmail.com
Thanks to:
Special thanks to Greg Snook for originally creating the UO Trainer and UO Auto-Pilot. Without him this program would have never existed...
Fear, Cyberwolf, and the entire Battle Vortex gang. Great show!
Mr. Roboto for beginning the website that I've always wanted to have, yet never had time to do it and for stealing the really cool "UO Bot" name. (Also for the email support and for motivating me to release another version.)
Dr. TwisTer for the great site and the constant reminder of whose game it really is that we play.
Arutha for getting me into UO and letting me crash at his UO house for many, many months before we lost the house to the "great" housing patch.
OSI for never banning me and for the game that we all love to hate.
Everyone else that ever emailed me a suggestion, comment, or plea for a new version.
Copyrights
UO Auto-Pilot is copyrighted by CrazyDole 1999.
UO Trainer and UO Auto-Pilot v2.0 and below are copyrighted by Greg Snook 1998.EA is the registered trademark of Electronic Arts.
OSI is the registered trademark of Origin Systems Incorporated.
Ultima Online is a registered trademark of EA/OSI.