| bool | accepted | object who | object quest | ||||
| void | act | object what | string txt | nilobject target:0 | nilobject prop:0 | string arg:0 | |
| bool | actionverb | string vn | |||||
| string | acts | object what | string txt | nilobject target:0 | nilobject prop:0 | string txt2:0 | |
| string | addtimer | protobject what | string code | int when | |||
| world | allholdsclone | object o | object f | ||||
| world | allholdsflag | object o | flag f | ||||
| world | alltreatas | object o | object f | ||||
| world | allwearsflag | object o | flag f | ||||
| object | anyobjectfrom | object blah | |||||
| object | anyplayerfrom | object blah | |||||
| object | anyroominzone | string zone | |||||
| void | arrest | object crim | object victim | string help | |||
| object | autoclone | object what | object where | string zone | |||
| int | balance | object o | object cur | ||||
| int | bit_and | int a | int b | ||||
| int | bit_or | int a | int b | ||||
| bool | canattack | object who | object what | ||||
| void | canceltimer | string code | |||||
| string | capitalise | string what | |||||
| int | cash | object o | object cur | ||||
| world | children | object what | |||||
| void | clearmission | object obj | |||||
| object | clone | object what | object where | object mis:0 | |||
| world | clothing | object who | |||||
| bool | contains | object o | object w | ||||
| int | convert | int amt | nilobject from | nilobject to | |||
| object | currency | object o | |||||
| bool | dead | object what | |||||
| string | describe | world o | |||||
| void | dofine | object mob | object victim | int amount | object cur:0 | ||
| bool | donemission | object who | object quest | ||||
| bool | dotrap | string a | object pl | object o1 | object o2:0 | object on:0 | object o3:0 | 
| string | drunkify | object who | string txt | ||||
| void | empty_ship | protobject o | |||||
| void | endpager | player who | |||||
| void | failmission | object who | object o | ||||
| void | failquest | object who | object mis | ||||
| void | fine | object who | int amount | string why | object jur:0 | ||
| void | flush | object o | |||||
| string | format_roomname | object room | object play | string ic | string oc | string sin | |
| string | formatcash | int amt | object o | int l:0 | |||
| string | formattime | object who | string format | int when | |||
| object | freequarters | object of | |||||
| char | gender | object o | |||||
| object | get | string id | |||||
| bool | getflag | object o | flag f | ||||
| object | getfloor | object o | |||||
| int | getint | object what | string id | ||||
| int | getintd | object what | string id | int d | |||
| object | getmission | object o | |||||
| object | getobj | object what | string id | ||||
| bool | getpriv | object o | priv f | ||||
| void | getprops | object what | string pref:0 | ||||
| nilstring | getstr | object what | string id | ||||
| void | give | protobject from | object what | object dest | |||
| void | givecash | object who | int amount | object curr | |||
| void | givemission | object who | object mission | ||||
| void | givequest | object who | object mis | ||||
| void | grudgequest | object who | object mis | ||||
| void | harm | object who | int amount | ||||
| void | heal | object medic | object who | int amount | |||
| object | holdsclone | object o | object c | ||||
| object | holdsflag | object o | flag f | ||||
| object | holdszone | object o | string z | ||||
| string | id | object what | |||||
| bool | inlist | object who | string list | ||||
| void | interpret | protobject what | string cmd | ||||
| bool | isa | object o | object c | ||||
| object | jurisdiction | object where | |||||
| object | kill | object who | nilstring msg | ||||
| world | killr | object room | nilstring msg | ||||
| string | lang | string txt | object who | ||||
| object | leader | object o | |||||
| int | mass_within | object o | |||||
| world | match | object who | table arg | ||||
| object | matchplayer | object who | string str | ||||
| world | matchprep | object who | table arg | string prep | |||
| object | mission | object blah | |||||
| bool | mobile | object o | |||||
| object | mount | object o | |||||
| void | move | protobject what | object where | ||||
| void | mplex_choose | player p | int i | ||||
| void | mplex_roomupdate | object o | |||||
| void | mplex_setsize | player p | int i | int cols | int rows | ||
| int | mudhour | object room | |||||
| int | mudminute | object room | |||||
| bool | naked | object who | |||||
| string | name | string id | |||||
| void | name_mobile | object mob | |||||
| string | nation | object w | |||||
| int | now | ||||||
| void | oact | object what | string txt | nilobject target:0 | nilobject prop:0 | string arg:0 | |
| bool | once | protobject o | |||||
| void | others | object what | string txt | object what2:0 | |||
| object | owner | object o | |||||
| string | pad | string what | int width | ||||
| void | pay | object from | object to | int amount | object cur:0 | ||
| bool | person | object o | |||||
| bool | player | object o | |||||
| world | players | object player:0 | |||||
| string | plural_name | object what | |||||
| int | privs | object who | |||||
| object | quarters | object of | |||||
| world | quests | ||||||
| int | random | int range | |||||
| string | rank | object who | |||||
| string | rankfor | int level | |||||
| world | recchildren | object what | |||||
| string | remove_articles | string txt | |||||
| void | reset | protobject what | |||||
| void | say | object who | string msg | ||||
| void | send | object what | string txt | ||||
| void | sendr | object what | string txt | ||||
| void | sendzone | string zone | string txt | ||||
| void | sendzonebut | string zone | object notr | string txt | |||
| void | set | protobject what | string id | int val | |||
| void | set | protobject what | string id | object val | |||
| void | set | protobject what | string id | string val | |||
| void | setbalance | object o | object cur | int amt | |||
| void | setcash | object o | object cur | int amt | |||
| void | setflag | protobject o | flag f | bool v | |||
| void | setmission | object obj | object mis | ||||
| void | setstate | protobject what | int n | ||||
| void | startfight | object attack | object victim | ||||
| void | startpager | player who | |||||
| int | state | object o | |||||
| int | super | ||||||
| void | swap | object a | object b | ||||
| void | syslog | priv pfl | string cat | object who | string msg | ||
| void | tell | object who | object to | string msg | |||
| string | toascii | string w | |||||
| string | type | void something | |||||
| void | unset | protobject what | string id | ||||
| int | value | object o | |||||
| void | vanish | protobject o | |||||
| void | vanish_all | protobject o | |||||
| object | weapon | object who | |||||
| bool | wears | object who | object what | ||||
| bool | wearsclone | object o | object c | ||||
| object | wearsflag | object o | flag f | ||||
| void | wipecash | object who | |||||
| object | wornon | object who | string where | ||||
| world | zone | string what | |||||
| world | zonewithflag | string what | flag f | 
Copyright (c) 2002 Abi Brady
bitwise or
int bit_and(int a, int b)  
    bitwise and 
 
    looks up the object with specified id. if you are in a holoprogram, returns the holoclone of it if any. 
int getint(object what, string id)  
    returns integer property id on what or if not present, -1 
int getintd(object what, string id, int d)  
    returns integer property id on what or if not present, d 
object getobj(object what, string id)  
    returns object property id on what or if not present, nil 
nilstring getstr(object what, string id)  
    returns string property id on what or if not present, nil 
object owner(object o)  
    returns the object that o is in 
void unset(protobject what, string id)  
    removes the property id on what 
void set(protobject what, string id, int val) 
    sets property id on what to val 
void set(protobject what, string id, string val) 
    sets property id on what to val 
void set(protobject what, string id, object val) 
    sets property id on what to val 
void getprops(object what, string pref:0) 
    returns a table with all the properties on what (only those starting with pref if specified) 
world children(object what)  
    returns all objects directly in what 
world players(object player:0)  
    returns all players visible to player, or all players if player is null. 
world recchildren(object what)  
    returns all objects in what, or in objects in those, etc. 
world quests()  
    returns all quests 
world zone(string what)  
    returns all objects in zone what. 
world zonewithflag(string what, flag f)  
    returns all objects in zone what which have flag f set. 
 
    sets the flag f on o to v 
bool getflag(object o, flag f)  
    returns 1 if o has flag f, otherwise nil. Flag constants look like 'flag.Fixed' 
bool getpriv(object o, priv f)  
    returns 1 if o has priv f, otherwise nil. Priv constants look like 'priv.God' 
 
    returns true if the string vn corresponds to a currently existing action 
bool isa(object o, object c)  
    returns true if o is c or has treatas set to c 
int state(object o)  
    returns which state o is in (for doors and containers, 0 
int privs(object who)  
    returns the effective level that who is at, taking into account remort 
bool person(object o)  
    returns true if o is a player or a mobile 
bool player(object o)  
    returns true if o a player 
bool mobile(object o)  
    returns true if o a mobile 
object mount(object o)  
    returns the thing o is riding, if any 
bool naked(object who)  
    returns true if who is naked 
object leader(object o)  
    returns the object o is following 
char gender(object o)  
    returns a one-char string which is 'm', 'f', 'n', 'a', etc, or '?' 
object getmission(object o)  
    return the mission object for mission with id o 
void pay(object from, object to, int amount, object cur:0)  
    pay amount units in cur from from to to 
void dofine(object mob, object victim, int amount, object cur:0)  
    pay amount units in cur from from to to 
object quarters(object of)  
    return the quarters belonging to of if any 
object freequarters(object of)  
    find out whether there are any free quarters referred to by the quarters office of 
bool inlist(object who, string list)  
    return true if who's id is in the comma-separated list list 
string rank(object who)  
   returns the rank of who as a string. 
string rankfor(int level)  
   returns the navy rank corresponding to 'level' 
string nation(object w)  
    returns the nation of the person w 
 
object holdsclone(object o, object c)  
    if o holds any clones of c, return one of them. recurses into containers. 
object holdsflag(object o, flag f)  
    returns true if o holds any object with flag f 
object holdszone(object o, string z)  
    returns any object held by o with zone z 
bool wearsclone(object o, object c)  
    returns true if o wears any clones of c 
object wearsflag(object o, flag f)  
    if o wears any objects with flag f return one of them. otherwise return nil. 
world allholdsflag(object o, flag f)  
    return all objects recursively in o which have the flag f. includes o if applicable. 
world allwearsflag(object o, flag f)  
    return all objects recursively in o which have the flag f. includes o if applicable. 
world allholdsclone(object o, object f)  
    return all objects recursively in o which are f or are clones of f 
world alltreatas(object o, object f)  
    return all objects recursively in o which are f or are clones of f 
bool contains(object o, object w)  
    returns true if w is in o either directly or via other objects, otherwise false. 
bool wears(object who, object what)  
    return true if who is wearing the actual object what 
object weapon(object who)  
    return the object that who is wielding 
 
    returns the currency that o is set to use 
int convert(int amt, nilobject from, nilobject to)  
    convert amt from from to to. if they are nil it means ICUs. 
string formatcash(int amt, object o, int l:0)  
    format amt (currency is o) for display. l is one for long-style, zero for short-style 
int cash(object o, object cur)  
    return the amount of cash in cur that o has on them 
void setcash(object o, object cur, int amt)  
    make o have amt in cur 
int balance(object o, object cur)  
    return the amount of cash in cur that o has in the bank 
void setbalance(object o, object cur, int amt)  
    make o have amt in cur in their balance 
void givecash(object who, int amount, object curr)  
    give who amount in curr  
void wipecash(object who)  
    remove all cash from  
void fine(object who, int amount, string why, object jur:0)  
    fine who amount (in ICUs), for why, in jurisdiction jur. if j not given, use the default one for their location. 
object jurisdiction(object where)  
    return the jurisidiction that applies for where 
 
    format when (a time_t value) as a time with string format, displaying it in who's timezone 
int value(object o)  
    return the value of o in ICUs. 
string capitalise(string what)  
    capitalise the given string 
string pad(string what, int width)  
    pad what out to width. colour-code safe. 
string name(string id)  
    returns the colour and capitalised name of the player with id, who need not be logged in 
void swap(object a, object b)  
    swap a and b's owners. 
int random(int range)  
    returns number between 0 and range-1 
int mudhour(object room)  
    returns mud-time hour between 0 and 23 for room 
int mudminute(object room)  
    returns mud-time minute between 0 and 59 for room 
int now()  
    returns the current time, in seconds, since 1970 
object wornon(object who, string where)  
    returns the outermost clothing worn by who on their where 
world clothing(object who)  
   returns all clothing worn by who 
void flush(object o)  
    cause current buffer of o to be sent to them. 
void mplex_choose(player p, int i)  
    sends the code to choose multiplexed connection i on o. 1 is subwindow for games, 0 is main window. 
void mplex_setsize(player p, int i, int cols, int rows)  
    sets the size of the subwindow i on o to cols by rows. 
void mplex_roomupdate(object o)  
    call the 'mplex' trap on the room for everyone in it who has mplex support. 
bool dotrap(string a, object pl, object o1, object o2:0, object on:0, object o3:0)  
    call the lua trap a on on (or o1 of on not specified) with o1 o1, o2 o2 (optional; if not then NULL) and pl pl. no txt support yet 
int super()  
    call the trap on the treatas that this trap has overridden 
string format_roomname(object room, object play, string ic, string oc, string sin)  
    return preposition-prefixed form of room's name, from the pov of play, with ic and oc as colourcodes for the name, and sin either "" for normal, or "to" for to-mode (in muon's bar -> to muon's bar, on foo -> onto foo). 
int mass_within(object o)  
    return the mass of the children of o recursively, in grams 
bool canattack(object who, object what)  
    return true is who can attack what without getting arrested 
 
    translates the text txt according to the language who is speaking 
string drunkify(object who, string txt)  
    mangle the text txt to make it as spoken by who. Does slurring, mog conversion, literacy filter, etc. 
void send(object what, string txt)  
    send txt to what. newline not needed. 
void sendr(object what, string txt)  
    send txt to everything in the room what and linked rooms 
void others(object what, string txt, object what2:0)  
    send txt to everything in the same room as what. newline not needed. 
void act(object what, string txt, nilobject target:0, nilobject prop:0, string arg:0)  
   uses txt as the text of an action and performs it as what. %1 appears to be "you" to what. If specified target and prop are used. 
string acts(object what, string txt, nilobject target:0, nilobject prop:0, string txt2:0)  
    format txt as if it were an action string performed by what 
void oact(object what, string txt, nilobject target:0, nilobject prop:0, string arg:0)  
   uses txt as the text of an action and performs it as what. doesn't get sent to what. If specified, target and prop are used. 
void tell(object who, object to, string msg)  
   tell to msg from who 
void say(object who, string msg)  
    makes who say msg 
void sendzone(string zone, string txt)  
    send txt to all players in rooms with zone zone 
void sendzonebut(string zone, object notr, string txt)  
    send txt to all players in rooms with zone zone, except for those in not 
string describe(world o)  
    given a world, give a string that describes the objects in it 
 
   if o is a clone, delete, if not move to "empty" 
void vanish_all(protobject o)  
    vanish o and all objects in it, recursively 
string plural_name(object what)  
   returns the plural form of what's name 
string remove_articles(string txt)  
   returns txt, minus leading articles 
void empty_ship(protobject o)  
    empties the ship o of all players 
void move(protobject what, object where)  
    moves what to be in where 
object clone(object what, object where, object mis:0)  
    clones a what and places it in where 
object autoclone(object what, object where, string zone)  
    clones a what and places it in where. creates auto objects too. everything'll be part of zone 
void reset(protobject what)  
    resets what to its starting conditions 
bool once(protobject o)  
    first time it is run on o will return 1, from then on will return 0 until object reset 
void setstate(protobject what, int n)  
    sets what to be in state n 
object anyplayerfrom(object blah)  
    return a random player from blah 
object anyobjectfrom(object blah)  
    return a random object from blah 
object anyroominzone(string zone)  
    returns a random room from blah 
object mission(object blah)  
    returns the minimission that owns blah 
void setmission(object obj, object mis)  
    associates the object obj with the minimission mis. The object will be destroyed with the minimission. 
void clearmission(object obj)  
    makes obj a freestanding object that isn't associated with a mission 
void name_mobile(object mob)  
    give mob a random human name 
world match(object who, table arg)  
    try to match arg from the point of view of who 
world matchprep(object who, table arg, string prep)  
    try to match arg from the point of view of who, looking for prep 
object matchplayer(object who, string str)  
    try to match str to a person, from the point of view of who 
 
   makes from give what to dest 
void startfight(object attack, object victim)  
   makes attack start a fight with victim 
void interpret(protobject what, string cmd)  
   does cmd as what 
object kill(object who, nilstring msg)  
   make blah die, with log message msg (which can be nil). returns the corpse if any, which you should set a cause of death on. 
world killr(object room, nilstring msg)  
    kill everything in room with message msg 
void heal(object medic, object who, int amount)  
    make medic heal who up to amount health points. 
void harm(object who, int amount)  
    remove amount health points from who 
void syslog(priv pfl, string cat, object who, string msg)  
 
    grant who the id quest with a cash reward 
void grudgequest(object who, object mis)  
    grant who the id quest but without any cash reward 
void failquest(object who, object mis)  
    mark who as having failed the id quest 
bool accepted(object who, object quest)  
    return true if who has accepted quest 
bool donemission(object who, object quest)  
    return true if who has done mission with qid quest 
void givemission(object who, object mission)  
    make who have done the minimission mission, reward them, message, etc. 
void failmission(object who, object o)  
    mark who as having failed the given minimission 
 
    start the pager on who. all further output sent to them will be send instead to a file and then paged back to them later. 
void endpager(player who)  
    activate the pager upon who. done automatically if not done in a trap.basic object functions
object get(string id) flags
void setflag(protobject o, flag f, bool v) advanced object info functions
bool actionverb(string vn) contents examination
object getfloor(object o) financial 
object currency(object o) utility
string formattime(object who, string format, int when) output
string lang(string txt, object who) basic object manipulation
void vanish(protobject o) advanced object manipulation
void give(protobject from, object what, object dest) quest related stuff
void givequest(object who, object mis) slightly evil stuff
void startpager(player who)