MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame^] | 1 | COMMANDS: |
| 2 | xcall xddes xforall xids xman xscan xtrace |
| 3 | xcallouts xdes xgoto xinherit xmore xset xtrans |
| 4 | xclean xdlook xgrep xlag xmove xsh xuclone |
| 5 | xclone xdo xhbeats xload xmsg xsort xupdate |
| 6 | xdbg xdupdate xhead xlook xmtp xtail xwc |
| 7 | xdclean xeval xhelp xlpc xprops xtool xwho |
| 8 | |
| 9 | |
| 10 | Give a "?" as single argument to get the command usage or do "xman <command>" |
| 11 | for more information about a command. |
| 12 | |
| 13 | QUICKTYPER: |
| 14 | The MGtool contains a full quicktyping tool. It provides the following |
| 15 | features: |
| 16 | |
| 17 | - multiple command execution (see the xdo and xforall command) |
| 18 | - script files (see the xsh command) |
| 19 | - command pipelining |
| 20 | - command history |
| 21 | |
| 22 | The command history stores (nearly) each command you type in and lets you |
| 23 | re-execute it. |
| 24 | |
| 25 | - %! show the command history |
| 26 | - %% re-execute the last command |
| 27 | - ^old^new re-execute the last command but replace all occurencies of |
| 28 | the "old" string of the command by "new". |
| 29 | - %num re-execute the command at position num of the history |
| 30 | - %str re-execute the last command beginning with the string "str" |
| 31 | |
| 32 | |
| 33 | COMMAND ARGUMENTS: |
| 34 | Most commands need filenames or objects as argument. The way objects are |
| 35 | specified will be descriped in the following. |
| 36 | |
| 37 | - an object can be accessed directly by its unique object name |
| 38 | - a player can be accessed by its player name |
| 39 | - a living can be accessed by its living name |
| 40 | - a object inside the current room by its id |
| 41 | - a object inside the current room by its position |
| 42 | |
| 43 | If the object can not be accessed by the above mentioned ways you can also |
| 44 | use the following object modifiers: |
| 45 | |
| 46 | ^obj stands for the environment of an object |
| 47 | obj1.obj2 stands for an object obj2 inside another object obj1 |
| 48 | |
| 49 | These modifiers can be concatenated together where the "^" has a higher |
| 50 | priority than the ".". This allows you to access an object from another know |
| 51 | object. |
| 52 | |
| 53 | Now some examples which demonstrates how to use this accessing mechanism. |
| 54 | Therefore we use the command "xlook" which prints the short and long |
| 55 | description and also the content of an object: |
| 56 | |
| 57 | 1. xlook deepthought |
| 58 | Look at Deepthought. |
| 59 | 2. xlook ^deepthought |
| 60 | Look at the room Deepthought is in. |
| 61 | 3. xlook deepthought.bag |
| 62 | Look at the bag of Deepthought. |
| 63 | 4. xlook deepthought.bag.bag |
| 64 | Look at the bag inside Deeps bag. |
| 65 | 4. xlook deepthought.5 |
| 66 | Look at the fifth object of Deeps inventory. |
| 67 | 5. xlook /std/thing#123 |
| 68 | Look at the object with the unique object name "/std/thing#123". |
| 69 | 6. xlook 1 |
| 70 | Look at the first object in the current room. |
| 71 | 7. xlook 1.2.3 |
| 72 | Look at the third of the second of the first object in the room. |
| 73 | |
| 74 | If the name of an object contains an object modifier as a character then it |
| 75 | can be escaped by a "\". A "\" is escaped by itself. This is because file |
| 76 | names often contain the "." for file extensions. So if you want to access |
| 77 | directly an object with for example such a name "file.old.bulb" you have to |
| 78 | write "file\.old\.blub". |
| 79 | |
| 80 | If a command needs a file as argument you can use the filename of an object |
| 81 | for it by placing an "@" infront of the object. This way you can clone |
| 82 | an object by using another clone: |
| 83 | |
| 84 | xclone @harry.bag.candles |
| 85 | Clone some candles of the kind Harry is carrying in his bag. |
| 86 | |
| 87 | |
| 88 | ARGUMENT VARIABLES: |
| 89 | Whenever an object or a filename is needed, we can use variables. |
| 90 | A variable allways starts with a "$" followed by the name which |
| 91 | identificates it. Two variable names are reserved for special purpose. |
| 92 | The first, "$me" is always set to the one who owns the Xtool. The other, |
| 93 | "$here" represents the current room. |
| 94 | |
| 95 | (Instead of "$me" and "$here" you can also use "$m" and "$h".) |
| 96 | |
| 97 | If a command needs a file as argument and gets a variable it will be |
| 98 | automatically converted into the source file of the object. |
| 99 | (This is done by taking the unique object identifier and replacing the |
| 100 | "#..." by a ".c".) |
| 101 | |