123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127 |
- <!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
- <html><head><title>Python: cmd_manip</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>cmd_manip</strong></big></big></font></td
- ><td align=right valign=bottom
- ><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/Users/hollis/Desktop/nakedmud/lib/pymodules/cmd_manip.py">/Users/hollis/Desktop/nakedmud/lib/pymodules/cmd_manip.py</a></font></td></tr></table>
- <p><tt>cmd_manip.py<br>
- <br>
- a set of commands that NakedMud(tm) comes with that allows characters to<br>
- manipulate various things. These commands are mostly directed towards<br>
- manipulating objects (e.g. get, put, drop, etc...) but can also affect other<br>
- things like exits (e.g. open, close)</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>
- <a href="inform.html">inform</a><br>
- </td><td width="25%" valign=top><a href="movement.html">movement</a><br>
- <a href="mud.html">mud</a><br>
- </td><td width="25%" valign=top><a href="obj.html">obj</a><br>
- <a href="mudsys.html">mudsys</a><br>
- </td><td width="25%" valign=top><a href="utils.html">utils</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_manip"><strong>chk_can_manip</strong></a>(ch, cmd)</dt></dl>
- <dl><dt><a name="-cmd_close"><strong>cmd_close</strong></a>(ch, cmd, arg)</dt><dd><tt>Usage: close <direction | door | container><br>
- <br>
- Attempts to close the specified door, direction, or container.</tt></dd></dl>
- <dl><dt><a name="-cmd_drop"><strong>cmd_drop</strong></a>(ch, cmd, arg)</dt><dd><tt>Usage: drop <item><br>
- <br>
- Attempts to move an object from your inventory to the ground.</tt></dd></dl>
- <dl><dt><a name="-cmd_get"><strong>cmd_get</strong></a>(ch, cmd, arg)</dt><dd><tt>Usage: get [the] <item> [[from] <other item>]<br>
- <br>
- Attempts to move an object from the room to your inventory. If an<br>
- addition argument is supplied, the command assumes it is a container and<br>
- instead tries to move an object from the container to your inventory.</tt></dd></dl>
- <dl><dt><a name="-cmd_give"><strong>cmd_give</strong></a>(ch, cmd, arg)</dt><dd><tt>Usage: give <object> [to] <person><br>
- <br>
- Attempts to transfer an object from your inventory to the specified<br>
- person. You can give multiple objects at a time by using the all.<br>
- prefix. For example:<br>
- <br>
- > give all.cookie george<br>
- <br>
- Would give all of the cookies in your inventory to George. If you only<br>
- want to give him the raisin cookie, which also happens to be the third<br>
- cookie in your inventory, you can use a numeric prefix instead of<br>
- the all prefix. For example:<br>
- <br>
- > give 3.cookie george</tt></dd></dl>
- <dl><dt><a name="-cmd_lock"><strong>cmd_lock</strong></a>(ch, cmd, arg)</dt><dd><tt>Usage: lock <direction | door | container><br>
- <br>
- Attempts to lock a specified door, direction, or container.</tt></dd></dl>
- <dl><dt><a name="-cmd_open"><strong>cmd_open</strong></a>(ch, cmd, arg)</dt><dd><tt>Usage: open [the] <direction | door | container><br>
- <br>
- Attempts to open the speficied door, direction, or container.</tt></dd></dl>
- <dl><dt><a name="-cmd_put"><strong>cmd_put</strong></a>(ch, cmd, arg)</dt><dd><tt>Usage: put [the] <item> [in the] <container><br>
- <br>
- Attempts to move an object from your inventory into a specified<br>
- container. The container must be in the room, in your inventory, or<br>
- worn.</tt></dd></dl>
- <dl><dt><a name="-cmd_remove"><strong>cmd_remove</strong></a>(ch, cmd, arg)</dt><dd><tt>Usage: remove <item | all><br>
- <br>
- Attempts to remove an item you have equipped. If you would like to<br>
- remove everything you are wearing, you may instead specify 'all'<br>
- instead of a specific item. If you would like to remove all of a certain<br>
- type of object (for instance, rings) you can use an all. prefix. For<br>
- example:<br>
- <br>
- > remove all.ring<br>
- <br>
- This command will remove everything you are wearing with the 'ring'<br>
- keyword. If you would instead like to remove, say, the second thing you<br>
- are wearing with the 'ring' keyword, you can supply a numeric prefix.<br>
- For example:<br>
- <br>
- > remove 2.ring</tt></dd></dl>
- <dl><dt><a name="-cmd_unlock"><strong>cmd_unlock</strong></a>(ch, cmd, arg)</dt><dd><tt>Usage: unlock <door | direction | container><br>
- <br>
- Attempts to unlock the specified door, direction, or container.</tt></dd></dl>
- <dl><dt><a name="-cmd_wear"><strong>cmd_wear</strong></a>(ch, cmd, arg)</dt><dd><tt>Usage: wear <item> [where]<br>
- <br>
- Attempts to equip an item from your inventory. If you would like to<br>
- equip it to a non-default location, you can supply where on your body<br>
- you would like to wear it. For example, if you would like to equip a<br>
- torch, but in your offhand instead of your mainhand:<br>
- <br>
- > wear torch offhand<br>
- <br>
- If an item covers multiple locations on your body, you can specify where<br>
- all you would like to equip the item as a comma-separated list:<br>
- <br>
- > wear gloves left hand, right hand</tt></dd></dl>
- <dl><dt><a name="-do_drop"><strong>do_drop</strong></a>(ch, obj)</dt><dd><tt>handles object dropping</tt></dd></dl>
- <dl><dt><a name="-do_get"><strong>do_get</strong></a>(ch, obj, cont)</dt><dd><tt>transfers an item from the ground to the character</tt></dd></dl>
- <dl><dt><a name="-do_give"><strong>do_give</strong></a>(ch, recv, obj)</dt><dd><tt>does the handling of the give command</tt></dd></dl>
- <dl><dt><a name="-do_put"><strong>do_put</strong></a>(ch, obj, cont)</dt><dd><tt>handles the putting of objects</tt></dd></dl>
- <dl><dt><a name="-do_remove"><strong>do_remove</strong></a>(ch, obj)</dt><dd><tt>handles equipment removing</tt></dd></dl>
- <dl><dt><a name="-do_wear"><strong>do_wear</strong></a>(ch, obj, where)</dt><dd><tt>handles object wearing</tt></dd></dl>
- <dl><dt><a name="-try_get_from"><strong>try_get_from</strong></a>(ch, cont, arg)</dt><dd><tt>tries to get one item from inside another</tt></dd></dl>
- <dl><dt><a name="-try_manip_other_exit"><strong>try_manip_other_exit</strong></a>(room, ex, closed, locked)</dt><dd><tt>used by open, close, lock, and unlock. When an exit is manipulated on one<br>
- side, it is the case that we'll want to do an identical manipulation on<br>
- the other side. That's what we do here. Note: Can only do close OR lock<br>
- with one call to this function. Cannot handle both at the same time!</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> = 'unlock'</td></tr></table>
- </body></html>
|