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
Vitae
Enchanter


Joined: 17 Jun 2005
Posts: 673
Location: New York

PostPosted: Thu Jul 03, 2008 10:03 pm   

Deleting Room Descs Map Wide
 
I know that I saw this ages ago on here as a question, and sort of remember the answer being yes, but the script that was given didn't work correctly. Can't find that post and don't know if it was ever worked out to be correct:

Is there a script that will go thru the map and delete every single room desc in every zone?
Reply with quote
Dharkael
Enchanter


Joined: 05 Mar 2003
Posts: 593
Location: Canada

PostPosted: Fri Jul 04, 2008 1:26 pm   
 
Untested and probably seriously slow, but:
Code:
#call %mapfilter("")
#loop %numrooms {#call %roomdesc(%roomvnum(%i),"")}


EDIT:added call to mapfilter
_________________
-Dharkael-
"No matter how subtle the wizard, a knife between the shoulder blades will seriously cramp his style."

Last edited by Dharkael on Fri Jul 04, 2008 1:45 pm; edited 1 time in total
Reply with quote
Dharkael
Enchanter


Joined: 05 Mar 2003
Posts: 593
Location: Canada

PostPosted: Fri Jul 04, 2008 1:26 pm   
 
Something like this will also do the trick.

Code:
#VAR rs %comcreate( "ADODB.Recordset")
#var cs "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=Z:\Program Files\zMUD\Sample\Sample2.mdb"
#var sql "UPDATE ObjectTbl SET ObjectTbl.Desc = ''"
#CALL @rs.Open( @sql, @cs)


Naturally you'll have to change the Data Source to point to the Mapfile that you're trying to clear out.
_________________
-Dharkael-
"No matter how subtle the wizard, a knife between the shoulder blades will seriously cramp his style."
Reply with quote
Progonoi
Magician


Joined: 28 Jan 2007
Posts: 430

PostPosted: Fri Jul 04, 2008 2:43 pm   
 
Heh, I was almost going to reply last night but didn't because I wasn't completely sure. Had everything correct cept %roomvnum(%i) part within #call, though :)

Very nice bit of info to know regardless.


Prog
_________________
The Proud new owner of CMud.

--------------------------------
Intel Core i5-650 3,2GHz
4 DD3 RAM
GTX 460 768MB
Win 7 Home Premium 64x
--------------------------------
Reply with quote
Vitae
Enchanter


Joined: 17 Jun 2005
Posts: 673
Location: New York

PostPosted: Mon Jul 07, 2008 2:32 pm   
 
Dharkael wrote:
Code:
#VAR rs %comcreate( "ADODB.Recordset")
#var cs "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=Z:\Program Files\zMUD\Sample\Sample2.mdb"
#var sql "UPDATE ObjectTbl SET ObjectTbl.Desc = ''"
#CALL @rs.Open( @sql, @cs)

Perfect.
The 1st didn't work for some reason, but this one did :-)
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