|
TiberSeptim Beginner
Joined: 20 Jun 2006 Posts: 24
|
Posted: 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? |
|
|
|
Larkin Wizard
Joined: 25 Mar 2003 Posts: 1113 Location: USA
|
Posted: 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.
|
|
|
|
TiberSeptim Beginner
Joined: 20 Jun 2006 Posts: 24
|
Posted: 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? |
|
|
|
TiberSeptim Beginner
Joined: 20 Jun 2006 Posts: 24
|
Posted: 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. |
|
|
|
mr_kent Enchanter
Joined: 10 Oct 2000 Posts: 698
|
Posted: Wed Jun 21, 2006 6:49 am |
Use the quote character. By default it is a tilde(~).
|
|
|
|
Larkin Wizard
Joined: 25 Mar 2003 Posts: 1113 Location: USA
|
Posted: 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
|
|
|
|
edb6377 Magician
Joined: 29 Nov 2005 Posts: 482
|
Posted: Wed Jun 21, 2006 6:52 pm |
%mapquery ( "[Name] LIKE '%~[Field~]%'" )
?? |
|
_________________ Confucious say "Bugs in Programs need Hammer" |
|
|
|
|
|