![](templates/Classic/images/spacer.gif) |
Vortigen Novice
Joined: 10 Dec 2000 Posts: 44 Location: United Kingdom
|
Posted: Sat Nov 10, 2001 4:45 pm
Setting Room ID to Room Name |
I need to have my room ID's the same as my Room names on my mapper.
I have already got a hell of a lot of rooms and I don't fancy going through each one and changing them by hand.
Is there some code I could use to do this change over?
Any help would be greatly appreciated.
Vortigen
"It's not just a riot of blots and blurs and disjointed jottings linked by bursts of speed...it only looks as if it is, damn it." |
|
|
![](templates/Classic/images/spacer.gif) |
Vortigen Novice
Joined: 10 Dec 2000 Posts: 44 Location: United Kingdom
|
Posted: Sat Nov 10, 2001 5:59 pm |
Its ok I have solved it using this script
#ALIAS roomiding
#VAR room 1
#LOOP X {%roomid( @room, %roomname(@room));#ADD room 1}
#SAY Finished!!!!
Where X is the number of rooms.
Vortigen
"It's not just a riot of blots and blurs and disjointed jottings linked by bursts of speed...it only looks as if it is, damn it." |
|
|
![](templates/Classic/images/spacer.gif) |
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Sat Nov 10, 2001 8:02 pm |
quote:
Its ok I have solved it using this script
#ALIAS roomiding
#VAR room 1
#LOOP X {%roomid( @room, %roomname(@room));#ADD room 1}
#SAY Finished!!!!
Where X is the number of rooms.
Vortigen
"It's not just a riot of blots and blurs and disjointed jottings linked by bursts of speed...it only looks as if it is, damn it."
It's not really important given the way you wrote it, but %i will start at 0 (which means it's looping one extra time). You might be getting an extra room, but I'm not familiar with the %room functions.
Anyways, you could eliminate the @room variable and change the loop to this:
#alias roomiding {
#loop 1,X {%roomid( %i, %roomname(%i))}
#say Finished!!!!
}
This will start with room #1 and end with Room #X, with no chance of messing with Room #0 or Room #X+1 (both of which should be invalid rooms?)
li'l shmoe of Dragon's Gate MUD |
|
|
![](templates/Classic/images/spacer.gif) |
einar Wanderer
Joined: 06 Nov 2000 Posts: 80 Location: USA
|
Posted: Sun Nov 11, 2001 5:07 am |
I know I sound like the newbie I am, but...
Do we have to change X to be the number of rooms in the zone?
And do I have to run that alias on every room or once in each zone?
Master, seventh circle of idling |
|
|
![](templates/Classic/images/spacer.gif) |
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Sun Nov 11, 2001 7:46 am |
quote:
I know I sound like the newbie I am, but...
Do we have to change X to be the number of rooms in the zone?
And do I have to run that alias on every room or once in each zone?
Master, seventh circle of idling
For the above question, just replace X with %numrooms() and then run the alias once in each zone.
However, there IS a way to do it so that you need only run the alias just once per map. You need to check out the %numrooms(), %numzones(), %zonename(), and %zonenum() functions. It SHOULD work along the same lines as the roomiding aliases shown earlier.
li'l shmoe of Dragon's Gate MUD |
|
|
![](templates/Classic/images/spacer.gif) |
|
|