Jim Vance Beginner
Joined: 07 Dec 2006 Posts: 16
|
Posted: Tue Oct 14, 2008 3:26 am
Concatenating a long string into a shorter string |
I have created a script to work off my automapper that will change the zMUD path syntax to one that will work off a command on a MUD I play. The MUD command is called "do" and allows you to add a list of different commands to a single string; this includes movement. So here are a couple of simple examples:
Code: |
do 5n,6e,7sw,2w
do n,e,s,10w |
Right now, my script will create a string that is not "optimized" (if you want to call it that), and creates long strings such as
Code: |
do n,n,n,n,n,n,n,n,n |
rather than just
I would like to have it so that any directions that are the same are concatenated in much the same way that the original zMUD path was.
Any help would be greatly appreciated.
Thanks. |
|