Guede Wanderer
Joined: 30 Nov 2003 Posts: 65 Location: United Kingdom
|
Posted: Sun Dec 14, 2003 11:22 pm
Changing properties of rooms en-masse!! |
Hi,
I've created a map of the MUD I play doing nothing fancy, now I want to change the colour of a number 'plain' rooms (i.e. rooms I've not already coloured - red for don't go here you'll die type rooms) automatically en-masse. For example I may want to change any room that's called "Rocky Ground" from the default colour to a dark grey.
I have a script (below) that works, BUT, it runs through every room in the map database across all the zones I have (I have quite a few - although with the above example 'Rocky Ground' grid rooms exist all over the place).
I would like it to just run in the current zone though. I've tried using the mapfilter with: #CALL %mapfilter(%concat("ZoneID = ",%zonenum())) for the zone I'm in and it correctly filters the map and gives you a correct %numrooms count, but when I run the alias, it would appear to change the first room it hits as expected, then it seems to 'break' the loop and set the value of %numrooms() to -1 (thus hitting the alias again does nothing). Any advice?
Oh yeah, ignore the hard coded roomname bit in it. I know it's bad practice - but it did mean I could eliminate that part of the script as a problem (i.e. not finding the right roomname)
ALIAS: cmap
#NOOP %maplocked( 0)
#SAY Changes to map permitted...
#LOOP %numrooms( ) {#IF (%roomname( %mapvnum( %i)) = "Rocky Ground") {
#IF (%roomcol( %mapvnum( %i)) = "536870911") {
#ECHO Changing Room Colour
#NOOP %roomcol( %mapvnum( %i), %1)
}
}}
#SAY Locking map...
#NOOP %maplocked( 1)
Thanks,
-G-
p.s. If there is an easier way to do what I'm trying to do I'm all ears, thanks for any help in advance. |
|