Skip to main content

VARIABLES

Keywords: VARIABLES, MP-VARIABLES, MOB-VARIABLES, SUBSTITUTIONS
To make things came alive, variables are needed. These are respresented in mobile programs by using a dollar sign convention, when the mud command is processed, those variables are expanded into the values shown below. ----------------------------------------------------------------------- VARIABLES $i....the first of the name of the mobile itself $I....the short description of the mobile itself $n....the name of whomever caused the trigger to happen $N....the short description of whomever caused the trigger to happen $t....the name of the secondary character target (i.e. A smiles at B) $T....the short description, or name and title of the target (NPC vs PC) $r....the name of a random PC in the room with the mobile $R....the short description, or name and title of the random PC $q....the name of the mobile program target (MOB REMEMBER) $Q....the short description of the mobile program target $j....he, she, it based on the sex of $i $J....he, she, it based on the sex of $r $e....he, she, it based on the sex of $n $E....he, she, it based on the sex of $t $k....him, her, it based on the sex of $i $K....him, her, it based on the sex of $r $m....him, her, it based on the sex of $n $M....him, her, it based on the sex of $t $l....his, her, its based on the sex of $i $L....his, her, its based on the sex of $r $s....his, her, its based on the sex of $n $S....his, her, its based on the sex of $t $Z....his, her, its based on the sex of $q $o....the first of the names of the primary object (i.e. A drops B) $O....the short description of the primary object $p....the first of the names of the secondary object (i.e A puts B in C) $P....the short description of the secondary object $V....the vnum of the room the mob is moving to with a premove trigger ------------------------------------------------------------------------- In If_checks the accepted variable are the basics ones (i,n,t,r,o,p,q). If the variable is referenced that doesn't exist, then the value is simply left blank or replaced with 'someone' or 'something' in output. If the variable $q has not been defined, it is automatically set to the last player that has triggered the program being executed ($n). Once $q has been defined, it can be modified with MOB REMEMBER and MOB FORGET commands in a program. Note that $q is set automatically only the first time the mobile executes a program, every time thereafter it must be set with MOB REMEMBER.