| General Purpose | |
|---|---|
| self | A reference to the entity the script is attached to. Always valid. |
| threadid | A record representing the currently executing script thread in a uniquely identifiable fashion. |
| random. num | DEPRECATED Random number between 1 and num. Use %random(num)% instead. |
| random.char | DEPRECATED Random person in room. Use % entity .room.people.word(%random(% entity .room.people.count%)%)% instead. |
| random(num) | Random number between 1 and num. |
| select(cond, a, b) | If cond is true/non-zero, the result is a. Otherwise the result is b. This mimics C-style trinary conditional, cond ? a : b |
| skillroll(value) | Perform a skillroll against the specified value. > 0 is success, 0 or less is failure. |
| tiers(value) | The Tier Value (useful fo rskillrolls) of the given value. |
| @mob(VIRTUAL, FIELD) | Special purpose - get value of field from prototype mob virtualid |
| @obj(VIRTUAL, FIELD) | Special purpose - get value of field from prototype obj virtualid |
| String Fields / Modifiers | |
|---|---|
| value.an | A new string with "a" or "an" prefixing the contents of value depending on if value beings with a vowel. |
| value.cap | Capitalize the word. Skips color codes and non-letters, to capitalize the first real letter of the word. |
| value.contains(other) | 1 if value contains the substring other. |
| value.beginswith(other) | 1 if value begins with the string other. |
| value.endswith(other) | 1 if value ends with the string other. |
| value.isabbrev(abbrev) | 1 if abbrev is an abbreviation of value. |
| value.isname(name) | 1 if name is in list of names (even as an abbreviation) in value. |
| value.trim | Remove beginning/ending spaces. E.g. " foo bar " becomes "foo bar". |
| value.splat(times) | Repeat value the specified number of times |
| value.strlen | The length of the string, counting color codes. |
| value.stripcolor | Removes all color codes from the string. |
| value.regex(pattern) | Regular expression parser. Given the string value and the regular expression pattern, determine if pattern is found in value. pattern supports full regular expression syntax, include 'capture groups'. A capture group is used to extract portions of a string that matches the format. Uses the PCRE (Perl Compatible Regular Expressions) style of regex. |
| value.replace(pattern, replacement) | Similiar to regex. Replaces the first matching regex pattern in value with replacement. Supports capture groups in the pattern corresponding to \0 through \9 in the replacement. |
| value.replaceall(pattern, _replacement) | Like replace, but replaces all matches. |
| expandcolorcodes(value) | Convert color codes to doubled quotes for displaying the codes themselves. |
| print(format, ...) | Like the 'print' command. Returns a string generated using the format and additional parameters. NOTE You must use $ before the format string, or you will get incorrect output or errors. For example: %print($"You have %d rounds left.", %rounds%)% |
| String / List Fields | |
|---|---|
| value. num | DEPRECATED Get string word / list item number num from variable value. Use value [ num ] instead. |
| value.word(num) | DEPRECATED Word / list item number num from variable value. Words/items are separated by 1 or more spaces. Use value [ num ] instead. |
| value.count | The number of words/items in value. |
| value.extract(num) | Return the string/list with word / item number num removed. You can alternatively use ' unset value num ' for immediate effect. |
| value.find(what) | The word / item number of what in value. what must be an exact, full match. 0 if no match. |
| value.findbyfield(fieldname, match) | The index (word / item number) of a record in value whose field fieldname contains match. what must be an exact, full match. 0 if no match. |
| value.head | The first word / item of value. |
| value.tail | The last word / item of value. NOTE Currently erroneously acts as everything AFTER the first word. Fixing it is undecided. |
| value.pop | Everything after the first word / item of value. |
| value.intersection(list) | Produces a list that contains only the words / items common to both value and list. |
| value.insert(where, what) | Return the string/list with what inserted into (before) word / item number where. |
| value.filter(filter) | Returns a list of items in the list value that match the filter. A filter can have an optional subfield on the filter For example, "hasvariable(foobar)" Additionally a filter can be an operation, with the field on the left-hand side There are 2 filtering modes |
| Parameters | |
|---|---|
| value.extractparam(num) | Returns the parameter list with parameter number num removed. |
| value.param(num) | Parameter number num of value. Parameters are specially separated items. |
| value.paramcount | The number of parameters in value. If the final parameter is empty it will still be counted. |
| value.paramfind(what) | The parameter number of what in value. what must be an exact, full match, excluding leading and trailing spaces of the parameter. 0 if no match. |
| Conversion Operations | |
|---|---|
| eval(expression) | Allows a mathematical expression to be dropped into commands where math is not normally allowed. |
| float(what) | Convert what into a decimal number (float). Strings become 0.0. |
| integer(what) | Convert what into a whole number (integer). Floats lose the decimal. Strings become 0. |
| string(what) | Convert what into a string. Forceful conversion. No real use. |
| isnumber(what) | True if what is a number of any kind. |
| isinteger(what) | True if what is a whole number (integer). |
| isfloat(what) | True if what is a decimal number (float). |
| crc(value) | Generate CRC of string. NOTE: Prefer hash(value) over CRC. |
| hash(value) | Generate hash of string. |
| Clans | |
|---|---|
| clans | A list of references to every clan |
| clan(clan) | A reference to the Clan data, if any |
| clanmemberson(clan) | DEPRECATED A list of references to clan members currently online. Use %clan(clan).membersonline% instead. |
| clan.id | ID number |
| clan.vnum | DEPRECATED ID number. Use % clan .id% instead. |
| clan.name | The name |
| clan.tag | The tag (short name) |
| clan.leader | Record containing the name and a ref to the leader |
| clan.races | List of the races allowed |
| clan.room | Recall room |
| clan.savings | Clan Points |
| clan.ranks | List of references to Clan Rank data |
| clan.members | List of references to Clan Member data |
| clan.membersOnline | List of references to member players that are currently online |
| clan.enemies | List of enemy clan IDs |
| clan.allies | List of ally clan IDs |
| clan.IsMember(who) | Is who a member of the clan. who may be a name, ID, or reference. |
| clan.IsApplicant(who) | Is who applying to the clan. who may be a name, ID, or reference. |
| clan.IsBanned(who) | Is who banned from applying to the clan. who may be a name, ID, or reference. |
| clan.IsEnemy(other) | Is other an enemy clan. other may be an ID or reference to a clan. Only one clan must be at war with the other. |
| clan.IsAlly(other) | Is other an allied clan. other may be an ID or reference to a clan. Both clans must be allies. |
| clan.Relation(other) | Relation of clan to other. other may be an ID or reference to a clan. Results will be Neutral, Friend (if allied), or Enemy (if at war) |
| Clan Members | |
| clanmember.id | Player ID of member |
| clanmember.name | Name of member |
| clanmember.ref | Reference to member, if online |
| clanmember.rank | A reference to the Clan rank of the member |
| clanmember.privileges | List of personal privileges of member (currently unused) |
| clanmember.laston | Last time member was online |
| Clan Ranks | |
| clanrank.name | Name of rank |
| clanrank.order | Order of rank, 0 is leadership. |
| clanrank.privileges | List of privileges granted to members of that rank. |
| Date and Time | |
|---|---|
| date | Current system time in seconds. Useful for tracking real-time time differences. |
| date.second | Second of the minute of current system time. |
| date.minute | Minute of the hour of current system time. |
| date.hour | Hour of the day of current system time. |
| date.day | Day of month current system time. |
| date.month | Month of current system time. |
| date.year | Year of current system time. |
| date.weekday | Day of week current system time. |
| date.yearday | Day of year (1..365) of current system time. |
| pulse | Current pulse since reboot (1/10th of a second). Resets to 0 at reboot or copyover. Do not keep this value persistent on objects, unless you REALLY know what the hell you are doing. |
| time.minute | Minute of game time. |
| time.hour | Hour of game time. |
| time.day | Day of game time. |
| time.month | Month of game time. |
| time.year | Year of game time. |
| time.weekday | Day of week of game time. |
| Advanced Mathematics | |
|---|---|
| All of these math functions are under the Math: namespace. Example usage: %Math:sqrt(%foo%)% | |
| Math:abs(x) | Compute the absolute value of x. |
| Math:acos(angle) | Arc cosine of angle (-1 to 1). Returns radians (-PI/2 to PI/2). |
| Math:acosh(angle) | Inverse hyperbolic cosine of angle. |
| Math:asin(angle) | Arc sine of angle (-1 to 1). Returns radians (-PI/2 to PI/2). |
| Math:asinh(angle) | Inverse hyperbolic sine of angle. |
| Math:atan(angle) | Arc tangent of angle (-1 to 1). Returns radians (-PI/2 to PI/2). |
| Math:atanh(angle) | Inverse hyperbolic tangent. |
| Math:atan2(x, y) | Arc tangent of the angle given the x and y. Returns radians (-PI to PI). |
| Math:cbrt(x) | Cube root of x. |
| Math:ceil(x) | Round x up to the nearest whole number. |
| Math:copysign(x, y) | Return a number whose absolute value is equal to the absolute value of x, but whose sign is equal to y. |
| Math:cos(angle) | Cosine of angle (given in radians). |
| Math:cosh(x) | Hyperbolic cosine of x. |
| Math:erf(x) | Error function of x. erf(x) == 2/sqrt(pi) * (integral from 0 to x of exp(-t * t) dt. |
| Math:erfc(x) | Complement of erf(x). That is, 1.0 - erf(x). |
| Math:exp(x) | Value of e raised to the power of x. |
| Math:exp2(x) | 2 raised to the power of x. Same as pow(2, x). |
| Math:expm1(x) | Exponential minus 1. Equivalent to exp(x) - 1. |
| Math:factorial(x) | returns x! (factorial). If x is a floating point number, uses floating point math for larger but imprecise results. |
| Math:fdim(x, y) | Positive difference; returns max(x-y,0). |
| Math:floor(x) | 2Round x down to the nearest integer. |
| Math:hypot(x, y) | Euclidean distance - hypotenuse. Returns sqrt(x * x + y * y). |
| Math:lgamma(x) | Integral from 0 to infinity of t^(x-1) e^-t dt. |
| Math:log(x) | Natural logarithm of x. |
| Math:log10(x) | Base-10 natural logarithm of x. |
| Math:log1p(x) | Equivalent to log(1 + x) |
| Math:log2(x) | Base-2 natural logarithm of x. |
| Math:max(x, y) | Returns the larger of x and y. |
| Math:min(x, y) | Returns the smaller of x and y. |
| Math:nearbyint(x) | Rounds to nearest whole number. Rounds halfway cases to the even number. |
| Math:nextafter(x, y) | Increments x towards y by the smallest amount possible. |
| Math:pow(x, y) | x to the power of y. |
| Math:round(x) | Round to nearest whole number. Rounds halfway cases away from zero. |
| Math:sin(angle) | Sin of angle (given in radians). |
| Math:sinh(x) | Hyperbolic sine of x. |
| Math:sqrt(x) | Square root of x. |
| Math:tan(angle) | Tangent of angle (given in radians). |
| Math:tanh(x) | Hyperbolic tangent of x. |
| Math:tgamma(x) | True gamma of x. |
| Math:trunc(x) | Drop decimals from x by rounding towards 0. |
| Directions | |
|---|---|
| isdir(dir) | Convert dir to a full-name direction, or 0 if it is not a valid direction. Also supports 0 to 5 numeric directions (n=0 e=1 s=2 w=3 u=4 d=5). |
| revdir(dir) | The opposite direction of dir. |
| simplepath(start, target) | Returns a basic path consisting of a list of directions from start to target. start and target may be a reference to a character, object, or room, or the virtual id of a room. |
| Lookup and Validation | |
|---|---|
| character(name) | Find a character (mob or player) in game by name, reference, or virtual id. Returns a reference. |
| record.field(name) | Returns contents of an arbitrarily named field of the specified record. Will also support record.variable(name) in the near future for seemless integration with entities. |
| findroom(virtual) | Find a room in game by reference or virtual id. Returns a reference. |
| makeuid(id) | Convert id into a reference. Does not validate reference. |
| mudcommand(command) | The full version of command, if it is a valid MUD command, otherwise 0. |
| object(name) | Find an object in game by name, reference, or virtual id. Returns a reference. |
| player(name) | Find a player in game by name or reference. Returns a reference. |
| players(options) | A list of references to every connected player character in game. If options contains "linkdead", then it also includes linkdead players. |
| valid(reference) | 1 if reference is still valid (the player/mob/object is still in game. |
| variable(name) | Returns a local or global (on self) variable of the specified name. Allows retrieving arbitrarily named variables. Does not throw an error on missing variable, but instead returns a blank result. Note: when using a context, the context specifier must be inside the subfield. |
| zonerooms(zone) | A reference to every room in the specified zone. |
| Virtual ID Confirmation | |
|---|---|
| mobexists(virtual) | 1 if there exists a prototype mob of virtual id virtual. |
| objexists(virtual) | 1 if there exists a prototype object of virtual id virtual. |
| roomexists(virtual) | 1 if there exists a room of virtual id virtual. |
| Characters | |
|---|---|
| character.age | Age, in years. Only useful for players. |
| character.agi | Agility attribute. |
| character.ai | A reference to the AI data of the mob, if any |
| character.alias | Name keywords. |
| character.affects | List of affect flags currently affecting character. |
| character.affecttypes | List of affect names currently affecting character. |
| character.bonusarmor | Bonus armor absorb. |
| character.cansee(who) | If who is an object, 1 if character can see it, 0 otherwise. If who is a character, 0 if character cannot see the target, 1 if who is a 'shimmer' to character, and 2 if who is fully visible. |
| character.canuse(what) | 1 if what is usable by character. |
| character.cango(dir) | 1 if character can move dir. |
| character.carrying | List of character 's inventory. |
| character.channels | If a player, list of the channel flags set. Most flags designate that a channel is turned off (NO-SHOUT, for example). |
| character.clan | Number of clan, or 0. |
| character.clanRank | Reference to clan rank, if any |
| character.coo | Coordination attribute. |
| character.condition | Descriptive string about current health condition of character. |
| character.description | Look-at description of character. Valid for both mobs and players. |
| character.enemy | DEPRECATED Mob scripts only. 1 if character is an enemy to the mob the script is attached to. Use % character .relation(character)% instead. |
| character.eq | List of character 's equipment. |
| character.faction | Faction (human, alien, predator) of character. |
| character.friend | DEPRECATED Mob scripts only. 1 if character is a friend to the mob the script is attached to. Use % character .relation(character)% instead. |
| character.fighting | Reference to current combat target of character, or 0. |
| character.findtarget(...) | Find a named/referenced target in nearby rooms, using the same target-scanning as the combat system. Usage: character.findtarget(name, range or weapon [, direction ]). name may be a name or a reference. range or weapon may be a numeric range in rooms or a reference to a ranged weapon. direction is optional, and specifies a single direction to check. If no direction is specified then all directions will be searched. The result is either 0 for a failure, or a list of 3 values: target direction distance Use a negative search range to opt out of searching the character's current room. |
| character.followers | List of followers. |
| character.group | List of group members. |
| character.hasattached(virtual) | 1 if script virtual is currently attached. |
| character.hasClanPermission(perm) | 1 if character has the given permission within their clan, either by rank or personal privilege. |
| character.hasfunction(function) | 1 if function is a valid function to call on character, provided by an attached entity-library script. |
| character.hasthread(threadid) | 1 if threadid is a currently executing thread on character. |
| character.hasvariable(name) | 1 if character has a global variable name. |
| character.hea | Health attribute. |
| character.height | Height of character. Only useful for players. |
| character.heshe | Pick proper pronoun based on gender: he, she, it. For displaying text to users, prefer $ character E. |
| character.himher | Pick proper pronoun based on gender: him, her, it. For displaying text to users, prefer $ character M. |
| character.hisher | Pick proper pronoun based on gender: his, hers, its. For displaying text to users, prefer $ character S. |
| character.hitpercent | Percent of hit points remaining. |
| character.hp | Current hit points remaining. |
| character.hasskill(skill) | 1 if character has the ability to train skill. |
| character.id | ID Number. Unique and never changes. Player's ID numbers never change. |
| character.idle | Idle time of players. |
| character.immobilized | 1 if character is sleeping, stunned, incapacitated, or mortally wounded. |
| character.invis | Level of invisibility: 0 through 3. |
| character.iscarrying(what) | A reference to every item in character's inventory which matches what. what may be a name, virtual id, or reference. Does not search equipment or inside containers. |
| character.iscarryingdeep(what) | Like character.iscarrying() but will also search inside non-equipped containers. |
| character.iswearing(what) | Like iscarrying() but for worn equipment instead. Does not search into containers. |
| character.iswearingdeep(what) | Like iswearing() but will also search inside non-equipped containers. |
| character.isname(name) | 1 if name is an abbreviation of a keyword. |
| character.ismarine | 1 if character is a Marine (Synthetic or Human). |
| character.karma | Karma. |
| character.kno | Knowledge attribute. |
| character.level | Current level. |
| character.lifemp | Total MP earned over players's lifetime, or MP value of mobile. |
| character.loadroom | A reference to the custom loadroom of the player, if any, or 0 (0 for mobs). See also character.startroom. |
| character.maxhp | Maximum hitpoints. |
| character.maxmv | Maximum movement points. |
| character.master | Reference to character being followed, or 0. |
| character.mdeaths | Player's lifetime deaths to mobs. |
| character.mkills | Player's lifetime mob kill count. |
| character.mobbits | Mob flags if character is a mobile. |
| character.mp | Current MP player has on hand, 0 for mobs. |
| character.mv | Current movement points. |
| character.name | Short name. |
| character.npc | 1 if is a mobile, 0 if is a player. |
| character.neutral | DEPRECATED Mob scripts only. 1 if character is neutral to the mob the script is attached to. Use % character .relation(% character %)% instead. |
| character.pdeaths | Player's lifetime deaths to players. |
| character.per | Perception attribute. |
| character.pkills | Player's lifetime player kill count. |
| character.position | Current position of character. Positions include: dead, mortally wounded, incapacitated, stunned, sleeping, resting, sitting, fighting, standing. |
| character.prefs | Preference flags if character is a player. |
| character.pretitle | Pretitle. |
| character.race | Race: human, synthetic, predator, alien. |
| character.rank | Current rank. |
| character.realskill(skill) | Number of points of skill. |
| character.realunmodskill(skill) | Raw number of points of skill, ignoring any equipment or affect boosts/penalties. |
| character.relation | DEPRECATED Mob scripts only. Relation of character to the mob the script is attached to. Use % character .relation(character)% instead. |
| character.relation(who) | Relation of character to who. Can be friendly, neutral, or enemy. |
| character.room | Current room character is in. Will be a reference, not virtual id. |
| character.sex | Gender: male, female, neutral |
| character.skill(skill) | Skill value in tiers, with attribute bonus applied. Value is 0 to 35. |
| character.skillroll(skill) | Perform a skillroll of skill. > 0 is success, 0 or less is failure. |
| character.staff | 1 if character is a staff member. |
| character.startroom | A reference to the room the player will respawn in (0 for mobs). See also character.loadroom. |
| character.str | Strength attribute. |
| character.sitting | Object character is sitting on, if any. |
| character.targetcharacter(name) | Reference to a character visible to character in room that matches name. Supports #.name format. |
| character.targetobject(name) | Reference to an object visible to character that matches name, first searching equipment, then inventory, then room. Supports #.name format. |
| character.targetobjectequipment(name) | Like character.targetobject() but only searches equipment. |
| character.targetobjectinventory(name) | Like character.targetobject() but only searches inventory. |
| character.targetobjectroom(name) | Like character.targetobject() but only searches room. |
| character.target(name, filter) | NOT YET IMPLEMENTED. Reference to matching character or object that matches name. filter must include one or more of the following words: character, objequipment, objinventory, objroom, and specifies what to search. Supports #.name#. |
| character.team | Name of team, or none |
| character.title | Title. |
| character.totalingame | Number of character loaded, if a mobile. |
| character.traitor | 1 if a traitor. |
| character.variable(name) | Returns a variable of the specified name on character. Allows retrieving arbitrarily named variables. Does not throw an error on missing variable, but instead returns a blank result. |
| character.varclass | "character" |
| character.vnum | DEPRECATED Virtual number of mobile, -1 for players, non-mob NPCs, or mobiles whose Virtual IDs do not exist in VNum-mapped space. Use character.vid instead. |
| character.vid | Virtual ID of mobile, 0 for players and non-mob NPCs. |
| character.wearing | List of references of all worn equipment. |
| character.wearing(location) | Reference to worn object worn on location. |
| character.weight | Character's physical weight. Excludes carried items. |
| Mob AI | |
|---|---|
| ai.aggrroom | 0..100 aggressive percentage against same room targets every thought cycle |
| ai.aggrranged | 0..100 aggressive percentage against ranged targets every thought cycle |
| ai.aggrloyalty | 0..100 aggressive percentage chance against targets fighting friends |
| ai.awarerange | Number of rooms the mob can see |
| ai.moverate | 0..100 percentage chance of wandering every thought cycle |
| Objects | |
|---|---|
| object.actiondesc | Look-at description. May contain multiple lines. |
| object.affects | List of affect flags. |
| object.affectmods | List of records detailing special affects applied to player when worn. |
| object.buyer | ID # of original purchaser. |
| object.bought | Time when item was bought. Same format as %date%. |
| object.contents | List of references to objects inside object. |
| object.clan | Clan restriction. |
| object.cost | MP cost. |
| object.description | Long description (in room). |
| object.extra | Extras flags. |
| object.gun | Reference to gun data, if any |
| object.hasattached(virtual) | 1 if script virtual is currently attached. |
| object.hasfunction(function) | 1 if function is a valid function to call on object, provided by an attached entity-library script. |
| object.hasthread(threadid) | 1 if threadid is a currently executing thread on object. |
| object.hasvariable(name) | 1 if object has a global variable name. |
| object.id | ID Number. Unique. Note that objects saved in houses/pfiles receive new ID numbers when MUD reboots/copyovers, or player quits and re-enters. |
| object.inside | Reference to object containing object. 0 if not inside another object. |
| object.iscontents(name) | A reference to every item inside object inventory which matches name. name may be a name, virtual id, or reference. Does not search containers within object. |
| object.iscontentsdeep(name) | Like object.iscontents(name) but searches inside containers. |
| object.isname(name) | 1 if name is an abbreviation of a keyword. |
| object.level | Level restriction. |
| object.name | Namelist (keywords). |
| object.owner | Reference to character carrying or wearing object. Even if object is inside a container, it can still have an owner. |
| object.reloaded | 1 if object has been loaded from a house file or pfile. |
| object.room | Current room object is in. Will be a reference. |
| object.racerestriction | Race restriction flags. |
| object.shortdesc | Short description (inventory/worn). |
| object.type | Object type (board, weapon, etc). |
| object.timer | Remaining time on the object timer. |
| object.val0 | DEPRECATED Value #0. Different purpose for each type. Use object.val(0) instead. |
| object.value(name) | Object value name. Each value has a different purpose for each object type. Please see LexiObjectValues for a list of values of every object type. THIS IS THE PREFERRED METHOD |
| object.variable(name) | Returns a variable of the specified name on object. Allows retrieving arbitrarily named variables. Does not throw an error on missing variable, but instead returns a blank result. |
| object.varclass | "object" |
| object.vnum | DEPRECATED Virtual number of object. Can be -1 (corpses, mail, "Empty", object's virtual id does not exist in VNum-mapped space). Use object.vid instead. |
| object.vid | Virtual ID of object. Can be 0 (corpses, mail, "Empty"). |
| object.wear | Wear flags (locations). |
| object.weight | Weight of object. Includes weight of contents of a container. |
| object.worn | Location object is worn on, or 0. |
| Object Gun | |
|---|---|
| gun.skill | Combat skill |
| gun.skill2 | Second combat skill, if any |
| gun.attack | Attack type |
| gun.damage | Damage |
| gun.damagetype | Damage type |
| gun.rate | Rate of fire |
| gun.range | Maximum range |
| gun.optimalrange | Optimal range |
| gun.ammo | Reference to ammo data for the gun |
| gun.ammotype | Ammo type. May also use gun.ammo.type |
| gun.ammovnum | DEPRECATED Use gun.ammovid or gun.ammo.vid |
| gun.ammovid | VirtualID? of ammo loaded. May also use gun.ammo.vid |
| gun.ammoammount | Amount of ammo. May also use gun.ammo.ammount |
| Object Gun Ammo | |
|---|---|
| gunammo.type | Type of ammo |
| gunammo.vid | Virtual ID of ammo loaded |
| gunammo.amount | Amount of ammo |
| Rooms | |
|---|---|
| room.contents | List of references to objects inside the room. |
| room.description | The full description |
| room.exit(direction) | DEPRECATED Exit information list for direction. 0 if no exit, otherwise first item in list is the reference to the destination room (treat as a reference), followed by a list of flags. Use room.newexit(direction) instead. This will eventually be renamed to room.oldexit() and all references to it changed. |
| room.exits | List of references the exits in a room. |
| room.flags | Room flags. |
| room.hasattached(virtual) | 1 if script virtual is currently attached. |
| room.hasfunction(function) | 1 if function is a valid function to call on room, provided by an attached entity-library script. |
| room.hasthread(threadid) | 1 if threadid is a currently executing thread on room. |
| room.hasvariable(name) | 1 if room has a global variable name. |
| room.id | ID Number. Unique and never changes during current reboot. |
| room.iscontents(what) | A reference to every item in the room which matches what. what may be a name, virtual id, or reference. Does not search inside containers. |
| room.iscontentsdeep(what) | Like room.iscontents(what) but will also search inside containers. |
| room.ispeople(who) | A reference to every character in the room that matches who. who may be a name, virtual id, or reference. |
| room.ispeoplerace(who) | DEPRECATED A reference to every character in the room that matches who. who may be a name, virtual id, or reference. Use room.people.filter with an appropraite filter string. |
| room.ispeoplenotrace(who) | DEPRECATED A reference to every character in the room that matches who. who may be a name, virtual id, or reference. Use room.people.filter with an appropraite filter string. |
| room.light | Light level in room. |
| room.name | Room name. |
| room.newexit(dir) | Returns a reference to the Exit for the given dir, or 0 if no exit. This will eventually be renamed to room.exit() and all references to it changed. |
| room.people | A reference to every character in the room. |
| room.sector | Sector type of room. |
| room.variable(name) | Returns a variable of the specified name on room. Allows retrieving arbitrarily named variables. Does not throw an error on missing variable, but instead returns a blank result. |
| room.varclass | "room" |
| room.vnum | DEPRECATED Virtual number. May be -1 for dynamic rooms or rooms whose virtual id does not exist in VNum-mapped space. Use room.vid instead. |
| room.vid | Virtual ID. May be 0 for dynamic rooms. |
| room.zone | Zone name. |
| Exit | |
|---|---|
| exit.room | Reference to destination room |
| exit.vnum | VirtualID? of destination room. Prefer exit.vid instead |
| exit.vid | VirtualID? of destination room. |
| exit.key | Key, if any |
| exit.name | Direction of the exit |
| exit.direction | Look-in-direction description |
| exit.description | Look-in-direction description |
| exit.flags | Flags (settable in redit) |
| exit.states | States (temporary modifiers: closed, locked, impassable, blocked, disabled, breached, jammed, hidden) |
| exit.isOpen | Exit has a destination, is not DISABLED, is not BLOCKED, and is BREACHED or not CLOSED |
| exit.isDoorClosed | Exit has a destination, is not DISABLED, is not BREACHED, and is CLOSED |
| exit.isPassable | Exit isOpen, is not NO-MOVE (flag), and is not IMPASSABLE |
| exit.isViewable | same consitions as isOpen |