Program Ifchecks
| KEY: | |
| MOB | Mob running the program. |
| OBJ | Object running the program. |
| TARGET | Object or Mob indicated by the CHECK VAR. |
| if | CHECK | CHECK VAR | OPERATORS | EVAL | ||
|---|---|---|---|---|---|---|
| if |
align |
( |
$i,$n,$t,$r,$f,$w |
) |
-ANY- |
<-1000 to 1000> |
| |
||||||
| if |
aname |
( |
$i,$n,$t,$r,$f,$w,$o,$p | ) |
== |
<name to check for> |
| |
if |
asupressed |
( |
$i,$n,$t,$r,$f,$w |
) |
-NONE- |
-NONE- |
| Is target suppressed? | ||||||
| if |
canpkill |
( |
$i,$n,$t,$r,$f,$w |
) |
-NONE- |
-NONE- |
| |
||||||
| if |
cansee |
( |
$n,$t,$r,$f,$w |
) |
-NONE- | -NONE- |
| Can MOB see TARGET? | if |
cha |
( |
$i,$n,$t,$r,$f,$w | ) |
-ANY- | <1 to 35> |
| Check TARGET's charisma. | if |
charcount |
( |
<room vnum/blank> | ) |
-ANY- | <a number> |
| How many characters in room? Includes mortals and mobs. if CHECKVAR is blank, checks MOB's room. | if |
clan |
( |
$n,$t,$r,$f,$w | ) |
== |
<clan name> |
| Check TARGET's clan. | if |
clantype |
( |
N/A | ) |
N/A | N/A |
| |
if |
class |
( |
$i,$n,$t,$r,$f,$w | ) |
== |
<class name> |
| Check TARGET's class. Will work with extended NPC classes. | if |
con |
( |
$i,$n,$t,$r,$f,$w | ) |
-ANY- | <1 to 35> |
| Check TARGET's constitution. | ||||||
| if |
council |
( |
$n,$t,$r,$f,$w | ) |
== | <council by name> |
| Checks if TARGET is in a specific council. | ||||||
| if |
deity |
( |
$n,$t,$r,$f,$w | ) |
== |
<deity by name> |
| Checks TARGET's deity. | ||||||
| if |
dex |
( |
$i,$n,$t,$r,$f,$w | ) |
-ANY- |
<1 to 35> |
| Checks TARGET's dexterity. | ||||||
| if |
doingquest |
( |
N/A | ) |
N/A | N/A |
| |
||||||
| if |
favor |
( |
$i,$n,$t,$r,$f,$w | ) |
-ANY- | <-30,000 to 30,000> |
| Checks TARGET's favor. | ||||||
| if |
goldamt |
( |
$i,$n,$t,$r,$f,$w | ) |
-ANY- |
<a positive number> |
| Check's target's amount of gold. | ||||||
| if |
guild |
( |
$i,$n,$t,$r,$f,$w | ) |
== |
<guild by name> |
| Checks if TARGET is in a specific guild. |
||||||
| if |
hitprcnt |
( |
$i,$n,$t,$r,$f,$w | ) |
-ANY- | <1 to 100> |
| Checks if percentage of TARGET's current hps to max hps. | ||||||
| if |
hostdesc |
( |
$n,$t,$r,$f,$w | ) |
-ANY- | <host desc> |
| Checks if TARGET's host is equal to some constant. |
||||||
| if |
hps |
( |
$i,$n,$t,$r,$f,$w | ) |
-ANY- | <-10 to 30,000> |
| Checks amount of hps TARGET has. | ||||||
| if |
inroom |
( |
$i,$n,$t,$r,$f,$w,$o,$p | ) |
-ANY- |
<room vnum> |
| Is TARGET in a particular room? To check a range of rooms, use two successive call to function: if inroom($i) >= 15094 followed by if inroom($i) <= 15100 will return TRUE if mob is in anyroom with vnum between 15094 and 15100. | ||||||
| if |
int |
( |
$i,$n,$t,$r,$f,$w | ) |
-ANY- | <1 to 35> |
| Checks TARGET's intelligence. | ||||||
| if |
isaffected |
( |
$i,$n,$t,$r,$f,$w | ) |
== | <affect by name> |
| Is TARGET affected by this affect? | ||||||
| if |
isattacker |
( |
$n,$t,$r,$f,$w | ) |
-NONE- |
-NONE- |
| Does TARGET have [ATTACKER] flag? | ||||||
| if |
iscarrying |
( |
$i,$n,$t,$r,$f,$w | ) |
== |
<object vnum> |
| Is TARGET carrying a particular item? | ||||||
| if |
ischarmed |
( |
$i,$n,$t,$r,$f,$w | ) |
-NONE- |
-NONE- |
| Is TARGET affected by charm spell? | ||||||
| if |
isclan1 |
( |
$n,$t,$r,$f,$w | ) |
-NONE- |
-NONE- |
| Is TARGET the number 1 of their clan? | ||||||
| if |
isclan2 |
( |
$n,$t,$r,$f,$w | ) |
-NONE- |
-NONE- |
| Is TARGET the number 2 of their clan? | ||||||
| if |
isclanleader |
( |
$n,$t,$r,$f,$w | ) |
-NONE- |
-NONE- |
| Is TARGET the leader of their clan? | ||||||
| if |
isdevoted |
( |
$n,$t,$r,$f,$w | ) |
-NONE- | -NONE- |
| Has TARGET chosen a deity? | ||||||
| if |
isevil |
( |
$i,$n,$t,$r,$f,$w | ) |
-NONE- |
-NONE- |
| Is TARGET's alignment below -350? | ||||||
| if |
isfight |
( |
$i,$n,$t,$r,$f,$w | ) |
-NONE- | -NONE- |
| Is TARGET currently fighting someone? | ||||||
| if |
isflying |
( |
$i,$n,$t,$r,$f,$w | ) |
-NONE- |
-NONE- |
| Is TARGET flying? | ||||||
| if |
isfollow |
( |
$i,$n,$t,$r,$f,$w | ) |
-NONE- | -NONE- |
| Is TARGET following someone in the room? | ||||||
| if |
isgood |
( |
$i,$n,$t,$r,$f,$w | ) |
-NONE- | -NONE- |
| Is TARGET's alignment +350 or greater? | ||||||
| if |
ishelled |
( |
$n,$t,$r,$f,$w | ) |
-NONE- |
-NONE- |
| Is TARGET under sentance in hell? | ||||||
| if |
isimmort |
( |
$n,$t,$r,$f,$w | ) |
-NONE- | -NONE- |
| Is TARGET's level 101+? | ||||||
| if |
iskiller |
( |
$n,$t,$r,$f,$w | ) |
-NONE- | -NONE- |
| Does TARGET have [KILLER] flag? | ||||||
| if |
isleader |
( |
$i,$n,$t,$r,$f,$w | ) |
-NONE- | -NONE- |
| Is TARGET the leader of a group? (A non-grouped TARGET returns FALSE) | ||||||
| if |
islocked |
( |
$i,$n,$t,$r,$f,$w,$o,$p | ) |
== | <direction by name> |
| Is exit in direction specified in TARGET's room locked? If there is no exit that way, it will return FALSE. | ||||||
| if |
ismobinvis |
( |
$i,$n,$t,$f,$w | ) |
-NONE- | -NONE- |
| Is TARGET mobinvis'd? | ||||||
| if |
ismorphed |
( |
$n,$t,$r,$f,$w | ) |
-NONE- | -NONE- |
| Is TARGET morphed into something? | ||||||
| if |
ismounted |
( |
$i,$n,$t,$r,$f,$w | ) |
-NONE- | -NONE- |
| Is TARGET on a mount? | ||||||
| if |
isneutral |
( |
$i,$n,$t,$r,$f,$w | ) |
-NONE- |
-NONE- |
| Is TARGET's alignment between -350 and +350? | ||||||
| if |
isnpc |
( |
$i,$n,$t,$r,$f,$w | ) |
-NONE- | -NONE- |
| Is TARGET a mob? (non-player character) | ||||||
| if |
isopen |
( |
$i,$n,$t,$r,$f,$w,$o,$p | ) |
== | <direction by name> |
| Is exit in direction specified in TARGET's room open? If there is no exit that way, it will return FALSE. | ||||||
| if |
ispacifist |
( |
$i,$n,$t,$f,$w | ) |
-NONE- |
-NONE- |
| Is TARGET a pacifist (will not fight because it has a pacifist flag)? Returns FALSE for PCs. | ||||||
| if |
ispassage |
( |
$i,$n,$t,$r,$f,$w,$o,$p | ) |
== | <direction by name> |
| Is there an exit in direction specified in TARGET's room? | ||||||
| if |
ispc |
( |
$i,$n,$t,$f,$w | ) |
-NONE- | -NONE- |
| Is TARGET a player? (i.e. not a mob) | ||||||
| if |
ispkill |
( |
$n,$t,$r,$f,$w | ) |
-NONE- | -NONE- |
Always returns TRUE in this realm. |
||||||
| if |
isthief |
( |
$i,$n,$t,$r,$f,$w | ) |
-NONE- | -NONE- |
| Does TARGET have [THIEF] flag? | ||||||
| if |
isworn |
( |
$o,$p | ) |
-NONE- | -NONE- |
Is object being worn (includes wielded and held)? |
||||||
| if |
lck |
( |
$i,$n,$t,$r,$f,$w | ) |
-ANY- | <1 to 35> |
| Checks TARGET's luck. | ||||||
| if |
level |
( |
$i,$n,$t,$r,$f,$w,$o,$p | ) |
-ANY- | <1 to 115> |
| Checks TARGET's level. | ||||||
| if |
leverpos |
( |
$o,$p | ) |
==, != | up |
| Is lever/switch/pullchain in the "up" position? If item is not one of those types, will return FALSE. | ||||||
| if |
mana |
( |
$n,$t,$r,$f,$w | ) |
-ANY- | <0 to 30,000> |
| Checks TARGET's mana. | ||||||
| if |
misa |
( |
$i,$n,$t,$r,$f,$w | ) |
== |
<race or class by name> |
| |
||||||
| if |
mobcount |
( |
<room vnun> | ) |
-ANY- | <0 to 30,000> |
| How many mobs are in room? Put "0" to check MOB's current room. | ||||||
| if |
mobinarea |
( |
<mob vnum> | ) |
-ANY- | <0 to 30,000> |
| How many of mob with this vnum are in MOB's current area? | ||||||
| if |
mobinroom |
( |
<mob vnum> |
) |
-ANY- | <0 to 30,000> |
| How many of mob with this vnum are in MOB's current room? | ||||||
| if |
mobinvislevel |
( |
$i,$n,$t,$f,$w | ) |
-ANY- | <2 to 115> |
| Is mob is mobinvis, and if so, at what level? Returns FALSE if mob is not mobinvis at all or if it is not a mob. | ||||||
| if |
mobinworld |
( |
<mob vnum> | ) |
-ANY- | <0 to 30,000> |
| How many of mob with this vnum are in existance? | ||||||
| if |
morph |
( |
$i,$n,$t,$f,$w | ) |
-ANY- | <1 to max_morph> |
| Is this TARGET's morph? |
||||||
| if |
mortcount |
( |
<room vnun> | ) |
-ANY- | <0 to 30,000> |
| How many players are in room? Put "0" to check MOB's current room. | ||||||
| if |
mortinarea |
( |
<name of a mortal> | ) |
-NONE- | -NONE- |
| Is this mortal in the area that MOB is in? |
||||||
| if |
mortinroom |
( |
<name of a mortal> | ) |
-NONE- | -NONE- |
| Is this mortal in the room that MOB is in? |
||||||
| if |
mortinworld |
( |
<name of a mortal> | ) |
-NONE- | -NONE- |
| Is this mortal in the game? |
||||||
| if |
multi |
( |
$n,$t,$r,$f,$w | ) |
-ANY- | <0 to 30,000> |
| How many connections does TARGET have? |
||||||
| if |
name |
( |
$i,$n,$t,$r,$f,$w,$o,$p | ) |
==,!= | <name string> |
| Is TARGET's name string exactly equal to this? | ||||||
| if |
norecall |
( |
$i,$n,$t,$r,$f,$w,$o,$p | ) |
-NONE- | -NONE- |
| Is room that TARGET is in a norecall flagged room? | ||||||
| if |
number |
( |
$i,$n,$t,$f,$w,$o,$p | ) |
-ANY- | <mob vnum> |
| What is the TARGET's vnum? Returns FALSE for mortals and for MOB itself. | ||||||
| if |
numfighting |
( |
$i,$n,$t,$r,$f,$w | ) |
-ANY- | <0 to 30,000> |
| How many foes are fighting TARGET? | ||||||
| if |
objtype |
( |
$o,$p | ) |
-ANY- | <item type> |
What is OBJ's item type? By number or name. |
||||||
| if |
objval0 |
( |
$o,$p | ) |
-ANY- | <0 to 30,000> |
| What is OBJ's value[0]? What this value means depends on item type. | ||||||
| if |
objval1 |
( |
$o,$p | ) |
-ANY- | <0 to 30,000> |
| What is OBJ's value[1]? What this value means depends on item type. | ||||||
| if |
objval2 |
( |
$o,$p | ) |
-ANY- | <0 to 30,000> |
| What is OBJ's value[2]? What this value means depends on item type. | ||||||
| if |
objval3 |
( |
$o,$p | ) |
-ANY- | <0 to 30,000> |
| What is OBJ's value[3]? What this value means depends on item type. | ||||||
| if |
objval4 |
( |
$o,$p | ) |
-ANY- | <0 to 30,000> |
| What is OBJ's value[4]? What this value means depends on item type. | ||||||
| if |
objval5 |
( |
$o,$p | ) |
-ANY- | <0 to 30,000> |
| What is OBJ's value[5]? What this value means depends on item type. | ||||||
| if |
ohasname |
( |
$o,$p | ) |
==,!= | <check name> |
| |
||||||
| if |
oisa |
( |
$o,$p | ) |
== | <check string> |
| |
||||||
| if |
order |
( |
$n,$t,$r,$f,$w | ) |
== | <order by name> |
| Checks if TARGET is in a specific order. |
||||||
| if |
otypecarry |
( |
<item type> | ) |
-ANY- | <0 to 30,000> |
| How many of this item type are being worn by MOB or are in inven of MOB? | ||||||
| if |
otypehere |
( |
<item type> | ) |
-ANY- | <0 to 30,000> |
| How many of this item type are being carried by MOB or laying on ground in room with MOB? | ||||||
| if |
otypeinv |
( |
<item type> | ) |
-ANY- | <0 to 30,000> |
| How many of this item type are in inven of MOB? | ||||||
| if |
otyperoom |
( |
<item type> | ) |
-ANY- | <0 to 30,000> |
| How many of this item type are being carried by MOB? | ||||||
| if |
otypewear |
( |
<item type> | ) |
-ANY- | <0 to 30,000> |
| How many of this item type are being worn by MOB? | ||||||
| if |
ovnumcarry |
( |
<obj vnum> | ) |
-ANY- | <0 to 30,000> |
| How many of the item with this vnum are being worn by MOB or are in inven of MOB? | ||||||
| if |
ovnumhere |
( |
<obj vnum> | ) |
-ANY- | <0 to 30,000> |
| How many of the item with this vnum are being worn by MOB? | ||||||
| if |
ovnuminv |
( |
<obj vnum> | ) |
-ANY- | <0 to 30,000> |
| How many of the item with this vnum are in inven of MOB? | ||||||
| if |
ovnumroom |
( |
<obj vnum> | ) |
-ANY- | <0 to 30,000> |
| How many of the item with this vnum are in room with MOB? | ||||||
| if |
ovnumwear |
( |
<obj vnum> | ) |
-ANY- | <0 to 30,000> |
| How many of the item with this vnum are being worn by MOB? | ||||||
| if |
position |
( |
$i,$n,$t,$r,$f,$w | ) |
-ANY- |
<0 to max_position> |
| What position is TARGET in? (i.e. sleep, stand, etc) | ||||||
| if |
precip |
( |
$i,$n,$t,$r,$f,$w,$o,$p | ) |
-ANY- | <0 to 4> |
| |
||||||
| if |
race |
( |
$i,$n,$t,$r,$f,$w | ) |
-ANY- | <race name> |
| Check race of TARGET. | ||||||
| if |
rand |
( |
<1 to 100> | ) |
N/A | N/A |
| Is random number between 1 and 100 less than or equal to number. | ||||||
| if |
sex |
( |
$i,$n,$t,$r,$f,$w | ) |
-ANY- | <sex> |
| Check sex by number or name. | ||||||
| if |
str |
( |
$i,$n,$t,$r,$f,$w | ) |
-ANY- |
<1 to 35> |
| Checks TARGET's strength. | ||||||
| if |
temp |
( |
$i,$n,$t,$r,$f,$w,$o,$p | ) |
-ANY- | <0 to 4> |
| |
||||||
| if |
time |
( |
$i,$n,$t,$r,$f,$w,$o,$p | ) |
-ANY- |
<0 to 23> |
| Checks time of day using military (24 hr) clock. | ||||||
| if |
timeskilled |
( |
$i,$n,$t,$f,$w | ) |
-ANY- | <0 to 30,000> |
| How many times has TARGET been killed since last reboot? Only applies to NPCs. | ||||||
| if |
waitstate |
( |
$i,$n,$t,$r,$f,$w | ) |
-ANY- | <0 to about 50> |
| How many rounds of wait is TARGET stuck in? | ||||||
| if |
wasinroom |
( |
$i,$n,$t,$r,$f,$w | ) |
-ANY- | <room vnum> |
| Check vnum of last room TARET was in. | ||||||
| if |
weight |
( |
$i,$n,$t,$r,$f,$w | ) |
-ANY- | <0 to 30,000> |
| What is weight of all items TARGET is carrying? | ||||||
| if |
wind |
( |
$i,$n,$t,$r,$f,$w,$o,$p | ) |
-ANY- | <0 to 4> |
| |
||||||
| if |
wis |
( |
$i,$n,$t,$r,$f,$w | ) |
-ANY- | <1 to 35> |
| Checks TARGET's wisdom. | ||||||
Always returns TRUE in this realm.
Is object being worn (includes wielded and held)?