Skip to content

One CMUD utility and one IMap utility shamelessly stolen from a former Imperian player

edited August 2013 in Scripting
All credit for these goes to @Lanira on Aetolia forums. I'm just throwing them here because I know they've helped me out in the past.

First is a way to automatically back up your settings file and the like in case for whatever reason  CMUD suddenly decides they're not worthy of living. 

Original source is here: 

I figured people might find this useful still. On a related note, is there still a way to use [code] tags on the new forums?

Due to issues with zmud/cmud, it's always a good idea to backup your .mud files. Here's a .bat file I wrote to launch zmud with which backups all your .mud files to a specified folder organized by date and time. Simply change 'zbak' to where you want your backups to be saved and 'zdir' to where you have zmud installed. To save this, open up notepad, copy/paste this code, and save with a .bat extension. After that you can use it to launch zmud.


Zmud:
@echo off
:: variables
set backupcmd=xcopy /s /c /d /h /i /r /y
set hour=%time:~0,2%
if "%hour:~0,1%"==" " set hour=0%time:~1,1%
set folder=%date:~10,4%_%date:~4,2%_%date:~7,2%_%hour%_%time:~3,2%
set zbak=C:\ZBAK
set zdir=C:\Program Files\zMUD

:: backup
echo ### Backing up Zmud mud files...
%backupcmd% "%zdir%\*.mud" "%zbak%\%folder%\"
echo Backup Complete! Starting zmud!
start "" "%zdir%\Zmud.exe"

This one is for CMUD, with an extra variable that points to your package directory. 'cpaks' should be set to where cmud stores your session folders, either in 'program files\cmud' or 'documents\my games\cmud'. Here's the script:

@echo off
:: variables
set backupcmd=xcopy /s /c /d /h /i /r /y
set hour=%time:~0,2%
if "%hour:~0,1%"==" " set hour=0%time:~1,1%
set folder=%date:~10,4%_%date:~4,2%_%date:~7,2%_%hour%_%time:~3,2%
set cbak=C:\CBAK
set cdir=C:\Program Files\CMUD
set cpaks=C:\Program Files\CMUD

:: backup
echo ### Backing up Cmud mud files...
%backupcmd% "%cpaks%\*.pkg" "%cbak%\%folder%\"
echo Backup Complete! Starting cmud!
start "" "%cdir%\cMUD.exe"

You can apply this to anything you want; It's very useful.

Comments

  • edited August 2013
    Next one is to create an easy IMap file when starting from scratch.

    Note this won't convert all your hidden exits and all that stuff.

    Original source once again @lanira from Aetolia.  

    This is a little project I threw together to parse XML map files using the MMP specification. The parser takes these files and converts them into an IMAP file usable by the aetolian mudbot mapper. Currently it has no support for special exits or any features outside of the MMP specification. It also has no way of knowing if an environment is underwater or requires swimming. This can easily be changed in the first section of the IMAP file. The generated IMap file does not contain any special movement messages either, so any desired will need to be manually added. Feel free to ask questions or provide me with feedback.

    List of a few features:
    Keeps vnums as is.
    Uses coordinates to make well-formated maps.
    Outputs any problem exit links.

    Instructions:
    Acquire an XML map file. IRE publishes theirs here: http://www.aetolia.com/maps/map.xml
    Stick XML file in parser directory
    Run parser, enter filename
    Use IMap
    ???
    Profit

    Anyone can feel free to upload their own parsed map. I'm just running low on attachment space and so I chose not to.

  • http://www.imperian.com/maps/map.xml

    Corrected link for Imperian Map for "Right Click/Save As" purposes.
    image
  • Oh whups, I thought I had changed that. Sorry!
Sign In or Register to comment.