Uopilot Script Commands Page

For advanced users, UOPilot allows reading game memory to get precise data (like Health, Stamina, or Inventory count) rather than relying on pixel colors.

UOPilot supports loops, conditionals, and subroutines – essential for complex automation.

| Command | Syntax | Description | |---------|--------|-------------| | IF | IF condition | Conditional block. Closed with ENDIF. | | ELSE | ELSE | Alternate branch. | | LOOP | LOOP label | Infinite loop until BREAK. Use with WAIT. | | BREAK | BREAK | Exits current loop. | | GOTO | GOTO label | Jumps to a line label (e.g., :START). | | CALL | CALL SubName | Calls a subroutine (defined with :SubName). | | RETURN | RETURN | Returns from subroutine. | | DELAY / WAIT | WAIT Milliseconds | Pauses execution. | | SET | SET VarName, Value | Assigns a variable. | | VARADD | VARADD VarName, Amount | Adds to a numeric variable. |

Variables: UOPilot uses dynamic variables – prefix with $ in most contexts (e.g., $myVar). No explicit declaration required.

Loop example – click 10 times:

SET $counter, 0
:START
MOVETO 500, 500
CLICK
VARADD $counter, 1
WAIT 1000
IF $counter < 10
  GOTO START
ENDIF

Subroutine example:

CALL MYSUB
END

:MYSUB SEND "Hello from subroutine" RETURN uopilot script commands


| Command | Description | |---------|-------------| | winactivate title | Focus window by title | | winwait title | Wait for window to exist | | winclose title | Close window | | winset title | Set as target for relative coords | | fullscreen | Capture entire screen (for color checks) |

Relative coordinates: After winset, use winx / winy to offset mouse moves inside window.


Here is a complete, well-structured UOPilot script that monitors a game screen for an "HP low" pixel pattern and presses a heal key.

//============================================
// AutoHeal Script for GameX
// Author: ScriptMaster
//============================================

SET $running, 1

:MAIN_LOOP // Search for low HP indicator (red pixel at specific location) FINDCOLOR 100, 50, 200, 100, "FF2222" For advanced users, UOPilot allows reading game memory

IF ERR == 0 // HP low detected – press heal key (F1) SENDK "F1" WAIT 500 // Optional: log action FILEWRITE "heal_log.txt", "Healed at " + $TIME ENDIF

WAIT 250 // Check every 250 ms GOTO MAIN_LOOP

:END


UOPilot is one of the most enduring and popular automation tools used primarily for Ultima Online (and other MMORPGs). While the graphical interface allows for simple "point and click" recording, the true power of the software lies in its scripting engine.

By using specific script commands, you can transform a simple macro into a complex bot capable of reacting to in-game events, managing inventory, and executing intricate combat rotations. Subroutine example: CALL MYSUB END :MYSUB SEND "Hello

This guide breaks down the essential UOPilot script commands you need to know.


Before diving into specific commands, understand that UOPilot scripts are read line-by-line from top to bottom. The script executes instructions sequentially unless directed otherwise by logic commands.

UOPilot script commands offer a remarkably accessible entry into Windows automation. With just a few lines – WINACT, MOVETO, CLICK, SEND, and FINDCOLOR – you can automate hours of repetitive work.

Mastering flow control (LOOP, IF, GOTO) and pixel detection turns UOPilot into a true robotic assistant. While not as powerful as full programming languages, its low learning curve and immediate results keep it relevant for hobbyists and retro-automation enthusiasts.

Next steps:

Remember: the best script is one that runs reliably. Test thoroughly, add generous WAITs, and handle errors with ERR checks.

Happy scripting

UoPilot is a freeware automation tool that utilizes script commands like set, left, say, and control structures (if, while, for) to automate complex tasks in games. The tool, which supports Lua in newer versions, allows for variable management, mouse actions, and time-based scripting. For a full manual, visit the official GitHub documentation. UoPilot - UoKit.com

  • pixelsearch: Search for a specific pixel color on the screen.