|
Hatalor Newbie
Joined: 20 Jul 2008 Posts: 1
|
Posted: Sun Jul 20, 2008 11:36 pm
Script to help with area building |
I have an alias that I would like to be able to run when checking out new areas to be installed on the mud I help admin.
I would like it to be able to do an "at look vnumrange".
Basically the script would do the look at the rooms for me without having to type in the room vnum 100 times for each zone.
So for example, the vnum range for a zone could be 18000. What I would like the script to do is the following command.
"at look 18000" and then increment and then do the next "at look" for each room in the zone until it got to 18100.
I think this is a simple alias but I do not know how to increment it.
Thanks |
|
|
|
wrym Magician
Joined: 06 Jul 2007 Posts: 349 Location: The big palace, My own lil world
|
Posted: Mon Jul 21, 2008 2:47 am |
I think you'll want to use a #loop to look at ever room in that range.
Code: |
#alias testrooms {#loop (%1*100),(%1*100+100) {#print {%i}}} |
might be what your looking for, testrooms 180, willl loop from 18000 to 180100, You can then look at each of those room using %i as the room number |
|
|
|
ralgith Sorcerer
Joined: 13 Jan 2006 Posts: 715
|
Posted: Mon Jul 21, 2008 4:20 pm |
I would recommend NOT using a pre-limited set like that... most MUDs these days use varying sizes to zones instead of an exact number of rooms. Say your zone was 438 rooms in size, starting with room 18000...
You'd want this instead:
Code: |
#ALIAS testrooms {#LOOP %eval(%1 * 100),%eval( (%1 * 100) + (%2 - 1)) {at %i look}} |
Then testrooms 180 438
Which will then at look at every room from 18000 to 18437 (your 438 rooms). You might want to add a #WAIIT 2000 after the at %i look... otherwise every single room will zip by VERY fast. That way you'd have 2 seconds at each room before it moves on to the next. |
|
|
|
|
|