Skip to content

Rooms and room numbers.

MathiausMathiaus Pennsylvania
Hey, I am attempting to gather most (if not all) the available rooms that have room numbers to them and have their associated names along with them. If someone has a way to list the names and the numbers for them it would greatly be appreciated so I can convert them into javascript. Thank you.
image

Comments

  • edited May 2013
    Why don't you download the Imperian map XML?
  • Link?
    image
  • edited May 2013
    copy con get_imp_map.bat
    @for /f "tokens=1,2" %%u in ('date /t') do set d=%%u
    @set map_file_name=%d:~6,4%-%d:~3,2%-%d:~0,2%-ImperianMap.xml
    wget http://www.imperian.com/maps/map.xml --output-document=%map_file_name%

    If you plan to use this, you will (most likely) need to download wget. Which won't be a bad thing, mind you.
  • How have I never seen/heard of this before? =|
    image
  • edited May 2013
    Which one? The arcane art of batch files, wget or the .xml?

    Edit: Even worse, that deliberate antique way of creating a batch file?
  • Not batch. I hate batches. Bash seemed so much more intuitive when I played with Linux. I mean this beautiful repository of information that I've got a million ways to use. It'll reduce the work involved in converting all my IMTS room numbers to match vnums. Also might be able to find where he entrance to this other hidden area in Ayriath's place is. Is it updated constantly when changes come around, or could it be out of date in some areas?
    image
  • Updated every 24 hours. I've given you a link to it before.
    I am the righteous one... 
    the claims are stated - it's the world I've created 
  • Aedius also has a program that will convert from that file directly into an Imap file to use with the mudbot mapper so you can use it for searching purposes if you want. 

    There used to be a guide posted on Imperian's forums, but I think it was lost in the transition.  So here.  http://forums.aetolia.com/discussion/301/xml-imap#latest
  • Just do what I do.

    Lazily drag the map directly out of Fazlee's dropbox folder, break everything, and get yelled at. :(:(:(

    "On the battlefield I am a god. I love war. The steel, the smell, the corpses. I wish there were more. On the first day I drove the Northmen back alone at the ford. Alone! On the second I carried the bridge! Me! Yesterday I climbed the Heroes! I love war! I… I wish it wasn’t over."

  • MathiausMathiaus Pennsylvania
    Thank you for that xml file. Helped me a lot.
    image
  • MathiausMathiaus Pennsylvania

    If anyone could get that xml file and put it in notepad form, it'd be great please, thank you.

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

    image

  • Mathiaus said:

    If anyone could get that xml file and put it in notepad form, it'd be great please, thank you.

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

    It should just be a matter of right-clicking that very link and choosing an option similar to Save (Link/Target) As...
  • MathiausMathiaus Pennsylvania

    Saved to desktop and opened with wordpad. Thanks.

    image
  • MathiausMathiaus Pennsylvania
    edited July 2013

    I have set up all the rooms to be set to:

    <trig name="(roomname)">#echo (roomname) - (roomnumber)</trig>

    The question I have now is how do I set up a find/replace regex for rooms with dupilicate names so I can have it list the roomnumbers like so:

    <trig name="(roomname)">#echo (roomname) - (roomnumber, roomnumber, roomnumber, etc)</trig>

    I am using notepad++.

    image
  • MathiausMathiaus Pennsylvania
    If I can't even do it as a whole, would there be a way to do it in short spurts, like just having the room name such as

    Damp sewer tunnel - 5555
    Damp sewer tunnel - 6666
    Damp sewer tunnel - 7777

    and have a macro or regex in the replace do:

    Damp sewer tunnel - 5555, 6666, 7777
    image
  • MathiausMathiaus Pennsylvania
    So far, when I've come across numerous lines that have the same room name, I've done:

    Find: <trig name="(.+)">#echo (.+) - (.+)</trig>
    Replace: $3,

    and then:

    Find: \n\r
    Replace:

    to put them in order so I can just click and drag them to where they need to go.

    If someone can greatly improve on this, it would be helpful, thanks.
    image
  • #!/usr/bin/python
    roomnames = dict()
    with open(filename) as infile:
        for line in infile.readlines():
            roomtuple = line.split(" - ")
            if roomnames[
    roomtuple[0]]:
                roomnames[roomtuple[0]] = roomnames[roomtuple[0]] + ", " + roomtuple[1]
            else:
                roomnames[
    roomtuple[0]] = roomtuple[1]

    with open(outfilename) as outfile:
        for room,roomnums in
    roomnames.iteritems():
            outfile.write(room + " - " + roomnums)
    I am the righteous one... 
    the claims are stated - it's the world I've created 
  • MathiausMathiaus Pennsylvania
    @Lionas thank you.
    image
  • The args to the open would be ("infile.txt", "r") for the file being READ, and ("outfile", "w") for the file being WRITTEN
    I am the righteous one... 
    the claims are stated - it's the world I've created 
Sign In or Register to comment.