|
canute Beginner
Joined: 19 Aug 2002 Posts: 11 Location: Canada
|
Posted: Mon Dec 09, 2002 2:42 am
renumbering script |
I saw a nifty renumbering script after doing a search, but (newbie that i am) i don't understand exactly how it works, and what i need to do to make it work, here is a copy of what i found, as posted by a person named Rehcra ----
#ALIAS renumrooms {
#var room 1
#var renum 30000
#t+ Scanning
#say Stage 1
#while (@room <30000) {
#while (%len( %roomname( @room))>0) {
#math renum {%roomnum( @room, @renum)+1}
#say @renum
#if (!%trigger( scanning)) {#abort 1}
}
#add room 1
}
#var room 30000
#var renum 1
#say Stage 2
#while (@room <60000) {
#while (%len( %roomname( @room))>0) {
#math renum {%roomnum( @room, @renum)+1}
#say @room
#if (!%trigger( scanning)) {#abort 1}
}
#add room 1
}
#unvar room
#unvar renum
#say Done!
}
(Just a note, in this example, the author uses vnum 1 as the starting room)
And its also mentioned to make a class called scanning (to use as a toggle)
So cool, i make the class scanning, i import the text as shown above, changing a few of the variables to meet my needs (although i'm leary on that part) and i turn on my mapper and set it to off, but what exactly do i do, do i manually walk through each room, and it saves what it sees to an area file, only with new vnums? or am i missing something, would someone be able to enlighten me as to what numbers i would need to change to change an area which starts at vnum 1000, and ends at vnum 1325, and move those vnums to vnums 81500 and end at 82000 (or specificially 81825)
Maybe i just need to read the help files more, but i tell ya, i'm a little lost :)) Some of these scripts, i look at, and just hafta say WOW, how the heck do they do that :) |
|
|
|
canute Beginner
Joined: 19 Aug 2002 Posts: 11 Location: Canada
|
Posted: Mon Dec 09, 2002 2:52 am |
#ALIAS renumrooms {
#var room 1000
#var renum 81500
#t+ Scanning
#say Stage 1
#while (@room <82000) {
#while (%len( %roomname( @room))>0) {
#math renum {%roomnum( @room, @renum)+1}
#say @renum
#if (!%trigger( scanning)) {#abort 1}
}
#add room 1000
}
#var room 81500
#var renum 1000
#say Stage 2
#while (@room <82000) {
#while (%len( %roomname( @room))>0) {
#math renum {%roomnum( @room, @renum)+1}
#say @room
#if (!%trigger( scanning)) {#abort 1}
}
#add room 1000
}
#unvar room
#unvar renum
#say Done!
}
Would this be the proper way of modifying it? and if so, what next :) |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Mon Dec 09, 2002 6:38 am |
I don't think you need anything this complicated. All you want to do is add 80500 to each room number, and you only have a few hundred rooms, so a simple loop should do the trick. I've used a separate variable for the calculation, but you could probably just do the calculation in the function itself.
#LOOP 1000,1325 {#MATH renum (%i + 80500);#NOOP %roomnum(%i, @renum);#UNVAR renum}
As for what to do, no you don't walk through the area. Just cut-and-paste to the command line, and it should do the whole thing itself. Be sure to have the map open, though.
LightBulb
Senior Member |
|
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|