Help Entries starting with 'T'


@teleport

Teleports <object> to <room>. <object> must be a thing; if you do not supply a thing, the object is assumed to be yourself. The destination must be either JUMP_OK or controlled by you, and you must either control <object> or <object>'s current location. Also, the destination, if a room, cannot be teleport-locked against <object>. Mortals cannot teleport HEAVY objects. If the target room has a drop-to, <object> will go to the drop-to room instead.

Privileged players who teleport a player to another player send them to the location of the target, unless the /inside switch is used, in which case they are sent to the inventory of the target.

Teleportation from a room can be stopped by setting the NO_TEL flag. Royalty and Wizards can _always_ teleport to any location, regardless of NO_TEL or teleport locks.

Teleportation triggers the @oxtport/@tport/@otport/@atport attributes, unless <room> is an exit or the /silent switch is given.

As a special case, using "home" as the <room> teleports the object to its home.

See also:


@tport

Sets the <message> shown to <object> when <object> is teleported.


@trigger

@trigger can be used to set off commands stored in an attribute on an object. It can also pass values to that attribute on the stack as %0 - %9.

Example:

&GREET me=POSE waves hi.
@tr me/GREET
> Cyclonus waves hi.
    &GREET me=POSE waves to %0! ; say Hi there, %1.
    @trig me/GREET = Gears, Arcee
    > Cyclonus waves to Gears.
    > You say, "Hi there, Arcee."

(continued in help @trigger2)


@trigger2

@trigger is very useful for splitting up large commands and for making them neater, but it does cause a time delay in execution, because the commands are put into the queue a second later. For very commonly-used globals that you want to execute quickly, you should probably avoid using @trigger. However, in most cases, the time saved by cramming everything into one attribute is outweighed by the time spent debugging.


T()

Returns a 0 if the expression is false, and 1 otherwise. The definition of truth and falsehood depends on configuration settings; see 'BOOLEAN VALUES' for details.


TABLE()

This function returns the elements of <list> in a tabular format. All other parameters are optional. <field width> specifies how wide each table entry is allowed to be. It defaults to 10 characters <line length> is how wide a table row can be. Default is 78 chars. <delimiter> is the delimiter used in <list>. Default is white space. <output separator> is a single character to be used between entries in the table. Default is a single space.

Example:

> think table(a b areallylongone d)
a          b          areallylon d

Example:

> think table(the quick brown fox,10,25, ,|)
the       |quick
brown     |fox

TAG()

Function: tag(<name>,[param1[,param2...]])

This will output the tag 'name' with values from it's parameters.

Example: [tag(IMG,SRC=http://www.pennmush.org/someimage.jpg,ALIGN=LEFT,WIDTH=300)]

Will output (in HTML): <IMG SRC=http://www.pennmush.org/someimage.jpg ALIGN=LEFT WIDTH=300>


TAGWRAP()

Function: tagwrap(<tag>[,<parameters>],<string>)

This will output 'tag' with parameters, followed by 'string', and then a closing tag for 'tag'.

Example: [tagwrap(A,HREF=http://lists.pennmush.org,PennMUSH Lists)] Will output (in HTML): <A HREF=http://lists.pennmush.org>PennMUSH Lists</A>

A particularly important use of this function is tagwrap(PRE,<string>). Because Pueblo works like an html browser, spaces and tabs are compressed to a single space. If you have code (a +who function, for example) that relies on exact spacing, surround its output with a tagwrap(PRE,...) so that Pueblo will render it as "preformatted" text.


TAN()

Returns the tangent of <angle>, which should be expressed in the given angle type, or radians by default.

See 'HELP CTU()' for more on the angle type.


teach

Shows <command> (unparsed) to others in your room and then causes you to execute <command> as if you'd typed it in directly from the socket (even if you're an object). Useful for helping newbies:

Example:

> say To do a pose, use :<action>
You say "To do a pose, use :<action>"
> teach :waves hello.
Javelin types --> :waves hello.
Javelin waves hello.

Example:

> teach "[sort(c b a)]
Javelin types --> "[sort(c b a)]
Javelin says, "a b c"

TEL()

This function will teleport <object> to <destination>, exactly as @tel <object>=<destination>. <silent> is an optional boolean that, if true, makes the function act like @tel/silent. <inside> is an optional boolean that, if true, makes the function act like @tel/inside (some value for <silent> must also be specified).

See also:


TEMPLE

The TEMPLE flag is no longer available in PennMUSH. Please see help changes for more information.


TERMINFO()

Returns a list with at least one element - the type of client used by the player, or "unknown" if the client being used doesn't support being asked to identify itself using RFC 1091.

  Other elements in the list describe client capabilities, and
  currently include:
  pueblo           present if the client is in Pueblo mode.
  telnet           present if the client understands the telnet protocol.
  ssl              present if the client is using an SSL/TLS connection.

Other fields may be added in the future, if, for example, MXP support is ever added.

Players can use terminfo() on their own connections. Using it on other players is restricted to see_all objects.


TERSE

Flag: TERSE (players, things)

When an object is set TERSE, it does not see the descriptions or success/failure messages in rooms. This is a useful flag if you're on a slow connection or you're moving through a familiar area and don't want to see tons of text.

When a player is TERSE, all of their objects are considered to be TERSE.


TEXTFILE()

textfile() returns the text of entries from cached text files (such as "help", "news", "events", etc.) All whitespace and newlines are included, so you may want to edit %r's and squish the result if you plan to use the text as a list of words rather than a display.

textentries() returns the topic names of matching entries. <entry> may include wildcards, in which case a list of matching topic names will be returned, separated by the <separator> string if one is provided, and space-separated otherwise.

Example:

> say textfile(help,tan\()
You say, "  tan(<angle>[,<angle type>])
Returns the tangent of <angle>, which should be expressed in the
given angle type, or radians by default.
    See 'HELP CTU()' for more on the angle type.
  "

think

You can use this command to send a private message to yourself. Pronoun substitution is performed. This is essentially equivalent to doing a "@pemit me=<message>", but with "think", there's no prepended text. One possible use: @adesc me=think %N just looked at you.


Time functions

These functions return times or format times.

  convsecs()    convutcsecs() convtime()    ctime()       etimefmt()
  isdaylight()  mtime()       restarttime() secs()        starttime()
  stringsecs()  time()        timefmt()     timestring()  utctime()

TIME()

time() gives you the current time on the MUSH. WARNING! This is the time on the machine that the mush is running on, and not where you are.

utctime() and time(utc) give the same time in UTC (Aka GMT), not the server's local timezone.

If a timezone (-24 to +24) is given, it adds that many hours to UTC to return the correct timezone. Timezone may contain decimals (-1.5)

If <object> is given, and is a valid object containing an attribute TZ, it modifies the resulting time according to said timezone. time() on a player will always return a time, and if TZ is not a number between -24 and +24 inclusive, the time returned is UTC.

See also:


TIMEFMT()

This function takes a format and a time in seconds (Or the current time) and returns the format with escape sequences in it expanded to the proper values based on the time, relative to the host the server is on.

A list of all codes is in HELP TIMEFMT2

Example:

> think timefmt($A\, the $dth day of $B.)
Monday, the 17th day of July.

TIMEFMT2

All escape codes start with a $. To get a literal $, use $$. Invalid codes will return #-1 INVALID ESCAPE CODE. Other text will be passed through unchanged.

  $a - Abbreviated weekday name  $p - AM/PM  ($P may also work)
  $A - Full weekday name         $S - Seconds after the minute
  $b - Abbreviated month name    $U - Week of the year from 1rst Sunday
  $B - Full month name           $w - Day of the week. 0 = Sunday
  $c - Date and time             $W - Week of the year from 1rst Monday
  $d - Day of the month          $x - Date
  $H - Hour of the 24-hour day   $X - Time
  $I - Hour of the 12-hour day   $y - Two-digit year
  $j - Day of the year           $Y - Four-digit year
  $m - Month of the year         $Z - Time zone
  $M - Minutes after the hour    $$ - $ character.

TIMESTRING()

The timestring function takes a number of seconds as input and returns the amount of time formatted into days, hours, minutes, and seconds. If <pad flag> is 1, all time periods will be used even if the number of seconds is less than a day, hour, or minute. If <pad flag> is 2, all numbers will be 2 digits long.

Example:

> say [timestring(301)]
You say, " 5m  1s"
> say [timestring(301,1)]
You say, "0d  0h  5m  1s"
> say [timestring(301,2)]
You say, "00d 00h 05m 01s"

See also:


topics

Help is available on the following topics:

  ACTION LISTS             ANCESTORS                ANONYMOUS ATTRIBUTES
  ATTRIB-OWNERSHIP         ATTRIBUTES               BEING KILLED
  BOOLEAN VALUES           CHAT                     CLIENTS
  CONTROL                  COPYRIGHT                COSTS
  CREDITS                  DBREFS                   DROP-TO
  ENACTOR                  EVALUATION               EXECUTOR
  EXITS                    FAILURE                  FLAGS
  FUNCTIONS                GENDER                   GLOBALS                  
  HERE                     HOMES                    INTERIORS                
  LINKING                  LISTENING                LISTS                    
  LOOPING                  MASTER ROOM              MATCHING

(continued in help topics2)


topics2
  ME                       MONEY                    MUSHCODE
  NON-STANDARD ATTRIBUTES  PARENTS                  POWERS
  PUPPETS                  QUEUE                    REGEXPS
  REGISTERS                SEMAPHORES               SETTING-ATTRIBUTES       
  SPOOFING                 STACK                    STRINGS                  
  SUBSTITUTIONS            SUCCESS                  SWITCHES                 
  TYPES OF OBJECTS         USER-DEFINED COMMANDS    VERBS                    
  WARNINGS                 WILDCARDS                ZONE MASTER ROOMS        
  ZONE MASTERS             ZONES  

Type "help <topic name>" for help.


TR()

This function translates every character in <string> that exists in <find> to the character at an identical position in <replace>. Ranges of characters seperated by -'s are accepted. <find> and <replace> must be the same length after expansion of ranges. If a character exists more than once in <find>, only the last instance will be counted. The example below is the common ROT-13 algorithm for lower case strings, demonstrated with every letter explicitly listed, and with the equivalent but briefer character ranges. Literal -'s can be in <find> and <replace> if they are the first or last characters in the arguments.

Example:

> say tr(hello,abcdefghijklmnopqrstuvwxyz,nopqrstuvwxyzabcdefghijklm)
You say, "uryyb"
> say tr(uryyb, a-z, n-za-m)
You say, "hello"

See also:


TRACK_MONEY

Flag: TRACK_MONEY (players)

By setting the TRACK_MONEY flag, a player can determine which objects may be using their money. TRACK_MONEY reports all charges to a player and their objects except the queue deposit.

Example:

> @set me=TRACK_MONEY
> give Javelin=50
You give 50 pennies to Javelin.
GAME: Walker spent 50 pennies!
> @create foo
GAME: Walker spent 10 pennies!
Created: Object #345.
> @for foo=@search
GAME: foo(#345) spent 100 pennies!
(search results)
> <a whole buncha commands>
GAME: Object Walker(#123) lost a Penny to queue loss.

See also:


TRANSPARENT

Flag: TRANSPARENT (all types)

  If this flag is set on a room, it will display exits in "long" format.
  Instead of putting all the exits on one line under "Obvious exits:"
  it prints each exit on a line by itself, in the format:
  <Exit Name> leads to <Exit Destination>.
  Thus, you might have:
     Obvious exits:
     South leads to Joe's Room.
     East leads to City Park.
  instead of
     Obvious exits:
     South  East

Exits set OPAQUE are still shown in the short format, so you can mix the two.

(continued in help transparent2)


TRANSPARENT2

If this flag is set on an exit, when a player looks at the exit they will see the description and contents of the destination room following the exit's description. The exit list and succ/fail messages of the room will NOT be displayed. See also CLOUDY.

See also:


TRIM()

This function trims leading and trailing characters from a string. The character trimmed is normally a space; if a second argument is provided, however, that character will be used instead.

If no trim style is specified, characters are trimmed from both the left and right sides of the string. If the 'l' trim style is specified, characters are only trimmed from the left side. If the 'r' trim style is specified, characters are only trimmed from the right side. If you specify a trim style, you must also explicitly specify the character to trim, since the trim style must be the third argument to the function.

If the tiny_trim_fun config option is "yes", the character and style arguments are reversed. Use trimpenn() or trimtiny() if you want to specify a particular argument sequence no matter how the option is set.

Example:

> say [trim(   foo bar baz   eek  )]
You say, "foo bar baz   eek"
> say [trim(***BLAM***,*)]
You say, "BLAM"
> say [trim(-----> WOW---,-,r)]
You say, "-----> WOW"

TRUNC()

This function truncates floating point numbers to integers. It can also be used to return the leading numeric prefix of a string, or "0" if there isn't one. For example, "val(101Dalmations)" => 101.

See also:


TRUST2

Authorization is only denied if the enactor is neither a player nor TRUST, and the target is WIZARD, TRUST, or is a player.

The TRUST protection against @trigger may be overridden by setting the target object LINK_OK.

Objects which are WIZARD are not subject to any special criterion, although they are automatically considered to be TRUST. The normal criteria for object control still apply.

The TRUST flag protects against an object from being controlled by anything not owned by its owner. This prevents someone who controls a zone master from doing things like @forcing an TRUST object to @force its owner.


TYPE()

This function returns the type of an object - PLAYER, THING, EXIT, or ROOM. See 'types of objects' for more.


TYPES OF OBJECTS

Everything on a MUSH is an object in the MUSH database. There are four types of objects: players, rooms, exits, things. The first three are separated from each other by being set with a special FLAG: Player, Room, Exit. Any object that doesn't have one of these flags is a thing.

  Unique Characteristics
  PLAYERS
    Can own other objects and can be connected to. Can receive @mail.
    Can move around, speak/pose/emit, enter MUSH commands, enter global
    commands. You can have $-commands and ^-patterns on a player.
    Players can be carried, can carry other objects, and can follow.
  ROOMS
    Fixed container objects, linked together by exits. Cannot move.
    Rooms can @emit and enter MUSH commands, but they cannot execute
    global commands. You can have $-commands and ^-patterns on a room.

(continued in help TYPES2)


TYPES2
  EXITS
    Objects that link rooms and things together. Cannot move, but can
    be @teleport-ed to a new location. Exits can @emit and enter MUSH
    commands, but they cannot execute global commands. You can NOT 
    have $-commands and ^-patterns on exits. Exits can lead TO things,
    but they can only lead FROM rooms. 
  THINGS
    Can move around, speak/pose/emit, enter MUSH commands, enter global
    commands. Can send @mail as themselves. You can have $-commands and 
    ^-patterns on things. Things can carry, be carried, and can follow.

See also:


Generated at Mon Jul 2 00:35:04 2007