Expressions
Expressions Overview¶
When using the if
or while
conditions, you can access the following expressions to check against.
The following operators are supported:
Operator | Description |
---|---|
= | Equal |
== | Equal |
!= | Not equal |
< | Less than |
<= | Less than or equal |
> | Greater than |
>= | Greater than or equal |
count/counter¶
count ('name of counter')
counter ('name of counter')
count ('name of item') [hue]
count (graphicID) [hue]
Description: Used to get the current amount of a specific item in player's backpack. Omitting the hue argument will result in count of all items of the specified type regardless of their hue. The expression can be used either directly by item type and hue, or by referencing a named counter manually set up in the Counters tab. More info
Example
1 2 3 |
|
1 2 3 |
|
1 2 3 |
|
diffhits¶
diffhits
diffhp
Description: Used to get the difference between you max hits and current hits.
Example
1 2 3 |
|
diffmana¶
diffmana
Description: Used to get the difference between you max mana and current mana.
Example
1 2 3 |
|
diffstam¶
diffstam
Description: Used to get the difference between you max stamina and current stamina.
Example
1 2 3 |
|
diffweight¶
diffweight
Description: Used to get the difference between you max weight and current weight.
Example
1 2 3 |
|
followers¶
Description: Used to get the current number of followers.
Example
1 2 3 4 5 |
|
1 2 3 4 5 |
|
findbuff¶
findbuff 'name of buff/debuff
Description: Used to check if a specific buff/debuff is applied to you.
Example
1 2 3 4 5 6 7 |
|
findtype¶
findtype ('name of item') [inrangecheck (true/false)/backpack] [hue]
ORfindtype (graphicID) [inrangecheck (true/false)/backpack] [hue]
Description: Used to check if a specific item name of graphic ID exists. Range check, if true, will check within 2 tiles.
The as
keyword
If you use findtype
along with as
you can assign a temporary variable to use throughout the script. See example below.
In-Game Info Gump
Not sure what name to enter or graphic ID to enter? Type >info
and click on any item or mobile for more information.
Click the blue dot next to the value you want to copy to the clipboard.
Example
1 2 3 |
|
1 2 3 |
|
1 2 3 |
|
1 2 3 |
|
1 2 3 4 |
|
1 2 3 4 |
|
hidden¶
hidden
Description: Used to check if you are hidden.
Example
1 2 3 |
|
hp & maxhp¶
hp
maxhp
hits
maxhits
Description: Used to get your current or max hit points/health levels.
Example
1 2 3 4 |
|
1 2 3 |
|
insysmsg¶
insysmsg ('message to look for')
insysmessage ('message to look for')
Description: Used to check if certain text appears within the system message log.
System Message Queue
Not sure if a specific message is in Razor's system message queue? Type >sysmsgs
to see what Razor can find.
Using clearsysmsg
will clear out the queue completely.
Example
1 2 3 |
|
invuln¶
invuln
invul
blessed
Description: Used to get your invulnerable status
Example
1 2 3 |
|
lhandempty¶
lhandempty
Description: Used to check if your left hand is empty
Example
1 2 3 |
|
mana & maxmana¶
mana
maxmana
Description: Used to get your current or max mana levels.
Example
1 2 3 4 |
|
maxfollowers¶
Description: Used to get the maximum number of allowed followers.
Example
1 2 3 |
|
1 2 3 4 5 |
|
maxweight¶
maxweight
Description: Used to get your max allowed weight.
Example
1 2 3 |
|
mounted¶
mounted
Description: Used to check if you are currently on a mount
Example
1 2 3 4 5 |
|
name¶
name
Description: Used to get your name of the currently logged in character
Example
1 2 3 |
|
paralyzed¶
paralyzed
Description: Used to check if you are currently paralyzed.
Example
1 2 3 |
|
poisoned¶
poisoned
Description: Used to check if you are currently poisoned.
Example
1 2 3 |
|
position¶
position (x, y)
position (x, y, z)
Description: Used to check if your current position matches the provided.
Example
1 2 3 4 5 |
|
queued¶
queued
Description: Used to check if your current queue is active (from restocking, organizing, etc)
Example
1 2 3 4 5 |
|
1 2 3 4 5 6 7 8 9 10 |
|
1 2 3 4 5 6 7 8 9 10 11 12 |
|
rhandempty¶
rhandempty
Description: Used to check if your right hand is empty
Example
1 2 3 |
|
skill¶
skill ('name')
Description: Used to get the current skill level for a given 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 |
|
stam & maxstam¶
stam
maxstam
Description: Used to get your current stamina or max stamina.
Example
1 2 3 |
|
1 2 3 |
|
str, dex & int¶
str
dex
int
Description: Used to get your current strength, dexterity and intelligence.
Example
1 2 3 |
|
targetexists¶
targetexists ['any'/'beneficial'/'harmful'/'neutral']
Description: Used to check if the client current has a target cursor up
Example
1 2 3 4 5 |
|
varexist¶
varexist
varexists
Description: Used to check if a variable exists.
Example
1 2 3 4 5 6 7 8 |
|
warmode¶
warmode
Description: Used to get your current combat/war status
Example
1 2 3 4 5 |
|
weight¶
weight
Description: Used to get your current weight.
Example
1 2 3 |
|