GlowMUCK Logo

Home Documentation MUF Docs GlowMUF Downloads Bug Tracking Support Requests Feature Requests

lib-look

The idea behind this library is that the words provided here will allow you to replicate the in-server look in a MUF program, or only part of it, as you desire. This would let you create a custom-look program that retains all the features of the in-server look, while adding your own.

Unfortunately, as glow's look gained several features (support for things like @object, for example), the lib-look library languished. It hasn't been updated to support the new glow functionality. I plan to change this, but it will take several months. Wish me Luck. :)

safecallx d -- Takes a dbref which is assumed to be a command or @desc-like program that takes one parameter, usually a string, and returns no values. It ensures that none of the variables me, loc, trigger, or command are modified, and that no garbage is left behind on the stack.
unparsed -- s Takes a dbref, and returns either just its name, or the name plus flags, depending on the permissions of me @.
contents-filtera d -- d... i Takes the address of a 'filter' routine and a dbref, and returns a range on the stack of the filtered contents of the object. The first item to print is the bottom of the stack range. The filter should be d -- i; it takes a dbref and returns a true/false value to say whether or not the dbref should be put into the list.
get-contentsd -- d... i Takes a dbref, and returns the list of its contents, filtered through the standard filter which acts like the server's contents list: Dark rooms don't list anything unless the room or the objects are yours, dark objects not owned by you don't show, and you don't show. This list has the first element in the contents at the bottom of the stack.
long-displayd... i -- List the dbref stack range given, in the usual format for the server. All elements on separate lines, using unparse. The bottom element is printed first.
short-listd... i -- s Turns the range of dbrefs on the stack into a properly formatted string, with commas. 1 element is just returned, 2 elements returns '1 and 2', more elements return '1, 2, 3, and 4' or similar. Returns a null string if there are no elements. Again, the bottom element is first in the list.
short-displayd... i -- Calls short-list, then prints out "You see ." to the user. Prints "You see nothing." if nothing is on the list.
list-contentss d -- Calls get-contents followed by long-display to print out all of the contents of the given dbref. If there are any contents listed, then the string on the stack is printed out, for "Contents:" or the like. If the contents list is empty, the string is ignored.
str-descs -- Takes string 's', and prints it out as a description. Matches the '@###' and '@' values properly, and uses them with the present trigger value. If neither of these exist, or if they're invalid, the rest of the string is just printed out.
dbstr-descd s --Runs str-desc, using the value d on the stack as the effective trigger value.
db-descd -- Does a full description of the object, including name and succ/fail if the dbref given is a room, and contents. All programs run with the dbref given in 'trigger @'. Will return the proper values for dbref's #-1 and #-2 as well.
cmd-looks -- This is not actually a library function. This word is run if you @link an action to the library. It Performs a match function, then calls db-desc with the results. This will simulate the usual 'look' command.

lib-look / Revised 2004 September 23 14:39 (Thursday)
© 2004 Glowmuck Development Group

Valid XHTML 1.1! Valid CSS!