You need to log in to create posts and topics.

If Checks

act

Checks the mobs act flags.

if act $i sentinel

act2

Checks the mobs act flags.

if avoids_all_attacks $i

affected

Checks if the target has an active affect.

if affected $n blind

align

Check the target’s alignment.

if align $n < -2

area

Checks the full exact name of the area the target is located in currently.

if area $n ‘White Harbor’

carries

Checks if the target caries an item specified by either object name or vnum.

if carries $n sword

if carries $n 1233

charhere

if charhere $n

clan

Checks the target’s clan name.

if clan $n ‘Protectors’

class

Checks the target’s class.

if class $n mage

clones

Use to check for a count of mobs with the same vnum as the mob running the program.

if clones > 3     – are there > 3 mobs of same vnum here

drunk

Checks how drunk a target is.

if drunk $n > 10

exactname

Checks the exact full name of the target. Unlike name which just searches to see if a name contains the given text.

if exactname $n Bilbo

exists

Checks if the target exists somewhere in the world.

if exists $n

full

Checks how full the target is.

if full $n > 10

grpsize

Group size check.

if grpsize $n > 6

has

Checks to see if the target has an object of the specified object type.

if has $n weapon

hasbonus

Check if the character has a bonus.

if hasbonus $n strength > 10

haseventgroupqueued

Checks if mob has any events queued in event group 55, checking group 0 means any mudprog queued event.

if haseventgroupqueued <target> <eventgroupnumber>

if !haseventgroupqueued $i 55

haspktimer

Checks if the target has a PK Timer on them – have they killed a player recently?

if haspktimer $n

haspracs

This check is necessary for mob setskill to ensure the character has enough trains.

if haspracs $n > 1

hasskill

if hasskill $n parry > 10

hastarget

Checks if the target has a valid target.

if hastarget $i

hastoken

Does the target carry one or more of the token in question?

if hastoken $n 3087           – is $n carrying 1 or more of token 3087

if hastoken $n 3.1233         – is $n carrying 3 or more of token 1233

if hastoken $n contestant     – does $n have a token named ‘contestant’

hastrains

This check is necessary for mob setskill to ensure the character has enough trains.

if hastrains $n > 1

hour

Checks the time in-game.

if hour > 11      – is the time > 11 o’clock

hpcnt

Checks the percentage of a target’s health.

if hpcnt $i > 30

hunger

Checks how hungry the target is.

if hunger $n > 10

imm

Checks the targets immunities.

if imm $i fire

isactive

Checks if the target is sleeping. Useful in mudprogs to wake a mob up if they are asleep. isactive can be used on players also.  If the target isactive, their position is not sleeping.

if isactive $n

Check if the player is NOT active (i.e. asleep).

if !isactive $i

isconcealed

Checks if the character’s weapon is concealed.

if isconcealed $n

iscourt

Checks if the player a member of the court.

if iscourt $n

isdelay

Checks if $i has a mudprog pending.

if isdelay $i

isevil

Checks if the target is has an evil alignment.

if isevil $n

isexitopen

Returns true if <direction> is an open exit (open door or no door).  <direction> can be a word for the direction or the direction number.

if isexitopen <direction>

isfollow

Checks if the target is following another character.

if isfollow $n

ischarm

Checks if the target is charmed.

isgood

Checks if the target is has a good alignment.

if isgood $n

isimmort

Checks if the target is an immortal character.

if isimmort $n

iskiller

True if player is currently flagged as a killer.

if iskiller $n

isneutral

Checks if the target is has a neutral alignment.

if isneutral $n

isnpc

Checks if the target is a mobile.

if isnpc $n

ispc

Checks if the target is a player.

if ispc $n

if ischarm $n

issheathed

Checks if the character’s weapon is sheathed.

if issheathed $n

istarget

Checks if the target is the mobile’s current target.

if istarget $n

isthief

True if player is currently flagged as a thief.

if isthief $n

isquester

Checks if the target is flagged as a quester.

if quester $n

isvisible

Checks if the mob can see the target.

if isvisible $n

karns

Checks how many Karns a player has.

if karns $n > 4

level

Checks the target character or object’s level.

if level $n < 5

if level $o < 5

mobs

Use to check for a count of mobs in the room (does not include players).

if mobs <operation> <number>

if mobs > 4       – true when does room contain more than 4 mobs

mobexists

Check if a mob exists somewhere in the game.

if mobexists <mobname>

mobhere

Check if a mob is in the room by vnum. While technically it could be used like ‘if mobhere dog’ if charhere is better for that, since charhere supports ‘if charhere $q’ etc.

if mobhere <mobvnum>

if mobhere 3001

money

Checks how much money the character has.

if money $n

name

Checks if the name of the target contains the specified text.

if name $n puff

if name $o iron

objexists

Check if a object exists somewhere in the game.

if objexists <keyword>

objhere

Check if an object is in the room by vnum/keyword.

if objhere <keyword|vnum>

if objhere 3001

if objhere bottle

off

Checks the mobs offensive flags.

if off $i berserk

objtype

Checks an object type.

objval0, objval1, objval2, objval3, obvval4

Check the object’s values field.

if objval0 $o > 1000

if objtype $p scroll

order

Get the order of a mob in the room. Useful when several mobs in a room have the same trigger and you want only the first of them to act.

if order == 0     – is mob the first in room

people

Use to check for a count of people in the room (mobs + players).

if people <operation> <number>

if people > 4     – true when does room contain more than 4 people

pkills

Checks the player kill count for the target.

if pkkills $n > 1000

pkdefeats

Checks how many times the target died in pk combat.

if pkdefeats $n > 1000 – ch pkdefeat checks

players

Use to check for a count of players in the room (does not include mobs).

if players <operation> <number>

if players > 4    – true when does room contain more than 4 players

pos

Checks the targets current position.

if pos $n standing

race

Checks the target’s race.

if race $n elf

racesize

Checks racial size — sizes are: tiny=0 small=1 medium=2 large=3 huge=4 giant=5

if racesize $n > 1

rand

Will be true if a random number between 1 and 100 is less than <number>.

if rand <number>

if rand 30

room

checks the rooms vnum

if room $i == 1233

roomflag

Checks for a room flag.

if room $n dark

rps

Checks the player’s RPS count.

if rps $n > 1000

sector

Checks the sector type – strprefix checking not exact.

if sector $n forest

sex

Checks the target’s gender.

if sex $i == 0          – sex check, 0=it, 1=male,2=female

thirst

Checks how thirsty the target is.

if thirst $n > 10

tired

Checks how tired the target is.

if tired $n > 10

uses

Checks to see if the target is wearing an object of the specified object type.

if uses $n armor

value

Use this to check room numbers in premove triggers (see mobhelp preventmove).

wears

Checks if the target is wearing an item specified by either object name or vnum.

if wears $n lantern

if wears $n 1233