Difference between revisions of "Manual:DIL Manual (Full Listing)"

From DikuMUD Wiki
Jump to navigation Jump to search
m
(manual index generated from the checked keyword pages)
 
Line 1: Line 1:
−
{{Manual:DIL_Manual/Making a Program}}
+
Every page of the DIL manual on one page, by kind; each line gives what the keyword does in a sentence. The chapters that explain the language as a whole are listed on the [[Manual:DIL Manual|front page]]. For the built-in functions, procedures and variables with their arguments, see [[Manual:DIL Manual/Built-In Functions|Built-In Functions]], [[Manual:DIL Manual/Built-In Procedures|Built-In Procedures]] and [[Manual:DIL Manual/Built-In Variables|Built-In Variables]]; for fields in tables by unit type, [[Manual:DIL Manual/Fields|Fields]].
−
{{Manual:DIL_Manual/Data Types}}
 
−
{{Manual:DIL_Manual/string}}
 
−
{{Manual:DIL_Manual/stringlist}}
 
−
{{Manual:DIL_Manual/integer}}
 
−
{{Manual:DIL_Manual/integerlist}}
 
−
{{Manual:DIL_Manual/extraptr}}
 
−
{{Manual:DIL_Manual/cmdptr}}
 
−
{{Manual:DIL_Manual/unitptr}}
 
−
{{Manual:DIL_Manual/zoneptr}}
 
−
{{Manual:DIL_Manual/Messages}}
 
−
{{Manual:DIL_Manual/SFB_CMD}}
 
−
{{Manual:DIL_Manual/SFB_DONE}}
 
−
{{Manual:DIL_Manual/SFB_TICK}}
 
−
{{Manual:DIL_Manual/SFB_COM}}
 
−
{{Manual:DIL_Manual/SFB_DEAD}}
 
−
{{Manual:DIL_Manual/SFB_MSG}}
 
−
{{Manual:DIL_Manual/SFB_PRE}}
 
−
{{Manual:DIL_Manual/Built-In Variables}}
 
−
{{Manual:DIL_Manual/cmdstr}}
 
−
{{Manual:DIL_Manual/excmdstr}}
 
−
{{Manual:DIL_Manual/excmdstr_case}}
 
−
{{Manual:DIL_Manual/self}}
 
−
{{Manual:DIL_Manual/activator}}
 
−
{{Manual:DIL_Manual/target}}
 
−
{{Manual:DIL_Manual/medium}}
 
−
{{Manual:DIL_Manual/power}}
 
−
{{Manual:DIL_Manual/argument}}
 
−
{{Manual:DIL_Manual/heartbeat}}
 
−
{{Manual:DIL_Manual/null}}
 
−
{{Manual:DIL_Manual/weather}}
 
−
{{Manual:DIL_Manual/realtime}}
 
−
{{Manual:DIL_Manual/mud(day,month,..)}}
 
−
{{Manual:DIL_Manual/DIL Constructs}}
 
−
{{Manual:DIL_Manual/if()}}
 
−
{{Manual:DIL_Manual/goto}}
 
−
{{Manual:DIL_Manual/while()}}
 
−
{{Manual:DIL_Manual/break}}
 
−
{{Manual:DIL_Manual/continue}}
 
−
{{Manual:DIL_Manual/on ... goto ...}}
 
−
{{Manual:DIL_Manual/foreach()}}
 
−
{{Manual:DIL_Manual/Assignment}}
 
−
{{Manual:DIL_Manual/Expressions}}
 
−
{{Manual:DIL_Manual/Operators}}
 
−
{{Manual:DIL_Manual/in}}
 
−
{{Manual:DIL_Manual/string in string}}
 
−
{{Manual:DIL_Manual/string in stringlist}}
 
−
{{Manual:DIL_Manual/string in extraptr}}
 
−
{{Manual:DIL_Manual/Functions}}
 
−
{{Manual:DIL_Manual/quit}}
 
−
{{Manual:DIL_Manual/return}}
 
−
{{Manual:DIL_Manual/return()}}
 
−
{{Manual:DIL_Manual/Fields}}
 
−
{{Manual:DIL_Manual/extraptr}}
 
−
{{Manual:DIL_Manual/unitptr}}
 
−
{{Manual:DIL_Manual/UNIT_ST_OBJ}}
 
−
{{Manual:DIL_Manual/UNIT_ST_ROOM}}
 
−
{{Manual:DIL_Manual/UNIT_ST_PC and UNIT_ST_NPC}}
 
−
{{Manual:DIL_Manual/UNIT_ST_NPC}}
 
−
{{Manual:DIL_Manual/UNIT_ST_PC}}
 
−
{{Manual:DIL_Manual/Built-In Functions}}
 
−
{{Manual:DIL_Manual/asctime()}}
 
−
{{Manual:DIL_Manual/strcmp()}}
 
−
{{Manual:DIL_Manual/strncmp()}}
 
−
{{Manual:DIL_Manual/textformat()}}
 
−
{{Manual:DIL_Manual/spellindex()}}
 
−
{{Manual:DIL_Manual/spellinfo()}}
 
−
{{Manual:DIL_Manual/beginedit()}}
 
−
{{Manual:DIL_Manual/cancarry()}}
 
−
{{Manual:DIL_Manual/fits()}}
 
−
{{Manual:DIL_Manual/replace()}}
 
−
{{Manual:DIL_Manual/restore()}}
 
−
{{Manual:DIL_Manual/meleeattack()}}
 
−
{{Manual:DIL_Manual/meleedamage()}}
 
−
{{Manual:DIL_Manual/mid()}}
 
−
{{Manual:DIL_Manual/moneystring()}}
 
−
{{Manual:DIL_Manual/equipment()}}
 
−
{{Manual:DIL_Manual/tolower()}}
 
−
{{Manual:DIL_Manual/toupper()}}
 
−
{{Manual:DIL_Manual/visible()}}
 
−
{{Manual:DIL_Manual/opponent()}}
 
−
{{Manual:DIL_Manual/purse()}}
 
−
{{Manual:DIL_Manual/atoi()}}
 
−
{{Manual:DIL_Manual/check_password()}}
 
−
{{Manual:DIL_Manual/command()}}
 
−
{{Manual:DIL_Manual/delstr()}}
 
−
{{Manual:DIL_Manual/delunit()}}
 
−
{{Manual:DIL_Manual/dildestroy()}}
 
−
{{Manual:DIL_Manual/dilfind()}}
 
−
{{Manual:DIL_Manual/itoa()}}
 
−
{{Manual:DIL_Manual/isaff()}}
 
−
{{Manual:DIL_Manual/islight()}}
 
−
{{Manual:DIL_Manual/isplayer()}}
 
−
{{Manual:DIL_Manual/isset()}}
 
−
{{Manual:DIL_Manual/paycheck()}}
 
−
{{Manual:DIL_Manual/findunit()}}
 
−
{{Manual:DIL_Manual/findrndunit()}}
 
−
{{Manual:DIL_Manual/filesize()}}
 
−
{{Manual:DIL_Manual/findroom()}}
 
−
{{Manual:DIL_Manual/findsymbolic()}}
 
−
{{Manual:DIL_Manual/getword()}}
 
−
{{Manual:DIL_Manual/getwords()}}
 
−
{{Manual:DIL_Manual/ghead()}}
 
−
{{Manual:DIL_Manual/split()}}
 
−
{{Manual:DIL_Manual/left()}}
 
−
{{Manual:DIL_Manual/length()}}
 
−
{{Manual:DIL_Manual/load()}}
 
−
{{Manual:DIL_Manual/loadstr()}}
 
−
{{Manual:DIL_Manual/openroll()}}
 
−
{{Manual:DIL_Manual/pathto()}}
 
−
{{Manual:DIL_Manual/pagestring()}}
 
−
{{Manual:DIL_Manual/right()}}
 
−
{{Manual:DIL_Manual/rnd()}}
 
−
{{Manual:DIL_Manual/Built-In Procedures}}
 
−
{{Manual:DIL_Manual/follow()}}
 
−
{{Manual:DIL_Manual/flog()}}
 
−
{{Manual:DIL_Manual/logcrime()}}
 
−
{{Manual:DIL_Manual/acc_modify()}}
 
−
{{Manual:DIL_Manual/strdir()}}
 
−
{{Manual:DIL_Manual/set_password()}}
 
−
{{Manual:DIL_Manual/store()}}
 
−
{{Manual:DIL_Manual/position_update()}}
 
−
{{Manual:DIL_Manual/send_done()}}
 
−
{{Manual:DIL_Manual/send_pre()}}
 
−
{{Manual:DIL_Manual/set()}}
 
−
{{Manual:DIL_Manual/unset()}}
 
−
{{Manual:DIL_Manual/addcolor()}}
 
−
{{Manual:DIL_Manual/delcolor()}}
 
−
{{Manual:DIL_Manual/getcolor()}}
 
−
{{Manual:DIL_Manual/changecolor()}}
 
−
{{Manual:DIL_Manual/gamestate()}}
 
−
{{Manual:DIL_Manual/addextra()}}
 
−
{{Manual:DIL_Manual/addstring()}}
 
−
{{Manual:DIL_Manual/subextra()}}
 
−
{{Manual:DIL_Manual/substring()}}
 
−
{{Manual:DIL_Manual/stop_fighting()}}
 
−
{{Manual:DIL_Manual/subaff()}}
 
−
{{Manual:DIL_Manual/addaff()}}
 
−
{{Manual:DIL_Manual/destroy()}}
 
−
{{Manual:DIL_Manual/walkto()}}
 
−
{{Manual:DIL_Manual/link()}}
 
−
{{Manual:DIL_Manual/weapon_name()}}
 
−
{{Manual:DIL_Manual/weapon_info()}}
 
−
{{Manual:DIL_Manual/skill_name()}}
 
−
{{Manual:DIL_Manual/reboot}}
 
−
{{Manual:DIL_Manual/killedit}}
 
−
{{Manual:DIL_Manual/experience()}}
 
−
{{Manual:DIL_Manual/act()}}
 
−
{{Manual:DIL_Manual/exec()}}
 
−
{{Manual:DIL_Manual/wait()}}
 
−
{{Manual:DIL_Manual/savestr()}}
 
−
{{Manual:DIL_Manual/remove()}}
 
−
{{Manual:DIL_Manual/reset_level()}}
 
−
{{Manual:DIL_Manual/reset_vlevel()}}
 
−
{{Manual:DIL_Manual/reset_race()}}
 
−
{{Manual:DIL_Manual/secure()}}
 
−
{{Manual:DIL_Manual/unitdir()}}
 
−
{{Manual:DIL_Manual/unsecure()}}
 
−
{{Manual:DIL_Manual/block}}
 
−
{{Manual:DIL_Manual/priority}}
 
−
{{Manual:DIL_Manual/nopriority}}
 
−
{{Manual:DIL_Manual/addequip()}}
 
−
{{Manual:DIL_Manual/unequip()}}
 
−
{{Manual:DIL_Manual/delete_player()}}
 
−
{{Manual:DIL_Manual/dilcopy()}}
 
−
{{Manual:DIL_Manual/sendtext()}}
 
−
{{Manual:DIL_Manual/change_speed()}}
 
−
{{Manual:DIL_Manual/transfermoney()}}
 
−
{{Manual:DIL_Manual/set_fighting()}}
 
−
{{Manual:DIL_Manual/setweight()}}
 
−
{{Manual:DIL_Manual/setbright()}}
 
−
{{Manual:DIL_Manual/log()}}
 
−
{{Manual:DIL_Manual/send()}}
 
−
{{Manual:DIL_Manual/sendto()}}
 
−
{{Manual:DIL_Manual/sendtoall()}}
 
−
{{Manual:DIL_Manual/sendtoalldil()}}
 
−
{{Manual:DIL_Manual/cast_spell()}}
 
−
{{Manual:DIL_Manual/attack_spell()}}
 
−
{{Manual:DIL_Manual/insert()}}
 
−
{{Manual:DIL_Manual/interrupt()}}
 
−
{{Manual:DIL_Manual/clear()}}
 
−
{{Manual:DIL_Manual/on_activation()}}
 
−
{{Manual:DIL_Manual/Ending Notes}}
 
  
−
[[Category:Exclude from Github]]
+
__TOC__
 +
 
 +
== Program structure ==
 +
The parts of a template. See [[Manual:DIL Manual/Making a Program|Making a Program]].
 +
* [[Manual:DIL Manual/dilbegin|dilbegin]] – Starts a DIL program, called a template.
 +
* [[Manual:DIL Manual/var|var]] – Starts the variable declarations of a template.
 +
* [[Manual:DIL Manual/code|code]] – Starts the statements of a template.
 +
* [[Manual:DIL Manual/external|external]] – Declares the other templates a template calls.
 +
* [[Manual:DIL Manual/dilend|dilend]] – Ends a template.
 +
* [[Manual:DIL Manual/recall|recall]] – Option of <code>dilbegin</code>: a saved program goes on where it stopped.
 +
* [[Manual:DIL Manual/aware|aware]] – Option of <code>dilbegin</code>: the program also hears what its own unit does.
 +
* [[Manual:DIL Manual/unique|unique]] – Option of <code>dilbegin</code>: a unit has at most one copy of the program.
 +
* [[Manual:DIL Manual/fnpri|fnpri]] – Option of <code>dilbegin</code>: where the program goes in its unit's list of programs.
 +
* [[Manual:DIL Manual/global|global]] – Makes a variable shared by every program that names the same key.
 +
 
 +
== Types ==
 +
See [[Manual:DIL Manual/Data Types|Data Types]].
 +
* [[Manual:DIL Manual/integer|integer]] – A whole number, signed, 32 bits.
 +
* [[Manual:DIL Manual/string|string]] – A piece of text.
 +
* [[Manual:DIL Manual/stringlist|stringlist]] – An ordered list of strings.
 +
* [[Manual:DIL Manual/intlist|intlist]] – An ordered list of integers.
 +
* [[Manual:DIL Manual/unitptr|unitptr]] – A pointer to a unit: a room, an object, an NPC or a player.
 +
* [[Manual:DIL Manual/extraptr|extraptr]] – A pointer to an extra description.
 +
* [[Manual:DIL Manual/zoneptr|zoneptr]] – A pointer to a zone.
 +
* [[Manual:DIL Manual/cmdptr|cmdptr]] – A pointer to one of the game's commands.
 +
* [[Manual:DIL Manual/null|null]] – The empty value: no unit, no extra, no zone, no command, no string, an empty list.
 +
 
 +
== Built-in variables ==
 +
See [[Manual:DIL Manual/Built-In Variables|Built-In Variables]].
 +
* [[Manual:DIL Manual/self|self]] – The unit the program runs on.
 +
* [[Manual:DIL Manual/activator|activator]] – The unit that caused the event that woke the program.
 +
* [[Manual:DIL Manual/medium|medium]] – The unit used in the event that woke the program, when the event has one; otherwise null.
 +
* [[Manual:DIL Manual/target|target]] – The unit an action in the event was aimed at, when the event has one; otherwise null.
 +
* [[Manual:DIL Manual/power|power]] – A number that comes with SFB_PRE and SFB_DONE events.
 +
* [[Manual:DIL Manual/argument|argument]] – The text that came with the event that woke the program.
 +
* [[Manual:DIL Manual/cmdstr|cmdstr]] – The full name of the command in the event that woke the program, as commands.def names it, even when the player typed an abbreviation.
 +
* [[Manual:DIL Manual/excmdstr|excmdstr]] – The first word of the line the player typed, in lower case, not expanded.
 +
* [[Manual:DIL Manual/excmdstr case|excmdstr_case]] – The first word of the line the player typed, exactly as typed: <code>Mellon</code> stays <code>"Mellon"</code>.
 +
* [[Manual:DIL Manual/heartbeat|heartbeat]] – How often the program's tick comes, in quarter seconds: <code>PULSE_SEC</code> (4, vme.h) is one second.
 +
* [[Manual:DIL Manual/realtime|realtime]] – The real time, in seconds since 1 January 1970 UTC: what <code>time(NULL)</code> gives in C.
 +
* [[Manual:DIL Manual/mud(day,month,..)|mudhour, mudday, mudmonth, mudyear]] – The game's clock and calendar.
 +
* [[Manual:DIL Manual/mudhour|mudhour]] – The hour of the mud day, 0 to 23: 0 is midnight, 12 noon.
 +
* [[Manual:DIL Manual/mudday|mudday]] – The day of the mud month, 0 to 13.
 +
* [[Manual:DIL Manual/mudmonth|mudmonth]] – The month of the mud year, 0 to 8.
 +
* [[Manual:DIL Manual/mudyear|mudyear]] – The mud year: the number of mud years since 11 August 1990, about 1261 in November 2026.
 +
* [[Manual:DIL Manual/weather|weather]] – The sky over the zone the program's unit is in.
 +
 
 +
== Control flow ==
 +
See [[Manual:DIL Manual/DIL Constructs|DIL Constructs]].
 +
* [[Manual:DIL Manual/if()|if()]] – Runs a statement only when a condition holds, with an optional <code>else</code>.
 +
* [[Manual:DIL Manual/else()|else()]] – The second branch of an <code>if</code>.
 +
* [[Manual:DIL Manual/while()|while()]] – Repeats a statement as long as a condition is true.
 +
* [[Manual:DIL Manual/foreach()|foreach()]] – Runs a statement once for each unit of some types around the program's unit.
 +
* [[Manual:DIL Manual/break|break]] – Leaves the loop it is in.
 +
* [[Manual:DIL Manual/continue|continue]] – Skips the rest of the loop's statement and starts its next round.
 +
* [[Manual:DIL Manual/goto|goto]] – Jumps to a label.
 +
* [[Manual:DIL Manual/on()|on()]] – Jumps to one of several labels, picked by a number.
 +
* [[Manual:DIL Manual/skip|skip]] – Takes the place of a label in an interrupt or an <code>on ... goto</code>, and means "don't jump".
 +
* [[Manual:DIL Manual/return()|return()]] – Leaves a procedure, or a function with its value.
 +
* [[Manual:DIL Manual/return|return]] – Ends the template that is running and goes back to the one that called it, which carries on after the call.
 +
* [[Manual:DIL Manual/waitnoop|waitnoop]] – Steps out of the current event for a moment.
 +
 
 +
== Functions ==
 +
Return a value. By purpose, with arguments: [[Manual:DIL Manual/Built-In Functions|Built-In Functions]].
 +
* [[Manual:DIL Manual/addcolor()|addcolor()]] – Gives a player their own colour for a colour name.
 +
* [[Manual:DIL Manual/asctime()|asctime()]] – Writes a time in seconds as a date, such as "Mon Nov 18 18:49:08 1996".
 +
* [[Manual:DIL Manual/atoi()|atoi()]] – The number written at the start of a string.
 +
* [[Manual:DIL Manual/attack spell()|attack_spell()]] – Hits a target with an offensive spell and returns the damage.
 +
* [[Manual:DIL Manual/can carry()|can_carry()]] – Tells whether a character can carry more of something, and if not, why.
 +
* [[Manual:DIL Manual/cast spell()|cast_spell()]] – Casts a spell without mana or the caster's own casting.
 +
* [[Manual:DIL Manual/changecolor()|changecolor()]] – Changes one of a player's own colours.
 +
* [[Manual:DIL Manual/chead()|chead()]] – The first command in the game's command table.
 +
* [[Manual:DIL Manual/check password()|check_password()]] – Tells whether a password is a player's password.
 +
* [[Manual:DIL Manual/clone()|clone()]] – Makes a copy of an existing NPC or object.
 +
* [[Manual:DIL Manual/command head()|command_head()]] – Another name for <code>chead()</code>: the first command in the game's command table.
 +
* [[Manual:DIL Manual/command()|command()]] – Tells whether the event that woke the program is a given command.
 +
* [[Manual:DIL Manual/delcolor()|delcolor()]] – Removes one of a player's own colours.
 +
* [[Manual:DIL Manual/delstr()|delstr()]] – Deletes a string file.
 +
* [[Manual:DIL Manual/delunit()|delunit()]] – Deletes a unit file.
 +
* [[Manual:DIL Manual/dilcall()|dilcall()]] – Calls a DIL function whose name is only known when the program runs.
 +
* [[Manual:DIL Manual/dildestroy()|dildestroy()]] – Stops a DIL program on a unit and removes it.
 +
* [[Manual:DIL Manual/dilfind()|dilfind()]] – Tells whether a unit runs a DIL program from a given template.
 +
* [[Manual:DIL Manual/equipment()|equipment()]] – The object a character wears or wields in a given position.
 +
* [[Manual:DIL Manual/findrndunit()|findrndunit()]] – Picks a random unit of the wanted kinds in one place.
 +
* [[Manual:DIL Manual/findroom()|findroom()]] – Finds a room by its symbolic name.
 +
* [[Manual:DIL Manual/findsymbolic()|findsymbolic()]] – Finds a unit by its symbolic name, the <code>name@zone</code> it was defined with.
 +
* [[Manual:DIL Manual/findunit()|findunit()]] – Finds a unit by name, the way commands find what a player names.
 +
* [[Manual:DIL Manual/findzone()|findzone()]] – Finds a zone by its name.
 +
* [[Manual:DIL Manual/fits()|fits()]] – Tells whether an object is the right size for a character.
 +
* [[Manual:DIL Manual/flog()|flog()]] – Writes a string to a file of its own in the server's log directory.
 +
* [[Manual:DIL Manual/getaffects()|getaffects()]] – Lists the affects on a unit, one string of numbers each.
 +
* [[Manual:DIL Manual/getcmd()|getcmd()]] – Finds a command from its name or an abbreviation.
 +
* [[Manual:DIL Manual/getcolor()|getcolor()]] – Returns the HTML tag that starts text in a named colour.
 +
* [[Manual:DIL Manual/getfollower()|getfollower()]] – Gets one of a character's followers by its place in the list.
 +
* [[Manual:DIL Manual/getinteger()|getinteger()]] – Gets one of several numbers that the server computes, chosen by an index.
 +
* [[Manual:DIL Manual/getopponent()|getopponent()]] – Gets one of a character's opponents by its place in the list.
 +
* [[Manual:DIL Manual/getword()|getword()]] – Takes the first word off a string.
 +
* [[Manual:DIL Manual/getwords()|getwords()]] – Splits a string into its words.
 +
* [[Manual:DIL Manual/ghead()|ghead()]] – The first unit in the game's global unit list.
 +
* [[Manual:DIL Manual/global head()|global_head()]] – Another name for <code>ghead()</code>: the first unit in the game's global unit list.
 +
* [[Manual:DIL Manual/interrupt()|interrupt()]] – Sets up a jump to a label when a certain event wakes the program, whatever it is waiting for.
 +
* [[Manual:DIL Manual/isaff()|isaff()]] – Tells whether a unit carries an affect with a given id.
 +
* [[Manual:DIL Manual/islight()|islight()]] – Tells whether there is light in a room.
 +
* [[Manual:DIL Manual/isplayer()|isplayer()]] – Tells whether a player character of that name exists.
 +
* [[Manual:DIL Manual/isset()|isset()]] – Tells whether any of some bits are set in an integer.
 +
* [[Manual:DIL Manual/itoa()|itoa()]] – An integer written as text.
 +
* [[Manual:DIL Manual/left()|left()]] – Returns the first characters of a string.
 +
* [[Manual:DIL Manual/length()|length()]] – The length of a string, or the number of entries in a list.
 +
* [[Manual:DIL Manual/load()|load()]] – Makes a new NPC or object from its zone definition.
 +
* [[Manual:DIL Manual/loadstr()|loadstr()]] – Reads a whole file into a string variable.
 +
* [[Manual:DIL Manual/meleeattack()|meleeattack()]] – Makes a character attack another once in melee, starting a fight.
 +
* [[Manual:DIL Manual/meleedamage()|meleedamage()]] – Makes a character strike another once, without first putting it into combat.
 +
* [[Manual:DIL Manual/mid()|mid()]] – Returns the characters from one position to another.
 +
* [[Manual:DIL Manual/moneystring()|moneystring()]] – Writes an amount of money out in coins.
 +
* [[Manual:DIL Manual/npc head()|npc_head()]] – The first NPC in the game's global unit list.
 +
* [[Manual:DIL Manual/obj head()|obj_head()]] – The first object in the game's global unit list.
 +
* [[Manual:DIL Manual/on activation()|on_activation()]] – Sets a check that runs every time the program is woken, by any event, before the event reaches the program's <code>wait()</code> or <code>pause</code>.
 +
* [[Manual:DIL Manual/openroll()|openroll()]] – Rolls an open-ended die: high rolls add another roll, low rolls subtract one.
 +
* [[Manual:DIL Manual/opponent()|opponent()]] – Tells whether two characters are fighting each other.
 +
* [[Manual:DIL Manual/pathto()|pathto()]] – Gives the first step of the shortest way from one unit's room to another's.
 +
* [[Manual:DIL Manual/paycheck()|paycheck()]] – Tells whether a player's account allows them into the zone of a unit.
 +
* [[Manual:DIL Manual/pc head()|pc_head()]] – The first player in the game's global unit list.
 +
* [[Manual:DIL Manual/purse()|purse()]] – Counts the coins of one kind that a unit carries.
 +
* [[Manual:DIL Manual/replace()|replace()]] – Replaces every occurrence of one text in a string with another.
 +
* [[Manual:DIL Manual/restore()|restore()]] – Loads units saved with store() back into the game.
 +
* [[Manual:DIL Manual/right()|right()]] – Returns the last characters of a string.
 +
* [[Manual:DIL Manual/rnd()|rnd()]] – A random whole number in a range.
 +
* [[Manual:DIL Manual/room head()|room_head()]] – The first room in the game's global unit list.
 +
* [[Manual:DIL Manual/sact()|sact()]] – Gives the text an act() would show, instead of sending it.
 +
* [[Manual:DIL Manual/savestr()|savestr()]] – Writes a string to a file, to read back later with loadstr().
 +
* [[Manual:DIL Manual/send pre()|send_pre()]] – Asks the programs around a character whether a command may go ahead.
 +
* [[Manual:DIL Manual/shell()|shell()]] – Starts a program from the server's <code>allow</code> directory.
 +
* [[Manual:DIL Manual/skill name()|skill_name()]] – Gives the name of a skill from its number.
 +
* [[Manual:DIL Manual/spellindex()|spellindex()]] – Finds a spell's number from its name or an abbreviation of it.
 +
* [[Manual:DIL Manual/spellinfo()|spellinfo()]] – Returns a spell's name and puts its properties in seven integer variables.
 +
* [[Manual:DIL Manual/split()|split()]] – Cuts a string into pieces at a separator.
 +
* [[Manual:DIL Manual/strcmp()|strcmp()]] – Compares two strings, minding upper and lower case.
 +
* [[Manual:DIL Manual/strdir()|strdir()]] – Lists the string files that DIL has saved, by a pattern.
 +
* [[Manual:DIL Manual/strncmp()|strncmp()]] – Compares the first characters of two strings, minding upper and lower case.
 +
* [[Manual:DIL Manual/textformat()|textformat()]] – Turns the escapes <code>\n</code> and <code>\r</code> in a text into real line breaks.
 +
* [[Manual:DIL Manual/tolower()|tolower()]] – Returns a string in lower case.
 +
* [[Manual:DIL Manual/toupper()|toupper()]] – Returns a string in upper case.
 +
* [[Manual:DIL Manual/transfermoney()|transfermoney()]] – Moves money from one character to another, or creates or destroys it.
 +
* [[Manual:DIL Manual/unitdir()|unitdir()]] – Lists the unit files that DIL has stored, by a pattern.
 +
* [[Manual:DIL Manual/visible()|visible()]] – Tells whether a character can see a unit.
 +
* [[Manual:DIL Manual/weapon info()|weapon_info()]] – The figures etc/weapons.def gives a weapon type.
 +
* [[Manual:DIL Manual/weapon name()|weapon_name()]] – Gives the name of a weapon type from its number.
 +
* [[Manual:DIL Manual/zhead()|zhead()]] – The first zone in the game.
 +
* [[Manual:DIL Manual/zone head()|zone_head()]] – Another name for <code>zhead()</code>: the first zone in the game.
 +
 
 +
== Procedures ==
 +
Return nothing. By purpose, with arguments: [[Manual:DIL Manual/Built-In Procedures|Built-In Procedures]].
 +
* [[Manual:DIL Manual/acc modify()|acc_modify()]] – Pays money into a player's account or takes it out.
 +
* [[Manual:DIL Manual/act()|act()]] – Shows a message to the characters around someone, worded for each of them.
 +
* [[Manual:DIL Manual/addaff()|addaff()]] – Adds an affect to a unit.
 +
* [[Manual:DIL Manual/addequip()|addequip()]] – Puts an object a character carries on, at a given position.
 +
* [[Manual:DIL Manual/addextra()|addextra()]] – Adds an extra description to a unit's extras, quests or info.
 +
* [[Manual:DIL Manual/addstring()|addstring()]] – Adds a string to the end of a stringlist.
 +
* [[Manual:DIL Manual/beginedit()|beginedit()]] – Lets a player type several lines of text, which the program then gets.
 +
* [[Manual:DIL Manual/block|block]] – Stops the event that woke the program from going any further.
 +
* [[Manual:DIL Manual/change speed()|change_speed()]] – Delays a fighting character's next attacks.
 +
* [[Manual:DIL Manual/clear()|clear()]] – Removes an interrupt set up with interrupt().
 +
* [[Manual:DIL Manual/delete player()|delete_player()]] – Deletes a player character for good.
 +
* [[Manual:DIL Manual/destroy()|destroy()]] – Removes a unit from the game.
 +
* [[Manual:DIL Manual/dilcopy()|dilcopy()]] – Starts a copy of a DIL template on a unit.
 +
* [[Manual:DIL Manual/dispatch()|dispatch()]] – Sends a line to programs outside the game, such as the Discord bot.
 +
* [[Manual:DIL Manual/exec()|exec()]] – Makes a character carry out a command, as if they had typed it.
 +
* [[Manual:DIL Manual/experience()|experience()]] – Gives a player experience points, or takes them away.
 +
* [[Manual:DIL Manual/follow()|follow()]] – Makes one character follow another, or stop following.
 +
* [[Manual:DIL Manual/gamestate()|gamestate()]] – Takes a player out of the game to the menu, back into the game, or out altogether.
 +
* [[Manual:DIL Manual/insert()|insert()]] – Puts a new entry into a stringlist or an intlist at a given position.
 +
* [[Manual:DIL Manual/killedit|killedit]] – Takes a player out of the text editor.
 +
* [[Manual:DIL Manual/link()|link()]] – Moves a unit into another unit, with no checks and no messages.
 +
* [[Manual:DIL Manual/log()|log()]] – Writes a line to the server log.
 +
* [[Manual:DIL Manual/logcrime()|logcrime()]] – Reports a crime to the justice system: who did it, to whom, and what.
 +
* [[Manual:DIL Manual/nopriority|nopriority]] – Ends the <code>priority</code> set by this program.
 +
* [[Manual:DIL Manual/pagestring()|pagestring()]] – Sends a long text to a player, to be shown a page at a time.
 +
* [[Manual:DIL Manual/position update()|position_update()]] – Sets a character's position from its hit points, and kills it at -11 or below.
 +
* [[Manual:DIL Manual/priority|priority]] – Keeps the unit's later programs from getting any event until <code>nopriority</code>.
 +
* [[Manual:DIL Manual/quit|quit]] – Ends the program for good.
 +
* [[Manual:DIL Manual/reboot|reboot]] – Shuts the game server down.
 +
* [[Manual:DIL Manual/remove()|remove()]] – Takes the entry at a given position out of a stringlist or an intlist.
 +
* [[Manual:DIL Manual/reset level()|reset_level()]] – Sets a mortal player's level back to 1.
 +
* [[Manual:DIL Manual/reset race()|reset_race()]] – Rolls a player's body again from the race's values: weight, height, lifespan and age.
 +
* [[Manual:DIL Manual/reset vlevel()|reset_vlevel()]] – Sets a mortal player's virtual level back to 1.
 +
* [[Manual:DIL Manual/secure()|secure()]] – Keeps a unit in a variable across waits, and names where to go when it leaves.
 +
* [[Manual:DIL Manual/send done()|send_done()]] – Tells the programs around that a command has been carried out.
 +
* [[Manual:DIL Manual/send()|send()]] – Sends a message to the DIL programs around the unit.
 +
* [[Manual:DIL Manual/sendtext()|sendtext()]] – Sends a text to one character's screen, exactly as it is.
 +
* [[Manual:DIL Manual/sendto()|sendto()]] – Sends a message to the DIL programs on one unit.
 +
* [[Manual:DIL Manual/sendtoall()|sendtoall()]] – Sends a message to every copy of a unit in the game.
 +
* [[Manual:DIL Manual/sendtoalldil()|sendtoalldil()]] – Sends a message to every running copy of a DIL template.
 +
* [[Manual:DIL Manual/set fighting()|set_fighting()]] – Starts a fight between two characters.
 +
* [[Manual:DIL Manual/set password()|set_password()]] – Sets a player's password.
 +
* [[Manual:DIL Manual/set weight|set_weight]] – Sets a unit's total weight.
 +
* [[Manual:DIL Manual/set weight base|set_weight_base]] – Sets a unit's own weight.
 +
* [[Manual:DIL Manual/set()|set()]] – Turns bits on in an integer variable or field.
 +
* [[Manual:DIL Manual/setbright()|setbright()]] – Sets how much light a unit gives.
 +
* [[Manual:DIL Manual/setroomexit()|setroomexit()]] – Points a room's exit in one direction at another room, making the exit if the room has none that way.
 +
* [[Manual:DIL Manual/stop fighting()|stop_fighting()]] – Ends a character's fight with one opponent, or with all.
 +
* [[Manual:DIL Manual/store()|store()]] – Saves a unit, or what is inside it, to a file.
 +
* [[Manual:DIL Manual/subaff()|subaff()]] – Removes an affect from a unit.
 +
* [[Manual:DIL Manual/subextra()|subextra()]] – Removes an extra description by name.
 +
* [[Manual:DIL Manual/substring()|substring()]] – Removes a string from a stringlist.
 +
* [[Manual:DIL Manual/unequip()|unequip()]] – Takes off an object a character is wearing.
 +
* [[Manual:DIL Manual/unsecure()|unsecure()]] – Ends the secure on a unit.
 +
* [[Manual:DIL Manual/unset()|unset()]] – Turns bits off in an integer variable or field.
 +
* [[Manual:DIL Manual/wait()|wait()]] – Stops the program until an event of the given kinds comes, for which a condition holds.
 +
* [[Manual:DIL Manual/zonereset()|zonereset()]] – Resets a zone now.
 +
 
 +
== Fields ==
 +
By unit type; a field several types have is under each. With type and access: [[Manual:DIL Manual/Fields|Fields]].
 +
=== All units ===
 +
* [[Manual:DIL Manual/alignment|alignment]] – How good or evil the unit is, from -1000 (evil) to 1000 (good).
 +
* [[Manual:DIL Manual/baseweight|baseweight]] – The weight of the unit itself, in pounds, without anything it carries or contains: an empty bag, a character's body.
 +
* [[Manual:DIL Manual/bright|bright]] – How much light the unit gives off: positive for a light source (a lit torch), negative for something that swallows light, 0 for most units.
 +
* [[Manual:DIL Manual/capacity|capacity]] – How much the unit can hold inside it, in pounds: the <code>capacity</code> line in the zone file, 0 when it has none.
 +
* [[Manual:DIL Manual/editing|editing]] – TRUE while the player is writing in the text editor (a board post, a letter, a [[Manual:DIL Manual/beginedit()|beginedit()]] text), FALSE otherwise.
 +
* [[Manual:DIL Manual/extra|extra]] – The first of the unit's extra descriptions, or null when it has none.
 +
* [[Manual:DIL Manual/flags|flags]] – The unit flags, a bit set of <code>UNIT_FL_*</code> values from <code>vme.h</code>, shared by all kinds of unit.
 +
* [[Manual:DIL Manual/gnext|gnext]] – The next unit in the game's global list of all units, or null after the last.
 +
* [[Manual:DIL Manual/gprevious|gprevious]] – The unit before <code>u</code> in the game's global list of all units, or null for the first.
 +
* [[Manual:DIL Manual/hasfunc|hasfunc]] – TRUE when the unit has at least one program attached, a DIL program or one of the server's special functions; FALSE when it has none.
 +
* [[Manual:DIL Manual/height|height]] – The size of a unit, set with <code>height</code> in the zone file.
 +
* [[Manual:DIL Manual/hp|hp]] – The unit's current hit points.
 +
* [[Manual:DIL Manual/idx|idx]] – A number that tells one unit from another with the same [[Manual:DIL Manual/symname|symname]].
 +
* [[Manual:DIL Manual/illum|illum]] – The part of a unit's [[Manual:DIL Manual/bright|bright]] that comes from what is inside it.
 +
* [[Manual:DIL Manual/inside|inside]] – The first unit inside <code>u</code>, or null when it is empty.
 +
* [[Manual:DIL Manual/inside descr|inside_descr]] – What is seen from inside the unit.
 +
* [[Manual:DIL Manual/key|key]] – The key that locks and unlocks the unit, as <code>"keyname@zone"</code>, set with <code>key</code> in the zone file.
 +
* [[Manual:DIL Manual/light|light]] – The light level inside the unit.
 +
* [[Manual:DIL Manual/loadcount|loadcount]] – How many units made from the same definition (the same <code>nameidx@zoneidx</code>) are in the game right now, this one included.
 +
* [[Manual:DIL Manual/manipulate|manipulate]] – What players can do with the unit, a bit set of <code>MANIPULATE_*</code> values from <code>vme.h</code>.
 +
* [[Manual:DIL Manual/max hp|max_hp]] – The unit's maximum hit points; [[Manual:DIL Manual/hp|hp]] holds the current ones.
 +
* [[Manual:DIL Manual/minv|minv]] – The unit's wizard invisibility level.
 +
* [[Manual:DIL Manual/name|name]] – The unit's first name (the first of its <code>names</code>); for a player, the player's name.
 +
* [[Manual:DIL Manual/nameidx|nameidx]] – The unit's name in its zone file: <code>"cityguard"</code> for <code>cityguard@midgaard</code>.
 +
* [[Manual:DIL Manual/names|names]] – The names players use for the unit; the first is its name.
 +
* [[Manual:DIL Manual/next|next]] – The next element of the list the value is in, or null after the last one.
 +
* [[Manual:DIL Manual/opendiff|opendiff]] – How hard the unit's lock is to pick.
 +
* [[Manual:DIL Manual/openflags|openflags]] – Whether the unit opens, and whether it is closed or locked: a bit set of <code>EX_*</code> values from <code>vme.h</code>.
 +
* [[Manual:DIL Manual/outside|outside]] – The unit that <code>u</code> is in.
 +
* [[Manual:DIL Manual/outside descr|outside_descr]] – The line a unit shows when it is seen from outside.
 +
* [[Manual:DIL Manual/spells|spells]] – A character's skill in spell <code>i</code>; for an object or a room, its magic resistance.
 +
* [[Manual:DIL Manual/symname|symname]] – The unit's symbolic name, <code>"nameidx@zoneidx"</code>: <code>"corpse@death"</code>, or <code>"papi@_players"</code> for a player.
 +
* [[Manual:DIL Manual/title|title]] – The unit's title: for an object or an NPC, the short name the game's messages use.
 +
* [[Manual:DIL Manual/type|type]] – What kind of unit it is: a <code>UNIT_ST_*</code> constant.
 +
* [[Manual:DIL Manual/weight|weight]] – The total weight of the unit in pounds: its own weight ([[Manual:DIL Manual/baseweight|baseweight]]) plus everything inside it.
 +
* [[Manual:DIL Manual/zone|zone]] – The name of the zone the unit is in now: the zone of the room at the top of whatever holds it.
 +
* [[Manual:DIL Manual/zoneidx|zoneidx]] – The name of the zone the unit's definition comes from: <code>"midgaard"</code> for <code>cityguard@midgaard</code>.
 +
=== Characters ===
 +
* [[Manual:DIL Manual/abilities|abilities]] – One of the character's abilities.
 +
* [[Manual:DIL Manual/attack type|attack_type]] – The weapon type a character fights with when not wielding a weapon.
 +
* [[Manual:DIL Manual/charflags|charflags]] – The character flags: a bit field of <code>CHAR_*</code> values, defined in vme.h.
 +
* [[Manual:DIL Manual/defensive|defensive]] – A flat bonus (or, below 0, penalty) to the character's defence.
 +
* [[Manual:DIL Manual/endurance|endurance]] – A character's current endurance: the points that moving, fighting and some skills use up.
 +
* [[Manual:DIL Manual/exp|exp]] – On a player, the experience points gained in total; on an NPC, the experience it is worth.
 +
* [[Manual:DIL Manual/fighting|fighting]] – The character this character is hitting in melee: its current opponent. null when it is not fighting.
 +
* [[Manual:DIL Manual/follower|follower]] – The first character that follows <code>ch</code>, or null when no one does.
 +
* [[Manual:DIL Manual/followercount|followercount]] – How many characters follow this one directly: not their own followers. 0 when none.
 +
* [[Manual:DIL Manual/level|level]] – The character's level.
 +
* [[Manual:DIL Manual/mana|mana]] – A character's current mana: the points that spells cost.
 +
* [[Manual:DIL Manual/master|master]] – The character that <code>ch</code> follows, or null when it follows no one.
 +
* [[Manual:DIL Manual/max endurance|max_endurance]] – The most endurance the character can have.
 +
* [[Manual:DIL Manual/max mana|max_mana]] – The character's maximum mana; [[Manual:DIL Manual/mana|mana]] holds the current amount.
 +
* [[Manual:DIL Manual/natural armour|natural_armour]] – The armour type of a character's own skin, used where no worn armour covers the spot that is hit.
 +
* [[Manual:DIL Manual/offensive|offensive]] – A flat bonus (or, below 0, penalty) to the character's attacks.
 +
* [[Manual:DIL Manual/opponentcount|opponentcount]] – How many characters this one is in combat with.
 +
* [[Manual:DIL Manual/position|position]] – The character's position, a <code>POSITION_*</code> constant from vme.h.
 +
* [[Manual:DIL Manual/race|race]] – The character's race, a <code>RACE_</code> constant from values.h.
 +
* [[Manual:DIL Manual/sex|sex]] – The character's sex: <code>SEX_NEUTRAL</code> (0), <code>SEX_MALE</code> (1) or <code>SEX_FEMALE</code> (2), from vme.h.
 +
* [[Manual:DIL Manual/speed|speed]] – The character's combat speed: lower is faster.
 +
* [[Manual:DIL Manual/switched|switched]] – Who is controlled through a <code>switch</code>.
 +
* [[Manual:DIL Manual/weapons|weapons]] – A character's skill, in percent, with a weapon.
 +
=== Players ===
 +
* [[Manual:DIL Manual/ability costs|ability_costs]] – The player's racial modifier for training ability <code>i</code>.
 +
* [[Manual:DIL Manual/ability levels|ability_levels]] – How many times the player has trained ability <code>i</code> since the last level gained.
 +
* [[Manual:DIL Manual/ability points|ability_points]] – The player's unspent ability points: training an ability (strength, dexterity, ...) at a teacher costs them.
 +
* [[Manual:DIL Manual/acc balance|acc_balance]] – The credit left on the player's account, in coin units, when the game runs with accounting.
 +
* [[Manual:DIL Manual/acc total|acc_total]] – The total credit paid in to the player's account to date, in coin units, when the game runs with accounting.
 +
* [[Manual:DIL Manual/birth|birth]] – When the player was born, in real seconds since 1970 like [[Manual:DIL Manual/realtime|realtime]].
 +
* [[Manual:DIL Manual/crimes|crimes]] – A count of the crimes the player has been charged with, saved with the player.
 +
* [[Manual:DIL Manual/drunk|drunk]] – How drunk the player is: 0 is sober.
 +
* [[Manual:DIL Manual/exptol|exptol]] – The experience a player still needs for the next level.
 +
* [[Manual:DIL Manual/full|full]] – How well fed the player is.
 +
* [[Manual:DIL Manual/guild|guild]] – The name of the player's main (default) guild, e.g. <code>"Udgaard Fighter"</code>.
 +
* [[Manual:DIL Manual/hometown|hometown]] – The symbolic name of the player's home room, such as <code>"temple@udgaard"</code>.
 +
* [[Manual:DIL Manual/info|info]] – A player's administrative extra descriptions.
 +
* [[Manual:DIL Manual/lastroom|lastroom]] – Meant to give the room the server will put the player back in: the room the player was in when last saved, or when the connection was lost.
 +
* [[Manual:DIL Manual/lifespan|lifespan]] – How old, in mud years, the player can grow.
 +
* [[Manual:DIL Manual/pcflags|pcflags]] – A player's option and status bits.
 +
* [[Manual:DIL Manual/playtime|playtime]] – How long the player has been logged in, in total, in real seconds.
 +
* [[Manual:DIL Manual/profession|profession]] – The player's profession: a <code>PROFESSION_</code> constant from values.h, <code>PROFESSION_FIGHTER</code> to <code>PROFESSION_BARBARIAN</code>.
 +
* [[Manual:DIL Manual/prompt|prompt]] – The player's prompt template, as set with the <code>prompt</code> command.
 +
* [[Manual:DIL Manual/quests|quests]] – The player's quest list: a list of extras, like <code>.extra</code>, saved with the player.
 +
* [[Manual:DIL Manual/skill costs|skill_costs]] – Despite the name, not a price: the player's racial modifier for the skill with that index, from -3 to +3.
 +
* [[Manual:DIL Manual/skill levels|skill_levels]] – How many times the player has trained the skill with that index since gaining the current level.
 +
* [[Manual:DIL Manual/skill points|skill_points]] – The player's unspent skill points.
 +
* [[Manual:DIL Manual/skills|skills]] – A player's skill, in percent, in the skill with that index.
 +
* [[Manual:DIL Manual/spell costs|spell_costs]] – How easy spell <code>i</code> is for the player's race to learn.
 +
* [[Manual:DIL Manual/spell levels|spell_levels]] – How many times the player has practised spell <code>i</code> since the last level gained.
 +
* [[Manual:DIL Manual/thirst|thirst]] – How well watered the player is.
 +
* [[Manual:DIL Manual/vlevel|vlevel]] – The player's virtual level.
 +
* [[Manual:DIL Manual/weapon costs|weapon_costs]] – The player's race modifier for the weapon <code>idx</code>, from the <code>race &lt;name&gt; = N</code> lines in <code>vme/etc/weapons.def</code>.
 +
* [[Manual:DIL Manual/weapon levels|weapon_levels]] – How many times the player has trained the weapon <code>idx</code> since gaining the current level.
 +
=== NPCs ===
 +
* [[Manual:DIL Manual/defaultpos|defaultpos]] – An NPC's default position, a <code>POSITION_*</code> constant from vme.h.
 +
* [[Manual:DIL Manual/npcflags|npcflags]] – An NPC's NPC flags, a bit field set in the zone file with <code>npcflags {...}</code> in the mobile.
 +
=== Objects ===
 +
* [[Manual:DIL Manual/cost|cost]] – What the object is worth, in the money's base unit (an iron piece is <code>IRON_MULT</code>, 10; a gold piece <code>GOLD_MULT</code>; vme.h).
 +
* [[Manual:DIL Manual/equip|equip]] – Where the object is worn or held.
 +
* [[Manual:DIL Manual/objectflags|objectflags]] – The object's flags, set with <code>romflags</code> in the object's zone definition (<code>flags</code> there sets the unit flags).
 +
* [[Manual:DIL Manual/objecttype|objecttype]] – What kind of object it is: one of the <code>ITEM_*</code> constants in vme.h.
 +
* [[Manual:DIL Manual/rent|rent]] – What the object costs its owner to keep, per real day, in the money's base unit (as [[Manual:DIL Manual/cost|cost]]).
 +
* [[Manual:DIL Manual/value|value]] – The object's five numbers, <code>value[0]</code> to <code>value[4]</code>, set with <code>value[i]</code> lines in the zone file.
 +
=== Rooms ===
 +
* [[Manual:DIL Manual/exit diff|exit_diff]] – The difficulty of the room's exit in direction <code>dir</code>, set with <code>difficulty</code> on the exit in the zone file (0 to 250).
 +
* [[Manual:DIL Manual/exit info|exit_info]] – The flags of the exit in direction <code>dir</code>: whether it has a door and what state it is in.
 +
* [[Manual:DIL Manual/exit key|exit_key]] – The key that locks and unlocks the room's exit in direction <code>dir</code>, as <code>"keyname@zone"</code> in lower case, set with <code>key</code> on the exit in the zone file.
 +
* [[Manual:DIL Manual/exit names|exit_names]] – The names of the door or opening in direction <code>dir</code>: what a player types to open, close, lock or unlock it.
 +
* [[Manual:DIL Manual/exit to|exit_to]] – The room that the exit in direction <code>dir</code> leads to, or null when the room has no exit that way.
 +
* [[Manual:DIL Manual/mapx|mapx]] – The room's X coordinate on the graphical map, set with <code>gmap(x, y)</code> in the zone file; -1 when the room has none.
 +
* [[Manual:DIL Manual/mapy|mapy]] – The room's Y coordinate on the graphical map, set with <code>gmap(x, y)</code> in the zone file; -1 when the room has none.
 +
* [[Manual:DIL Manual/movement|movement]] – The room's terrain, set with <code>movement</code> in the zone file.
 +
* [[Manual:DIL Manual/roomflags|roomflags]] – Bit flags of a room, set with <code>romflags</code> in the zone file.
 +
=== extraptr ===
 +
* [[Manual:DIL Manual/descr|descr]] – The text of an extra description: what a player sees on <code>look at</code> the extra's name.
 +
* [[Manual:DIL Manual/name|name]] – The extra description's first name (keyword).
 +
* [[Manual:DIL Manual/names|names]] – The keywords the extra description answers to.
 +
* [[Manual:DIL Manual/next|next]] – The next element of the list the value is in, or null after the last one.
 +
* [[Manual:DIL Manual/vals|vals]] – The list of integers kept with an extra description.
 +
=== zoneptr ===
 +
* [[Manual:DIL Manual/access|access]] – The zone's access level: the fourth column of <code>vme/etc/zonelist</code>, 0 to 255, where 0 is the most trusted.
 +
* [[Manual:DIL Manual/creators|creators]] – The names of the zone's creators.
 +
* [[Manual:DIL Manual/fname|fname]] – The zone's name, the same as [[Manual:DIL Manual/name|name]] on a zoneptr: <code>"midgaard"</code>.
 +
* [[Manual:DIL Manual/help|help]] – The zone's help text for players: the <code>help</code> text in the zone file's <code>%zone</code> header.
 +
* [[Manual:DIL Manual/loadlevel|loadlevel]] – The level a god needs to <code>load</code> objects and NPCs from the zone, unless the god's name is in the zone's [[Manual:DIL Manual/creators|creators]].
 +
* [[Manual:DIL Manual/name|name]] – The zone's name, as in <code>sym@zone</code>.
 +
* [[Manual:DIL Manual/next|next]] – The next element of the list the value is in, or null after the last one.
 +
* [[Manual:DIL Manual/notes|notes]] – The zone's notes from its creators: the <code>notes</code> text in the zone file's <code>%zone</code> header.
 +
* [[Manual:DIL Manual/npccount|npccount]] – Meant to be the number of NPCs the zone defines, but the server never counts them: it is always 0.
 +
* [[Manual:DIL Manual/npcs|npcs]] – A copy, in the game, of the zone's NPC whose symbolic name sorts first.
 +
* [[Manual:DIL Manual/objcount|objcount]] – Meant to be the number of objects the zone defines, but the server never counts them: it is always 0.
 +
* [[Manual:DIL Manual/objs|objs]] – A copy, in the game, of the zone's object whose symbolic name sorts first.
 +
* [[Manual:DIL Manual/payonly|payonly]] – Whether the zone is only for paying players: the sixth column of <code>vme/etc/zonelist</code> (0 when missing).
 +
* [[Manual:DIL Manual/resetmode|resetmode]] – How the zone resets, as set with <code>reset</code> in the zone file's <code>%zone</code> header.
 +
* [[Manual:DIL Manual/resettime|resettime]] – The minutes between two resets of the zone.
 +
* [[Manual:DIL Manual/roomcount|roomcount]] – The number of rooms the zone defines: the rooms read from its <code>.data</code> file at boot.
 +
* [[Manual:DIL Manual/rooms|rooms]] – One room of the zone: the one whose symbolic name sorts first.
 +
* [[Manual:DIL Manual/title|title]] – The zone's title, from <code>title</code> in its <code>%zone</code> header.
 +
=== cmdptr ===
 +
* [[Manual:DIL Manual/level|level]] – The lowest level that may use the command.
 +
* [[Manual:DIL Manual/loglevel|loglevel]] – The <code>loglevel</code> a command has in <code>vme/etc/commands.def</code>.
 +
* [[Manual:DIL Manual/name|name]] – The command's full name, such as <code>"wiz"</code>.
 +
* [[Manual:DIL Manual/next|next]] – The next element of the list the value is in, or null after the last one.
 +
* [[Manual:DIL Manual/position|position]] – The lowest position in which the command can be used.
 +
* [[Manual:DIL Manual/speed|speed]] – The command's combat speed, from <code>turns</code> in commands.def.
 +
* [[Manual:DIL Manual/type|type]] – The command's type: <code>TYPE_SOCIAL</code>, <code>TYPE_SKILL</code> or 0 for an ordinary command.
 +
 
 +
== Events (SFB_*) ==
 +
What <code>wait()</code> and <code>interrupt()</code> wait for. See [[Manual:DIL Manual/Messages|Messages]].
 +
* [[Manual:DIL Manual/SFB CMD|SFB_CMD]] – The command event.
 +
* [[Manual:DIL Manual/SFB PRE|SFB_PRE]] – The "about to happen" event.
 +
* [[Manual:DIL Manual/SFB DONE|SFB_DONE]] – The "it has happened" event.
 +
* [[Manual:DIL Manual/SFB TICK|SFB_TICK]] – The timer event.
 +
* [[Manual:DIL Manual/SFB COM|SFB_COM]] – The combat event.
 +
* [[Manual:DIL Manual/SFB DEAD|SFB_DEAD]] – The death event.
 +
* [[Manual:DIL Manual/SFB MSG|SFB_MSG]] – The message event: how DIL programs talk to each other.
 +
 
 +
== Unit types (UNIT_ST_*) ==
 +
Values of a unit's [[Manual:DIL Manual/type|type]] field.
 +
* [[Manual:DIL Manual/UNIT ST PC|UNIT_ST_PC]] – A player character.
 +
* [[Manual:DIL Manual/UNIT ST NPC|UNIT_ST_NPC]] – A non-player character: a monster, a shopkeeper, a guard.
 +
* [[Manual:DIL Manual/UNIT ST PC and UNIT ST NPC|UNIT_ST_PC and UNIT_ST_NPC]] – Characters: players (<code>UNIT_ST_PC</code>) and monsters (<code>UNIT_ST_NPC</code>).
 +
* [[Manual:DIL Manual/UNIT ST OBJ|UNIT_ST_OBJ]] – An object: a weapon, a container, a key, money, a corpse.
 +
* [[Manual:DIL Manual/UNIT ST ROOM|UNIT_ST_ROOM]] – A room.
 +
 
 +
== Operators ==
 +
The others (<code>and</code>, <code>or</code>, <code>not</code>, arithmetic and comparison) are in [[Manual:DIL Manual/Operators|Operators]].
 +
* [[Manual:DIL Manual/in|in]] – Looks for a string in a string, a stringlist or a list of extras.
 +
* [[Manual:DIL Manual/string in string|string in string]] – TRUE (1) when the text <code>s1</code> appears anywhere in <code>s2</code>, FALSE (0) when it doesn't.
 +
* [[Manual:DIL Manual/string in stringlist|string in stringlist]] – Looks for the string <code>s</code> in the stringlist <code>sl</code> and gives its position plus one.
 +
* [[Manual:DIL Manual/string in extraptr|string in extraptr]] – Finds the extra description whose names include <code>s</code>, in a list of extras such as <code>u.extra</code> or <code>pc.quests</code>, and gives that extra.
 +
 
 +
== Old names ==
 +
Pages for names that DIL no longer has, never had, or that don't work, and what to use instead.
 +
* [[Manual:DIL Manual/AGENT|AGENT]] – not a DIL name; this page was a copy of an overview file for AI coding agents.
 +
* [[Manual:DIL Manual/cancarry()|cancarry()]] – the function is [[Manual:DIL Manual/can carry()|can_carry()]], with an underscore.
 +
* [[Manual:DIL Manual/dex red|dex_red]] – vmc accepts it, but the server has no code for it and the program stops; a character's dexterity is [[Manual:DIL Manual/abilities|abilities]]<code>[ABIL_DEX]</code>.
 +
* [[Manual:DIL Manual/filesize()|filesize()]] – nothing replaces it; read the file with [[Manual:DIL Manual/loadstr()|loadstr()]] and take its [[Manual:DIL Manual/length()|length()]].
 +
* [[Manual:DIL Manual/findsymname()|findsymname()]] – use [[Manual:DIL Manual/findsymbolic()|findsymbolic()]]; a unit's own symbolic name is in [[Manual:DIL Manual/symname|symname]].
 +
* [[Manual:DIL Manual/integerlist|integerlist]] – the type is called [[Manual:DIL Manual/intlist|intlist]].
 +
* [[Manual:DIL Manual/setweight()|setweight()]] – removed in 2020; use [[Manual:DIL Manual/set weight|set_weight]] or [[Manual:DIL Manual/set weight base|set_weight_base]].
 +
* [[Manual:DIL Manual/walkto()|walkto()]] – no such procedure; [[Manual:DIL Manual/pathto()|pathto()]] gives the next step and [[Manual:DIL Manual/exec()|exec()]] takes it.

Latest revision as of 23:39, 14 November 2026

Every page of the DIL manual on one page, by kind; each line gives what the keyword does in a sentence. The chapters that explain the language as a whole are listed on the front page. For the built-in functions, procedures and variables with their arguments, see Built-In Functions, Built-In Procedures and Built-In Variables; for fields in tables by unit type, Fields.

Program structure

The parts of a template. See Making a Program.

  • dilbegin – Starts a DIL program, called a template.
  • var – Starts the variable declarations of a template.
  • code – Starts the statements of a template.
  • external – Declares the other templates a template calls.
  • dilend – Ends a template.
  • recall – Option of dilbegin: a saved program goes on where it stopped.
  • aware – Option of dilbegin: the program also hears what its own unit does.
  • unique – Option of dilbegin: a unit has at most one copy of the program.
  • fnpri – Option of dilbegin: where the program goes in its unit's list of programs.
  • global – Makes a variable shared by every program that names the same key.

Types

See Data Types.

  • integer – A whole number, signed, 32 bits.
  • string – A piece of text.
  • stringlist – An ordered list of strings.
  • intlist – An ordered list of integers.
  • unitptr – A pointer to a unit: a room, an object, an NPC or a player.
  • extraptr – A pointer to an extra description.
  • zoneptr – A pointer to a zone.
  • cmdptr – A pointer to one of the game's commands.
  • null – The empty value: no unit, no extra, no zone, no command, no string, an empty list.

Built-in variables

See Built-In Variables.

  • self – The unit the program runs on.
  • activator – The unit that caused the event that woke the program.
  • medium – The unit used in the event that woke the program, when the event has one; otherwise null.
  • target – The unit an action in the event was aimed at, when the event has one; otherwise null.
  • power – A number that comes with SFB_PRE and SFB_DONE events.
  • argument – The text that came with the event that woke the program.
  • cmdstr – The full name of the command in the event that woke the program, as commands.def names it, even when the player typed an abbreviation.
  • excmdstr – The first word of the line the player typed, in lower case, not expanded.
  • excmdstr_case – The first word of the line the player typed, exactly as typed: Mellon stays "Mellon".
  • heartbeat – How often the program's tick comes, in quarter seconds: PULSE_SEC (4, vme.h) is one second.
  • realtime – The real time, in seconds since 1 January 1970 UTC: what time(NULL) gives in C.
  • mudhour, mudday, mudmonth, mudyear – The game's clock and calendar.
  • mudhour – The hour of the mud day, 0 to 23: 0 is midnight, 12 noon.
  • mudday – The day of the mud month, 0 to 13.
  • mudmonth – The month of the mud year, 0 to 8.
  • mudyear – The mud year: the number of mud years since 11 August 1990, about 1261 in November 2026.
  • weather – The sky over the zone the program's unit is in.

Control flow

See DIL Constructs.

  • if() – Runs a statement only when a condition holds, with an optional else.
  • else() – The second branch of an if.
  • while() – Repeats a statement as long as a condition is true.
  • foreach() – Runs a statement once for each unit of some types around the program's unit.
  • break – Leaves the loop it is in.
  • continue – Skips the rest of the loop's statement and starts its next round.
  • goto – Jumps to a label.
  • on() – Jumps to one of several labels, picked by a number.
  • skip – Takes the place of a label in an interrupt or an on ... goto, and means "don't jump".
  • return() – Leaves a procedure, or a function with its value.
  • return – Ends the template that is running and goes back to the one that called it, which carries on after the call.
  • waitnoop – Steps out of the current event for a moment.

Functions

Return a value. By purpose, with arguments: Built-In Functions.

  • addcolor() – Gives a player their own colour for a colour name.
  • asctime() – Writes a time in seconds as a date, such as "Mon Nov 18 18:49:08 1996".
  • atoi() – The number written at the start of a string.
  • attack_spell() – Hits a target with an offensive spell and returns the damage.
  • can_carry() – Tells whether a character can carry more of something, and if not, why.
  • cast_spell() – Casts a spell without mana or the caster's own casting.
  • changecolor() – Changes one of a player's own colours.
  • chead() – The first command in the game's command table.
  • check_password() – Tells whether a password is a player's password.
  • clone() – Makes a copy of an existing NPC or object.
  • command_head() – Another name for chead(): the first command in the game's command table.
  • command() – Tells whether the event that woke the program is a given command.
  • delcolor() – Removes one of a player's own colours.
  • delstr() – Deletes a string file.
  • delunit() – Deletes a unit file.
  • dilcall() – Calls a DIL function whose name is only known when the program runs.
  • dildestroy() – Stops a DIL program on a unit and removes it.
  • dilfind() – Tells whether a unit runs a DIL program from a given template.
  • equipment() – The object a character wears or wields in a given position.
  • findrndunit() – Picks a random unit of the wanted kinds in one place.
  • findroom() – Finds a room by its symbolic name.
  • findsymbolic() – Finds a unit by its symbolic name, the name@zone it was defined with.
  • findunit() – Finds a unit by name, the way commands find what a player names.
  • findzone() – Finds a zone by its name.
  • fits() – Tells whether an object is the right size for a character.
  • flog() – Writes a string to a file of its own in the server's log directory.
  • getaffects() – Lists the affects on a unit, one string of numbers each.
  • getcmd() – Finds a command from its name or an abbreviation.
  • getcolor() – Returns the HTML tag that starts text in a named colour.
  • getfollower() – Gets one of a character's followers by its place in the list.
  • getinteger() – Gets one of several numbers that the server computes, chosen by an index.
  • getopponent() – Gets one of a character's opponents by its place in the list.
  • getword() – Takes the first word off a string.
  • getwords() – Splits a string into its words.
  • ghead() – The first unit in the game's global unit list.
  • global_head() – Another name for ghead(): the first unit in the game's global unit list.
  • interrupt() – Sets up a jump to a label when a certain event wakes the program, whatever it is waiting for.
  • isaff() – Tells whether a unit carries an affect with a given id.
  • islight() – Tells whether there is light in a room.
  • isplayer() – Tells whether a player character of that name exists.
  • isset() – Tells whether any of some bits are set in an integer.
  • itoa() – An integer written as text.
  • left() – Returns the first characters of a string.
  • length() – The length of a string, or the number of entries in a list.
  • load() – Makes a new NPC or object from its zone definition.
  • loadstr() – Reads a whole file into a string variable.
  • meleeattack() – Makes a character attack another once in melee, starting a fight.
  • meleedamage() – Makes a character strike another once, without first putting it into combat.
  • mid() – Returns the characters from one position to another.
  • moneystring() – Writes an amount of money out in coins.
  • npc_head() – The first NPC in the game's global unit list.
  • obj_head() – The first object in the game's global unit list.
  • on_activation() – Sets a check that runs every time the program is woken, by any event, before the event reaches the program's wait() or pause.
  • openroll() – Rolls an open-ended die: high rolls add another roll, low rolls subtract one.
  • opponent() – Tells whether two characters are fighting each other.
  • pathto() – Gives the first step of the shortest way from one unit's room to another's.
  • paycheck() – Tells whether a player's account allows them into the zone of a unit.
  • pc_head() – The first player in the game's global unit list.
  • purse() – Counts the coins of one kind that a unit carries.
  • replace() – Replaces every occurrence of one text in a string with another.
  • restore() – Loads units saved with store() back into the game.
  • right() – Returns the last characters of a string.
  • rnd() – A random whole number in a range.
  • room_head() – The first room in the game's global unit list.
  • sact() – Gives the text an act() would show, instead of sending it.
  • savestr() – Writes a string to a file, to read back later with loadstr().
  • send_pre() – Asks the programs around a character whether a command may go ahead.
  • shell() – Starts a program from the server's allow directory.
  • skill_name() – Gives the name of a skill from its number.
  • spellindex() – Finds a spell's number from its name or an abbreviation of it.
  • spellinfo() – Returns a spell's name and puts its properties in seven integer variables.
  • split() – Cuts a string into pieces at a separator.
  • strcmp() – Compares two strings, minding upper and lower case.
  • strdir() – Lists the string files that DIL has saved, by a pattern.
  • strncmp() – Compares the first characters of two strings, minding upper and lower case.
  • textformat() – Turns the escapes \n and \r in a text into real line breaks.
  • tolower() – Returns a string in lower case.
  • toupper() – Returns a string in upper case.
  • transfermoney() – Moves money from one character to another, or creates or destroys it.
  • unitdir() – Lists the unit files that DIL has stored, by a pattern.
  • visible() – Tells whether a character can see a unit.
  • weapon_info() – The figures etc/weapons.def gives a weapon type.
  • weapon_name() – Gives the name of a weapon type from its number.
  • zhead() – The first zone in the game.
  • zone_head() – Another name for zhead(): the first zone in the game.

Procedures

Return nothing. By purpose, with arguments: Built-In Procedures.

  • acc_modify() – Pays money into a player's account or takes it out.
  • act() – Shows a message to the characters around someone, worded for each of them.
  • addaff() – Adds an affect to a unit.
  • addequip() – Puts an object a character carries on, at a given position.
  • addextra() – Adds an extra description to a unit's extras, quests or info.
  • addstring() – Adds a string to the end of a stringlist.
  • beginedit() – Lets a player type several lines of text, which the program then gets.
  • block – Stops the event that woke the program from going any further.
  • change_speed() – Delays a fighting character's next attacks.
  • clear() – Removes an interrupt set up with interrupt().
  • delete_player() – Deletes a player character for good.
  • destroy() – Removes a unit from the game.
  • dilcopy() – Starts a copy of a DIL template on a unit.
  • dispatch() – Sends a line to programs outside the game, such as the Discord bot.
  • exec() – Makes a character carry out a command, as if they had typed it.
  • experience() – Gives a player experience points, or takes them away.
  • follow() – Makes one character follow another, or stop following.
  • gamestate() – Takes a player out of the game to the menu, back into the game, or out altogether.
  • insert() – Puts a new entry into a stringlist or an intlist at a given position.
  • killedit – Takes a player out of the text editor.
  • link() – Moves a unit into another unit, with no checks and no messages.
  • log() – Writes a line to the server log.
  • logcrime() – Reports a crime to the justice system: who did it, to whom, and what.
  • nopriority – Ends the priority set by this program.
  • pagestring() – Sends a long text to a player, to be shown a page at a time.
  • position_update() – Sets a character's position from its hit points, and kills it at -11 or below.
  • priority – Keeps the unit's later programs from getting any event until nopriority.
  • quit – Ends the program for good.
  • reboot – Shuts the game server down.
  • remove() – Takes the entry at a given position out of a stringlist or an intlist.
  • reset_level() – Sets a mortal player's level back to 1.
  • reset_race() – Rolls a player's body again from the race's values: weight, height, lifespan and age.
  • reset_vlevel() – Sets a mortal player's virtual level back to 1.
  • secure() – Keeps a unit in a variable across waits, and names where to go when it leaves.
  • send_done() – Tells the programs around that a command has been carried out.
  • send() – Sends a message to the DIL programs around the unit.
  • sendtext() – Sends a text to one character's screen, exactly as it is.
  • sendto() – Sends a message to the DIL programs on one unit.
  • sendtoall() – Sends a message to every copy of a unit in the game.
  • sendtoalldil() – Sends a message to every running copy of a DIL template.
  • set_fighting() – Starts a fight between two characters.
  • set_password() – Sets a player's password.
  • set_weight – Sets a unit's total weight.
  • set_weight_base – Sets a unit's own weight.
  • set() – Turns bits on in an integer variable or field.
  • setbright() – Sets how much light a unit gives.
  • setroomexit() – Points a room's exit in one direction at another room, making the exit if the room has none that way.
  • stop_fighting() – Ends a character's fight with one opponent, or with all.
  • store() – Saves a unit, or what is inside it, to a file.
  • subaff() – Removes an affect from a unit.
  • subextra() – Removes an extra description by name.
  • substring() – Removes a string from a stringlist.
  • unequip() – Takes off an object a character is wearing.
  • unsecure() – Ends the secure on a unit.
  • unset() – Turns bits off in an integer variable or field.
  • wait() – Stops the program until an event of the given kinds comes, for which a condition holds.
  • zonereset() – Resets a zone now.

Fields

By unit type; a field several types have is under each. With type and access: Fields.

All units

  • alignment – How good or evil the unit is, from -1000 (evil) to 1000 (good).
  • baseweight – The weight of the unit itself, in pounds, without anything it carries or contains: an empty bag, a character's body.
  • bright – How much light the unit gives off: positive for a light source (a lit torch), negative for something that swallows light, 0 for most units.
  • capacity – How much the unit can hold inside it, in pounds: the capacity line in the zone file, 0 when it has none.
  • editing – TRUE while the player is writing in the text editor (a board post, a letter, a beginedit() text), FALSE otherwise.
  • extra – The first of the unit's extra descriptions, or null when it has none.
  • flags – The unit flags, a bit set of UNIT_FL_* values from vme.h, shared by all kinds of unit.
  • gnext – The next unit in the game's global list of all units, or null after the last.
  • gprevious – The unit before u in the game's global list of all units, or null for the first.
  • hasfunc – TRUE when the unit has at least one program attached, a DIL program or one of the server's special functions; FALSE when it has none.
  • height – The size of a unit, set with height in the zone file.
  • hp – The unit's current hit points.
  • idx – A number that tells one unit from another with the same symname.
  • illum – The part of a unit's bright that comes from what is inside it.
  • inside – The first unit inside u, or null when it is empty.
  • inside_descr – What is seen from inside the unit.
  • key – The key that locks and unlocks the unit, as "keyname@zone", set with key in the zone file.
  • light – The light level inside the unit.
  • loadcount – How many units made from the same definition (the same nameidx@zoneidx) are in the game right now, this one included.
  • manipulate – What players can do with the unit, a bit set of MANIPULATE_* values from vme.h.
  • max_hp – The unit's maximum hit points; hp holds the current ones.
  • minv – The unit's wizard invisibility level.
  • name – The unit's first name (the first of its names); for a player, the player's name.
  • nameidx – The unit's name in its zone file: "cityguard" for cityguard@midgaard.
  • names – The names players use for the unit; the first is its name.
  • next – The next element of the list the value is in, or null after the last one.
  • opendiff – How hard the unit's lock is to pick.
  • openflags – Whether the unit opens, and whether it is closed or locked: a bit set of EX_* values from vme.h.
  • outside – The unit that u is in.
  • outside_descr – The line a unit shows when it is seen from outside.
  • spells – A character's skill in spell i; for an object or a room, its magic resistance.
  • symname – The unit's symbolic name, "nameidx@zoneidx": "corpse@death", or "papi@_players" for a player.
  • title – The unit's title: for an object or an NPC, the short name the game's messages use.
  • type – What kind of unit it is: a UNIT_ST_* constant.
  • weight – The total weight of the unit in pounds: its own weight (baseweight) plus everything inside it.
  • zone – The name of the zone the unit is in now: the zone of the room at the top of whatever holds it.
  • zoneidx – The name of the zone the unit's definition comes from: "midgaard" for cityguard@midgaard.

Characters

  • abilities – One of the character's abilities.
  • attack_type – The weapon type a character fights with when not wielding a weapon.
  • charflags – The character flags: a bit field of CHAR_* values, defined in vme.h.
  • defensive – A flat bonus (or, below 0, penalty) to the character's defence.
  • endurance – A character's current endurance: the points that moving, fighting and some skills use up.
  • exp – On a player, the experience points gained in total; on an NPC, the experience it is worth.
  • fighting – The character this character is hitting in melee: its current opponent. null when it is not fighting.
  • follower – The first character that follows ch, or null when no one does.
  • followercount – How many characters follow this one directly: not their own followers. 0 when none.
  • level – The character's level.
  • mana – A character's current mana: the points that spells cost.
  • master – The character that ch follows, or null when it follows no one.
  • max_endurance – The most endurance the character can have.
  • max_mana – The character's maximum mana; mana holds the current amount.
  • natural_armour – The armour type of a character's own skin, used where no worn armour covers the spot that is hit.
  • offensive – A flat bonus (or, below 0, penalty) to the character's attacks.
  • opponentcount – How many characters this one is in combat with.
  • position – The character's position, a POSITION_* constant from vme.h.
  • race – The character's race, a RACE_ constant from values.h.
  • sex – The character's sex: SEX_NEUTRAL (0), SEX_MALE (1) or SEX_FEMALE (2), from vme.h.
  • speed – The character's combat speed: lower is faster.
  • switched – Who is controlled through a switch.
  • weapons – A character's skill, in percent, with a weapon.

Players

  • ability_costs – The player's racial modifier for training ability i.
  • ability_levels – How many times the player has trained ability i since the last level gained.
  • ability_points – The player's unspent ability points: training an ability (strength, dexterity, ...) at a teacher costs them.
  • acc_balance – The credit left on the player's account, in coin units, when the game runs with accounting.
  • acc_total – The total credit paid in to the player's account to date, in coin units, when the game runs with accounting.
  • birth – When the player was born, in real seconds since 1970 like realtime.
  • crimes – A count of the crimes the player has been charged with, saved with the player.
  • drunk – How drunk the player is: 0 is sober.
  • exptol – The experience a player still needs for the next level.
  • full – How well fed the player is.
  • guild – The name of the player's main (default) guild, e.g. "Udgaard Fighter".
  • hometown – The symbolic name of the player's home room, such as "temple@udgaard".
  • info – A player's administrative extra descriptions.
  • lastroom – Meant to give the room the server will put the player back in: the room the player was in when last saved, or when the connection was lost.
  • lifespan – How old, in mud years, the player can grow.
  • pcflags – A player's option and status bits.
  • playtime – How long the player has been logged in, in total, in real seconds.
  • profession – The player's profession: a PROFESSION_ constant from values.h, PROFESSION_FIGHTER to PROFESSION_BARBARIAN.
  • prompt – The player's prompt template, as set with the prompt command.
  • quests – The player's quest list: a list of extras, like .extra, saved with the player.
  • skill_costs – Despite the name, not a price: the player's racial modifier for the skill with that index, from -3 to +3.
  • skill_levels – How many times the player has trained the skill with that index since gaining the current level.
  • skill_points – The player's unspent skill points.
  • skills – A player's skill, in percent, in the skill with that index.
  • spell_costs – How easy spell i is for the player's race to learn.
  • spell_levels – How many times the player has practised spell i since the last level gained.
  • thirst – How well watered the player is.
  • vlevel – The player's virtual level.
  • weapon_costs – The player's race modifier for the weapon idx, from the race <name> = N lines in vme/etc/weapons.def.
  • weapon_levels – How many times the player has trained the weapon idx since gaining the current level.

NPCs

  • defaultpos – An NPC's default position, a POSITION_* constant from vme.h.
  • npcflags – An NPC's NPC flags, a bit field set in the zone file with npcflags {...} in the mobile.

Objects

  • cost – What the object is worth, in the money's base unit (an iron piece is IRON_MULT, 10; a gold piece GOLD_MULT; vme.h).
  • equip – Where the object is worn or held.
  • objectflags – The object's flags, set with romflags in the object's zone definition (flags there sets the unit flags).
  • objecttype – What kind of object it is: one of the ITEM_* constants in vme.h.
  • rent – What the object costs its owner to keep, per real day, in the money's base unit (as cost).
  • value – The object's five numbers, value[0] to value[4], set with value[i] lines in the zone file.

Rooms

  • exit_diff – The difficulty of the room's exit in direction dir, set with difficulty on the exit in the zone file (0 to 250).
  • exit_info – The flags of the exit in direction dir: whether it has a door and what state it is in.
  • exit_key – The key that locks and unlocks the room's exit in direction dir, as "keyname@zone" in lower case, set with key on the exit in the zone file.
  • exit_names – The names of the door or opening in direction dir: what a player types to open, close, lock or unlock it.
  • exit_to – The room that the exit in direction dir leads to, or null when the room has no exit that way.
  • mapx – The room's X coordinate on the graphical map, set with gmap(x, y) in the zone file; -1 when the room has none.
  • mapy – The room's Y coordinate on the graphical map, set with gmap(x, y) in the zone file; -1 when the room has none.
  • movement – The room's terrain, set with movement in the zone file.
  • roomflags – Bit flags of a room, set with romflags in the zone file.

extraptr

  • descr – The text of an extra description: what a player sees on look at the extra's name.
  • name – The extra description's first name (keyword).
  • names – The keywords the extra description answers to.
  • next – The next element of the list the value is in, or null after the last one.
  • vals – The list of integers kept with an extra description.

zoneptr

  • access – The zone's access level: the fourth column of vme/etc/zonelist, 0 to 255, where 0 is the most trusted.
  • creators – The names of the zone's creators.
  • fname – The zone's name, the same as name on a zoneptr: "midgaard".
  • help – The zone's help text for players: the help text in the zone file's %zone header.
  • loadlevel – The level a god needs to load objects and NPCs from the zone, unless the god's name is in the zone's creators.
  • name – The zone's name, as in sym@zone.
  • next – The next element of the list the value is in, or null after the last one.
  • notes – The zone's notes from its creators: the notes text in the zone file's %zone header.
  • npccount – Meant to be the number of NPCs the zone defines, but the server never counts them: it is always 0.
  • npcs – A copy, in the game, of the zone's NPC whose symbolic name sorts first.
  • objcount – Meant to be the number of objects the zone defines, but the server never counts them: it is always 0.
  • objs – A copy, in the game, of the zone's object whose symbolic name sorts first.
  • payonly – Whether the zone is only for paying players: the sixth column of vme/etc/zonelist (0 when missing).
  • resetmode – How the zone resets, as set with reset in the zone file's %zone header.
  • resettime – The minutes between two resets of the zone.
  • roomcount – The number of rooms the zone defines: the rooms read from its .data file at boot.
  • rooms – One room of the zone: the one whose symbolic name sorts first.
  • title – The zone's title, from title in its %zone header.

cmdptr

  • level – The lowest level that may use the command.
  • loglevel – The loglevel a command has in vme/etc/commands.def.
  • name – The command's full name, such as "wiz".
  • next – The next element of the list the value is in, or null after the last one.
  • position – The lowest position in which the command can be used.
  • speed – The command's combat speed, from turns in commands.def.
  • type – The command's type: TYPE_SOCIAL, TYPE_SKILL or 0 for an ordinary command.

Events (SFB_*)

What wait() and interrupt() wait for. See Messages.

  • SFB_CMD – The command event.
  • SFB_PRE – The "about to happen" event.
  • SFB_DONE – The "it has happened" event.
  • SFB_TICK – The timer event.
  • SFB_COM – The combat event.
  • SFB_DEAD – The death event.
  • SFB_MSG – The message event: how DIL programs talk to each other.

Unit types (UNIT_ST_*)

Values of a unit's type field.

Operators

The others (and, or, not, arithmetic and comparison) are in Operators.

  • in – Looks for a string in a string, a stringlist or a list of extras.
  • string in string – TRUE (1) when the text s1 appears anywhere in s2, FALSE (0) when it doesn't.
  • string in stringlist – Looks for the string s in the stringlist sl and gives its position plus one.
  • string in extraptr – Finds the extra description whose names include s, in a list of extras such as u.extra or pc.quests, and gives that extra.

Old names

Pages for names that DIL no longer has, never had, or that don't work, and what to use instead.