<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: movement</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>movement</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/mud/nakedmud-mod/lib/pymodules/movement.py">/mud/nakedmud-mod/lib/pymodules/movement.py</a></font></td></tr></table>
<p><tt>movement.py<br>
<br>
all of the functions concerned with movement and position change</tt></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
<td colspan=3 valign=bottom> <br>
<font color="#fffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td>
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="hooks.html">hooks</a><br>
</td><td width="25%" valign=top><a href="inform.html">inform</a><br>
</td><td width="25%" valign=top><a href="mud.html">mud</a><br>
</td><td width="25%" valign=top><a href="mudsys.html">mudsys</a><br>
</td></tr></table></td></tr></table><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="-chk_can_move"><strong>chk_can_move</strong></a>(ch, cmd)</dt></dl>
<dl><dt><a name="-chk_land"><strong>chk_land</strong></a>(ch, cmd)</dt></dl>
<dl><dt><a name="-chk_sit"><strong>chk_sit</strong></a>(ch, cmd)</dt></dl>
<dl><dt><a name="-chk_sleep"><strong>chk_sleep</strong></a>(ch, cmd)</dt></dl>
<dl><dt><a name="-chk_stand"><strong>chk_stand</strong></a>(ch, cmd)</dt></dl>
<dl><dt><a name="-chk_wake"><strong>chk_wake</strong></a>(ch, cmd)</dt></dl>
<dl><dt><a name="-cmd_move"><strong>cmd_move</strong></a>(ch, cmd, arg)</dt><dd><tt>A basic movement command, relocating you to another room in the<br>
specified direction.</tt></dd></dl>
<dl><dt><a name="-cmd_sit"><strong>cmd_sit</strong></a>(ch, cmd, arg)</dt><dd><tt>If standing, attempts to sit on the ground.</tt></dd></dl>
<dl><dt><a name="-cmd_sleep"><strong>cmd_sleep</strong></a>(ch, cmd, arg)</dt><dd><tt>If awake, attempts to lay down and sleep.</tt></dd></dl>
<dl><dt><a name="-cmd_stand"><strong>cmd_stand</strong></a>(ch, cmd, arg)</dt><dd><tt>If sitting, attempts to stand. If flying, attempts to land.</tt></dd></dl>
<dl><dt><a name="-cmd_wake"><strong>cmd_wake</strong></a>(ch, cmd, arg)</dt><dd><tt>If sleep, attempts to wake up and sit.</tt></dd></dl>
<dl><dt><a name="-dir_index"><strong>dir_index</strong></a>(dir)</dt><dd><tt>returns the index of the direction name</tt></dd></dl>
<dl><dt><a name="-dir_opposite"><strong>dir_opposite</strong></a>(dir)</dt><dd><tt>returns the opposite direction of the specified one, or None if none.</tt></dd></dl>
<dl><dt><a name="-try_change_pos"><strong>try_change_pos</strong></a>(ch, pos)</dt><dd><tt>this function attempts to change the position of the person</tt></dd></dl>
<dl><dt><a name="-try_move"><strong>try_move</strong></a>(ch, dir, mssg<font color="#909090">=False</font>)</dt><dd><tt>Handles all moving of characters from one room to another, through<br>
commands. Attempts a move. If successful, returns the exit left<br>
through.</tt></dd></dl>
<dl><dt><a name="-try_move_mssg"><strong>try_move_mssg</strong></a>(ch, dir)</dt><dd><tt>Handles all moving of characters from one room to another, through<br>
commands. Attempts a move. If successful, returns the exit left through.<br>
Informs people of our moving</tt></dd></dl>
<dl><dt><a name="-try_use_furniture"><strong>try_use_furniture</strong></a>(ch, obj, pos)</dt><dd><tt>attempts to resituate a person on the piece of furniture</tt></dd></dl>
</td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#55aa55">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
<tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td>
<td width="100%"><strong>cmd</strong> = 'se'<br>
<strong>dir_abbr</strong> = ['n', 'e', 's', 'w', 'ne', 'nw', 'sw', 'se', 'u', 'd']<br>
<strong>dir_name</strong> = ['north', 'east', 'south', 'west', 'northeast', 'northwest', 'southwest', 'southeast', 'up', 'down']<br>
<strong>dir_opp</strong> = [2, 3, 0, 1, 6, 7, 4, 5, 9, 8]<br>
<strong>pos_act</strong> = ['collapse', 'sleep', 'sit', 'stand', 'fly']<br>
<strong>positions</strong> = ['unconscious', 'sleeping', 'sitting', 'standing', 'flying']</td></tr></table>
</body></html>