| Conglomo's Zombii Page | |
|
Zombii.org
Docs/Guides
Misc. Scripts
Other Stuff
|
Path Tracker v1.0.4IntroductionThis Python script basically allows you to track the leader of the party and makes it easier for you to retrace the steps. It essentially parses the log file and then outputs a list of commands that you would put in your scripts. I will get into more details below on how you tell the script to correctly trace the paths. DownloadingYou can download the source from www.zombii.org. It has been downloaded 209 times. InstallingThis script was written for Python v2.4 which can be obtained from www.python.org. If you are using a Unix system you should make sure that you have Python installed in your PATH. This script should work on Windows but you're on your own there as to how you set that up. Usage$ ./dirs.py --help
usage: dirs.py [options]
options:
--version show program's version number and exit
-h, --help show this help message and exit
-m EXPR, --movement=EXPR
This is a regular expression that describes the format
for leader movement messages. This expression must
contain exactly one capturing group that will grab the
direction in which the leader moves. For example
'^Conglomo leaves (.*)\.$' basically puts everything
between 'leaves' and the '.' in that group.
-t EXPR, --target=EXPR
This is a regular expression that describes the format
for when you've set a new target (or are basically at
your destination). This expression must contain
exactly one capturing group that will grab the name of
the target. For example '^Conglomo pulls down her
pants and moons (.*)\.$' is something that happens
each time he attacks a new monster. You can use party
says here as well.
-x EXPR, --start=EXPR
This is a regular expression that describes a common
location where all directions will be based. This is
useful if you want to start fresh each time you hit
Central square. For example '^Central square ' is the
middle of ZombieCity and is somewhere that you'd
easily start your run macros from.
-f FILE, --logfile=FILE
This is the file that contains the log file which you
are going to parse. If you use TinyFugue this could be
the file you created with '/log' or the file created
using Zmud and '#log'.
-c MAX, --count=MAX This is the number of rooms you'd like to limit the
script from running per command. In general muds will
allow you to type '5 e' instead of typing 'e' 5 times.
A lot of times there's a limit of how many commands
you can type at once. The default value here is 20.
-s STRING, --separator=STRING
This is the separator used when you combine all of the
commands together to make a run. The default is the
Zmud style of ';'.
Example$ ./dirs.py -m '^Leper leaves (.*)\.$' -t '^You pull down your pants and moon (.*)\.$' -f ~/2007-01-02.log -x '^Central square ' -c20 -s ';'
11 n;12 nw;20 w;10 nw;woods;2 n;e;2 n;u;w;n;w;n > Math teacher s;e;s;e;d;2 s;w;3 s;10 se;20 e;12 se;11 s > START n;e;2 w;e;2 n;e;s;n;w;s;w;e;2 s > START 2 e;n > Akashia s;2 w > START 5 w;4 n;ne;d;4 s;w;n;6 d;e;2 n;ne;2 n;e;se;2 e;se;2 sw;w;n;w;s > Paladin commander n;e;s... Known IssuesOne issues that I will hopefully deal with later revolves around the 'special' commands that the leader does. There are some things that you will probably never be able to automate, but others such as opening doors or using keys might be an interesting thing to eventually add. Another big problem that I doubt one will ever be able to overcome is the mud's flood protection which stops sending text after you've received a large amount of data. It's just the way that things are and there is really no way for the script to guess which way the leader went when text stops coming. Finally if the leader has the ability to conceal their movement the script is going to puke. Again there is no good way to tell where you are going if you can't see the leader moving. |
| Updated Mon, 30 Jun 2008 15:06:26 -0500 | |