|
Takilara Apprentice
Joined: 31 Jan 2002 Posts: 129 Location: Norway
|
Posted: Wed May 29, 2002 2:39 pm
%mapvnum() |
i am making a script that will loop through all rooms in a zone, then do something for each room. and in v6.26 as i use this alias to loop with:
(alias generate)
#if %1 {generateroom %1} {#loop 0,%numrooms {generateroom %mapvnum( %i)}}
however i also want this script to work in v5.55 that doesnt have the %mapvnum() function, what to do ?
#if %1 {generateroom %1} {#loop 0,%numrooms {generateroom %roomnum( %i)}}
would work fine if noone has ever deleted any rooms.. but i cant do that assumption, is there a way to check the roomnum of the highest numbered room or something?
|
|
|
|
Takilara Apprentice
Joined: 31 Jan 2002 Posts: 129 Location: Norway
|
Posted: Wed May 29, 2002 3:24 pm |
well i solved it, not a good solve so if anyone comes up with a better solution, please do tell:
my solution:
#if %1 {generateroom %1} {
#var tttroomnum 0
#var ttroomnum 0
#while (@tttroomnum<%numrooms) {generateroom @ttroomnum}
}
then in generateroom i do this:
#var myroom %1
#add ttroomnum 1
#if %roomexit( @myroom) {generateroom2;#add tttroomnum 1}
lots of overhead if someone has deleted lots of rooms from the zone though, thinking bout doing a check on the zmud version, and dooing this if v 5.55 and the previous solution if 6.26+
|
|
|
|
|
|
|
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
|
|