The following PernWorld specific functions have been documented. They work like the built in global functions explained in 'help functions'.

View the help files via '+help function <function>'.

knotsearch age dage
rage dolphin dragon
color race columnate


Use: knotsearch(<knot> [ / <search pattern>])

Returns a list of dbrefs, the characters on <knot> who match <search pattern>. If no search pattern is specified, they it returns all the characters on <knot>. The format of the search pattern is the same as is used in <knot> .who/<search pattern>.


say [knotsearch(pub/name:a*)]

You say "#1234 #1000 #9595 #333"

say [knotsearch(woc)]

You say "#555 #1191"

say [knotsearch(mic/admins)]

You say "#4321 #9999 #747"



Use: age(<secs>)

Returns the age for a character given by <secs>.

A common use is in descriptions:

A boy aged 6 Turns, 5 months, and 21 days old.

Note: v(birthsecs) returns the <secs> set by doing &birthsecs <name>=<secs>. For all code such as +sheet to work properly, the <secs> that give you age must be set this way. To find out what secs give what age, see +help time2.



Use: dage(<secs>)

Returns the age for a dragon given by <secs>.



Use: rage(<secs>)

Returns the age for a runner given by <secs>.



Use: dolphin(<character>)

Returns the dbref of the dolphin that <character> is paired with. <character> must be a dbref or referred to in the format *<character name>.



Use: dragon(<character>)

Returns the dbref of the dragon that <character> has Impressed. <character> must be a dbref or referred to in the format *<character name>.



Use: color(<dragon>)

Returns the color of <dragon>. <dragon> must be a dbref.



Use: race(<dbref>)

Returns the race of <dbref>.



Use: columnate(<list>,<columns>,<spacing>[,<prepend>[,<append[,<delim>]]])

Returns: List, broken up into columns, or #-1 for bad arguments.

<spacing> includes the separator between columns.
<prepend> is put on the left side of every line except the first.
<append> is put on the right side of every line, including the last (in the proper place), unless it is one line total.
<delim> is the delimiter for the list.



Use: elist(<list> [,<delimiter>])

Takes a list of words and returns them in the format of an English list — separated by commas with an and between the last two words. The default is for words separated by spaces but you can specify a different delimiter.


say [elist(one two three four)]

You say "one, two, three and four."

say [elist(apples|oranges|bananas|pears|apricots,|)]

You say "apples, oranges, bananas, pears and apricots."

say [elist(foobar)]

You say "foobar."

say [elist()]

You say ""


Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License