Your first script
The window
Section titled “The window”- Tabs: one open script per tab. Use File → New or Open, or drag a
.euofile onto the window. The tabs of the last session come back when you start the app again. - Editor (left and centre): a code editor with syntax highlighting and line numbers.
- Variable inspector (right): a tree of every built-in
#variablegrouped by category, plus your script’s own%variables. The values refresh a few times a second while a script runs. - Title bar: shows the version (
YY.MM.DD.<commit>), also under Help → About and in#ReforgedVer. - Status bar (bottom), from left to right: the cursor’s line and column in the editor; your character’s
position (
#CharPosX/#CharPosY) and where it is within its 8 × 8 map block; the mouse position (#CursorX/#CursorY); the selected client and how many there are; and whichmenusystem the tab’s script runs, or ran last:MENU 1.5,MENU 1.6, with(forced)when the script set it withmenu Reforge Mode.
Run a script
Section titled “Run a script”-
Make sure the UO client is running and your character is logged in.
-
Paste a script into a tab. A minimal one:
; announce where the character is, then stopdisplay OK Char is at #CharPosX , #SPC , #CharPosYhalt -
Press F9 (Control → Start), or the Play button on the toolbar.
-
Control → Pause, Stop and Stop All (stops the scripts of every tab) control execution. The editor is read-only while a script runs.
If you get “No supported UO client found!”, the client isn’t running, isn’t logged in, or is a version this build doesn’t recognize yet.
A message saying a menu sub-command needs the EasyUO 1.6 MENU logic means the script uses EasyUO 1.6’s
menu in a way Reforged could not tell before it started. It comes once per run and the script goes on, but
that menu line does nothing. Add the line the message names, usually menu Reforge Mode 1.6, at the top of
the script; see MENU: EasyUO 1.5 and 1.6.
New to the language itself? The introduction and the beginner’s tutorial start from zero; the Language section is the full reference.
Several clients
Section titled “Several clients”- Tools → New Client starts another UO client. You’ll be asked where
client.exeis the first time. - Tools → Swap To Next Client changes which running client the active script drives. In a script,
uoxl swapdoes the same, and#CliNrtells which client is being driven.
Settings worth knowing
Section titled “Settings worth knowing”- Tools → Don’t Move Cursor is on by default:
clickand target commands work without moving your real mouse pointer. Turn it off if a script needs the real cursor moved. - Tools → Manage VarList chooses which variables the inspector shows.
- Building a big
menuwindow? A script runs#LPClines (10 by default) and then pauses 50 ms, so a menu with a hundred controls takes about half a second to appear. Putset #LPC 1000before building it, andset #LPC 10once it is on screen if you want the normal pace back. Rebuilding a window that is already showing is drawn in one go.
Next: debugging.