Commands |top|: Uopilot Script

This report provides a summary of the scripting commands and syntax for UoPilot, a freeware clicker and automation tool primarily used for Ultima Online but applicable for general Windows automation. 1. Scripting Fundamentals

UoPilot scripts use a line-based syntax where each command or variable assignment occupies its own line.

Variable Declaration: Variables are defined using the set command. Numerical variables: Prefix with # (e.g., set #count 10).

String/Line variables: Prefix with $ (e.g., set $name Player). Comments: Use // to add notes that the script will ignore. 2. Core Execution Commands

These commands control how the script moves through its logic and interacts with the system:

Wait: Pauses the script for a specified time in milliseconds. Example: wait 1000 (pauses for 1 second). Say: Sends text to the active window. Example: say hello world

Break/Continue: Used to interrupt or skip to the next step of a loop (while, for, repeat). 3. Logical Operators & Control Structures uopilot script commands

UoPilot supports conditional logic and loops to handle complex automation tasks. If / Else: Executes code based on conditions. Example: if hits < 45.

While: Repeats a block of code as long as a condition is true.

Repeat: Executes a block of code a specific number of times. Random: Generates a random number within a range. Example: set #a random (5) (returns a number from 0 to 4). 4. Input & Interaction Commands Commands for emulating mouse and keyboard actions:

Mouse Clicks: Commands like left or right at specific x, y coordinates.

Key Presses: keyDown and keyUp simulate pressing and releasing a key.

onMouseMove: Triggers specific commands when the mouse is moved. 5. Reserved System Variables This report provides a summary of the scripting

UoPilot includes built-in variables that provide real-time information, particularly useful for game automation: Time: hour, min, sec for current clock time.

Timer: timer tracks milliseconds from the start of the script.

Character Stats: Variables like hits (health), mana, stam (stamina), and wght (weight).

Positioning: charposx, charposy, and charposz for spatial coordinates.

For further details and updates, the WKnight Home Page serves as the primary repository for stable and experimental builds. UoPilot - UoKit.com

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 Keycodes: virtual-key codes (e

Overview — uoPilot script commands (full review)

4. Logic and Flow Control

Without logic commands, a script is just a linear list of tasks. Logic allows the bot to make decisions.

2.2 Keyboard Control

| Command | Syntax | Description | |---------|--------|-------------| | Key | Key keycode | Sends a single key press/release. | | KeyDown | KeyDown keycode | Presses and holds key. | | KeyUp | KeyUp keycode | Releases held key. | | Send | Send "text" | Types string (supports ENTER, TAB, etc.). | | SendAsync | SendAsync "text" | Non-blocking send. |

Keycodes: virtual-key codes (e.g., VK_RETURN, VK_A, VK_F1).

2.5 Timing & Flow Control

| Command | Syntax | Description | |---------|--------|-------------| | Sleep | Sleep ms | Pauses script (milliseconds). | | Wait | Wait ms | Same as Sleep. | | Goto | Goto label | Jumps to label (e.g., :start). | | Call | Call sub_name | Calls subroutine. | | Return | Return | Returns from subroutine. | | If | If condition | Conditional branch (see variables below). |

4. Keyboard & Mouse

| Command | Effect | |---------|--------| | key(keycode) | Press and release key (e.g., key(F1)) | | keydown(keycode) | Hold key | | keyup(keycode) | Release key | | lclick | Left click at current mouse position | | lclick x,y | Move to (x,y) and left click | | rclick | Right click | | move x,y | Move mouse to screen coordinates | | mousemove x,y,speed | Smooth movement (speed 1‑10) | | wheel +/- | Scroll wheel |

Key codes: AZ, 09, F1F12, ENTER, TAB, SPACE, CTRL, ALT, SHIFT


Waiting (wait)

Crucial for preventing the script from running too fast, which can cause lag or disconnects. Time is usually in milliseconds (1000ms = 1 second).

wait 2000 // Pauses the script for 2 seconds

2.4 Window Commands

| Command | Syntax | Description | |---------|--------|-------------| | WinActivate | WinActivate Title | Brings window to foreground | | WinWait | WinWait Title | Waits for window to exist | | WinGetPos | WinGetPos Title, VarX, VarY | Gets window position | | WinMove | WinMove Title, X, Y | Moves window |

4. Best Practices

  • Always add Wait after window activation to ensure focus.
  • Use relative coordinates with WinGetPos for robust scripts.
  • Prefer FindColor over fixed coordinates for dynamic UI.
  • Use comments (//) to document logic.