A
/ \ _ Play Now Nemesis on
| | | | _______ _ _ _______ _______ _ _______
| |\ | | | ____| | \ / | | ____| / ____| | | / ____|
/-------/-------------------------------------------------------------------,
O= Home <=XX| About News Pics Adventurers Wizards Download Connect >
\-------\-------------------------------------------------------------------'
| | \ | | |____ | | | | | |____ ___ \ \ | | ___ \ \
| | \_| |_______| |_| |_| |_______| |_______/ |_| |_______/
\ /
V
Documentation Area
Document Path: /doc/lib/make_scroll
Simul efun: make_scroll - create a string looking like a nice scroll
Synopsis:
string make_scroll(string *lines, string align)
Description:
Returns the given string *lines as a nice scroll as with the command
'who'. The first argument is an array of strings, or a string where
the lines are separated by newlines ('\n'). If lines are too long
to fit on the scroll, newlines are inserted. The second argument
(optional) determines where the lines are placed on the scroll:
"center" (default), "left" or "right".
Return value:
returns a string containing an ASCII scroll
Example:
int i;
string *lines = ({ "In the village church you will see:" });
object *inv = all_inventory(find_object("room/church"));
foreach(i, inv) {
if (inv[i]->short())
lines += ({ "- "+capitalize(inv[i]->short())+"." });
}
write(make_scroll(lines, "left"));
Note:
The elements of the array of strings *lines must not contain newlines.
See also:
This page was generated in LPC
Imprint / Impressum