Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
nexela
Wizard


Joined: 15 Jan 2002
Posts: 1644
Location: USA

PostPosted: Fri Feb 13, 2004 2:39 am   

mapper script
 
Ok need a quick way to loop through all rooms on the current zone and set the vnums for them to a 4 digit number starting with a then adding 1 so the final vnums will be 1001 1002 1003 for all the rooms in the zone.
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5187

PostPosted: Fri Feb 13, 2004 4:01 am   
 
Off the top of my, might have a missing "(){} or other.

#CLASS RenumRooms
#VAR RenumCounter1 0 0
#VAR RenumCounter2 0 0
#VAR TempRenum {} {}
#STATUS {Renumbering @RenumCounter2 of %numrooms()} "" "RenumStat"
#T- RenumStat status
#ALIAS Renum {#IF (%numparam!=2) {#ECHO Usage--Renum zoneName/zoneNum baseVnum;#NOOP %-1} {RenumCounter1=-1;#IF (%isnumber(%1)) {#IF (%zonename(%1)) {RenumCounter1=%1} {#ECHO Zone number: %1 could not be found}} {#IF (%zonenum(%1)) {RenumCounter1=%zonenum(%1)} {#ECHO Zone name: %1 could not be found}};#IF (@RenumCounter1!=-1) {#ADDKEY TempRenum {filter} {%mapfilter()};#ADDKEY TempRenum {mode} {%roommode()};#ADDKEY TempRenum {locked} {%maplocked()};RenumCounter2=1;#T+ RenumStat status;#NOOP %roommode(1);#NOOP %maplocked(0);#NOOP %mapfilter(%concat("ZoneID = ",@RenumCounter1));RenumCounter1=%2;#WHILE (@RenumCounter2<=%numrooms) {#NOOP %roomnum(%mapvnum(@RenumCounter2),@RenumCounter1);#ADD RenumCounter1 1;#ADD RenumCounter2 1};#T- RenumStat status;#NOOP %roommode(@TempRenum.mode);#NOOP %maplocked(@TempRenum.locked);#NOOP %mapfilter(@TempRenum.filter)}}}
#CLASS 0
Reply with quote
nexela
Wizard


Joined: 15 Jan 2002
Posts: 1644
Location: USA

PostPosted: Fri Feb 13, 2004 5:53 am   
 
No syntax errors but
Soo Close yet so far Its only Changing one room vnum..... and the if zone doesn't exist isnt working
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
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

© 2009 Zugg Software. Hosted by Wolfpaw.net