Daleken 1.10 -- This file contains a list of all functions/variables used in MudPrograms. Simple Variables: /---------------+-----------------------------+-----------------------------\ |variable | mobile actor victim random | object 2nd_object | +---------------+-----------------------------+-----------------------------+ | name | $i $n $t $r | $o $p | |shrt_desc/title| $I $N $T $R | $O $P | |he/she/it | $j $e $E $J | -- -- '$'symbol=$$ | |him/her/it | $l $m $M $L | -- -- | |his/hers/its | $k $s $S $K | -- -- | |a/an | -- -- -- -- | $a $A | `^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^' Mathematical Operators: + - plus - - minus * - times / - divided by % - modulo ^ - exclusive OR == - is equal to != - is not equal to > - is greater than < - is less than >= - is greater than or equal to <= - is less than or equal to & - binary AND | - binary OR << - binary left shift >> - binary right shift ! - logical NOT* ~ - binary NOT* * - these operators apply to the number to the right only. Program Types (A - all, M - mob, R - room, O - object, C - container) Type Arg ? Triggered... ----------------------------------------------------------------------------- ACT_PROG string (A) any message going through act() SPEECH_PROG string (A) when the words are said RAND_PROG percentage (A) random occasion GREET_PROG percentage (A) when character enters the room ALL_GREET_PROG percentage (A) "" SUB_PROG percentage (M) by another program/mob TIME_PROG hours (A) on the hours specified REPOP_PROG percentage (M) when the mobile is created LOOK_PROG percentage (A) when the thing is looked at FIGHT_PROG percentage (M) when the mobile is fighting DEATH_PROG percentage (M) just after the mob dies HITPRCNT_PROG percentage (M) when the mob reaches that %age of its hps ENTRY_PROG percentage (M) when the mob walks into a room GIVE_PROG obj name/vnum (M) when given the specified item BRIBE_PROG amount (M) when given the named amount of gold ATTACK_PROG percentage (M) when attacked DELAY_PROG percentage (M) when timed out of an imposed delay WEAR_PROG percentage (O) being put on REMOVE_PROG percentage (O) taken off SAC_PROG percentage (O) before being sacrificed EXAMINE_PROG percentage (C) when looked into USE_PROG percentage (O?) when used, scrolls potions etc... GET_PROG percentage (O) when picked up DROP_PROG percentage (O) when dropped DAMAGE_PROG percentage (O) damaged REPAIR_PROG percentage (O) repaired OPEN_PROG percentage (C) opened CLOSE_PROG percentage (C) closed SLEEP_PROG percentage (R) when someone sleeps REST_PROG percentage (R) when someone rests LEAVE_PROG percentage (R) just before someone leaves ----------------------------------------------------------------------------- Functions: Argument types: character - the name or '$' code referring to a character. pc - a player character npc - a non-player character object - the name or '$' code referring to an object. string - a variable name (the value is substituted) - a quoted string (normal substitution applies) - a string function # Function Args Description ----------------------------------------------------------------------------- exist '$' code true if the char/obj for that code exists rand - a random number 1-100 rand x a random number 1-x rand x,y a random number x-y dice x,y X lots of a Y sided dice added time - The current time mobinarea - number of mobiles in the area mobinroom - number of mobiles in the room playerinarea - number of players in the area playerinroom - number of players in the room timeskilled npc number of times the npc has been killed isexit direction is there is an exit in that dir isclear direction if it's clear to walk in that dir islocked direction if the door is locked findchar string find if the named character can be found findobj string if the named object can be found findobj char,string if the named object can be found on named char ispc char if they are a player isgood, isevil char true/false if good (>350) or evil(<-350) isimmort char sufficient trust (npc means false) ischarmed char affected by charm isflying char has wings/fly affect hitprcnt char returns their hit point percentage inroom char vnum of the room they are in sex char integer value of their sex position char integer value of their position level char easy! waitstate char how long until they can do something again class,race char integer value for their class/race goldamt char how much gold they carry isopen npc if they are an open shop isoutlaw pc if they have stolen/killed etc.. hp,maxhp,move,maxmove char their current or maximum stats mana<sphere>,maxmana<sphere>,magic<sphere> char current/maximum stats in mana and magic str,int,wis,dex,con char current stats in strength etc... getskill char,skill their skill percentage in that skill getsuccess char,skill if they pass the test for the skill isfight char if they are fighting isfight char1,char2 if char1 is fighting char2 cansee char1,char2 if char1 can see char2 isfollow char1,char2 if char1 follows char2 isaffected char,affectname if char is affected by the affect bodypart char,part if char has the named bodypart variable char,varname the integer value of the named variable for ch objtype object the integer value for the object type objval object,num the value specified vnum char/obj the vnum of the char/object isvar varname if the named exists as a variable strcmp str1,str2 if the strings are the same strprefix str1,str2 if the str1 is prefix to str2 strinfix str1,str2 if str1 is contained within str2 strkey str1,str2 if str1 is a keyword for str2 strlen str the length of the string speclookup,slookup,racelookup spec/skill/race the integer value of the named <???> bitvalues using the bit.c tables, the integer value obtained using the mapping named --- String functions: name char/obj the name of the char/obj table table,int the string name taken from a constant table class, race, skill, spec or bitvalue table ----------------------------------------------------------------------------- Commands: (Just a listing, read other documents for details) ----------------------------------------------------------------------------- ASOUND AT BREAK (!) BURROW CAST OPENPASSAGE CLOSEPASSAGE DAMAGE DELAY SET UNSET / DELETE DREAM ECHO ECHOAROUND ECHOAT FORCE QFORCE GOTO JUNK KILL MLOAD OLOAD OSETVAL PEACE PURGE TRANSFER TRIGGER -----------------------------------------------------------------------------