Commands
Overview¶
The commands issued in the scripting engine are similar to a commands you might enter into a command prompt or shell. Each line has a starting command, and a set of parameters. Some of those parameters are required, some are optional.
command (required) [optional]
All parameters are shown inside of parenthesis or brackets. Parameters within parenthesis are required while those in brackets are optional and will default to specific value if not provided.
If you want to pass several words as a single parameter you must wrap them using '
or "
. For example 'hello goodbye'
is one parameter, while hello
goodbye
is two.
For example, if your script is something like:
1 2 |
|
You will end up just saying Hello
. Instead, you if you wrap the words in single (') or double quotes (") the engine will see it as a single parameter.
1 2 |
|
If you prefix a command with the @
this will silence any warning/output from the command. For example:
Example
1 2 3 4 5 |
|
Without the @
symbol, if a robe isn't available, you would get an warning message telling you that it couldn't find a robe. But since the @
symbol was provided, no warning is displayed.
alliance¶
Syntax: alliance ('message to send')
Description: This command will force your character to say an alliance message passed as the parameter.
Example
1 |
|
attack¶
Syntax: attack (serial)
or attack ('variablename')
Description: Attack a specific serial or variable tied to a serial.
Example
1 |
|
1 |
|
cast¶
Syntax: cast ('name of spell')
Description: Cast a spell by name
Example
1 2 3 |
|
clearall¶
Syntax: clearall
Description: Combines the following actions into one commmand: Cancel Current Target, Clear Target Queue, Drop What You Are Currently Holding and Clear Drag/Drop Queue
into a single command.
Example
1 2 3 |
|
cleardragdrop¶
Syntax: cleardragdrop
Description: Clears Razor's the drag/drop queue
Example
1 2 3 |
|
clearhands¶
Syntax: clearhands ('left'/'right'/'both')
Description: Undress your hands based on the param.
Example
1 |
|
1 |
|
clearsysmsg¶
Syntax: clearsysmsg
Description: Clears the internal system message queue
Example
1 2 3 4 5 6 7 8 9 10 11 12 |
|
dclick¶
Syntax: dclick (serial)
or dclick ('left'/'right'/'hands')
Description: This command will use (double-click) a specific item or mobile or use the item in one of your hands using left
, right
or hands
to use an item in either hand.
Example
1 |
|
1 |
|
1 |
|
1 |
|
dclicktype¶
Syntax: dclicktype ('name of item'/'graphicId') [inrange (true/false)/backpack] [hue]
Description: This command will use (double-click) an item type either provided by the name or the graphic ID.
Range Check
If you include the optional true
parameter, items within range (2 tiles) will only be considered. If you include the optional backpack
parameter, items in your backpack only be considered.
Getting the graphic name or ID
To get the name or the ID of item, use the >info
command in Razor and click on the item. You can use either the Item Name
or Id
.
Example
1 2 3 |
|
1 2 3 |
|
1 2 3 |
|
1 2 3 |
|
dress¶
Syntax: dress ('name of dress list')
Description: This command will execute a spec dress list you have defined in Razor.
Example
1 |
|
drop¶
Syntax: drop (serial) (x) (y) [z]
or drop (serial) (layer)
or drop 'ground' (x) (y) [z]
Description: This command will drop the item you are holding either at your feet, on a specific layer , at a specific X/Y/Z location on the ground or within the defined serial.
Tip
The functionality of drop 'ground' (x) (y) [z]
is also available in with droprelloc.
Tip
A list of available layers for reference that can be used with this command.
Example
1 2 |
|
1 2 |
|
droprelloc¶
Syntax: droprelloc (x) (y)
Description: This command will drop the item you're holding to a location relative to your position.
Example:
Example
1 2 3 |
|
emote¶
Syntax: emote ('message to send') [hue]
Description: This command will force your character to emote the message passed as the parameter.
Tip
This command will append *
around the emote so emote 'smiles'
will be displayed in game as *smiles*
.
Example
1 |
|
1 |
|
guild¶
Syntax: guild ('message to send')
Description: This command will force your character to say a guild message passed as the parameter.
Example
1 |
|
gumpresponse¶
Syntax: gumpresponse (buttonID)
Description: Responds to a specific gump button
Example
1 |
|
gumpclose¶
Syntax: gumpclose
Description: This command will close the last gump that opened.
Example
1 |
|
hotkey¶
Syntax: hotkey ('name of hotkey')
Description: This command will execute any Razor hotkey by name.
Example
1 2 3 |
|
interrupt¶
Syntax: interrupt
Description: This command will interrupt a casting action.
Example
1 2 3 4 5 6 7 8 9 10 |
|
lasttarget¶
Syntax: lasttarget
Description: This command will target your last target set in Razor.
Example
1 2 3 |
|
lift¶
Syntax: lift (serial) [amount]
Description: This command will lift a specific item and amount. If no amount is provided, 1
is defaulted.
Example
1 2 3 |
|
lifttype¶
Syntax: lifttype (gfx) [amount] [hue]
or lifttype ('name of item') [amount] [hue]
Description: This command will lift a specific item by type either by the graphic id or by the name from your backpack. If no amount is provided, 1
is defaulted.
Example
1 2 3 |
|
1 2 3 |
|
1 2 3 |
|
1 2 3 |
|
menu¶
Syntax: menu (serial) (index) [false]
Description: Selects a specific index within a context menu. Razor will block the menu from appearing by default. If you include the optional false
parameter, the context menu won't be blocked by Razor.
Context Menu
This command applies to the context menu accessed on some servers via a single-click (such as on yourself, to open your paperdoll or backpack).
Example
1 |
|
1 |
|
menuresponse¶
Syntax: menuresponse (index) (menuId) [hue]
Description: Responds to a specific menu and menu ID
Warning
This command does not work on context menus, they are for a less used menu type. See the menu
command to use context/popup menus.
Example
1 |
|
organizer¶
Syntax: organizer (number) ['set']
Description: This command will execute a specific organizer agent. If the set
parameter is included, you will instead be prompted to set the organizer agent's hotbag.
Example
1 |
|
1 |
|
overhead¶
Syntax: overhead ('text') [color] [serial]
Description: This command will display a message over your head. Only you can see this.
Example
1 2 3 |
|
potion¶
Syntax: potion ('potion type')
Types: heal, cure, refresh, nightsight, ns, explosion, strength, str, agility
Description: This command will use a specific potion based on the type.
Example
1 |
|
1 |
|
promptresponse¶
Syntax: promptresponse ('prompt response')
Description: This command will respond to a prompt triggered from actions such as renaming runes or giving a guild title.
Example
1 2 3 |
|
random¶
Syntax: random (max number)
Description: This command will generate a random number between 1 and the max number.
Example
1 2 3 4 5 6 7 8 9 |
|
restock¶
Syntax: restock (number) ['set']
Description: This command will execute a specific restock agent. If the set
parameter is included, you will instead be prompted to set the restock agent's hotbag.
Example
1 2 3 |
|
1 |
|
say¶
Syntax: say ('message to send') [hue]
or msg ('message to send') [hue]
Description: This command will force your character to say the message passed as the parameter.
Example
1 |
|
1 |
|
script¶
Syntax: script 'name'
or script 'category\name'
Description: This command will call another script.
Tip
You can call scripts in categories using cat1\cat2\scriptname
format.
Example
1 2 3 |
|
1 2 3 |
|
scavenger¶
Syntax: scavenger ['clear'/'add'/'on'/'off'/'set']
Description: This command will control the scavenger agent.
clear
: Clear scavenger agent cacheadd
: Select an item to add to the liston
: Turn on the scavenger agentoff
: Turn off the scavenger agentset
: Set the scavenger agent's hotbag
Example
1 |
|
sell¶
Syntax: sell
Description: This command will set the Sell agent's hotbag.
Example
1 |
|
setability¶
Syntax: setability ('primary'/'secondary'/'stun'/'disarm') ['on'/'off']
Description: This will set a specific ability on or off. If on
or off
is missing, on
is defaulted.
Example
1 |
|
1 |
|
setlasttarget¶
Syntax: setlasttarget
Description: This command will pause the script until you select a target to be set as Last Target.
Example
1 2 3 4 5 6 |
|
setvar¶
Syntax: setvar ('variable') [timeout
or setvariable ('variable') [timeout]
Description: This command will pause the script until you select a target to be assigned a variable. Please note, the variable must exist before you can assign values to it. Default timeout is 30 seconds that can be changed by passing in a new timeout value in milliseconds.
Example
1 2 3 4 5 |
|
skill¶
Syntax: skill 'name of skill'
or skill last
Description: This command will use a specific skill (assuming it's a usable skill).
Supported skill names
anatomy, animallore, itemidentification, itemid, armslore, begging, peacemaking, peace, cartography, detectinghidden, discord, discordance, evaluatingintelligence, evalint, forensicevaluation, forensiceval, hiding, provocation, provo, inscription, poisoning, spiritspeak, stealing, taming, tasteidentification, tasteid, tracking, meditation, stealth, removetrap, imbuing
Example
1 2 3 4 5 |
|
sysmsg¶
Syntax: sysmsg ('message to display in system message')
Description: This command will display a message in the lower-left of the client.
Example
1 2 3 |
|
target¶
Syntax: target (closest/random/next/prev) [type1,type2] [humanoid/monster]
or target (closest/random/next/prev) [type1!type2] [humanoid/monster]
or target (serial)
or target (clear/cancel)
Description: This command will target a specific mobile based either the type searched for or the serial. If you provide a list of target types, you can use ,
for a general list and !
for a priority list.
Type | Notoriety Name | Notoriety Color |
---|---|---|
nonfriendly |
Attackable, Criminal, Enemy, Murderer | Gray (but not criminal), Gray, Orange, Red |
friendly |
Innocent, Guild/Ally | Blue, Green |
enemy |
Enemy | Orange |
red /murderer |
Murderer | Red |
gray /grey |
Attackable, Criminal | Gray (but not criminal), Gray |
criminal |
Criminal | Gray |
blue /innocent |
Innocent | Blue |
friend |
Based on your friends list | Any |
List Type | Delimiter | Description |
---|---|---|
General | , |
When the script tries to acquire a target, it will look for all the target types passed in the list. See Examples. |
Priority | ! |
When the script tries to acquire a target, it will prioritize each type. See Examples. |
Example
1 2 3 |
|
1 2 3 4 5 6 |
|
1 2 3 4 5 6 |
|
1 2 3 |
|
1 2 3 |
|
1 2 3 |
|
1 2 3 |
|
1 |
|
1 |
|
1 |
|
targetrelloc¶
Syntax: targetrelloc (x-offset) (y-offset)
Description: This command will target a specific location on the map relative to your position.
Example
1 2 3 |
|
targetloc¶
Syntax: targetloc (x) (y) (z)
Description: This command will target a specific location on the map.
Example
=== "Specific location"
1 2 3 4 5 |
|
targettype¶
Syntax: targettype ('name of item or mobile type'/'graphicId') [inrange (true/false)/backpack] [hue]
Description: This command will target a specific type of mobile or item based on the graphic id or based on the name of the item or mobile.
Range Check
If the optional parameter is passed in as true
only items within the range of 2
tiles will be considered. If the optional parameter is passed in as backpack
only items in your backpack will be considered.
Getting the graphic name or ID
To get the name or the ID of item, use the >info
command in Razor and click on the item. You can use either the Item Name
or Id
.
Example
1 2 3 |
|
1 2 3 |
|
1 2 3 |
|
1 2 3 |
|
1 2 3 |
|
1 2 3 |
|
undress¶
Syntax: undress ['name of dress list']'
or undress 'LayerName'
Description: This command will either undress you completely if no dress list is provided. If you provide a dress list, only those specific items will be undressed. Lastly, you can define a layer name to undress.
Tip
Available layers for reference
Example
1 |
|
1 |
|
1 2 |
|
useonce¶
Syntax: useonce ['add'/'addcontainer']
Description: This command will execute the UseOnce agent. If the add
parameter is included, you can add items to your UseOnce list. If the addcontainer
parameter is included, you can add all items in a container to your UseOnce list.
Example
1 |
|
1 |
|
1 |
|
virtue¶
Syntax: virtue ('honor'/'sacrifice'/'valor')
Description: This command will invoke Honor, Sacrifice or Valor.
Example
1 |
|
1 |
|
1 |
|
walk¶
Syntax: walk ('direction')
Description: This command will turn and/or walk your player in a certain direction.
Example
1 2 3 4 5 6 7 8 |
|
wait & pause¶
Syntax: wait [time in milliseconds]
or pause [time in milliseconds]
or wait [duration] (shorthand)
Description: This command will pause the execution of a script for a given time.
Tips
1000
milliseconds is equal to 1
second.
1000 x number of seconds = total milliseconds
To make your script easier to read, you can shorthand instead of defining the full time in milliseconds.
Accepted Shorthand |
---|
seconds , second , sec , s |
minutes , minute , min , m |
Example
1 2 3 |
|
1 2 3 4 5 6 7 |
|
1 2 3 |
|
waitforgump¶
Syntax: waitforgump [gump id/'any'] [timeout]
Description: This command will wait for a gump. If no gump id
is provided, it will wait for any gump. Default timeout is 30 seconds that can be changed by passing in a new timeout value in milliseconds.
Timeout parameter
To modify the default 30 second timeout for any gump, you must include include the any
keyword before the timeout.
waitforgump 'any' 5000
will wait for 5 seconds
waitforgump 5000
will wait 30 seconds for a gump with the id of 5000
Example
1 |
|
1 |
|
1 |
|
1 |
|
waitformenu¶
Syntax: waitformenu [menu id/'any'] [timeout]
Description: This command will wait for a context menu. If no menu id
is provided, it will wait for any menu. Default timeout is 30 seconds that can be changed by passing in a new timeout value in milliseconds.
Timeout parameter
To modify the default 30 second timeout for any menu, you must include include the any
keyword before the timeout.
waitformenu 'any' 5000
will wait for 5 seconds
waitformenu 5000
will wait 30 seconds for a menu with the id of 5000
Warning
This command does not work on context menus, they are for an less used menu type. See the menu
command to use context/popup menus.
Example
1 |
|
1 |
|
1 |
|
waitforprompt¶
Syntax: waitforprompt [promptid/'any'] [timeout]
Description: This command will wait for a prompt before continuing. If no prompt id
is provided, it will wait for any prompt. Default timeout is 30 seconds that can be changed by passing in a new timeout value in milliseconds.
Timeout parameter
To modify the default 30 second timeout for any gump, you must include include the any
keyword before the timeout.
waitforprompt 'any' 5000
will wait for 5 seconds
waitforprompt 5000
will wait 30 seconds for a prompt with the id of 5000
Example
1 2 3 |
|
1 2 3 |
|
waitforsysmsg¶
Syntax: waitforsysmsg 'message to wait for' [timeout]
or wfsysmsg 'message to wait for' [timeout]
Description: This command will wait a specific message to be added to the system message queue before continuing. Default timeout is 30 seconds that can be changed by passing in a new timeout value in milliseconds.
Example
1 2 |
|
1 2 |
|
waitfortarget¶
Syntax: waitfortarget [pause in milliseconds]
or wft [pause in milliseconds]
Description: This command will cause the script to pause until you have a target cursor. By default it will wait 30 seconds but you can define a specific wait time if you prefer.
Example
1 2 3 |
|
1 2 3 |
|
whisper¶
Syntax: whisper ('message to send') [hue]
Description: This command will force your character to whisper the message passed as the parameter.
Example
1 |
|
1 |
|
yell¶
Syntax: yell ('message to send') [hue]
Description: This command will force your character to yell the message passed as the parameter.
Example
1 |
|
1 |
|