<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html><head><title>Python: mud</title> </head><body bgcolor="#f0f0f8"> <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading"> <tr bgcolor="#7799ee"> <td valign=bottom> <br> <font color="#ffffff" face="helvetica, arial"> <br><big><big><strong>mud</strong></big></big></font></td ><td align=right valign=bottom ><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br>(built-in)</font></td></tr></table> <p><tt>The mud module, for all MUD misc mud utils.</tt></p> <p> <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> <tr bgcolor="#eeaa77"> <td colspan=3 valign=bottom> <br> <font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr> <tr><td bgcolor="#eeaa77"><tt> </tt></td><td> </td> <td width="100%"><dl><dt><a name="-erase_global"><strong>erase_global</strong></a>(...)</dt><dd><tt><a href="#-erase_global">erase_global</a>(name)<br> <br> Delete a value from the global variable table.</tt></dd></dl> <dl><dt><a name="-expand_text"><strong>expand_text</strong></a>(...)</dt><dd><tt><a href="#-expand_text">expand_text</a>(text, dict={}, newline=False)<br> <br> Take text with embedded Python statements. Statements can be embedded<br> between [ and ]. Expand them out and return the new text. Variables can<br> be added to the scripting environment by specifying their names and<br> values in an optional dictionary. Statements are expanded in the default<br> scripting environment.</tt></dd></dl> <dl><dt><a name="-extract"><strong>extract</strong></a>(...)</dt><dd><tt><a href="#-extract">extract</a>(thing)<br> <br> Extracts an object, character, or room from the game.</tt></dd></dl> <dl><dt><a name="-format_string"><strong>format_string</strong></a>(...)</dt><dd><tt><a href="#-format_string">format_string</a>(text, indent=True, width=80)<br> <br> Format a block of text to be of the specified width, possibly indenting<br> paragraphs.</tt></dd></dl> <dl><dt><a name="-generic_find"><strong>generic_find</strong></a>(...)</dt><dd><tt>Deprecated. Use mud.parse_args instead.</tt></dd></dl> <dl><dt><a name="-get_global"><strong>get_global</strong></a>(...)</dt><dd><tt><a href="#-get_global">get_global</a>(name)<br> <br> Return a non-persistent global variable, or None.</tt></dd></dl> <dl><dt><a name="-get_greeting"><strong>get_greeting</strong></a>(...)</dt><dd><tt><a href="#-get_greeting">get_greeting</a>()<br> <br> returns the mud's connection greeting.</tt></dd></dl> <dl><dt><a name="-get_hour"><strong>get_hour</strong></a>(...)</dt><dd><tt><a href="#-get_hour">get_hour</a>()<br> <br> Return the current in-game hour of day.</tt></dd></dl> <dl><dt><a name="-get_motd"><strong>get_motd</strong></a>(...)</dt><dd><tt><a href="#-get_motd">get_motd</a>()<br> <br> Returns the mud's message of the day.</tt></dd></dl> <dl><dt><a name="-get_time"><strong>get_time</strong></a>(...)</dt><dd><tt><a href="#-get_time">get_time</a>()<br> <br> Return time of day (morning, afternoon, evening, night).</tt></dd></dl> <dl><dt><a name="-is_afternoon"><strong>is_afternoon</strong></a>(...)</dt><dd><tt>True or False if it is afternoon.</tt></dd></dl> <dl><dt><a name="-is_evening"><strong>is_evening</strong></a>(...)</dt><dd><tt>True or False if it is evening.</tt></dd></dl> <dl><dt><a name="-is_morning"><strong>is_morning</strong></a>(...)</dt><dd><tt>True or False if it is morning.</tt></dd></dl> <dl><dt><a name="-is_night"><strong>is_night</strong></a>(...)</dt><dd><tt>True or False if it is night.</tt></dd></dl> <dl><dt><a name="-is_race"><strong>is_race</strong></a>(...)</dt><dd><tt><a href="#-is_race">is_race</a>(name)<br> <br> Returns True or False if the string is a valid race name.</tt></dd></dl> <dl><dt><a name="-ite"><strong>ite</strong></a>(...)</dt><dd><tt><a href="#-ite">ite</a>(logic_statement, if_statement, else_statement=None)<br> <br> A functional form of if/then/else.</tt></dd></dl> <dl><dt><a name="-keys_equal"><strong>keys_equal</strong></a>(...)</dt><dd><tt><a href="#-keys_equal">keys_equal</a>(key1, key2)<br> <br> Returns whether two world database keys are equal, relative to the<br> locale (if any) that the current script is running in.</tt></dd></dl> <dl><dt><a name="-list_races"><strong>list_races</strong></a>(...)</dt><dd><tt><a href="#-list_races">list_races</a>(player_only=False)<br> <br> Return a list of available races. If player_only is True, list only the<br> races that players have access to.</tt></dd></dl> <dl><dt><a name="-log_string"><strong>log_string</strong></a>(...)</dt><dd><tt><a href="#-log_string">log_string</a>(mssg)<br> Send a message to the mud's log.</tt></dd></dl> <dl><dt><a name="-message"><strong>message</strong></a>(...)</dt><dd><tt><a href="#-message">message</a>(ch, vict, obj, vobj, show_invis, range, mssg)<br> <br> Send a message via the mud messaging system using $ expansions. Range<br> can be 'to_room', 'to_char', 'to_vict', or 'to_world'.</tt></dd></dl> <dl><dt><a name="-parse_args"><strong>parse_args</strong></a>(...)</dt><dd><tt><a href="#-parse_args">parse_args</a>(ch, show_usage_errors, cmd, args, format)<br> <br> equivalent to parse_args written in C. See parse.h for information.</tt></dd></dl> <dl><dt><a name="-send"><strong>send</strong></a>(...)</dt><dd><tt><a href="#-send">send</a>(list, mssg, dict = None, newline = True)<br> <br> Sends a message to a list of characters. Messages can have scripts<br> embedded in them, using [ and ]. If so, a variable dictionary must be<br> provided. By default, 'ch' references each character being sent the<br> message, for embedded scripts.</tt></dd></dl> <dl><dt><a name="-set_global"><strong>set_global</strong></a>(...)</dt><dd><tt><a href="#-set_global">set_global</a>(name, val)<br> <br> Sets a non-persistent global variable. Val can be any type.</tt></dd></dl> </td></tr></table> </body></html>