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.
1
Comments
@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.
Edit: Even worse, that deliberate antique way of creating a batch file?
the claims are stated - it's the world I've created
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
"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."
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...
Saved to desktop and opened with wordpad. Thanks.
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++.
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
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.
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)
the claims are stated - it's the world I've created
the claims are stated - it's the world I've created