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
TiberSeptim
Beginner


Joined: 20 Jun 2006
Posts: 24

PostPosted: Tue Jun 20, 2006 3:49 pm   

Searching/Using Spreadsheet View -- Coloring Many Rooms
 
So, the MUD I play lists its room names like so:

A Field Before the Mountains [Field]

I would like to parse the existing database, and color rooms based on the [Terrain] value after each room name.

I don't want to do this by hand because it's a pain in the ass.

I don't want to do it using the "Nearby" feature because my map is huge and the terrain types are distributed evenly across the world.

What I want to be able to do:

Search the entire database for rooms containing a particular terrain field, like 'Swampland' and select all of those rooms at once so I can choose their color.

Is there any way to to this simply?
Reply with quote
Larkin
Wizard


Joined: 25 Mar 2003
Posts: 1113
Location: USA

PostPosted: Tue Jun 20, 2006 6:45 pm   
 
Without going to all the trouble myself of writing a script to do this for you, my advice is to use the results from a %mapquery and pass the room number and desired color to %roomcol, using #noop to "eat" the return value of the %roomcol function.
Reply with quote
TiberSeptim
Beginner


Joined: 20 Jun 2006
Posts: 24

PostPosted: Wed Jun 21, 2006 4:22 am   
 
Larkin wrote:
Without going to all the trouble myself of writing a script to do this for you, my advice is to use the results from a %mapquery and pass the room number and desired color to %roomcol, using #noop to "eat" the return value of the %roomcol function.


How troubled would you be just writing the script yourself? Wink
Reply with quote
TiberSeptim
Beginner


Joined: 20 Jun 2006
Posts: 24

PostPosted: Wed Jun 21, 2006 5:11 am   
 
Okay, just one question.

#mapquery ( "[Name] LIKE '%Field%'" )

Gives me too many results, including areas that are actually [Mountain] but with names like "Mountains Near a Field" or whatever.

#mapquery ( "[Name] LIKE '%[Field]%'" ) doesn't work because [] are special characters. How can I specify them so they're recognized as the characters and not part of the query? \ was my best guess but that didn't work.
Reply with quote
mr_kent
Enchanter


Joined: 10 Oct 2000
Posts: 698

PostPosted: Wed Jun 21, 2006 6:49 am   
 
Use the quote character. By default it is a tilde(~).
Reply with quote
Larkin
Wizard


Joined: 25 Mar 2003
Posts: 1113
Location: USA

PostPosted: Wed Jun 21, 2006 11:22 am   
 
Use %mapquery instead of #mapquery, too. You can then store the results of %mapquery and loop through all the rooms to change their colors. And, sorry, but I will not write the whole script for you. :P
Reply with quote
edb6377
Magician


Joined: 29 Nov 2005
Posts: 482

PostPosted: Wed Jun 21, 2006 6:52 pm   
 
%mapquery ( "[Name] LIKE '%~[Field~]%'" )

??
_________________
Confucious say "Bugs in Programs need Hammer"
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