[Herne's SMAUG Building Guides]
  [Introduction] [Building Rooms] [Making Resets]
  [FAQ] [Building Objects] [Making Programs]
  [Some of Herne's Ideas] [Building Mobs] [OLC Resources]
 
 

I am also working on making a PDF Version of this page.

This page last updated: Oct 2002
 
 

The IF Check Help Files

Many of these help files have been rewritten by Tiki from Realms of Despair.

Every attempt has been made to ensure the syntax is correct and the commands function as intended, however if a command fails to function or gives you an 'unknown command' error on your MUD, chances are the MPCommand is specific to Realms of Despair.


Table of Contents:

If Checks (Roughly grouped by type)
Sex Deity isnuisance Cansee Objval# Time
Level Isdevoted Nuisance Ismobinvis Objtype Economy
Str Favor asupressed Mobinvislevel Objinworld Rand
Int Guild Waitstate Inroom Ovnumhere LeverPos
Wis IsLeader Idle Inarea Ovnumroom Number
Dex Council Hostdesc Mobinroom Ovnumwear ishot
Con Clan Multi Mobinarea Ovnumcarry iscold
Cha IsClanLeader AreaMulti Mobinworld Ovnuminv iswindy
Lck IsClan1 Isnpc Mortinroom Otypehere issnowing
Name IsClan2 Ispc Mortinarea Otyperoom israining
Race Clantype Isimmort Mortinworld Otypewear iscalm
Class Ispkill Ismounted WasInRoom Otypecarry mpsleep
Hps Canpkill Isriding MortCount Otypeinv stopscript
Hitprcnt Pkadrenalized Isfollow MobCount    
Mana Ishelled Ischarmed CharCount    
Goldamt IsAttacker Isaffected Safe    
Position IsKiller IsFlying Norecall    
Age IsThief Ishunting NoAstral    
Weight IsFlagged Ishating NoSummon    
Height IsTagged Isfight NoMagic    
IsGood PCFlagged Numfighting NoSupplicate    
IsEvil DoingQuest Timeskilled indoors    
IsNeutral Rank Ispacifist Ispassage    
Drunk Genre Isdead Isopen    
Haspet   Actflagged Islocked    
    Wearing      
    Wearingvnum      
    Carryingvnum      


IFCHECK SEX

Example: if sex($n) == 2
mpe $n is a female.

If the target character or mob is female, it will return true.

The SEX ifcheck can be used in MOB, OBJECT, or ROOM programs to determine the target char or mob's gender.

Note: 0 is a neutral
1 is a male
2 is a female
[Back to Top]

IFCHECK LEVEL

Example: if level($n) == 47
mpe $n, you are almost an av!

If the target char or mob is level 47, it will return true.

The LEVEL ifcheck can be used in MOB, OBJECT, or ROOM programs to determine the target char or mob's level.

[Back to Top]

IFCHECK STR

Example: if str($n) == 20
mpe You have a strength of 20!

If the target's strength is 20, it will return true.

The STR ifcheck can be used in MOB, OBJECT, or ROOM programs to determine if the target (either a mob or a char) is affected by a given amount of strength (taking into account their natural strength and that given by equipment and spells).

[Back to Top]

IFCHECK INT

Example: if int($n) < 15
mpe $n appears to be a little dull...

If the target's intelligence is less than 15, it will return true.

The INT ifcheck can be used in MOB, OBJECT, or ROOM programs to determine if the target (either a mob or a char) is affected by a given amount of intelligence (taking into account their natural intelligence and that given by equipment and spells).

[Back to Top]

IFCHECK WIS

Example: if wis($n) < 12
mpe Not the brightest bulb in the socket, eh $n?

If the target's wisdom is less than 12, it will return true.

The WIS ifcheck can be used in MOB, OBJECT, or ROOM programs to determine if the target (either a mob or a char) is affected by a given amount of wisdom (taking into account their natural wisdom and that given by equipment and spells).

[Back to Top]

IFCHECK DEX

Example: if dex($n) > 20
mpe Wow, is $n ever nimble!

If the target's dexterity is greater than 20, it will return true.

The DEX ifcheck can be used in MOB, OBJECT, or ROOM programs to determine if the target (either a mob or a char) is affected by a given amount of dexterity (taking into account their natural dexterity and that given by equipment and spells).

[Back to Top]

IFCHECK CON

Example: if con($n) == 18
mpe You have a constitution of 18!

If the target's constitution is 18, it will return true.

The CON ifcheck can be used in MOB, OBJECT, or ROOM programs to determine if the target (either a mob or a char) is affected by a given amount of constitution (taking into account their natural constitution and that given by equipment and spells).

[Back to Top]

IFCHECK CHA

Example: if cha($n) > 18
mpe You're very charismatic, $n!

If the target's charisma is higher than 18, it will return true.

The CHA ifcheck can be used in MOB, OBJECT, or ROOM programs to determine if the target (either a mob or a char) is affected by a given amount of charisma (taking into account their natural charisma and that given by equipment and spells).

[Back to Top]

IFCHECK LCK

Example: if lck($n) => 18
mpe $n should be renamed 'Lucky'!

If the target's luck is greater than or equal to 18, it will return true.

The LCK ifcheck can be used in MOB, OBJECT, or ROOM programs to determine if the target (either a mob or a char) is affected by a given amount of luck (taking into account their natural luck and that given by equip ment and spells).

[Back to Top]

IFCHECK NAME

Example: if name($n) == darrek
mpe Hi, $n! Have a beer!

If the target char's name is Darrek (case insensitive), it will return true.

Example: if name($o)==extradimensional portal
mpe $n dropped $O (an extradimensional portal)

The target object variable MUST be "$o", and the specified name has to be its full name, without quotes.

The NAME ifcheck can be used in MOB, OBJECT, or ROOM programs to determine the target char, mob, or object's name.

[Back to Top]

IFCHECK RACE

Example: if race($n) == drow
mpe $n is one of the dark elves.

If the target char or mob is drow, it will return true.

The RACE ifcheck can be used in MOB, OBJECT, or ROOM programs to determine the race of the target char or mob.

Note: Please read help RACE, and help NPCRACES.

[Back to Top]

IFCHECK CLASS

Example: if class($n) == mage
mpe $n is a mage!

If the target char or mob is of the class 'mage', it will return true.

The CLASS ifcheck can be used in MOB, OBJECT, or ROOM programs to determine if the target CHAR or MOB belongs to a specified class.

Note: Please see help CLASS and help NPCCLASSES for a list of the valid char and mob class values.

[Back to Top]

IFCHECK HPS

Example: if hps($n) > 1900
mpe $n is buff!

If the target char or mob has more than 1900 left, it will return true.

The HPS ifcheck can be used in MOB, OBJECT, or ROOM programs to determine if the target char or mob has a specific number of hitpoints.

[Back to Top]

IFCHECK HITPRCNT

Example: if hitprcnt($n) < 10
mpe $n is going to dieeeeeee!

If the target char or mob's has less than 10% of their hitpoints left, it will return true.

The HITPRCNT ifcheck can be used in MOB, OBJECT, or ROOM programs to determine the target char or mob's hitpoint percentage.

[Back to Top]

IFCHECK MANA

Example: if mana($n) < 100
mpe $n's mana is getting low.

If the target char or mob's mana is below 100, it will return true.

The MANA ifcheck can be used in MOB, OBJECT, or ROOM programs to determine the target char or mob's mana.

[Back to Top]

IFCHECK GOLDAMT

Example: if goldamt($n) < 100
mpe $n is broke!

If the target char or mob's gold amount is less than 100 gold coins, it will return true.

The GOLDAMT ifcheck can be used in MOB, OBJECT, or ROOM programs to determine if the target char or mob holds a specified amount of gold.

[Back to Top]

IFCHECK POSITION

Example: if position($t) == 6
mpe $t is sleeping!

If the target char is sleeping, it will return true.

The POSITION ifcheck can be used in MOB, OBJECT, or ROOM programs to determine the position of the target char or mob.

Note: Please read help POSITIONNUMS (below).

POSITIONNUMS

Bitvector Position
0
Dead
1
Mortally Wounded
2
Incapacitated
3
Stunned
4
Sleeping
5
Fighting (Berserk)
6
Resting
 
Bitvector Position
7
Fighting (Aggressive)
8
Sitting
9
Fighting (Standard)
10
Fighting (Defensive)
11
Fighting (Evasive)
12
Standing
13
Mounted
[Back to Top]

IFCHECK AGE

Example: if age($n)>20000
mpe $n doesn't have a life...

If the target mob or char is over 20000 years in age, it will return true.

The AGE ifcheck can be used in MOB, OBJECT, or ROOM programs to determine the age of the target char in years.

[Back to Top]

IFCHECK WEIGHT

Example: if weight($n)>998
mpe $n isn't going to be able to carry much more.

If the target mob or char is carrying 998 units of weight or more, it will return true.

Example: if weight($o)==1
mpe That object is as light as a feather!

If the target object weighs 1 unit of weight, it will return true.

The WEIGHT ifcheck can be used in MOB, OBJECT, ROOM programs to determine either the carrying weight of a target char or mob (the weight of what they are wearing, holding, and/or carrying in their inventory), or the weight of an object.

[Back to Top]

IFCHECK HEIGHT

Example: if height($n) > 100
mpe My my $n, you are really tall...

If the target char is taller than 100 'inches', will return true.

The HEIGHT ifcheck can be used in MOB, OBJECT, or ROOM programs to determine the target char or mob's height in 'inches'.

[Back to Top]

IFCHECK ISGOOD

Example: if isgood($n)
mpe $n is an angel!

If the target char or mob's align is good, it will return true.

The ISGOOD ifcheck can be used in MOB, OBJECT, or ROOM programs to determine if the target char or mob's align is +350 or more.

[Back to Top]

IFCHECK ISEVIL

Example: if isevil($n)
mpe $n is evil to the core!

If the target char or mob's align is evil, it will return true.

The ISEVIL ifcheck can be used in MOB, OBJECT, or ROOM programs to determine if the target char or mob's align is -350 or less.

[Back to Top]

IFCHECK ISNEUTRAL

Example: if isneutral($n)
mpe $n is neither an angel nor devil. BORING!

If the target char or mob's align is neutral, it will return true.

The ISNEUTRAL ifcheck can be used in MOB, OBJECT, or ROOM programs to determine if the target char or mob's align is greater than -350 and less than +350.

[Back to Top]

IFCHECK DRUNK

Example: if drunk($n) > 40
mpe Tsk... would you please sober up?

If the target char's drunkeness is over 40, it will return true.

The DRUNK ifcheck can be used in MOB, OBJECT, or ROOM programs to determine if the target char's drunk field is set to a specified number.

Note: The range of drunk values runs from 1 to 100. 10 is the point where a char would see 'You are drunk.' in their scoresheet.

[Back to Top]

IFCHECK HASPET

Example: if haspet($n)
mpe What a cute pet $n has!

If the target char owns a pet, it will return true.

The HASPET ifcheck can be used in MOB, OBJECT, or ROOM programs to determine if the target char owns a pet. It will still return true if the pet is in another room.

[Back to Top]

IFCHECK DEITY

Example: if deity($n) == Keltas
mpe Here, $n, have my spare change.

If the target char is devoted to Keltas, it will return true.

The DEITY ifcheck can be used in MOB, OBJECT, or ROOM programs to determine if the target char is devoted to a specified deity.

[Back to Top]

IFCHECK ISDEVOTED

Example: if isdevoted($n)
mpe $n has devoted their soul to a deity.

If the target char is devoted to a deity, it will return true.

The ISDEVOTED ifcheck can be used in MOB, OBJECT, or ROOM programs to determine if the target char is devoted to one of the realm's deities.

[Back to Top]

IFCHECK FAVOR

Example: if favor($n) == 2500
mpe $n couldn't be any more loved by their deity!

If the target chars's favor is 2500, it will return true.

The FAVOR ifcheck can be used in MOB, OBJECT, or ROOM programs to determine if the target char's favor is set to a specified amount. Favor ranges from -2500 to 2500.

[Back to Top]

IFCHECK GUILD

Example: if guild($n) == guild of clerics
mpe Go heal someone, silly GoC'er!

If the target char belongs to the Guild of Clerics, it will return true.

The GUILD ifcheck can be used in MOB, OBJECT, or ROOM programs to determine if the target char is a member of the specified guild.

Note: The preferable ifcheck to use is 'clan'. Please see help 'IFCHECK CLAN'.

[Back to Top]

IFCHECK ISLEADER

Example: isleader($n) == inconnu
mpe $n is either leader, 1st or 2nd of Inconnu!

If the target char is a leader of Inconnu, it will return true.

Example: isleader($n)
mpe $n is one of the leaders of a guild/clan/order!

If the target char is a leader of ANY guild/clan/order, it will return true.

The ISLEADER ifcheck can be used in MOB, OBJECT, or ROOM programs to determine if a char is either a leader, first, or second of any (or a specified) order, clan, or guild.

[Back to Top]

IFCHECK COUNCIL

Example: if council($n) == nc
mpe $n is one of those wonderful Newbie Councillors!

If the target char belongs to the Newbie Council, it will return true.

The COUNCIL ifcheck can be used in MOB, OBJECT, or ROOM programs to determine if the target char belongs to a specified council.

Note: Please see 'help councilnums' (RoD specific, below) for a list of the valid council 'short' names (ie. CoE for Council of Elders). Please note that using the numeric values will NOT work.

COUNCILNUMS

Number Shortform Council
1
CoE
Council of Elders
2
TS
The Symposium
3
NC
Newbie Council
4
Pro
Primordial Circle
5
PKC
Pkill Conclave
6
QC
Quest Council
7
NeoC
Neophyte Council
8
CC
Code Council
9
AC
Area Council

When using ifcheck council($n) use the council name or abbreviation as listed above.

[Back to Top]

IFCHECK CLAN

Example: if clan($n) == inconnu
mpe $n is in Inconnu!

If the target is a member of Inconnu, it will return true.

Example: if clan($n) == guild of clerics (no quotes used)
mpe $n is in the Guild of Clerics!

Note that you could also use 'goc' (again, with no quotes) in this case. Check each guild/orderlan helpfile for their 'short' name.

The CLAN ifcheck can be used in MOB, OBJECT, or ROOM programs to determine if the char belongs to the specified ORDER, CLAN or GUILD.

[Back to Top]

IFCHECK ISCLANLEADER

Example: if isclanleader($n) == Guild of Thieves
mpe $n is the Guildmaster of the GoT!

If the target is the Guildmaster of the Guild of Thieves, it will return true.

Example: if isclanleader($n)
mpe $n is the Leader of a clan/order/guild!

If the target is the Leader of any clan, it will return true.

The ISCLANLEADER ifcheck can be used in MOB, OBJECT, or ROOM programs to determine if the target char is the Leader (not first or second) of any (or a specified) order, guild, or deadly clan.

[Back to Top]

IFCHECK ISCLAN1

Example: if isclan1($n) == Rol Na Feinne
mpe $n is the Number One of RnF!

If the target is the Number One of the order Rol Na Feinne, it will return true.

Example: if isclan1($n)
mpe $n is the Number One of a clan/order/guild!

If the target is a Number One, it will return true.

The ISCLAN1 ifcheck can be used in MOB, OBJECT, or ROOM programs to determine if the target char is the number one of any (or a specified) order, guild, or deadly clan.

[Back to Top]

IFCHECK ISCLAN2

Example: if isclan2($n) == Ascendere
mpe $n is the Second of Ascendere!

If the target is the Second of the order Ascendere, it will return true.

Example: if isclan2($n)
mpe $n is the Second of a clan/order/guild!

If the target is a Second, it will return true.

The ISCLAN2 ifcheck can be used in MOB, OBJECT, or ROOM programs to determine if the target char is the second of any (or a specified) order, guild, or deadly clan.

[Back to Top]

IFCHECK CLANTYPE

Example: if clantype($n) == 13
mpe $n belongs to an Order

If the target char belongs to an Order, it will return true.

The CLANTYPE ifcheck can be used in MOB, OBJECT, or ROOM programs to determine if the target belongs to a clan of the specified type.

Note: Please see 'help clantypes' for a list of the valid clantype values (below).

CLANTYPE CLANTYPES

Value Clan
0 Deadly Clan
13 Order
14 Guild
[Back to Top]

IFCHECK ISPKILL

Example: if ispkill($n)
mpe $n is a deadly player.

If the target char is deadly, it will return true.

The ISPKILL ifcheck can be used in MOB, OBJECT, or ROOM programs to determine if the target char is a deadly player.

Note: While a player may be flagged as 'deadly', they may not be legally able to participate in pkilling if they aren't at the minimum age (18) and level (5). To see if they've met that requirement, use CANPKILL.

[Back to Top]

IFCHECK CANPKILL

Example: if canpkill($n)
mpe 0.$n You'd better start running, $n...

If $n is officially a deadly, gives them a warning.

The CANPKILL ifcheck can be used in MOB, OBJECT, or ROOM programs to determine if the target is 'legally' a deadly, which means:
- minimum age of 18
- minimum level of 5
- flagged pkill.

Note: To see if a char is flagged deadly regardless of age/level, use ISPKILL.

[Back to Top]

IFCHECK PKADRENALIZED

Example: if pkadrenalized($n) >= 5
mpe $n is a deadly player.

If the target char is deadly, it will return true.

The PKADRENALIZED ifcheck can be used in MOB, OBJECT, or ROOM programs to determine if the target char has recently been, or is in a fight. This counter only works for DEADLY chars.

[Back to Top]

IFCHECK ISHELLED

Example: if ishelled($n)
mpe $n has apparently been naughty...

If the target char is helled, it will return true.

The ISHELLED ifcheck can be used in MOB, OBJECT, or ROOM programs to determine if the target char is helled.

[Back to Top]

IFCHECK ISATTACKER   IFCHECK ISKILLER   IFCHECK ISTHIEF

Example: if isattacker($n)
mpe $n attacked someone, but didn't kill them.

If the target char or mob is flagged as an attacker, it will return true.

The ISATTACKER, ISTHIEF, and ISKILLER ifcheck can be used in MOB, OBJECT, or ROOM programs to determine if the target char has been flagged as an attacker, thief, or killer.

[Back to Top]

IFCHECK ISFLAGGED

Example: if isflagged($n,justtesting,2)
mpe $n's justtesting flag's second bit is on!

If the target char or mob's second bit in their 'justtesting' flag is turned on.

The ISFLAGGED ifcheck can be used in MOB, OBJECT, or ROOM programs to determine if the target char or mob has been flagged with a particular variable, and has a given bit turned on. The format is: isflagged(<target>, <variable>, <bit testing for>)

Note: If you want to check only for the _presence_ of a 'bit' flag, the ifcheck 'ISTAGGED' can be used.

[Back to Top]

IFCHECK ISTAGGED

Example: if istagged($n,testflag)
mpe $n is tagged with the 'testflag' variable.

If the target mob or char is tagged with the variable 'testflag' it will return true, regardless of the variable's value.

Example: if istagged($n,testflag) == bob
mpe $n's 'testflag' variable's value is 'bob'.

If the target mob or char is tagged with the variable 'testflag' which has a value of 'bob', it will return true.

Example: if istagged($n,testflag) >= 10
mpe $n's 'testflag' variable's value is >= 10.

If the target mob or char is tagged with the variable 'testflag' which has a numerical value greater or equal to 10, it will return true.

The ISTAGGED ifcheck can be used in MOB, OBJECT, or ROOM programs to determine if the target char or mob has been tagged with a specified variable, and to test the value of that variable as well. When used with a numeric value, it can be tested using ">", "<", etc., as well.

Note: While you can use ISTAGGED to check for the presence of a bitflag, you must use the 'ISFLAGGED' ifcheck to check the flag's value.

[Back to Top]

IFCHECK PCFLAGGED

Example: if pcflagged($n)==norecall
mpe $n won't be leaving here anytime soon...

If the player is set 'norecall', the ifcheck would return true.

The PCFLAGGED ifcheck can be used in MOB, ROOM or OBJECT programs to determine if a player is flagged with the given flag.

[Back to Top]

IFCHECK DOINGQUEST

Example: if doingquest($n) == 17
mpe $n is doing quest number 17.

If the target char's 'quest' field is set to 17, it will return true.

The DOINGQUEST ifcheck can be used in MOB, OBJECT, or ROOM programs to determine if the target char's quest field is set to a specified number.

[Back to Top]

IFCHECK RANK

Example: if rank($n) == Guildmaster
mpe $n's rank is 'guildmaster' (not case-sensitive)

If the target char's rank is 'Guildmaster', it will return true.

The RANK ifcheck can be used in MOB, OBJECT, or ROOM programs to determine the rank of the target char.

Note: Please note that ranks CAN be changed by imms, and this is not a reliable method to check for clan leaders, imms of certain levels, or nation leaders.

[Back to Top]

IFCHECK GENRE (RoD specific)

Example: if genre($n) == sorcerer
mpe $n is either a mage, auggie or nephandi!

If the target chars's class belongs in the sorcerer genre, it will return true.

The GENRE ifcheck can be used in MOB, OBJECT, or ROOM programs to determine if the target char's genre, or 'class group'.

Note: See 'Help GENRE' for a list of possible values.

[Back to Top]

IFCHECK ISNUISANCE

Example: if isnuisance($n)
mpe $n has apparently been annoying someone...

If the target char is nuisanced, it will return true.

The ISNUISANCE ifcheck can be used in MOB, OBJECT, or ROOM programs to determine if the target char has been 'nuisanced' (See 'help nuisance' on your MUD).

[Back to Top]

IFCHECK NUISANCE

Example: if nuisance($n) > 8
mpe $n is at level 8 nuisance level. Ouch!

If the target char is nuisanced, it will return true.

The ISNUISANCE ifcheck can be used in MOB, OBJECT, or ROOM programs to determine the level of nuisance the target char has reached (See 'help nuisance' on your MUD).

[Back to Top]

IFCHECK ASUPRESSED

Example: if asupressed($n) => 10
mpe $n's got a bit of wait ahead of them!

If the target char or mob is affected by supress for 10 or more rounds, it will return true.

The ASUPRESSED ifcheck can be used in MOB, OBJECT, or ROOM programs to determine the number of rounds the target char is supressed (unable to use attack commands or automatic attacks).

Note: Please see 'Help MPASUPRESS' on your MUD.

[Back to Top]

IFCHECK WAITSTATE

Example: if waitstate($n) > 5
mpe $n has a bit of a wait ahead of them.

If the target char is delayed more than 5 ticks, it will return true.

The WAITSTATE ifcheck can be used in MOB, OBJECT, or ROOM programs to determine the number of ticks of 'wait' or 'delay' affecting a char.

[Back to Top]

IFCHECK IDLE

Example: if idle($r) >= 100
mpe $n must be asleep on the keyboard...

If the target char has been idle for 100 or more, it will return true.

The IDLE ifcheck can be used in MOB, OBJECT, or ROOM programs to determine if the target char has been idle a specified number of measurements.

[Back to Top]

IFCHECK HOSTDESC

Example: if hostdesc($n) == 127.0.0.1
mpe $n is connecting from localhost.

If the target char's ip is 127.0.0.1, it will return true.

The HOSTDESC ifcheck can be used in MOB, OBJECT, or ROOM programs to determine if the target char is connecting from a specific host. The host id must be in ip form.

[Back to Top]

IFCHECK MULTI

Example: if multi($n) == 4
mpe $n has four chars logged on!

Example: if multi($n)
mpe $n has more than one character logged!

The MULTI ifcheck can be used in MOB, OBJECT, or ROOM programs to determine if the target char is has other chars logged, or to determine the number of chars the target has logged into the game.

Note: If at all possible, use AREAMULTI ifcheck as it only checks the current area and is less taxing on system resources.

[Back to Top]

IFCHECK AREAMULTI

Example: if areamulti($n) > 4
mpe $n has more than four chars logged in this area!

Example: if areamulti($n)
mpe $n has more than one char logged in this area!

The AREAMULTI ifcheck can be used in MOB, OBJECT, or ROOM programs to determine if the target char is multying in the current area, or to determine the number of PCs the target has logged into the game that are in the area of the checker.

Note: If at all possible, use this command before using the ifcheck 'MULTI', as it checks the entire mud.

[Back to Top]

IFCHECK ISNPC

Example: if isnpc($n)
mpe $n is a mob!

If the target is a mob, it will return true.

The ISNPC ifcheck can be used in MOB, OBJECT, or ROOM programs to determine if the target is a mob.

[Back to Top]

IFCHECK ISPC

Example: if ispc($n)
mpe $n is a character, not a mob!

If the target is a character, it will return true.

The ISPC ifcheck can be used in MOB, OBJECT, or ROOM programs to determine if the target is a character (not a mob).

[Back to Top]

IFCHECK ISIMMORT

Example: if isimmort($n)
mpe $n is an immortal!

If the target char is an immortal, it will return true.

The ISIMMORT ifcheck can be used in MOB, OBJECT, or ROOM programs to determine if the target char is an immortal.

[Back to Top]

IFCHECK ISMOUNTED

Example: if ismounted($n)
mpe $n is being lazy today.

If the target char or mob is mounted on a mob, it will return true.

The ISMOUNTED ifcheck can be used in MOB, OBJECT, or ROOM programs to determine if the target mob or char is mounted on another mob.

[Back to Top]

IFCHECK ISRIDING

Example: if isriding($n)
say $n is riding on me!

If $n is riding the mob with the program, it will return true.

The ISRIDING ifcheck can be used in MOB programs to determine if the given variable is riding the mob.

Note: Only the mob triggering the program will be checked for the rider $n. You cannot use anything like "if isriding($n)==8452". It will ignore the anything after the parentheses.

[Back to Top]

IFCHECK ISFOLLOW

Example: if isfollow($n)
mpe $n isn't much of a leader!

If the target char or mob is following another char or mob, it will return true.

The ISFOLLOW ifcheck can be used in MOB, OBJECT, or ROOM programs to determine if the target char or mob is following another char or mob.

Note: This will only return true if the char or mob being followed is also IN THE SAME ROOM.

[Back to Top]

IFCHECK ISCHARMED

Example: if ischarmed($n)
mpe Someone is controlling $n!

If the target mob is charmed, it will return true.

The ISCHARMED ifcheck can be used in MOB, OBJECT, or ROOM programs to determine if the target mob is affected by charm.

[Back to Top]

IFCHECK ISAFFECTED

Example: if isaffected($n) detect_invis
mpe Damn! $n* can see me!

If the target char or mob is affected by detect invis, it will return true. (The '*' after the variable forces it into uppercase - see 'help variables'.)

The ISAFFECTED ifcheck can be used in MOB, OBJECT, or ROOM programs to determine if the target char or mob is affected by the specified spell affect. This requires bitvectors, i.e. what a mob can be set as affected by.

Note: For a list of affects, see 'Help AFFECTEDBY'.

[Back to Top]

IFCHECK ISFLYING

Example: if isflying($n)
mpe How's the weather up there, $n?

If the target char or mob is flying, it will return true.

The ISFLYING ifcheck can be used in MOB, OBJECT, or ROOM programs to determine if the target char or mob is flying.

[Back to Top]

IFCHECK ISHUNTING

Example: if ishunting($n)
mpe $n is out to get someone...

If the target char or mob is hunting a char or mob, it will return true.

The ISHUNTING ifcheck can be used in MOB, OBJECT, or ROOM programs to determine if the target char or mob is hunting someone.

[Back to Top]

IFCHECK ISHATING

Example: if ishating($n)
mpe $n is really angry at someone!

If the target char or mob is hating someone, it will return true.

Example: if ishating($n)==guard
mpe $n is really angry at a guard!!

If the target char or mob is hating a guard mob, it will return true.

The ISHATING ifcheck can be used in MOB, OBJECT, or ROOM programs to determine if the target char or mob is hating anyone, or a named victim.

[Back to Top]

IFCHECK ISFIGHT

Example: if isfight($n)
mpe $n is busy fighting!

If the target char or mob is fighting, it will return true.

The ISFIGHT ifcheck can be used in MOB, OBJECT, or ROOM programs to determine if the target char or mob is fighting.

[Back to Top]

IFCHECK NUMFIGHTING

Example: if numfighting($n) > 5
mpe $n is fighting like Xena!

If the target char or mob is fighting more than 5 chars and/or mobs, it will return true.

The NUMFIGHTING ifcheck can be used in MOB, OBJECT, or ROOM programs to determine the number of chars and/or mobs the target char or mob is fighting.

[Back to Top]

IFCHECK TIMESKILLED

Example: if timeskilled($n) > 200
mpe $n has been killed more than 200 times!

If the target char or mob has been killed more than 200 times, it will return true.

The TIMESKILLED ifcheck can be used in MOB, OBJECT, or ROOM programs to determine the number of times the target char or mob has been killed.

[Back to Top]

IFCHECK ISPACIFIST

Example: if ispacifist($n)
mpe $n cannot be attacked.

If the target mob is pacifist, it will return true.

The ISPACIFIST ifcheck can be used in MOB, OBJECT, or ROOM programs to determine if the target mob is flagged as pacifist, and cannot be attacked.

[Back to Top]

IFCHECK ISDEAD

Example: if isdead($n)
mpe $n died before I could finish my prog!

If the target mob or char has died, it will return true.

The ISDEAD ifcheck can be used in MOB, OBJECT, or ROOM programs to determine if the target char or mob is dead before the end of the program.

[Back to Top]

IFCHECK ACTFLAGGED

Example: if actflagged($i)==pet
say Sorry, I'm already a pet, you can't adopt me!

If the mob is flagged 'pet', the ifcheck would return true.

The ACTFLAGGED ifcheck can be used in MOB programs to determine if a mob has the given actflag set.

Note: See 'Help ACTFLAGS' for listing of flags.

[Back to Top]

IFCHECK WEARING

Example: if wearing($n) feet
mpe $n is wearing some kind of footwear.

If the target mob or char is wearing anything on their feet, it will return true. You can also use the syntax "if wearing($n) == feet".

The WEARING ifcheck can be used in MOB, OBJECT, or ROOM programs to determine if the target char or mob is wearing or holding equipment of any kind in the specified position.

Note: Please see 'Help WEARLOCS'.

[Back to Top]

IFCHECK WEARINGVNUM

Example: if wearingvnum($n) 21061
mpe $n wearing vnum 21061?

If the target mob or char is wearing an object with a vnum of 21061, it will return true.

The WEARINGVNUM ifcheck can be used in MOB, OBJECT, ROOM programs to determine if the target char or mob is wearing or holding an object with the specified vnum. Objects in a mob or char's inventory will not be counted.

Note: Do not confuse this ifcheck with OVNUMWEAR, which only works with the mob associated with the program. WEARINGVNUM _will_ check a specified char or mob.

[Back to Top]

IFCHECK CARRYINGVNUM

Example: if carryingvnum($n) 21
mpe Try holding the light instead of carrying it!

If the target has a ball of light in their inventory, they'll be advised to hold it.

The CARRYINGVNUM ifcheck can be used in MOB, OBJECT, or ROOM programs to determine if the victim (either a mob or a char) is holding a particular object in their inventory.

Note: This ifcheck is not affected by the target's invisibility, or cloaking. The prog will still return the correct result even if the target is a 'someone' to them.

[Back to Top]

IFCHECK CANSEE

Example: if cansee($n)
mpe Peek-a-boo, I see $n!

If the mob, object or room can see the target, it will return true.

The CANSEE ifcheck can be used in MOB, OBJECT, or ROOM programs to determine if the target (either a mob or a char) can be seen.

Note: Mobs should be affected by 'truesight' in order to be able to see all invis and hidden chars or mobs regardless of level.

[Back to Top]

IFCHECK ISMOBINVIS

Example: if ismobinvis($i)
mpe $I is mobinvis

If the target mob is mobinvis, it will return true.

The ISMOBINVIS ifcheck can be used in MOB, OBJECT, or ROOM programs to determine if the target mob is flagged as 'mobinvis', meaning the mob is invisible to both pc's and non pc's.

[Back to Top]

IFCHECK MOBINVISLEVEL

Example: if mobinvislevel($i) == 50
mpe $I's invisible to all under lvl 50.

If the target mob mobinvis' level is 50, it will return true.

The MOBINVISLEVEL ifcheck can be used in MOB, OBJECT, or ROOM programs to determine the target mob's level of invisibility.

[Back to Top]

IFCHECK INROOM

Example: if inroom($i) == 1200
mpe Look at all the notes to read!

If the target mob or char is in room 1200, it will return true.

The INROOM ifcheck can be used in MOB, OBJECT or ROOM progs to determine the current room. Use the '$i' variable in all three cases.

[Back to Top]

IFCHECK INAREA

Example: if inarea($i) == baali.are
mpe $I looks around for Ktulu.

If the target mob is in the Baali area, it will return true.

The INAREA ifcheck can be used in MOB, OBJECT, or ROOM programs to determine if the target char or mob is in a specified area.

Note: Use 'zones' to determine the required area filename.

[Back to Top]

IFCHECK MOBINROOM

Example: if mobinroom(21044) > 2
mpe There are two Harakiems in the room!

Determines if there are more than 2 mobs of the given vnum in the room.

Example: if mobinroom(21044)
mpe Harakiem is in the room (and maybe another?)

Determines if there is at least one mob of the given vnum in the room.

The MOBINROOM ifcheck can be used in MOB, OBJECT, or ROOM programs to determine if a mob of a given vnum is present in the room. Even if the checking mob cannot see the target mob due to level, affects, etc, this check will still return TRUE.

Note: The lesser of these commands should be used if at all possible.
ie. MOB/MORTINROOM should be chosen to use before MOB/MORTINAREA, and lastly MOB/MORTINWORLD.

[Back to Top]

IFCHECK MOBINAREA

Example: if mobinarea(21044) > 2
mpe There are two Harakiems in the area!

Determines if there are more than 2 mobs of the given vnum in the area.

Example: if mobinarea(21044)
mpe Harakiem is in the area (and maybe another?)

Determines if there is at least one mob of the given vnum in the area.

The MOBINAREA ifcheck can be used in MOB, OBJECT, or ROOM programs to determine if a mob of a given vnum is present in the area. Even if the checking mob cannot see the target mob due to level, affects, etc, this check will still return TRUE.

Note: The lesser of these commands should be used if at all possible.
ie. MOB/MORTINROOM should be chosen to use before MOB/MORTINAREA, and lastly MOB/MORTINWORLD.

[Back to Top]

IFCHECK MOBINWORLD

Example: if mobinworld(21044) > 2
mpe There are two Harakiems in the world!

Determines if there are more than 2 mobs of the given vnum in the world.

Example: if mobinworld(21044)
mpe Harakiem is in the world (and maybe another?)

Determines if there is at least one mob of the given vnum in the world.

The MOBINWORLD ifcheck can be used in MOB, OBJECT, or ROOM programs to determine if a mob of a given vnum is present in the world. Even if the checking mob cannot see the target mob due to level, affects, etc, this check will still return TRUE.

Note: The lesser of these commands should be used if at all possible.
ie. MOB/MORTINROOM should be chosen to use before MOB/MORTINAREA, and lastly MOB/MORTINWORLD.

[Back to Top]

IFCHECK MORTINROOM

Example: if mortinroom(Ralph)
mpe Ralph is in the room!

If the char 'Ralph' is in the room, it will return true.

The MORTINROOM ifcheck can be used in MOB, OBJECT, or ROOM programs to determine if a specified char is in the room. Even if the checking mob cannot see the target char due to level, affects, etc, this check will still return TRUE. This ifcheck will NOT find immortals.

Note: The lesser of these commands should be used if at all possible.
ie. MOB/MORTINROOM should be chosen to use before MOB/MORTINAREA, and lastly MOB/MORTINWORLD.

[Back to Top]

IFCHECK MORTINAREA

Example: if mortinarea(Ralph)
mpe Ralph is in the area!

If the char 'Ralph' is in the area, it will return true.

The MORTINAREA ifcheck can be used in MOB, OBJECT, or ROOM programs to determine if a specified char is in the area. Even if the checking mob cannot see the target char due to level, affects, etc, this check will still return TRUE. This ifcheck will NOT find immortals.

Note: The lesser of these commands should be used if at all possible.
ie. MOB/MORTINROOM should be chosen to use before MOB/MORTINAREA, and lastly MOB/MORTINWORLD.

[Back to Top]

IFCHECK MORTINWORLD

Example: if mortinworld(Ralph)
mpe Ralph is in the world!

If the char 'Ralph' is in the world, it will return true.

The MORTINWORLD ifcheck can be used in MOB, OBJECT, or ROOM programs to determine if a specified char is in the world. Even if the checking mob cannot see the target char due to level, affects, etc, this check will still return TRUE. This ifcheck will NOT find immortals.

Note: The lesser of these commands should be used if at all possible.
ie. MOB/MORTINROOM should be chosen to use before MOB/MORTINAREA, and lastly MOB/MORTINWORLD.

[Back to Top]

IFCHECK WASINROOM

Example: if wasinroom($n) == 1200
mpe $n was in room 1200 just before they moved to this room.

If the target char or mob was in room 1200 last, it will return true.

The WASINROOM ifcheck can be used in MOB, OBJECT, or ROOM programs to determine the last room the mob or char was in, regardless of the means they used to get into the current room (ie. by walking, being transferred, entering from a portal, using magic such as astral, etc).

Note: This information will not be saved on the char if they quit and relog.

[Back to Top]

IFCHECK MORTCOUNT

Example: if mortcount(21000) > 100
mpe All the morts are partying at DH[]!

If the target room contains more than 100 mortals, it will return true.

Example: if mortcount(0) == 0
mpe There are no mortals here in this room.

If the current room contains no mortals it will return true.

The MORTCOUNT ifcheck can be used in MOB, OBJECT, or ROOM programs to determine if there is a given number of mortals in the specified room. Use 0 (zero) to check the current room.

Note: This ifcheck will NOT include immortals in its count.

[Back to Top]

IFCHECK MOBCOUNT

Example: if mobcount(21000) > 10
mpe Darkhaven Square is filled with mobs!

If the target room contains more than 10 mobs, it will return true.

Example: if mobcount(0) == 0
mpe There are no mobs here in this room.

If the current room contains no mobs it will return true (except, perhaps, the mob checking).

The MOBCOUNT ifcheck can be used in MOB, OBJECT, or ROOM programs to determine if there is a given number of mobs in the specified room. Use 0 (zero) to check the current room.

Note: If this ifcheck is in a MOB prog, it will NOT count itself as being in the room.

[Back to Top]

IFCHECK CHARCOUNT

Example: if charcount(21000) > 10
mpe Darkhaven Square is getting crowded!

If the target room contains more than 10 chars and/or mobs, it will return true.

Example: if charcount(0) == 0
mpe There are no morts or mobs here... maybe an imm?

If the current room contains no chars or mobs it will return true (excluding imms).

The CHARCOUNT ifcheck can be used in MOB, OBJECT, or ROOM programs to determine if there is a given number of chars OR mobs in the specified room. Use 0 (zero) to check the current room.

Note: This ifcheck does NOT include immortals in it's result. Also, if it is in a MOB prog, it will NOT count itself as being in the room.

[Back to Top]

IFCHECK SAFE

Example: if safe($n)
mpe $n is in a room flagged as 'safe'.

If the target char or mob's room is flagged as safe, it will return true.

The SAFE ifcheck can be used in MOB, OBJECT, or ROOM programs to determine the target char or mob's room is flagged as being 'safe'.

Note: Please read 'Help ROOMFLAGS'.

[Back to Top]

IFCHECK NORECALL

Example: if norecall($n)
mpe The room $n is in is flagged 'norecall'

If the target char's room is flagged norecall, it will return true.

The NORECALL ifcheck can be used in MOB, OBJECT, or ROOM programs to determine the target char or mob's room is flagged as being 'norecall'.

Note: Please read 'Help ROOMFLAGS'.

[Back to Top]

IFCHECK NOASTRAL

Example: if noastral($n)
mpe The room $n is in is flagged 'noastral'

If the target char's room is flagged noastral, it will return true.

The NOASTRAL ifcheck can be used in MOB, OBJECT, or ROOM programs to determine the target char or mob's room is flagged as being 'noastral'.

Note: Please read 'Help ROOMFLAGS'.

[Back to Top]

IFCHECK NOSUMMON

Example: if nosummon($n)
mpe The room $n is in is flagged 'nosummon'

If the target char's room is flagged nosummon, it will return true.

The NOSUMMON ifcheck can be used in MOB, OBJECT, or ROOM programs to determine the target char or mob's room is flagged as being 'nosummon'.

Note: Please read 'Help ROOMFLAGS'.

[Back to Top]

IFCHECK NOMAGIC

Example: if nomagic($n)
mpe The room $n is in is flagged 'nomagic'

If the target char's room is flagged nomagic, it will return true.

The NOMAGIC ifcheck can be used in MOB, OBJECT, or ROOM programs to determine the target char or mob's room is flagged as being 'nomagic'.

Note: Please read 'Help ROOMFLAGS'.

[Back to Top]

IFCHECK NOSUPPLICATE

Example: if nosupplicate($n)
mpe The room $n is in is flagged 'nosupplicate', 'nosupprecall', and/or 'nosuppcorpse'.

If the target char's room is flagged nosupplicate, nosupprecall, and/or nosuppcorpse, it will return true.

The NOSUPPLICATE ifcheck can be used in MOB, OBJECT, or ROOM programs to determine the target char or mob's room is flagged as being 'nosupplicate', 'nosupprecall', and/or 'nosuppcorpse'.

Note: Please read 'Help ROOMFLAGS'.

[Back to Top]

IFCHECK INDOORS

Example: if indoors($i)
say I'm indoors!

If the mob ($i) is indoors, the ifcheck will return true.

Example: if indoors($o)
mpe The flower is wilting from lack of sun.

If the obj ($o) is indoors, the ifcheck will return true.

The INDOORS ifcheck can be used in MOB, ROOM, or OBJECT programs to determine if the current room is either of sectortype 0 (indoors) AND/OR is flagged as 'indoors'.

Note: If the program is triggered by a character, the varibles '$n' or '$r' can be used. However, for a rand program, '$i' should be used for MOB programs, and '$o' for OBJ programs.

[Back to Top]

IFCHECK ISPASSAGE

Example: if ispassage($n) == east
mpe There is an exit east of $n.

If the target direction exists, it will return true. A mob or char must be referred to by the variable within the brackets.

The ISPASSAGE ifcheck can be used in MOB, OBJECT, or ROOM programs to determine if a direction exists.

Note: While "north" OR "n" can be used as the given direction to check, you CANNOT use numerical values.

[Back to Top]

IFCHECK ISOPEN

Example: if isopen($n) == north
mpe The exit north of $n is open.

If the target direction is open, it will return true. A mob or char must be referred to by the variable within the brackets.

The ISOPEN ifcheck can be used in MOB, OBJECT, or ROOM programs to determine if a direction exists, and is open.

Note: While "north" OR "n" can be used as the given direction to check, you CANNOT use numerical values.

Also remember that if there is no exit in the given direction, it returns FALSE, or 'not open', not an error.

[Back to Top]

IFCHECK ISLOCKED

Example: if islocked($n) == north
mpe The door north of $n is locked.

If the target direction is locked, it will return true. A mob or char must be referred to by the variable within the brackets.

The ISLOCKED ifcheck can be used in MOB, OBJECT, or ROOM programs to determine if a direction is locked.

Note: While "north" OR "n" can be used as the given direction to check, you CANNOT use numerical values.

Also remember that if there is no exit in the given direction, it returns FALSE, or 'not locked', not an error.

[Back to Top]

IFCHECK OBJVAL0

Example: if objval0($o) == 10
  and objtype($o)==17 (an obj of type 'drink_con')
mpe This drink_con can hold 10 units of fluid in it!

If the target object has value0 of 10, it will return true.

The OBJVAL0 ifcheck can be used in MOB, OBJECT, or ROOM programs to determine the number that object value 0 contains.

Note: Please read 'Help ITEMVALUES'. Also note that the use of "and" within programs is RoD-specific.

[Back to Top]

IFCHECK OBJVAL1

Example: if objval1($o) == 20
  and objtype($o)==9 (an obj of type 'armor')
mpe The original AC of this armor is 20.

If the target object has value1 of 20, it will return true.

The OBJVAL1 ifcheck can be used in MOB, OBJECT, or ROOM programs to determine the number that object value 1 contains.

Note: Please read 'Help ITEMVALUES'. Also note that the use of "and" within programs is RoD-specific.

[Back to Top]

IFCHECK OBJVAL2

Example: if objval2($o) == 12
  and objtype($o)==17 (an obj of type 'drink_con')
mpe This container holds coffee!

If the target object has value2 of 12, it will return true.

The OBJVAL2 ifcheck can be used in MOB, OBJECT, or ROOM programs to determine the number that object value 2 contains.

Note: Please read 'Help ITEMVALUES'. Also note that the use of "and" within programs is RoD-specific.

[Back to Top]

IFCHECK OBJVAL3

Example: if objval3($o) == 12
  and objtype($o)==5 (an obj of type 'weapon')
mpe This is a suction type weapon.

If the target object has value3 of 12, it will return true.

The OBJVAL3 ifcheck can be used in MOB, OBJECT, or ROOM programs to determine the number that object value 3 contains.

Note: Please read 'Help ITEMVALUES'. Also note that the use of "and" within programs is RoD-specific.

[Back to Top]

IFCHECK OBJVAL4

Example: if objval4($o) == 400
  and objtype($o)==26 (an obj of type 'pill')
mpe You won't be eating many of these, with a food value of 400!

If the target object has value4 of 400, it will return true.

The OBJVAL4 ifcheck can be used in MOB, OBJECT, or ROOM programs to determine the number that object value 4 contains.

Note: Please read 'Help ITEMVALUES'. Also note that the use of "and" within programs is RoD-specific.

[Back to Top]

IFCHECK OBJVAL5

Example: if objval5($o) == 229
  and objtype($o)==60 (an obj of type 'salve')
mpe This salve's 2nd spell is poison (sn 229).

If the target object has value5 of 229, it will return true.

The OBJVAL5 ifcheck can be used in MOB, OBJECT, or ROOM programs to determine the number that object value 5 contains.

Note: Please read 'Help ITEMVALUES'. Also note that the use of "and" within programs is RoD-specific.

[Back to Top]

IFCHECK OBJTYPE

Example: if objtype($o) == 19
mpe Yummy, food!

If the target object is of type 'food', it will return true.

The OBJTYPE ifcheck can be used in MOB, OBJECT, or ROOM programs to determine the object type number of the target object.

Note: Please read 'Help OBJECTTYPES'.

[Back to Top]

IFCHECK OBJINWORLD

Example: if objinworld(21) > 2
mpe There should be far more than two balls of light in the world!
Determines if there are more than 2 objects of the given vnum in the world.

Example: if objinworld(21)
mpe At least one ball of light exists!

Determines if there is at least one object of the given vnum in the world.

The OBJINWORLD ifcheck can be used in MOB, ROOM or OBJECT programs to determine if an object of a given vnum is present in the world.

Note: Please read 'Help OBJECTTYPES'.

[Back to Top]

IFCHECK OVNUMHERE

Example: if ovnumhere(21) >= 3

Determines if an 3 or more objects of vnum 21 have been dropped in the room OR are in the inventory OR being worn by the CHECKING MOB.

Example: if ovnumhere(21)

Determines at least 1 object of vnum 21 has been dropped in the room OR is in the inventory OR is being worn by the CHECKING MOB.

The OVNUMHERE ifcheck can be used in MOB progs to determine of an object of the given vnum is on the floor of the room OR in the inventory OR being worn by the CHECKING MOB. If used in a ROOM or OBJECT program, it will ONLY check the FLOOR of the room.

Note: This will NOT check for objects in containers.

[Back to Top]

IFCHECK OVNUMROOM

Example: if ovnumroom(21) >= 3

Determines if an 3 or more objects of vnum 21 have been dropped in the room.

Example: if ovnumroom(21)

Determines at least 1 object of vnum 21 has been dropped in the room.

The OVNUMROOM ifcheck can be used in MOB, OBJECT or ROOM programs to determine of an object of the given vnum is on the floor of the room.

Note: This will NOT check for objects in containers.

[Back to Top]

IFCHECK OVNUMWEAR

Example: if ovnumwear(21) >= 2

Determines if 2 or more objects of vnum 21 are being worn by the CHECKING MOB.

Example: if ovnumwear(21)

Determines if at least 1 object of vnum 21 is being worn by the CHECKING MOB.

The OVNUMWEAR ifcheck can be used in MOB programs only, to determine if an object of the given vnum is being worn by the CHECKING MOB.

Note: This will NOT check for objects in containers.

[Back to Top]

IFCHECK OVNUMCARRY

Example: if ovnumcarry(21) >= 3

Determines if a MOB is wearing and/or carrying 3 or more objects of vnum 21 (a bright ball of light).

Example: if ovnumcarry(21)
mpe $n is wearing some kind of footwear.


Checks to see if a MOB is wearing and/or carrying at least one object of vnum 21.

The OVNUMCARRY ifcheck can be used in MOB progs to determine if a MOB is either wearing and/or carrying in its inventory an object of a given vnum.

Note: This will NOT check for objects in containers.

[Back to Top]

IFCHECK OVNUMINV

Example: if ovnuminv(21) >= 2

Determines if 2 or more objects of vnum 21 are in the inventory of the CHECKING MOB.

Example: if ovnuminv(21)


Determines if at least 1 object of vnum 21 is in the inventory of the CHECKING MOB.

The OVNUMINV ifcheck can be used in MOB programs to determine of an object of the given vnum is in the inventory of the CHECKING MOB.

Note: This will NOT check for objects in containers.

[Back to Top]

IFCHECK OTYPEHERE

Example: if otypehere(light) >= 3

Determines if an 3 or more objects of type light have been dropped in the room or are in the inventory or being worn by the CHECKING MOB.

Example: if otypehere(light)

Determines at least 1 object of type light has been dropped in the room or is in the inventory or being worn by the CHECKING MOB.

The OTYPEHERE ifcheck can be used in MOB programs to determine of an object of the given type is on the floor of the room and/or in the inventory or being worn by the CHECKING MOB. If used in a ROOM or OBJECT program, it will only check the floor of the room.

Note: This will NOT check for objects in containers. Please read 'Help OBJECTTYPES'.

[Back to Top]

IFCHECK OTYPEROOM

Example: if otyperoom(light) >= 3

Determines if an 3 or more objects of type light have been dropped in the room.

Example: if otyperoom(light)

Determines at least 1 object of type light has been dropped in the room.

The OTYPEROOM ifcheck can be used in MOB, OBJECT, or ROOM programs to determine of an object of the given type is on the floor of the room.

Note: This will NOT check for objects in containers. Please read 'Help OBJECTTYPES'.

[Back to Top]

IFCHECK OTYPEWEAR

Example: if otypewear(light) >= 3

Determines if 3 or more objects of type light are being worn by the CHECKING MOB.

Example: if otypewear(light)

Determines if at least 1 object of type light is being worn by the CHECKING MOB.

The OTYPEWEAR ifcheck can be used in MOB programs to determine of an object of the given type is being worn by the CHECKING MOB.

Note: This will NOT check for objects in containers. Please read 'Help OBJECTTYPES'.

[Back to Top]

IFCHECK OTYPECARRY

Example: if otypecarry(light) >= 3

Determines if a mob is wearing and/or carrying 3 or more objects of type 'light'. "if otypecarry(light)" with no number can be used to check for more than 0.

Example: if otypecarry(0)

Determines if a mob is wearing and/or carrying ANY type of object.

The OTYPECARRY ifcheck can be used in a MOB prog to determine if a MOB is wearing and/or carrying in its inventory an object of a given type. "0" (zero) can be used to determine if the mob is wearing and/or carrying ANY object.

Note: This will NOT check for objects in containers. Please read 'Help OBJECTTYPES'.

[Back to Top]

IFCHECK OTYPEINV

Example: if otypeinv(light) >= 3

Determines if 3 or more objects of type light are in the inventory of the CHECKING MOB.

Example: if otypeinv(light)

Determines at least 1 object of type light is in the invetory of the CHECKING MOB.

The OTYPEINV ifcheck can be used in MOB programs to determine of an object of the given type is in the inventory of the CHECKING MOB.

Note: This will NOT check for objects in containers. Please read 'Help OBJECTTYPES'.

[Back to Top]

IFCHECK TIME

Example: if time($n) == 12
mpe It's noon, mudtime!

If the mudtime is 12 noon, it will return true.

Example: if time($n) >= 13
  and time($n) <= 17
mpe It's a lovely afternoon in the realm.

If the mudtime is either 1, 2, 3, 4, or 5pm, it will return true.

The TIME ifcheck can be used in MOB, OBJECT, or ROOM programs to determine the hour of the day in military time (ie. 14 is 2pm and 22 is 10pm, mud time, not real time). You can use the variable $i for room progs.

Note: You can use OR or AND with ifchecks (RoD specific).

[Back to Top]

IFCHECK ECONOMY

Example: if economy(21001) > 10000000
mpe Darkhaven's economy is booming!

If the target room's area's economy is greater than 10,000,000, it will return true.

Example: if economy(0) < 20000
mpe Wow, everyone here is broke...

If the current area's economy is less than twenty thousand, then it will return true.

The ECONOMY ifcheck can be used in MOB, OBJECT, or ROOM programs to determine if the target room's area's economy field is set to a specified amount.

[Back to Top]

IFCHECK RAND

Example: if rand(25)
mpe I will echo this 25% of the time or less.

25% of the time or less, the check will return true.

The RAND ifcheck can be used in MOB, OBJECT, or ROOM programs to return true at a 'random' percent of the time. For example, if you wish for two sets of commands to occur with equal frequency, you would use a program such as:

if rand(50)
  <commands performed 50% of the time>
else
  <commands performed the other 50% of the time>
endif

Note: Please see 'Using Multiple Rand Programs'.

[Back to Top]

IFCHECK LEVERPOS

Example: if leverpos($o) == up
mpe Pssst... your lever's showing.

If the target object's lever is up, it will return true.

The LEVERPOS ifcheck can be used in MOB, OBJECT, or ROOM programs to determine the target object's lever position.

Note: "up" is the ONLY parameter recognized by this ifcheck. Any other parameter will be treated as the equivalent of "down".

[Back to Top]

IFCHECK NUMBER

Example: if number($n)==21044
mpe $n is Harakiem!

If the target mob has a vnum of 21044, it will return true.

Example: if number($o)==21
mpe That object is a ball of light.

If the target object has a vnum of 21, it will return true.

The NUMBER ifcheck can be used in MOB, OBJECT, ROOM programs to determine the vnum of the target mob or object.

[Back to Top]

IFCHECK ISHOT

Example: if ishot(21000)
mpe DH[] is sure hot today!

ISHOT ifcheck checks the weather in the given room and returns TRUE if it is hot. This can be used in mob, obj, and room progs.

Example: if ishot(0)
mpe Sure is hot in this room!

Use a zero room number if you want to have the mob, obj, or room prog test the current room.

[Back to Top]

IFCHECK ISCOLD

Example: if iscold(21000)
mpe DH[] is sure cold today!

ISCOLD ifcheck checks the weather in the given room and returns TRUE if it is cold. This can be used in mob, obj, and room progs.

Example: if iscold(0)
mpe Sure is cold in this room!

Use a zero room number if you want to have the mob, obj, or room prog test the current room.

[Back to Top]

IFCHECK ISWINDY

Example: if iswindy(21000)
mpe Everyone in DH[] is blowing away!

ISWINDY ifcheck checks the weather in the given room and returns TRUE if the wind is very strong. This can be used in mob, obj, and room progs.

Example: if iswindy(0)
mpe I think this room is going to blow away!

Use a zero room number if you want to have the mob, obj, or room prog test the current room.

[Back to Top]

IFCHECK ISSNOWING

Example: if issnowing(21000)
mpe They'll be making snowmen in DH[]...

ISSNOWING ifcheck checks the weather in the given room and returns TRUE if it is snowing. This can be used in mob, obj, and room progs.

Example: if issnowing(0)
mpe Someone find a shovel to get us out of this room!

Use a zero room number if you want to have the mob, obj, or room prog test the current room.

[Back to Top]

IFCHECK ISRAINING

Example: if israining(21000)
mpe DH[] is nothing but umbrellas!

ISRAINING ifcheck checks the weather in the given room and returns TRUE if it is raining. This can be used in mob, obj, and room progs.

Example: if israining(0)
mpe It's raining cats and dogs here!

Use a zero room number if you want to have the mob, obj, or room prog test the current room.

[Back to Top]

IFCHECK ISCALM

Example: if iscalm(21000)
mpe DH[] has barely any wind blowing!

ISCALM ifcheck checks the weather in the given room and returns TRUE if the wind is calm. This can be used in mob, obj, and room progs.

Example: if iscalm(0)
mpe Barely any wind blowing in this room...

Use a zero room number if you want to have the mob, obj, or room prog test the current room.

[Back to Top]

IFCHECK MPSLEEP

Example: if mpsleep($n)
mpe $n is in an mpsleep state

If the target mob's _program_ is in an mpsleep state, it will return true. You can also use '$o' to check for the state of an object's program.

Example: if mpsleep(21000) (or 0 (zero) for current room)
mpe Darkhaven Square is in an mpsleep state.

If the target mob's program is in an mpsleep state, it will return true.

The MPSLEEP ifcheck can be used in MOB, OBJECT, or ROOM programs to determine if one of the target char, object, or room's program is affected by mpsleep.

Note: Please see Help MPSLEEP.

[Back to Top]

IFCHECK STOPSCRIPT

Example: if stopscript($i)
say I can't even run my hourly script.

If the mob is flagged 'stopscript', it will return true.

The STOPSCRIPT ifcheck can be used in MOB, OBJECT, or ROOM programs to determine if the target mob is flagged 'stopscript' and unable to run scripts. This flag can be toggled using the command MPMSET.


Rooms  ] [ Objects ] [ Mobs ] [ Resets ] [ Programs ] [ Resources ] [  FAQ  ]

[Back To My Homepage][Back to Top]
The entire contents of this page is Copyright ©1997-2007 FoxDesigns