UOSAGAS Scripting

Command Reference

All 92 commands the assistant registers. Commands do things; to read state and decide whether to do them, see the expressions.

This list is generated from the assistant itself. If a command is here, it is registered; if it is missing, it does not exist. Anything that cannot work on UOSagas is marked and explained rather than quietly omitted.

Targeting

attack

attack (serial)

Attacks a specific serial, or a variable holding one. If the serial is already your last target, this repeats the last attack instead.

ParameterMeaning
serial Mobile to attack, or a variable that resolves to one.
Example
attack 0x2AB4
attack 'attackdummy'

lasttarget

lasttarget

Answers the cursor with whatever Razor has stored as Last Target.

Example
cast 'magic arrow'
waitfortarget
lasttarget

See also setlasttarget · target

setlasttarget

setlasttarget (serial)

Stores a serial as Razor's Last Target without targeting anything.

ParameterMeaning
serial Mobile or item to remember.
Example
setlasttarget 0x2AB4
cast 'magic arrow'
waitfortarget
lasttarget

target

target (serial) | target ('closest'/'random'/'next'/'prev') [notoriety] [type]

Targets a serial directly, or picks a mobile by proximity. Notoriety accepts a comma list (any match) or an exclamation list (priority order: try the first, fall back to the next). Type narrows to 'humanoid' or 'monster'. Also takes 'cancel' and 'clear'.

ParameterMeaning
serial | mode A serial, or closest / random / next / prev / cancel / clear.
notoriety optional innocent, friend, friendly, grey, criminal, enemy, murderer, nonfriendly. Comma = any, exclamation = priority.
type optional humanoid or monster.
Example
cast 'lightning'
waitfortarget
target 'closest' 'enemy' 'monster'
 
# priority: try enemies first, then criminals
target 'closest' 'enemy!criminal'

See also waitfortarget · targettype · lasttarget · setlasttarget

targetloc

targetloc (x) (y) [z]

Answers a ground target cursor with a fixed world location.

ParameterMeaning
x World X.
y World Y.
z optional World Z. Defaults to 0.
Example
cast 'fire field'
waitfortarget
targetloc 5923 1145 0

targetrelloc

targetrelloc (x-offset) (y-offset)

Answers a ground target cursor at an offset from your own position.

ParameterMeaning
x-offset Tiles east (positive) or west (negative).
y-offset Tiles south (positive) or north (negative).
Example
cast 'fire field'
waitfortarget
targetrelloc 1 1

On UOSagas: The target uses your own Z rather than the height of the tile you are aiming at, because Razor has no access to the map files. This is fine on flat ground. On stairs or multi-level terrain it can miss.

targettype

targettype ('name' | graphic) [source] [hue] [quantity] [range]

Finds an object the same way findtype does, then targets it.

ParameterMeaning
'name' | graphic Tiledata name (supports %s%) or graphic ID.
source optional backpack, self, ground, container serial, or true/false. 'any' skips.
hue optional Restrict to one colour.
quantity optional Minimum stack size.
range optional Maximum distance in tiles.
Example
dclicktype 'scissors'
waitfortarget
targettype 'cloth' backpack

See also findtype · dclicktype

waitfortarget

waitfortarget [timeout]

Blocks until a target cursor is up. Put this between a cast/skill and the target command. 'wft' is an alias.

Also spelled wft

ParameterMeaning
timeout optional Milliseconds before giving up. Defaults to 30000.
Example
cast 'energy bolt'
waitfortarget
target 'last'

See also target · targettype · targetexists

wft

waitfortarget [timeout]

Blocks until a target cursor is up. Put this between a cast/skill and the target command. 'wft' is an alias.

ParameterMeaning
timeout optional Milliseconds before giving up. Defaults to 30000.
Example
cast 'energy bolt'
waitfortarget
target 'last'

See also target · targettype · targetexists

Items & Containers

cleardragdrop

cleardragdrop

Stops Razor's pending lift/drop actions without dropping what you hold.

Example
cleardragdrop

clearhands

clearhands ('left' | 'right' | 'both')

Moves the item in the named hand back to your backpack.

ParameterMeaning
hand left, right, both (or 'hands').
Example
clearhands 'both'
dclicktype 'bandage'

dclick

dclick (serial) | dclick ('left'/'right'/'hands')

Uses (double-clicks) a specific item or mobile. Instead of a serial you can pass 'left', 'right' or 'hands' to use what you are holding. 'useobject' is an alias.

Also spelled useobject

ParameterMeaning
serial The object to use.
Example
dclick 0x34AB
dclick 'right'

See also dclicktype

dclicktype

dclicktype ('name' | graphic) [source] [hue] [quantity] [range]

Finds an item by Tiledata name or graphic ID and uses it. It is the acting twin of findtype and takes the same arguments. Falls back to mobiles if no item matches. 'usetype' is an alias.

Also spelled usetype

ParameterMeaning
'name' | graphic Tiledata name (supports the %s% plural wildcard) or graphic ID.
source optional backpack, self (worn, including container contents), ground, a container serial, or true/false for the CE range check. 'any' skips the slot.
hue optional Restrict to one colour. 'any' to ignore.
quantity optional Minimum stack size.
range optional Maximum distance in tiles.
Example
dclicktype 'dagger'
waitfortarget
targettype 'robe'
 
dclicktype 0x0F0C backpack

See also findtype · targettype · lifttype

dress

dress ('name of dress list')

Equips everything in a dress list you defined on the Arm/Dress tab. You can also pass an item serial to equip a single item.

ParameterMeaning
'name of dress list' Dress list name, or an item serial.
Example
dress 'My Sunday Best'

See also undress · clearhands

drop

drop (serial) (x y z | layername)

Drops the held item at your feet, onto a layer, or at a specific location. Lift something first.

ParameterMeaning
serial Target container, or 'ground'.
x y z | layername optional Where to drop it.
Example
lift 0x400D54A7 1
drop 0x6311 InnerTorso

See also lift · droprelloc · cleardragdrop

droprelloc

droprelloc (x) (y)

Drops what you are holding at an offset from your own position.

ParameterMeaning
x Tiles east (positive) or west (negative).
y Tiles south (positive) or north (negative).
Example
lift 0x400EED2A 1
wait 1000
droprelloc 1 1

lift

lift (serial) [amount] [timeout]

Lifts a specific item. The script waits until the item is actually in hand before moving on.

ParameterMeaning
serial Item to lift.
amount optional How many from the stack. Defaults to 1.
timeout optional Milliseconds to wait. Defaults to 30000.
Example
lift 0x400EED2A 1
wait 1000
droprelloc 1 1

See also lifttype · drop

lifttype

lifttype ('name' | graphic) [amount] [source] [hue]

Lifts the first matching item. Searches your backpack unless you name another source.

ParameterMeaning
'name' | graphic Tiledata name or graphic ID.
amount optional How many. Defaults to 1.
source optional backpack (default), self, ground, or a container serial.
hue optional Restrict to one colour.
Example
lifttype 'robe'
wait 1000
droprelloc 1 1

potion

potion ('type')

Finds and drinks a potion by type.

ParameterMeaning
'type' heal, cure, refresh, nightsight (ns), explosion, strength (str), agility.
Example
if hp < 40
    potion 'heal'
endif

On UOSagas: If 'Block heal while poisoned' is enabled in Options, a heal potion is refused while you are poisoned. Cure first.

undress

undress ['name of dress list' | 'layer']

With no argument you strip completely. Pass a dress list to remove only those items, or a layer name to clear a single layer.

ParameterMeaning
'name' | 'layer' optional Dress list name, layer name, or item serial.
Example
undress
undress 'My Sunday Best'
undress 'shirt'

See also dress

useobject

dclick (serial) | dclick ('left'/'right'/'hands')

Uses (double-clicks) a specific item or mobile. Instead of a serial you can pass 'left', 'right' or 'hands' to use what you are holding. 'useobject' is an alias.

ParameterMeaning
serial The object to use.
Example
dclick 0x34AB
dclick 'right'

See also dclicktype

usetype

dclicktype ('name' | graphic) [source] [hue] [quantity] [range]

Finds an item by Tiledata name or graphic ID and uses it. It is the acting twin of findtype and takes the same arguments. Falls back to mobiles if no item matches. 'usetype' is an alias.

ParameterMeaning
'name' | graphic Tiledata name (supports the %s% plural wildcard) or graphic ID.
source optional backpack, self (worn, including container contents), ground, a container serial, or true/false for the CE range check. 'any' skips the slot.
hue optional Restrict to one colour. 'any' to ignore.
quantity optional Minimum stack size.
range optional Maximum distance in tiles.
Example
dclicktype 'dagger'
waitfortarget
targettype 'robe'
 
dclicktype 0x0F0C backpack

See also findtype · targettype · lifttype

Magic & Skills

cast

cast ('name of spell')

Casts a spell by name or number. For spells that need a target, follow with waitfortarget and a target command.

ParameterMeaning
'name of spell' Spell name, or its spell number.
Example
cast 'greater heal'
waitfortarget
target 'self'

See also waitfortarget · target · interrupt

interrupt

interrupt [layer]

Interrupts your own cast by equipping and unequipping, so you do not waste the mana on a spell you no longer want.

ParameterMeaning
layer optional Layer to use for the interrupt.
Example
cast 'greater heal'
if hp = maxhp
    interrupt
endif

On UOSagas: The layer argument is accepted but ignored. There is one generic interrupt path.

setability

setability ('primary'/'secondary'/'stun'/'disarm') ['on'/'off']

Sets a weapon ability or special move. Defaults to 'on' when you omit the state.

ParameterMeaning
ability primary, secondary, stun or disarm.
'on' | 'off' optional Defaults to on. 'off' clears the armed ability.
Example
setability 'primary'
setability stun
setability 'primary' off

setskill

setskill ('skill name') ('up' | 'down' | 'lock')

Changes whether a skill goes up, goes down, or is locked, the same as clicking the arrow in the skills window. Works on any skill, not just usable ones.

ParameterMeaning
'skill name' Skill name with spaces removed, e.g. blacksmithing.
'up' | 'down' | 'lock' New lock state.
Example
setskill 'blacksmithing' up
setskill 'mining' lock

skill

skill ('name of skill' | 'last')

Invokes a usable skill, the same as clicking its button in the skills window. Pass 'last' to repeat the previous one. 'useskill' is an alias.

Also spelled useskill

ParameterMeaning
'name of skill' | 'last' Skill name with spaces removed, e.g. animallore, detectinghidden.
Example
while mana < maxmana
    skill 'meditation'
    wait 11000
endwhile

See also setskill

useskill

skill ('name of skill' | 'last')

Invokes a usable skill, the same as clicking its button in the skills window. Pass 'last' to repeat the previous one. 'useskill' is an alias.

ParameterMeaning
'name of skill' | 'last' Skill name with spaces removed, e.g. animallore, detectinghidden.
Example
while mana < maxmana
    skill 'meditation'
    wait 11000
endwhile

See also setskill

Agents

org

organizer (number) ['set']

Runs the numbered organizer agent. 'set' prompts you for its hotbag instead. 'organize' and 'org' are aliases.

ParameterMeaning
number Agent number, or its alias name.
'set' optional Prompt for the hotbag.
Example
organizer 1
organizer 4 'set'

organize

organizer (number) ['set']

Runs the numbered organizer agent. 'set' prompts you for its hotbag instead. 'organize' and 'org' are aliases.

ParameterMeaning
number Agent number, or its alias name.
'set' optional Prompt for the hotbag.
Example
organizer 1
organizer 4 'set'

organizer

organizer (number) ['set']

Runs the numbered organizer agent. 'set' prompts you for its hotbag instead. 'organize' and 'org' are aliases.

Also spelled organize , org

ParameterMeaning
number Agent number, or its alias name.
'set' optional Prompt for the hotbag.
Example
organizer 1
organizer 4 'set'

restock

restock (number) ['set']

Runs the numbered restock agent. 'set' prompts you for its hotbag instead.

ParameterMeaning
number Agent number, or its alias name.
'set' optional Prompt for the hotbag.
Example
restock 1
restock 4 'set'

scav

scavenger ['clear' | 'add' | 'on' | 'off' | 'set']

Turns the scavenger on or off, adds items, clears its cache or sets its hotbag. 'scav' is an alias.

ParameterMeaning
action optional clear, add, on, off or set.
Example
scavenger 'off'

scavenger

scavenger ['clear' | 'add' | 'on' | 'off' | 'set']

Turns the scavenger on or off, adds items, clears its cache or sets its hotbag. 'scav' is an alias.

Also spelled scav

ParameterMeaning
action optional clear, add, on, off or set.
Example
scavenger 'off'

sell

sell

Prompts you to pick the Sell agent's hotbag.

Example
sell

useonce

useonce ['add' | 'addcontainer']

Uses the next item on your UseOnce list. 'add' lets you add an item, 'addcontainer' adds everything in a container.

ParameterMeaning
'add' | 'addcontainer' optional Add items instead of using one.
Example
useonce
useonce 'add'

Speech

alliance

alliance ('message') [hue]

Sends the message to your guild alliance.

ParameterMeaning
'message' What to say.
hue optional Speech colour.
Example
alliance 'moving out'

emote

emote ('message') [hue]

Sends the message as an emote. Razor wraps it in *asterisks* for you.

ParameterMeaning
'message' What to emote.
hue optional Speech colour.
Example
emote 'looks around'

guild

guild ('message') [hue]

Sends the message to your guild.

ParameterMeaning
'message' What to say.
hue optional Speech colour.
Example
guild 'incoming at brit gate'

msg

say ('message') [hue]

Makes your character say the message. Pet commands and other keyword speech work as if you typed it. 'msg' is an alias.

ParameterMeaning
'message' What to say.
hue optional Speech colour.
Example
say 'Hello world!'
say 'Hello world!' 454

See also whisper · yell · emote · guild · alliance

say

say ('message') [hue]

Makes your character say the message. Pet commands and other keyword speech work as if you typed it. 'msg' is an alias.

Also spelled msg

ParameterMeaning
'message' What to say.
hue optional Speech colour.
Example
say 'Hello world!'
say 'Hello world!' 454

See also whisper · yell · emote · guild · alliance

whisper

whisper ('message') [hue]

Speaks quietly, so only mobiles very close to you hear it.

ParameterMeaning
'message' What to whisper.
hue optional Speech colour.
Example
whisper 'over here'

yell

yell ('message') [hue]

Speaks loudly, so it carries much further than normal speech.

ParameterMeaning
'message' What to yell.
hue optional Speech colour.
Example
yell 'guards!'

Gumps & Menus

gumpclose

gumpclose [gumpId]

Closes the last gump, or a specific one by ID.

ParameterMeaning
gumpId optional Which gump to close.
Example
gumpclose

gumpresponse

gumpresponse (buttonId) [gumpId]

Answers an open gump. Pass a gump ID to answer a specific gump instead of the last one that opened.

ParameterMeaning
buttonId Button to press.
gumpId optional Which gump, when several are open.
Example
waitforgump 'any'
if ingump 'teleport home'
    gumpresponse 4
endif

menu

menu (serial) (index) [blockPopup]

Requests the context menu for an object and selects an entry by index. Pass 0 as the serial to use yourself.

ParameterMeaning
serial Object whose menu to open. 0 = yourself.
index Entry index, starting at 0.
blockPopup optional Hide the menu from view. Defaults to true.
Example
# open your own context menu, pick the second entry
menu 0 1

menuresponse

menuresponse (index) (menuId) [hue]

Responds to a classic menu (not a context menu).

ParameterMeaning
index Entry index.
menuId Menu ID.
hue optional Hue, when the menu asks for one.
Example
waitformenu
menuresponse 3 4

promptresponse

promptresponse ('text')

Responds to a server prompt, such as renaming a rune or setting a guild title.

ParameterMeaning
'text' Your answer.
Example
dclicktype 'rune'
waitforprompt
promptresponse 'to home'

See also waitforprompt

waitforgump

waitforgump (gumpId | 'any') [timeout]

Blocks until a gump appears. Pass 'any' for the next gump, or an ID to wait for a specific one.

ParameterMeaning
gumpId | 'any' Which gump to wait for.
timeout optional Milliseconds before giving up. Defaults to 30000.
Example
dclicktype 'rune book'
waitforgump 'any'
gumpresponse 4

See also gumpresponse · gumpclose · gumpexists · ingump

waitformenu

waitformenu (menuId | 'any') [timeout]

Blocks until a classic menu appears.

ParameterMeaning
menuId | 'any' Which menu to wait for.
timeout optional Milliseconds before giving up.
Example
waitformenu 'any'
menuresponse 3 4

waitforprompt

waitforprompt (promptId | 'any') [timeout]

Blocks until the server asks you for text input.

ParameterMeaning
promptId | 'any' Which prompt to wait for.
timeout optional Milliseconds before giving up.
Example
dclicktype 'rune'
waitforprompt
promptresponse 'to home'

Flow Control

clearall

clearall

Cancels the target cursor, empties the action queues and drops whatever you are holding. A good first line for a script that must start from a known state.

Example
clearall
cast 'greater heal'

hotkey

hotkey ('name of hotkey')

Executes a hotkey exactly as if you pressed it. This is the bridge to everything the assistant can do that has no command of its own. Use the name shown on the Hot Keys tab.

ParameterMeaning
'name of hotkey' Display name, exactly as on the Hot Keys tab. A numeric index also works.
Example
skill 'detect hidden'
waitfortarget
hotkey 'target self'
 
hotkey 'Bandage self'

pause

wait (milliseconds) ['s'/'m']

Stops the script for a while. Add a unit to write it in seconds or minutes instead of milliseconds. 'pause' is an alias.

ParameterMeaning
milliseconds How long to wait.
's' | 'm' optional Unit: seconds or minutes. Also accepts sec/secs/second/seconds, min/mins/minute/minutes.
Example
wait 500
wait 5 seconds

script

script ('name')

Starts a different script by name. Only one script runs at a time, so this hands over control.

ParameterMeaning
'name' Script name (without .razor).
Example
if hp < 40
    script 'healself'
endif

stop

stop

Ends the script immediately.

Example
if dead self
    stop
endif

wait

wait (milliseconds) ['s'/'m']

Stops the script for a while. Add a unit to write it in seconds or minutes instead of milliseconds. 'pause' is an alias.

Also spelled pause

ParameterMeaning
milliseconds How long to wait.
's' | 'm' optional Unit: seconds or minutes. Also accepts sec/secs/second/seconds, min/mins/minute/minutes.
Example
wait 500
wait 5 seconds

waitforsysmsg

waitforsysmsg ('text') [timeout]

Blocks until the given text shows up in the message queue. Substring match. 'wfsysmsg' is an alias.

Also spelled wfsysmsg

ParameterMeaning
'text' Text to wait for.
timeout optional Milliseconds before giving up. Defaults to 30000.
Example
clearsysmsg
dclicktype 'pickaxe'
waitforsysmsg 'You put' 5000

See also insysmsg · clearsysmsg

wfsysmsg

waitforsysmsg ('text') [timeout]

Blocks until the given text shows up in the message queue. Substring match. 'wfsysmsg' is an alias.

ParameterMeaning
'text' Text to wait for.
timeout optional Milliseconds before giving up. Defaults to 30000.
Example
clearsysmsg
dclicktype 'pickaxe'
waitforsysmsg 'You put' 5000

See also insysmsg · clearsysmsg

Lists, Timers & Variables

clearignore

clearignore

Everything is findable again.

Example
clearignore

clearlist

clearlist ('list name')

Removes every entry; the list still exists.

ParameterMeaning
'list name' Name of the list.
Example
clearlist 'ore'

cooldown

cooldown ('name') (milliseconds)

Starts a timer you can read back with the cooldown expression. It is the clean way to stop a loop from repeating an action too early.

ParameterMeaning
'name' Your label for it.
milliseconds How long it runs.
Example
cooldown 'bandage' 30000
 
if cooldown 'bandage' > 2000
    overhead 'not yet'
endif

On UOSagas: The duration is in milliseconds. Older scripts that pass seconds keep working: a value below 100 is read as seconds. The on-screen cooldown bar is not implemented yet, but the timer itself works.

See also createtimer · timer

createlist

createlist ('list name')

Lists hold values you can loop over with foreach. Creating a list that already exists does nothing.

ParameterMeaning
'list name' Name of the list.
Example
createlist 'ore'
pushlist 'ore' 0x19B9
foreach x in ore
    sysmsg x
endfor

See also pushlist · poplist · clearlist · removelist · list · inlist · atlist

createtimer

createtimer ('timer name')

Timers count up in milliseconds. Read them with the timer expression.

ParameterMeaning
'timer name' Name of the timer.
Example
createtimer 'trip'
while timer 'trip' < 60000
    walk 'North'
endwhile

See also settimer · removetimer · timer · timerexists

findtypelist

findtypelist ('list name') ('name' | graphic) [source] [hue] [quantity] [range]

Works like findtype, but instead of returning one serial it fills an existing list with all matches. Create the list first.

ParameterMeaning
'list name' Must already exist.
'name' | graphic Tiledata name or graphic ID.
source optional backpack, self, ground, container serial, or true/false.
hue optional Restrict to one colour.
quantity optional Minimum stack size.
range optional Maximum distance in tiles.
Example
createlist 'loot'
findtypelist 'loot' 0x0EED ground 0 any 3
foreach item in loot
    dclick item
endfor

See also findtype · createlist

ignore

ignore (serial | 'list name')

Ignored serials are skipped by findtype, dclicktype, targettype and friends. Pass a list name to ignore every entry in it.

ParameterMeaning
serial | 'list name' One serial, or a list of them.
Example
if findtype 'corpse' ground as body
    ignore body
endif

See also unignore · clearignore

poplist

poplist ('list name') ('element' | 'front' | 'back')

Removes one entry, either by value or from the front or back. Add ! to remove every match instead of one.

ParameterMeaning
'list name' Target list.
'element' | 'front' | 'back' What to remove.
Example
poplist 'ore' 'front'
poplist! 'ore' 0x19B9   // ! = remove all matches

pushlist

pushlist ('list name') ('element') ['front' | 'back']

Appends to the back by default. Add ! to only push when the value is not already in the list.

ParameterMeaning
'list name' Target list.
'element' Value to add.
'front' | 'back' optional Where to insert. Defaults to back.
Example
createlist 'ore'
pushlist 'ore' 0x19B9
pushlist! 'ore' 0x19B9   // ! = only if not already present

removelist

removelist ('list name')

Destroys the list entirely. listexists will report false afterwards.

ParameterMeaning
'list name' Name of the list.
Example
removelist 'ore'

removetimer

removetimer ('timer name')

Destroys the timer. timerexists reports false afterwards.

ParameterMeaning
'timer name' Name of the timer.
Example
removetimer 'trip'

settimer

settimer ('timer name') (value)

Sets the elapsed time in milliseconds, the same as starting it that long ago.

ParameterMeaning
'timer name' Name of the timer.
value Milliseconds already elapsed.
Example
settimer 'trip' 5000

setvar

setvar ('name') [serial] [timeout]

With only a name, the script pauses and asks you to click a target. Pass a serial to set it without prompting. Variables are saved in your profile and survive a restart; add ! to make it script-local instead. 'setvariable' is an alias.

Also spelled setvariable

ParameterMeaning
'name' Variable name.
serial optional Set directly instead of prompting.
timeout optional Milliseconds to wait for your click.
Example
setvar 'dummy'
cast 'magic arrow'
waitfortarget
target 'dummy'
 
@setvar! globalTimeout 650   // ! = not persisted, @ = quiet

See also unsetvar · varexist

setvariable

setvar ('name') [serial] [timeout]

With only a name, the script pauses and asks you to click a target. Pass a serial to set it without prompting. Variables are saved in your profile and survive a restart; add ! to make it script-local instead. 'setvariable' is an alias.

ParameterMeaning
'name' Variable name.
serial optional Set directly instead of prompting.
timeout optional Milliseconds to wait for your click.
Example
setvar 'dummy'
cast 'magic arrow'
waitfortarget
target 'dummy'
 
@setvar! globalTimeout 650   // ! = not persisted, @ = quiet

See also unsetvar · varexist

unignore

unignore (serial | 'list name')

Undoes ignore for one serial or for every entry of a list.

ParameterMeaning
serial | 'list name' One serial, or a list of them.
Example
unignore 0x40001234

unsetvar

unsetvar ('name')

Removes a stored variable. 'unsetvariable' is an alias.

Also spelled unsetvariable

ParameterMeaning
'name' Variable name.
Example
unsetvar 'dummy'

unsetvariable

unsetvar ('name')

Removes a stored variable. 'unsetvariable' is an alias.

ParameterMeaning
'name' Variable name.
Example
unsetvar 'dummy'

Player State

virtue

virtue ('honor' | 'sacrifice' | 'valor')

Invokes one of the three virtues.

ParameterMeaning
virtue honor, sacrifice or valor.
Example
virtue 'honor'

walk

walk ('direction')

Moves your character one step. Razor throttles this to roughly one step every 0.4s, so a walk in a tight loop will not spam the server.

ParameterMeaning
'direction' North, South, East, West, Up, Down, Left, Right.
Example
walk 'North'
walk 'East'

warmode

warmode ('on' | 'off')

Switches your character between peace and war mode.

ParameterMeaning
'on' | 'off' Desired state.
Example
if not warmode
    warmode 'on'
endif

World & Objects

getlabel

getlabel (serial) (variable)

Single-clicks the object and collects every label line the server sends back into a variable. Use the 'in' operator to test the result.

ParameterMeaning
serial Object to inspect.
variable Variable name to store the label text in.
Example
if findtype 3852 self as pot
    getlabel pot potlabel
    if 'next usable' in potlabel
        sysmsg 'not ready'
    endif
endif

See also in

rename

rename (serial) (new name)

Renames a mobile you control. The name must be longer than one character.

ParameterMeaning
serial The follower to rename.
new name New name.
Example
rename 0x0004E2A9 'Fluffy'

Misc

classicuo

⚠ Not supported
cuo (setting) (value)

Sets a ClassicUO profile property at runtime. 'cuo' is an alias.

Also spelled cuo

ParameterMeaning
setting Profile property name.
value New value.
Example
cuo 'usecustomlight' true

On UOSagas: Not supported. The client is compiled ahead-of-time, so it has no reflection with which to reach profile properties. The command still parses and warns instead of breaking your script. We may route it through the assistant interface later.

clearjournal

clearsysmsg

Razor keeps a buffer of recent system messages for insysmsg and waitforsysmsg. This clears it. Do that before waiting for a message you expect soon, so an old one cannot match. 'clearjournal' is an alias.

Example
clearsysmsg
dclicktype 'pickaxe'
waitforsysmsg 'You put'

See also insysmsg · waitforsysmsg

clearsysmsg

clearsysmsg

Razor keeps a buffer of recent system messages for insysmsg and waitforsysmsg. This clears it. Do that before waiting for a message you expect soon, so an old one cannot match. 'clearjournal' is an alias.

Also spelled clearjournal

Example
clearsysmsg
dclicktype 'pickaxe'
waitforsysmsg 'You put'

See also insysmsg · waitforsysmsg

cuo

alias of classicuo ⚠ Not supported
cuo (setting) (value)

Sets a ClassicUO profile property at runtime. 'cuo' is an alias.

ParameterMeaning
setting Profile property name.
value New value.
Example
cuo 'usecustomlight' true

On UOSagas: Not supported. The client is compiled ahead-of-time, so it has no reflection with which to reach profile properties. The command still parses and warns instead of breaking your script. We may route it through the assistant interface later.

headmsg

overhead ('text') [hue] [serial]

Draws a private message over your character (or another mobile). Nobody else sees it; it is never sent to the server. Supports {{...}} interpolation: {{myvar}} inserts a variable, and an expression such as {{skill 'Alchemy'}} or {{hits}} inserts its current value. 'headmsg' is an alias.

ParameterMeaning
'text' Message. {{name}} inserts a variable; {{expression args}} inserts the expression's value, e.g. {{skill 'Alchemy'}} or {{hits}}.
hue optional Text colour.
serial optional Show it over this mobile instead of you.
Example
if stam = 100
    overhead 'ready to go!' 68
endif
 
overhead "Alchemy: {{skill 'Alchemy'}}" 88
overhead 'hp {{hits}}/{{maxhits}}'

See also sysmsg

music

music (id)

Starts a music track locally.

ParameterMeaning
id Music track ID.
Example
music 8

overhead

overhead ('text') [hue] [serial]

Draws a private message over your character (or another mobile). Nobody else sees it; it is never sent to the server. Supports {{...}} interpolation: {{myvar}} inserts a variable, and an expression such as {{skill 'Alchemy'}} or {{hits}} inserts its current value. 'headmsg' is an alias.

Also spelled headmsg

ParameterMeaning
'text' Message. {{name}} inserts a variable; {{expression args}} inserts the expression's value, e.g. {{skill 'Alchemy'}} or {{hits}}.
hue optional Text colour.
serial optional Show it over this mobile instead of you.
Example
if stam = 100
    overhead 'ready to go!' 68
endif
 
overhead "Alchemy: {{skill 'Alchemy'}}" 88
overhead 'hp {{hits}}/{{maxhits}}'

See also sysmsg

random

random (max)

Shows a random number between 1 and max as a system message.

ParameterMeaning
max Upper bound, inclusive.
Example
random 15

sound

sound (id)

Plays a sound effect locally at your position. Useful as an alert.

ParameterMeaning
id Sound ID.
Example
if hp < 30
    sound 0x1E9
endif

sysmessage

sysmsg ('text') [hue]

Prints a message in the lower-left of the client. Local only. Supports {{...}} interpolation: {{myvar}} inserts a variable, and an expression such as {{skill 'Alchemy'}} or {{hits}} inserts its current value. 'sysmessage' is an alias.

ParameterMeaning
'text' Message. {{name}} inserts a variable; {{expression args}} inserts the expression's value, e.g. {{skill 'Alchemy'}} or {{hits}}.
hue optional Text colour.
Example
sysmsg 'ready to go!' 33
sysmsg "Alchemy: {{skill 'Alchemy'}}"

See also overhead · insysmsg · clearsysmsg

sysmsg

sysmsg ('text') [hue]

Prints a message in the lower-left of the client. Local only. Supports {{...}} interpolation: {{myvar}} inserts a variable, and an expression such as {{skill 'Alchemy'}} or {{hits}} inserts its current value. 'sysmessage' is an alias.

Also spelled sysmessage

ParameterMeaning
'text' Message. {{name}} inserts a variable; {{expression args}} inserts the expression's value, e.g. {{skill 'Alchemy'}} or {{hits}}.
hue optional Text colour.
Example
sysmsg 'ready to go!' 33
sysmsg "Alchemy: {{skill 'Alchemy'}}"

See also overhead · insysmsg · clearsysmsg